[Chromium] Allow asyncronous response of pointer lock requests in layout tests.
https://bugs.webkit.org/show_bug.cgi?id=95628

Reviewed by James Robinson.

Tools:

Future tests need the ability to respond asynchronously that
pointer lock requests have been accepted or rejected. This patch
adds the following:
    testRunner.setPointerLockWillRespondAsynchronously();
    testRunner.didAcquirePointerLock();
    testRunner.didNotAcquirePointerLock();

Tested in existing test:
    pointerlockchange-pointerlockerror-events.html

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::didAcquirePointerLock):
(DRTTestRunner::didNotAcquirePointerLock):
(DRTTestRunner::setPointerLockWillRespondAsynchronously):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::requestPointerLock):
(WebViewHost::didAcquirePointerLock):
(WebViewHost::didNotAcquirePointerLock):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):
(WebViewHost::setPointerLockWillRespondAsynchronously):

LayoutTests:

Add testing for testRunner.setPointerLockWillRespondAsynchronously().

* pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt:
* pointer-lock/pointerlockchange-pointerlockerror-events.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTion failure when SVG element is removed from document and readded
https://bugs.webkit.org/show_bug.cgi?id=95517
<rdar://problem/12175583>

Reviewed by Brady Eidson.

Previously, SVG animations would cease to animate when their parent
<svg> element was removed and re-added to the document.

Instead, to match Firefox and Opera, we should continue the animation
with the same beginTime (i.e. the animation continues as if it had never
been removed from the document).

Test: svg/animations/reinserting-svg-into-document.html

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::insertedInto): Don't call begin() on an already-started SMILTimeContainer().
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::isStarted): Added.
* svg/animation/SMILTimeContainer.h: Add isStarted().
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedInto): Always reschedule SVGSMILElements with
their parent SMILTimeContainer when they are inserted into the document, otherwise
they are lost (and never again update) when their subtree is removed and then
readded to the document.

Add a test that ensures that removing an SVG element from the document
and readding it continues SMIL animations.

* svg/animations/reinserting-svg-into-document.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Print API missing documentation when generating gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=95703

Patch by Martin Robinson <mrobinson@igalia.com> on 2012-09-04
Reviewed by Carlos Garcia Campos.

Print out API missing documentation when generating gtkdoc. This makes it
easier to fix documentation errors.

* gtk/generate-gtkdoc:
(print_missing_api): Added.
(generate_doc): Inline the rebase step, since it now reports an error
when you try to rebase without generating documentation first.
* gtk/gtkdoc.py:
(GTKDoc.rebase_installed_docs): Raise an error when rebasing without
generating documentation first to enable a small cleanup at the caller.
(GTKDoc.api_missing_documentation): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Do not allow infinite pending frames in CCFrameRateController
https://bugs.webkit.org/show_bug.cgi?id=94254

Patch by Brian Anderson <brianderson@chromium.org> on 2012-09-04
Reviewed by James Robinson.

Removes support for infinite pending frames in CCFrameRateController
if swap acks are available.

Functionality covered by existing tests.

* platform/graphics/chromium/cc/CCFrameRateController.cpp:
(WebCore::CCFrameRateController::CCFrameRateController):
(WebCore::CCFrameRateController::setMaxFramesPending):
(WebCore::CCFrameRateController::setSwapBuffersCompleteSupported):
(WebCore):
(WebCore::CCFrameRateController::onTimerTick):
(WebCore::CCFrameRateController::didBeginFrame):
(WebCore::CCFrameRateController::didFinishFrame):
* platform/graphics/chromium/cc/CCFrameRateController.h:
(CCFrameRateController):
* platform/graphics/chromium/cc/CCScheduler.cpp:
(WebCore::CCScheduler::setSwapBuffersCompleteSupported):
(WebCore):
* platform/graphics/chromium/cc/CCScheduler.h:
(CCScheduler):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::initializeRendererOnImplThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Elide test names when running new-run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=95626

Reviewed by Dirk Pranke.

When the test name exceeds the number of terminal columns, it leaves
text on the screen. Avoid this by eliding the test name when running
tests. This is similar to what ninja does when compiling.

* Scripts/webkitpy/layout_tests/views/metered_stream.py:
(MeteredStream):
(MeteredStream.number_of_columns): Helper method to get number of
terminal columns. Won't work on Win32 python, but meh.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer._test_status_line): New method for eliding the text. Doesn't use \u2026
because stderr appears to be ascii only.
(Printer.print_started_test): Route through _test_status_line.
(Printer.print_finished_test): Route through _test_status_line.
(Printer._print_test_trace): Route through _test_status_line.
(Printer._print_baseline): Route through _test_status_line.
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(test_test_status_line): Test for _test_status_line.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove uses of ClassInfo from SpeculativeJIT::compileObjectOrOtherLogicalNot
https://bugs.webkit.org/show_bug.cgi?id=95510

Reviewed by Oliver Hunt.

More refactoring to get rid of ClassInfo checks in the DFG.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Register scrolling layers with ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=78862

Patch by Sami Kyostila <skyostil@google.com> on 2012-09-04
Reviewed by James Robinson.

In order to allow scrollable child layers to be scrolled off the main
thread, register them with the ScrollingCoordinator. These layers are
also removed from the non-fast scrollable region.

Whenever the scroll offset or other scroll geometry related attribute of
a compositor scrolled layer changes, the ScrollingCoordinator is
informed to allow it to update its internal representation of the
scrollable layer.

No tests because the ScrollingCoordinator is currently not testable.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion): Composited scrolling layers
can be scrolled off the main thread.
(WebCore):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
Callback to ScrollingCoordinator about changes the composited scrolling layers.
* page/scrolling/ScrollingCoordinator.h:
(WebCore):
(ScrollingCoordinator):
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::usesCompositedScrolling):
* rendering/RenderLayer.cpp:
(WebCore):
(WebCore::RenderLayer::usesCompositedScrolling):
* rendering/RenderLayer.h:
(RenderLayer):
(WebCore::RenderLayer::usesCompositedScrolling):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::updateScrollingLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scrollingLayerDidChange):
(WebCore):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Automatic features should work in sandboxed iframes if "allow-scripts" flag is set
https://bugs.webkit.org/show_bug.cgi?id=93961

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-04
Reviewed by Adam Barth.

Source/WebCore:

Allow automatic features (video autoplay and form control
autofocus) in a sandboxed iframe that has "allow-scripts"
flag set. This behavior is according to the latest
specification at:
http://dev.w3.org/html5/spec/browsers.html#attr-iframe-sandbox-allow-same-origin

This sandboxed automatic features browsing context flag is
relaxed by the same keyword as scripts, because when
scripts are enabled these features are trivially possible
anyway, and it would be unfortunate to force authors to
use script to do them when sandboxed rather than allowing
them to use the declarative features.

Tests: fast/forms/autofocus-in-sandbox-with-allow-scripts.html
       media/auto-play-in-sandbox-with-allow-scripts.html

* dom/SecurityContext.cpp:
(WebCore::SecurityContext::parseSandboxPolicy):

LayoutTests:

Add layout tests to check that automatic features (video
autoplay and form control autofocus) are allowed / working
in sandboxed iframes if the "allow-scripts" flag is set.
This behavior is according to the latest specification at:
http://dev.w3.org/html5/spec/browsers.html#attr-iframe-sandbox-allow-same-origin

The tests to check that automatic features are blocked in
sandboxed iframes have been removed since they relied on
the "allow-scripts" flag to work.

* fast/forms/autofocus-in-sandbox-with-allow-scripts-expected.txt: Added.
* fast/forms/autofocus-in-sandbox-with-allow-scripts.html: Renamed from LayoutTests/fast/forms/no-autofocus-in-sandbox.html.
* fast/forms/no-autofocus-in-sandbox-expected.txt: Removed.
* media/auto-play-in-sandbox-with-allow-scripts-expected.txt: Added.
* media/auto-play-in-sandbox-with-allow-scripts.html: Renamed from LayoutTests/media/no-auto-play-in-sandbox.html.
* media/no-auto-play-in-sandbox-expected.txt: Removed.
* media/resources/auto-play-in-sandbox-with-allow-scripts-iframe.html: Added.
* media/resources/no-auto-play-in-sandbox-iframe.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Elide test names when running new-run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=95626

Patch by Tony Chang <tony@chromium.org> on 2012-09-04
Reviewed by Dirk Pranke.

When the test name exceeds the number of terminal columns, it leaves
text on the screen. Avoid this by eliding the test name when running
tests. This is similar to what ninja does when compiling.

* Scripts/webkitpy/layout_tests/views/metered_stream.py:
(MeteredStream):
(MeteredStream.number_of_columns): Helper method to get number of
terminal columns. Won't work on Win32 python, but meh.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer._test_status_line): New method for eliding the text. Doesn't use \u2026
because stderr appears to be ascii only.
(Printer.print_started_test): Route through _test_status_line.
(Printer.print_finished_test): Route through _test_status_line.
(Printer._print_test_trace): Route through _test_status_line.
(Printer._print_baseline): Route through _test_status_line.
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(test_test_status_line): Test for _test_status_line.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Crash in AccessibilityObject::accessibilityPlatformIncludesObject()
https://bugs.webkit.org/show_bug.cgi?id=95740

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-09-04
Reviewed by Martin Robinson.

Source/WebCore:

Added sanity check to be sure we have a render object prior to seeing if
said object is an anonymous block.

Testing via unit test because a non-flaky layout test crasher could not
be found.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Sanity check for render object added.

Source/WebKit/gtk:

Updated unit test.

* tests/testatk.c:
(testWebkitAtkComboBox): Added checks that the menu popup in a combo box
has 0 links and, more importantly, that checking doesn't result in a crash.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Extend the coverage of the Custom Allocation Framework in WTF and in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=95737

Reviewed by Eric Seidel.

Add WTF_MAKE_FAST_ALLOCATED macro to the following class declarations because these are instantiated by operator new.

Source/JavaScriptCore:

* wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.

* heap/MachineStackMarker.cpp:
(MachineThreads::Thread): Thread is instantiated at heap/MachineStackMarker.cpp:196.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(FixedVMPoolExecutableAllocator): FixedVMPoolExecutableAllocator is instantiated at jit/ExecutableAllocatorFixedVMPool.cpp:111
* parser/SourceProviderCache.h:
(SourceProviderCache): SourceProviderCache is instantiated at parser/SourceProvider.h:49.
* parser/SourceProviderCacheItem.h:
(SourceProviderCacheItem): SourceProviderCacheItem is instantiated at parser/Parser.cpp:843.
* runtime/GCActivityCallback.h:
(GCActivityCallback): GCActivityCallback is instantiated at runtime/GCActivityCallback.h:96.
* tools/CodeProfile.h:
(CodeProfile): CodeProfile is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:140.

Source/WTF:

* wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.
* wtf/MediaTime.h: MediaTime is instantiated at wtf/MediaTime.cpp:288.
* wtf/MetaAllocator.h:
(MetaAllocatorTracker): MetaAllocatorTracker is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:120.
* wtf/ThreadingPthreads.cpp:
(PthreadState): PthreadState is instantiated at wtf/ThreadingPthreads.cpp:165.
* wtf/text/AtomicString.cpp:
(AtomicStringTable): AtomicStringTable is instantiated at wtf/text/AtomicString.cpp:43.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Change the MediaStreamTrackList track added/removed signaling
https://bugs.webkit.org/show_bug.cgi?id=95721

Reviewed by Adam Barth.

Source/Platform:

Adding the signaling to the WebKit interface.

* chromium/public/WebMediaStreamCenter.h:
(WebKit::WebMediaStreamCenter::didAddMediaStreamTrack):
(WebKit::WebMediaStreamCenter::didRemoveMediaStreamTrack):

Source/WebCore:

This allows the platform implementor to throw an NOT_SUPPORTED_ERR exception if it doesn support these methods.

Patch covered by expanded existing test.

* Modules/mediastream/MediaStreamTrackList.cpp:
(WebCore::MediaStreamTrackList::add):
(WebCore::MediaStreamTrackList::remove):
* platform/mediastream/MediaStreamCenter.h:
(MediaStreamCenter):
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
(WebCore::MediaStreamCenterBlackBerry::didAddMediaStreamTrack):
(WebCore):
(WebCore::MediaStreamCenterBlackBerry::didRemoveMediaStreamTrack):
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
(MediaStreamCenterBlackBerry):
* platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
(WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack):
(WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack):
* platform/mediastream/chromium/MediaStreamCenterChromium.h:
(MediaStreamCenterChromium):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack):
(WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
(MediaStreamCenterGStreamer):

Tools:

* DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
(MockWebMediaStreamCenter::didAddMediaStreamTrack):
(MockWebMediaStreamCenter::didRemoveMediaStreamTrack):
* DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
(MockWebMediaStreamCenter):

LayoutTests:

* fast/mediastream/MediaStreamTrackList.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Provide virtual dtor for DumpRenderTreeClient
https://bugs.webkit.org/show_bug.cgi?id=95769

Reviewed by NOBODY (OOPS!).

Also remove WTF prefixes.

* Api/DumpRenderTreeClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove use of deprecated QInputMethod method
https://bugs.webkit.org/show_bug.cgi?id=95741

Patch by Pekka Vuorela <pvuorela@iki.fi> on 2012-09-04
Reviewed by Simon Hausmann.

Adapt from deprecated QInputMethod::visible() to isVisible().

* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::setInputPanelVisible):
(WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Output time and thread info in crash log
https://bugs.webkit.org/show_bug.cgi?id=95768

Reviewed by Adam Barth.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver._get_logcat): Add '-v threadtime' to adb logcat command line to get time and thread info.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] pass isMainFrame() through to notifyDocumentOnLoad()
https://bugs.webkit.org/show_bug.cgi?id=95766

Reviewed by Rob Buis.

Passing the frame status through will allow the client to make better
decisions about how to act on the onload.

* Api/WebPageClient.h:
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidHandleOnloadEvents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Removing accidentally added executable properties on test files.

* platform/win/accessibility/canvas-description-and-role-expected.txt: Removed property svn:executable.
* platform/win/fast/canvas/canvas-strokeRect-alpha-shadow-expected.txt: Removed property svn:executable.
* platform/win/fast/css/image-resolution/image-resolution-expected.txt: Removed property svn:executable.
* platform/win/fast/css/image-set-setting-expected.txt: Removed property svn:executable.
* platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: Removed property svn:executable.
* platform/win/fast/css/variables/build-supports-variables-expected.txt: Removed property svn:executable.
* platform/win/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt: Removed property svn:executable.
* platform/win/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style-expected.txt: Removed property svn:executable.


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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Fix memory leak in InputHandler
https://bugs.webkit.org/show_bug.cgi?id=95771

Reviewed by Rob Buis.

Simply delete the arrays at function exit.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rename WebViewClient::handleDisambiguationPopup
https://bugs.webkit.org/show_bug.cgi?id=95529

Patch by Tien-Ren Chen <trchen@chromium.org> on 2012-09-04
Reviewed by Adam Barth.

Rename it to something more descriptive (WebViewClient::didTapMultipleTargets) before people start using it.

* public/WebViewClient.h:
(WebKit::WebViewClient::didTapMultipleTargets):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
* tests/WebFrameTest.cpp:

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