[WK2] Rename SetFrameInViewSourceMode to SetMainFrameInViewSourceMode
https://bugs.webkit.org/show_bug.cgi?id=105885

Reviewed by Martin Robinson.

This way we don't depend on a WebFrameProxy and
webkit_web_view_set_view_mode() works even if the main frame proxy
hasn't been created yet.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_set_view_mode): Call
WebPageProxy::setMainFrameInViewSourceMode() directly.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy): Remove
setInViewSourceMode().
* UIProcess/WebFrameProxy.h:
(WebFrameProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMainFrameInViewSourceMode):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setMainFrameInViewSourceMode):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update Mac test expectation per bug 105932.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sandboxed iframes should not be granted notification permission of the parent frame unless allow-same-origin is specified
https://bugs.webkit.org/show_bug.cgi?id=36732

Reviewed by Adam Barth.

The behavior was fixed in wkbug.com/79704, but there aren't currently
any tests ensuring that it doesn't regress for sandboxed frames. This
patch adds one.

* fast/notifications/notifications-sandbox-permission-expected.txt: Added.
* fast/notifications/notifications-sandbox-permission.html: Added.
* fast/notifications/resources/notifications-iframe.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
sandboxed iframe attribute parsing layout tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=104848

Reviewed by Adam Barth.

This patch breaks the monolithic sandboxed-iframe-attribute-parsing.html
test into separate tests for each case. The flaky failures were due to
one of the 14 frames loading out of order, which shifted console message
positions around. Breaking them into separate tests should both speed up
the tests, as more can run in parallel, and solve the flake.

* fast/frames/resources/sandboxed-iframe-attribute-test.js: Added.
(fail):
(setStatus):
(allowedCallFromSandbox):
(disallowedCallFromSandbox):
(disallowedFormSubmitted):
(window.onload):
* fast/frames/sandboxed-iframe-attribute-parsing-01-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-01.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-02-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-02.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-03-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-03.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-04-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-04.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-05-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-05.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-06.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-07.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-08.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-09.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-10.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-11.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-12.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-13.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-14.html: Added.
* fast/frames/sandboxed-iframe-attribute-parsing-expected.txt: Removed.
* fast/frames/sandboxed-iframe-attribute-parsing.html: Removed.
* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-arm/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't include a header that has been removed in r138413.

* WebProcess/win/WebProcessWin.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another Windows port build fix attempt. Don't try to build WTF files in WebCore.

Rubber-stamped by Sam Weinig.

* WebCore.vcproj/WebCore.vcproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF.gypi lists Platform.h twice
https://bugs.webkit.org/show_bug.cgi?id=105731

Reviewed by Tony Chang.

Once ought to be enough for everybody.

* WTF.gypi:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Use top level field for gesture event source
https://bugs.webkit.org/show_bug.cgi?id=105664

Reviewed by Adam Barth.

Previously, only GestureFlingStart subtypes of WebGestureEvent
had a deviceSource flag. A previous CL added a top-level
deviceSource field for all WebGestureEvent. Now that this field
is populated in Chromium, use it as necessary in the Chromium
WebKit layer.

No new tests: covered by existing tests.

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
* tests/WebCompositorInputHandlerImplTest.cpp:
(WebKit::TEST_F):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression (r132935): WebKit breaks between <nobr> tags
https://bugs.webkit.org/show_bug.cgi?id=11857

Reviewed by David Hyatt.

Source/WebCore:

The fix for bug 29648 in http://trac.webkit.org/changeset/132935 was too broad - it caused us
to find linebreaks in autowrap containers between non-wrapping elements where there was no
whitespace to allow the break. This reverts the code change in r132935 and ensures we attempt
to move below floats when inside an autowrap container but leaves the treatment of non-wrapping
elements in an autowrap container unaffected.

Test: fast/inline/break-between-nobr.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/inline/break-between-nobr-expected.html: Added.
* fast/inline/break-between-nobr.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement WebIDL-style string constants in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=105058

Reviewed by Kentaro Hara.

Source/WebCore:

See Deprecation Notes for more detail:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DeprecationNotes

PannerNode, BiquadFilterNode, OscillatorNode constants must support WebIDL-style string constants.
Legacy support in the setters for the old integer values should be supported.

This patch handles the changes for OscillatorNode.

* GNUmakefile.list.am:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::type):
(WebCore):
(WebCore::OscillatorNode::setType):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSOscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
(WebCore):
(WebCore::JSOscillatorNode::setType):
* bindings/v8/custom/V8OscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
(WebCore):
(WebCore::V8OscillatorNode::typeAccessorSetter):

LayoutTests:

* webaudio/oscillator-basic-expected.txt:
* webaudio/oscillator-basic.html:
* webaudio/resources/audio-testing.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Transitions and animations do not apply to CSS ::before and ::after pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=92591

Reviewed by Eric Seidel.

.:

Expose Element::pseudoElement for Internals.

* Source/autotools/symbols.filter:

Source/WebCore:

The new DOM based :before and :after pseudo elements support animations
and transitions already, but I had disabled support so we could turn them
on in a separate step. This patch just removes the checks and adds tests.

This also adds two methods to internals to allow pausing animations and
transitions on pseudo elements at predictable locations so the tests
are not flaky.

Tests: fast/css-generated-content/pseudo-animation.html
       fast/css-generated-content/pseudo-transition.html

* WebCore.exp.in:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

Add tests that check if animations and transitions play for pseudo
:before and :after pseudo elements.

* fast/css-generated-content/pseudo-animation-expected.txt: Added.
* fast/css-generated-content/pseudo-animation.html: Added.
* fast/css-generated-content/pseudo-transition-expected.txt: Added.
* fast/css-generated-content/pseudo-transition.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r138627.
http://trac.webkit.org/changeset/138627
https://bugs.webkit.org/show_bug.cgi?id=105935

This patch doesn't fix Windows port build failure (Requested
by rniwa on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-02

* WebCore.vcproj/WebCore.vcproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove old-run-webkit-tests support from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=105619

Reviewed by Eric Seidel.

This patch removes support for webkitpy parsing the
old-run-webkit-tests results format. There doesn't seem to be any
reason to keep this code around anymore now that most bots have
switched to new-run-webkit-tests.

* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(Builder.fetch_layout_test_results):
* Scripts/webkitpy/common/net/layouttestresults.py:
(path_for_layout_test):
(LayoutTestResults.results_from_string):
(LayoutTestResults):
* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
(LayoutTestResultsTest.test_results_from_string):
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(test_flaky_test_failure):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(LayoutTestResultsReaderTest.test_missing_layout_test_results):
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._test_patch):
* Scripts/webkitpy/tool/commands/queuestest.py:
(QueuesTest.assert_queue_outputs):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r138464): Safari hangs when opening Privacy preferences
https://bugs.webkit.org/show_bug.cgi?id=105933

Reviewed by Sam Weinig.

Quick and dirty fix - added a special case for main thread. But I'm not sure if
dispatch_sync on main queue is really the best idiom here.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginInfoFromCarbonResources):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another Windows port build fix attempt. Try not exporting this symbol from JSC
since it's also compiled in WebCore.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
View source mode is missing the processing instruction line.
https://bugs.webkit.org/show_bug.cgi?id=15961

Reviewed by Adam Barth.

Add a test for XML documents shown in viewsource mode. The bug
with the missing processing instruction line was fixed long
ago with the HTML5 parser rewrite so this just adds a test.

* fast/frames/viewsource-xml-expected.txt: Added.
* fast/frames/viewsource-xml.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Yet another Windows build fix attempt. Try exporting more symbols.

* win/WebKit2.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up the loadXXXStyle() idiom in StyleResolver.
https://bugs.webkit.org/show_bug.cgi?id=105903

Reviewed by Darin Adler.

This patch refactors 'loadViewSourceStyle' in order to avoid the
necessity of each call site checking whether the relevant data has
been loaded. The new 'viewSourceStyle' will load the data if required,
and return a pointer which can be used directly.

No new tests, as this refactoring should exhibit no visible change in
behavior.

* css/StyleResolver.cpp:
(WebCore::viewSourceStyle):
    Lazily populate the static 'defaultViewSourceStyle' with data. I
    haven't removed the outer variable, as it's used directly in
    StyleResolver::reportMemoryUsage.
(WebCore::StyleResolver::matchUARules):
(WebCore::StyleResolver::collectFeatures):
    Use the new hotness rather than the old, lame method.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize TransformationMatrix::multiply() for x86_64
https://bugs.webkit.org/show_bug.cgi?id=105719

Reviewed by Sam Weinig.

On x86_64, we have access to 16 XMM registers. This can hold 32 double values.
We can use that in two ways to optimize matrix multiplications:
-Keep the source matrix completely in registers. Write the result directly in
 the source matrix's memory. This avoids the memcpy at the end of the multiplication
 and various memory operations.
-Use SIMD with SSE to perform 2 operations at a time.

The parameter from the second matrix are loaded one by one in XMM registers.
Loading them with SSE then shuffling the values perform worse than loading
one by one.

This is only enabled on 64bits as x86 only has access to 8 XMM registers and
the function should be written differently.

On a i5, TransformationMatrix::multiply() perform about 3 times faster with the change.

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::multiply):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix): Fix an incorrect comment. Unify the comment with the cpp file.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG inliner should not use the callee's bytecode variable for resolving references to the callee in inlined code
https://bugs.webkit.org/show_bug.cgi?id=105938

Reviewed by Mark Hahnenberg.
        
This simplifies a bunch of code for referring to the callee. It also ought to simplify how we do
closure call inlining: for inlined closure call frames we will simply require that the callee is
already stashed on the stack in the Callee slot in the inline call frame header.

* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(JSC::DFG::ByteCodeParser::getDirect):
(JSC::DFG::ByteCodeParser::get):
(InlineStackEntry):
(JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138641 268f45cc-cd09-0410-ab3c-d52691b4dbfc