[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