Fix CALayer hiearchy when combining tiling with preserve-3d
https://bugs.webkit.org/show_bug.cgi?id=100205

Reviewed by Dean Jackson.

Source/WebCore:

When an element has "transform-style: preserve-3d", its GraphicsLayerCA has a
m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered
content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden,
it is the primary layer that is set to be single-sided.

In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via
"customSublayers" returned from the PlatformCALayer, where the custom sublayer is
the tile cache container layer. However, the custom sublayers were being added as
children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer,
thus they were not affected by the doubleSided property.

This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList()
by maintaining two vectors of PlatformCALayers, one for sublayers of the structural
layer, and one for sublayers of the primary layer. It adds custom sublayers to
the latter list, so now the tile cache container layer becomes a sublayer of
the primary layer, so is affected by that layer's doubleSided property.

Test: compositing/tiling/backface-preserve-3d-tiled.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateSublayerList):

LayoutTests:

Pixel test that tests backface-visibility on a tile cache layer. Mark the test as
failing on Chromium.

* compositing/tiling/backface-preserve-3d-tiled-expected.png: Added.
* compositing/tiling/backface-preserve-3d-tiled-expected.txt: Added.
* compositing/tiling/backface-preserve-3d-tiled.html: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Setting width of a flexitem causes the adjacent flex item to be displayed poorly.
https://bugs.webkit.org/show_bug.cgi?id=99925

Reviewed by Ojan Vafai.

Source/WebCore:

Make sure that we always repaint when moving a child. This is similar to what RenderDeprecatedFlexibleBox does.

Test: css3/flexbox/repaint-during-resize-no-flex.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Move logic for repaining into the helper method
for setting the location of a child.
(WebCore::RenderFlexibleBox::layoutColumnReverse): Remove code for repaint since it's now in setFlowAwareLocationForChild.
(WebCore::RenderFlexibleBox::adjustAlignmentForChild): Remove code for repaint since it's now in setFlowAwareLocationForChild.

LayoutTests:

Add a repaint test.  The render tree should be cross platform, but due to
slight color differences in the grey overlay, the png can't be shared.

* css3/flexbox/repaint-during-resize-no-flex-expected.txt: Added.
* css3/flexbox/repaint-during-resize-no-flex.html: Added.
* platform/chromium-linux/css3/flexbox/repaint-during-resize-no-flex-expected.png: Added.
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a strategy for loader customization.
https://bugs.webkit.org/show_bug.cgi?id=100278

Reviewed by Alexey Proskuryakov.

Source/WebCore:

It's empty for now and does nothing, just like the goggles.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::loaderStrategy):
(PlatformStrategies):
(WebCore::PlatformStrategies::PlatformStrategies):

Source/WebKit/efl:

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::createLoaderStrategy):
* WebCoreSupport/PlatformStrategiesEfl.h:
(PlatformStrategiesEfl):

Source/WebKit/gtk:

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::createLoaderStrategy):
* WebCoreSupport/PlatformStrategiesGtk.h:
(PlatformStrategiesGtk):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createLoaderStrategy):

Source/WebKit/qt:

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::createLoaderStrategy):
* WebCoreSupport/PlatformStrategiesQt.h:
(PlatformStrategiesQt):

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createLoaderStrategy):
* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::createLoaderStrategy):
* WebCoreSupport/PlatformStrategiesWinCE.h:
(PlatformStrategiesWinCE):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createLoaderStrategy):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] ActiveDOMObjectEpilogueVisitor is unnecessary and can be deleted
https://bugs.webkit.org/show_bug.cgi?id=100208

Reviewed by Eric Seidel.

Rather than clearing and re-establishing the weak callback for
ActiveDOMObjects during every GC, this patch puts all the
ActiveDOMObjects with pending activity into an object group with a live
object, causing them not to be garbage collected.

In addition to simplifying this code, this patch makes the patch in
https://bugs.webkit.org/show_bug.cgi?id=100175 much easier because
V8GCController no longer needs to know how to configure the weak
callbacks for these objects.

* bindings/v8/V8GCController.cpp:
(WebCore::ActiveDOMObjectPrologueVisitor::ActiveDOMObjectPrologueVisitor):
(ActiveDOMObjectPrologueVisitor):
(WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper):
(WebCore::V8GCController::majorGCPrologue):
(WebCore::V8GCController::majorGCEpilogue):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::V8PerIsolateData):
* bindings/v8/V8PerIsolateData.h:
(WebCore::V8PerIsolateData::liveRoot):
(V8PerIsolateData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
call to setNeedsLayout during RenderVideo::paintReplaced
https://bugs.webkit.org/show_bug.cgi?id=100265

Reviewed by Eric Carlson.

Removed unnecessary call and added new defensive guards to catch erroneous setNeedsLayout() calls
during paints earlier (so the offending calls are in the emitted stacktrace).

No new tests - new defensive checks are triggered by existing tests.

* page/FrameView.cpp:
(WebCore::FrameView::paintContents): forbid setNeedsLayout() during painting
* rendering/RenderObject.cpp:
(WebCore):
(WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
(WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope):
* rendering/RenderObject.h:
(RenderObject):
(SetLayoutNeededForbiddenScope): added helper class for forbidding setNeedsLayout() in a scope.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced): drop the offending & unnecessary call to updatePlayer().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=99202
[Chromium] shift-click fails to spawn new window with target=_blank

Reviewed by Adam Barth

No new tests in WebKit-land--see
https://codereview.chromium.org/11235048/ for tests that I'll submit
once this lands.

* src/ChromeClientImpl.cpp:
Change currentEventShouldCauseBackgroundTab to updatePolicyForEvent; we
were looking up the right policy, then throwing it away if it wasn't
forcing a background tab.
(WebKit::ChromeClientImpl::updatePolicyForEvent):
(WebKit::ChromeClientImpl::getNavigationPolicy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Updating slow expectations for two tests following a Chromium
change. See https://bugs.webkit.org/show_bug.cgi?id=100287

* platform/chromium/TestExpectations:


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