[chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into
https://bugs.webkit.org/show_bug.cgi?id=91288

Reviewed by Adrienne Walker.

Source/WebCore:

Always use pointers to layers when discussing render targets instead of
pointing directly to a RenderSurface.

Covered by existing tests.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::createRenderSurface):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::renderTarget):
(WebCore::LayerChromium::setRenderTarget):
(LayerChromium):
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
* platform/graphics/chromium/RenderSurfaceChromium.h:
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::setTexturePriorities):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
(WebCore::CCLayerImpl::createRenderSurface):
(WebCore::CCLayerImpl::dumpLayerProperties):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::renderTarget):
(WebCore::CCLayerImpl::setRenderTarget):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateLayerScissorRect):
(WebCore::calculateSurfaceScissorRect):
(WebCore::calculateVisibleContentRect):
(WebCore::computeScrollCompensationForThisLayer):
(WebCore::calculateDrawTransformsInternal):
(WebCore::pointIsClippedBySurfaceOrClipRect):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::::enterLayer):
(WebCore::::leaveLayer):
(WebCore::::enterRenderTarget):
(WebCore::::finishedRenderTarget):
(WebCore):
(WebCore::reduceOcclusionBelowSurface):
(WebCore::::leaveToRenderTarget):
(WebCore::::markOccludedBehindLayer):
(WebCore::::occluded):
(WebCore::::unoccludedContentRect):
(WebCore::::unoccludedContributingSurfaceContentRect):
(WebCore::::layerScissorRectInTargetSurface):
* platform/graphics/chromium/cc/CCOcclusionTracker.h:
(CCOcclusionTrackerBase):
(WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
(StackObject):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::CCQuadCuller::appendSurface):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):

Source/WebKit/chromium:

* tests/CCDamageTrackerTest.cpp:
(WebKitTests::TEST_F):
* tests/CCLayerImplTest.cpp:
(WebCore::TEST):
* tests/CCLayerTreeHostCommonTest.cpp:
* tests/CCOcclusionTrackerTest.cpp:
(WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
(WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
(WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
(WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
(WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
(WebKitTests::CCOcclusionTrackerTestReplicaOccluded::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceChildOfSurface::runMyTest):
(WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest):
* tests/CCQuadCullerTest.cpp:
* tests/CCTiledLayerTestCommon.cpp:
(WebKitTests::FakeTiledLayerChromium::setTexturePriorities):
* tests/LayerChromiumTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object.
https://bugs.webkit.org/show_bug.cgi?id=91419

Run the following in inspector to crash WebKit

qnx.callExtensionMethod.apply(window, []);

In the c++ that handles the function it assumes that when callExtensionMethod
is called that 'this' is the object 'qnx'.  The qnx object has a hidden
variable that the code casts and uses, but when 'this' is not qnx such as the
example this will cause a crash.  Any website can insert the above JavaScript
to cause the crash.

Patch by Benjamin C Meyer <bmeyer@rim.com> on 2012-07-16
Reviewed by Yong Li.

* WebCoreSupport/ClientExtension.cpp:
(clientExtensionMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Layout Test pointer-lock/locked-element-removed-from-dom.html flakiness.
https://bugs.webkit.org/show_bug.cgi?id=91373

Reviewed by Adrienne Walker.

pointer-lock-test-harness corrected to no longer silently allow too many
asynchronous doNextStep calls in a test. The locked-element-removed-from-dom test
generated too many events and incorrectly exited the test early.

* platform/chromium/TestExpectations:
    Re-enabled locked-element-removed-from-dom test.html
* pointer-lock/locked-element-removed-from-dom.html:
    Absorb extra doNextStep.
* pointer-lock/resources/pointer-lock-test-harness.js:
(doNextStep.setTimeout):
    Fail tests that call doNextStep too many times.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy: handle failures properly when running in parallel
https://bugs.webkit.org/show_bug.cgi?id=91416

Reviewed by Tony Chang.

It turns out that unittest.TestResults contain a handle to the
test method itself, which isn't picklable; it's sufficient to just
store the test name instead of the actual method. By doing so
we can move the test_name() method from the printer to the
runner where it belongs (so the printer is less dependent on the
unittest framework's data structures).

This change should really have a test but I don't know how to
write one that properly captures the behavior and won't cause
test-webkitpy itself to fail. I've verified the fix by hand, at
least, in the meantime.

* Scripts/webkitpy/test/printer.py:
(Printer.__init__):
(Printer.print_result):
* Scripts/webkitpy/test/runner.py:
(_test_name):
(Runner.all_test_names):
(_Worker.handle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adobe Web Platform Team Blog is missing from Planet WebKit
https://bugs.webkit.org/show_bug.cgi?id=91407

Reviewed by Andreas Kling.

Adding Adobe Web Platform Team Blog feed to Planet WebKit.

* config.ini:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=91299
Paginated views should restrict available height to column height
-and corresponding-
<rdar://problem/11152108>

Reviewed by Dan Bernstein.

Source/WebCore: 

Now that RenderViews can have columns, availableLogicalHeight needs to consider 
that column height, much like how availableLogicalWidth already considers column 
width.

availableLogicalHeight is newly virtual, like the already-virtual 
availableLogicalWidth.
* rendering/RenderBox.h:
(RenderBox):

Check with the columnHeight.
* rendering/RenderView.cpp:
(WebCore):
(WebCore::RenderView::availableLogicalHeight):
* rendering/RenderView.h:

setPagination now takes pageLength as an optional parameter. 
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setPagination):
* testing/InternalSettings.h:
(WebCore::InternalSettings::setPagination):
(InternalSettings):
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::setPagination):
* testing/Internals.h:
(WebCore::Internals::setPagination):
(Internals):
* testing/Internals.idl:

LayoutTests: 

New test.
* fast/multicol/resources/big-green.png: Added.
* fast/multicol/shrink-to-column-height-for-pagination.html: Added.
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png: Added.
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening. Layout Test svg/W3C-SVG-1.1/animate-elem-39-t.svg is flaky
https://bugs.webkit.org/show_bug.cgi?id=91421

This test is flaky (crashing) on the Win7 bot and has been for some time.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy: clean up logging to make it ninja-esque
https://bugs.webkit.org/show_bug.cgi?id=91297

Reviewed by Adam Barth.

This patch changes the output of test-webkitpy to be closer to
what ninja produces. Namely:

If you are running with stderr writing to a tty (and not -v), we
will no longer print '...' as tests complete. Instead, we use a
metered stream and print entries of the form:
   '[X/Y] test_name passed/failed/erred'
where X is the current test # and Y is the total number of tests.

If you are running with stderr piped to a file or other non-tty
object (or with -v), you get the same output, one per line for
every test.

In addition, if tests fail or err out, you get the stack trace
immediately; you don't have to wait until the end of the run.

Lastly, this change cleans up the unit tests for test-webkitpy
itself to not confuse the logger and to work cleanly w/ multiple
processes. It looks like between this and all the clean up in
MessagePool that happened as it landed, we can now run
multiprocessing tests in parallel.

* Scripts/webkitpy/test/finder.py:
(Finder._default_names):
* Scripts/webkitpy/test/finder_unittest.py:
(FinderTest.setUp):
(FinderTest.tearDown):
* Scripts/webkitpy/test/printer.py:
(Printer.__init__):
(Printer.configure):
(Printer.print_started_test):
(Printer.print_finished_test):
(Printer._test_line):
(Printer.print_result):
* Scripts/webkitpy/test/runner.py:
(Runner.run):
* Scripts/webkitpy/test/runner_unittest.py:
(RunnerTest.setUp):
(RunnerTest):
(RunnerTest.tearDown):
(RunnerTest.assert_run):
(RunnerTest.test_regular):
(RunnerTest.test_verbose):
(RunnerTest.test_timing):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove non-ephemeral data from RenderSurface as it duplicates data from the owning layer
https://bugs.webkit.org/show_bug.cgi?id=91418

Reviewed by Adrienne Walker.

This removes the filters and masks from render surfaces, and makes them
used directly from the owning layer. Also removes skipsDraw from
surfaces as it was just not used at all.

Covered by existing tests.

* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::filters):
(WebCore::LayerChromium::backgroundFilters):
(WebCore::LayerChromium::hasMask):
(WebCore::LayerChromium::hasReplica):
(WebCore::LayerChromium::replicaHasMask):
(LayerChromium):
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
(WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
* platform/graphics/chromium/RenderSurfaceChromium.h:
(RenderSurfaceChromium):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::hasMask):
(WebCore::CCLayerImpl::hasReplica):
(WebCore::CCLayerImpl::replicaHasMask):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsInternal):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::::finishedRenderTarget):
(WebCore::reduceOcclusionBelowSurface):
(WebCore::::leaveToRenderTarget):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::drawableContentRect):
(WebCore::CCRenderSurface::appendQuads):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):


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