[GTK] [CMake] Add support for building TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=116987

Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsGTK.cmake: Turn on the API tests in the settings.

Tools:

* TestWebKitAPI/CMakeLists.txt: Move the library listings to before the inclusion of the
platform-specific file, so that GTK+ can override them.
* TestWebKitAPI/PlatformGTK.cmake: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=117365

Reviewed by David Hyatt.

Source/WebCore:

After the RenderFlowThread has a new layout we need to check if any of the children layers
had been moved to a new render region. We are only checking for the first level of layers,
as they are the only ones supported right now. Also, added code to make Regions require a layer
based on the layers that fit in their clipping area.

Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
       fast/regions/layers/dynamic-layer-removed-with-no-layout.html
       fast/regions/layers/float-region-promoted-to-layer.html
       fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
       fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
       fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
       fast/regions/layers/regions-promoted-to-layers.html

* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed.
* rendering/FlowThreadController.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
needs to be painted by the current block or not.
(WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
container that would need to paint a FloatingObject.
(WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
the FloatingObjects of a float.
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
into its own method.
(WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
but we need to patch it for the floating RenderRegions after the layout is already finished.
(WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
* rendering/RenderBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
(WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
It only cares about the top most point of the element and ignores transforms.
(WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
and updates the region. Will return true if there was any change.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
(WebCore::RenderLayer::dirtyNormalFlowList):
(WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
in front of other layers.
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
(WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayer.h:
(WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
so that we can update the list of layers associated with a region. In a following patch we will need to
rebuild the composited layers.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
only after the content of the flow thread is computed.
* rendering/RenderLayerModelObject.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::setRequiresLayerForCompositing):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::requiresLayer):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.

LayoutTests:

Added new tests for cases when CSS Regions are promoted to RenderLayers because
they contain elements that might need to become composited.

* fast/regions/layers/dynamic-layer-added-with-no-layout-expected.png: Added.
* fast/regions/layers/dynamic-layer-added-with-no-layout-expected.txt: Added.
* fast/regions/layers/dynamic-layer-added-with-no-layout.html: Added.
* fast/regions/layers/dynamic-layer-removed-with-no-layout-expected.png: Added.
* fast/regions/layers/dynamic-layer-removed-with-no-layout-expected.txt: Added.
* fast/regions/layers/dynamic-layer-removed-with-no-layout.html: Added.
* fast/regions/layers/float-region-promoted-to-layer-expected.html: Added.
* fast/regions/layers/float-region-promoted-to-layer.html: Added.
* fast/regions/layers/regions-promoted-to-layers-expected.txt: Added.
* fast/regions/layers/regions-promoted-to-layers-horizontal-bt-expected.txt: Added.
* fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html: Added.
* fast/regions/layers/regions-promoted-to-layers-vertical-lr-expected.txt: Added.
* fast/regions/layers/regions-promoted-to-layers-vertical-lr.html: Added.
* fast/regions/layers/regions-promoted-to-layers-vertical-rl-expected.txt: Added.
* fast/regions/layers/regions-promoted-to-layers-vertical-rl.html: Added.
* fast/regions/layers/regions-promoted-to-layers.html: Added.

Updated existing tests that now have CSS Regions that require a RenderLayer.
* fast/regions/autoheight-regions-mark-expected.txt:
* fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt:
* fast/repaint/region-painting-via-layout-expected.txt:
* platform/mac/fast/regions/overflow-in-uniform-regions-dynamic-expected.txt:
* platform/mac/fast/regions/overflow-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/overflow-not-moving-below-floats-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/overflow-rtl-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/overflow-size-change-in-variable-width-regions-expected.txt:
* platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-in-regions-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Sync messages with with non-default timeout sent from secondary threads always time out
https://bugs.webkit.org/show_bug.cgi?id=119767

Fix by Justin Bur.
Reviewed by Darin Adler.

* Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
The argument to wait() is absolute time, not a delta. This calculation matches one
in Connection::waitForMessage().


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

* TestResultServer/static-dashboards/flakiness_dashboard.js:
(processTestRunsForBuilder):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed jit on Win64.
https://bugs.webkit.org/show_bug.cgi?id=119601

Reviewed by Oliver Hunt.

* jit/JITStubsMSVC64.asm: Added ctiVMThrowTrampolineSlowpath implementation.
* jit/JSInterfaceJIT.h: Added thirdArgumentRegister.
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::call): Added correct calling convention for Win64.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build gardening.

* platform/win/TestExpectations: Clean up a lint warning, and reactivate four tiling tests
that pass and had been turned off previously.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/119820> Add pluginView-related logging to WebPage

Reviewed by Tim Horton.

Add some more diagnostic output to help track down bugs.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addPluginView): More logging.
(WebKit::WebPage::removePluginView): Ditto.

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