Diff
Modified: trunk/ChangeLog (142142 => 142143)
--- trunk/ChangeLog 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
@@ -1,5 +1,16 @@
2013-02-07 Gavin Peters <[email protected]>
+ Unreviewed, rolling out r142141.
+ http://trac.webkit.org/changeset/142141
+ https://bugs.webkit.org/show_bug.cgi?id=108990
+
+ Reland r142112, will update Chromium expectations and create a
+ Chromium bug instead for the crash.
+
+ * ManualTests/remove-fixed-position-but-keep-compositing.html: Added.
+
+2013-02-07 Gavin Peters <[email protected]>
+
Unreviewed, rolling out r142112.
http://trac.webkit.org/changeset/142112
https://bugs.webkit.org/show_bug.cgi?id=108990
Added: trunk/ManualTests/remove-fixed-position-but-keep-compositing.html (0 => 142143)
--- trunk/ManualTests/remove-fixed-position-but-keep-compositing.html (rev 0)
+++ trunk/ManualTests/remove-fixed-position-but-keep-compositing.html 2013-02-07 17:51:49 UTC (rev 142143)
@@ -0,0 +1,46 @@
+<html>
+
+ <body style="height: 10000px">
+
+ <button id="toggle">Toggle</button>
+
+ <p>
+ The black rectangle starts fixed, and due to a -webkit-transform will be composited. Toggle to unfix it and scroll: the black rectangle should scroll with the page and not overlap the numbers.
+ </p>
+
+ <div id="rect" style="background-color: black; width: 200px; height: 200px; position: fixed; -webkit-transform: translate3d(0,0,0)">
+ </div>
+
+1<br>
+2<br>
+3<br>
+4<br>
+5<br>
+6<br>
+7<br>
+8<br>
+9<br>
+10<br>
+11<br>
+12<br>
+13<br>
+14<br>
+15<br>
+16<br>
+17<br>
+18<br>
+19<br>
+20<br>
+
+<script>
+var rect = document.getElementById("rect");
+var toggle = document.getElementById("toggle");
+
+toggle.addEventListener("click", function (ev) {
+ if (rect.style.position === "fixed") {
+ rect.style.position = "";
+ } else {
+ rect.style.position = "fixed";
+ }
+});
+</script>
Property changes on: trunk/ManualTests/remove-fixed-position-but-keep-compositing.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/CMakeLists.txt (142142 => 142143)
--- trunk/Source/WebCore/CMakeLists.txt 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/CMakeLists.txt 2013-02-07 17:51:49 UTC (rev 142143)
@@ -44,6 +44,7 @@
"${WEBCORE_DIR}/page"
"${WEBCORE_DIR}/page/animation"
"${WEBCORE_DIR}/page/scrolling"
+ "${WEBCORE_DIR}/page/scrolling/coordinatedgraphics"
"${WEBCORE_DIR}/platform"
"${WEBCORE_DIR}/platform/animation"
"${WEBCORE_DIR}/platform/audio"
@@ -1820,6 +1821,7 @@
page/scrolling/ScrollingConstraints.cpp
page/scrolling/ScrollingCoordinator.cpp
+ page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
platform/Arena.cpp
platform/AsyncFileSystem.cpp
Modified: trunk/Source/WebCore/ChangeLog (142142 => 142143)
--- trunk/Source/WebCore/ChangeLog 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
@@ -1,3 +1,32 @@
+2013-02-07 Gavin Peters <[email protected]>
+
+ Unreviewed, rolling out r142141.
+ http://trac.webkit.org/changeset/142141
+ https://bugs.webkit.org/show_bug.cgi?id=108990
+
+ Reland r142112, will update Chromium expectations and create a
+ Chromium bug instead for the crash.
+
+ * CMakeLists.txt:
+ * Target.pri:
+ * WebCore.pri:
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::create):
+ * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
+ (WebCore):
+ (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
+ (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
+ * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
+ (WebCore):
+ (ScrollingCoordinatorCoordinatedGraphics):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
+ (WebCore):
+ (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+ (CoordinatedGraphicsLayerClient):
+ (CoordinatedGraphicsLayer):
+
2013-02-07 Andrey Lushnikov <[email protected]>
Web Inspector: home button behaviour is wrong in DTE
Modified: trunk/Source/WebCore/Target.pri (142142 => 142143)
--- trunk/Source/WebCore/Target.pri 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/Target.pri 2013-02-07 17:51:49 UTC (rev 142143)
@@ -4066,6 +4066,7 @@
use?(3D_GRAPHICS) {
HEADERS += \
+ page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h \
platform/graphics/cpu/arm/GraphicsContext3DNEON.h \
platform/graphics/ANGLEWebKitBridge.h \
platform/graphics/Extensions3D.h \
@@ -4090,6 +4091,7 @@
platform/graphics/texmap/coordinated/UpdateAtlas.h
SOURCES += \
+ page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp \
platform/graphics/ANGLEWebKitBridge.cpp \
platform/graphics/GraphicsContext3D.cpp \
platform/graphics/gpu/DrawingBuffer.cpp \
Modified: trunk/Source/WebCore/WebCore.pri (142142 => 142143)
--- trunk/Source/WebCore/WebCore.pri 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/WebCore.pri 2013-02-07 17:51:49 UTC (rev 142143)
@@ -50,6 +50,7 @@
$$SOURCE_DIR/page/animation \
$$SOURCE_DIR/page/qt \
$$SOURCE_DIR/page/scrolling \
+ $$SOURCE_DIR/page/scrolling/coordinatedgraphics \
$$SOURCE_DIR/platform \
$$SOURCE_DIR/platform/animation \
$$SOURCE_DIR/platform/audio \
@@ -63,6 +64,7 @@
$$SOURCE_DIR/platform/graphics/qt \
$$SOURCE_DIR/platform/graphics/surfaces \
$$SOURCE_DIR/platform/graphics/texmap \
+ $$SOURCE_DIR/platform/graphics/texmap/coordinated \
$$SOURCE_DIR/platform/graphics/transforms \
$$SOURCE_DIR/platform/image-decoders \
$$SOURCE_DIR/platform/image-decoders/bmp \
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (142142 => 142143)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2013-02-07 17:51:49 UTC (rev 142143)
@@ -52,6 +52,10 @@
#include "ScrollingCoordinatorChromium.h"
#endif
+#if USE(COORDINATED_GRAPHICS)
+#include "ScrollingCoordinatorCoordinatedGraphics.h"
+#endif
+
namespace WebCore {
PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
@@ -64,6 +68,10 @@
return adoptRef(new ScrollingCoordinatorChromium(page));
#endif
+#if USE(COORDINATED_GRAPHICS)
+ return adoptRef(new ScrollingCoordinatorCoordinatedGraphics(page));
+#endif
+
return adoptRef(new ScrollingCoordinator(page));
}
Added: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp (0 => 142143)
--- trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp (rev 0)
+++ trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp 2013-02-07 17:51:49 UTC (rev 142143)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if USE(COORDINATED_GRAPHICS)
+
+#include "ScrollingCoordinatorCoordinatedGraphics.h"
+
+#include "CoordinatedGraphicsLayer.h"
+#include "Page.h"
+#include "Settings.h"
+
+namespace WebCore {
+
+ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics(Page* page)
+ : ScrollingCoordinator(page)
+{
+}
+
+void ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer(GraphicsLayer* layer, bool enable)
+{
+ if (!m_page->settings()->acceleratedCompositingForFixedPositionEnabled())
+ return;
+ toCoordinatedGraphicsLayer(layer)->setFixedToViewport(enable);
+}
+
+} // namespace WebCore
+
+#endif // USE(COORDINATED_GRAPHICS)
Property changes on: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
___________________________________________________________________
Added: svn:eol-style
Added: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h (0 => 142143)
--- trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h (rev 0)
+++ trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h 2013-02-07 17:51:49 UTC (rev 142143)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollingCoordinatorCoordinatedGraphics_h
+#define ScrollingCoordinatorCoordinatedGraphics_h
+
+#if USE(COORDINATED_GRAPHICS)
+
+#include "ScrollingCoordinator.h"
+
+namespace WebCore {
+
+class ScrollingCoordinatorCoordinatedGraphics : public ScrollingCoordinator {
+public:
+ explicit ScrollingCoordinatorCoordinatedGraphics(Page*);
+
+ virtual void setLayerIsFixedToContainerLayer(GraphicsLayer*, bool);
+};
+
+} // namespace WebCore
+
+#endif // USE(COORDINATED_GRAPHICS)
+
+#endif
Property changes on: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (142142 => 142143)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2013-02-07 17:51:49 UTC (rev 142143)
@@ -464,6 +464,15 @@
return m_id;
}
+void CoordinatedGraphicsLayer::setFixedToViewport(bool isFixed)
+{
+ if (m_fixedToViewport == isFixed)
+ return;
+
+ m_fixedToViewport = isFixed;
+ didChangeLayerState();
+}
+
void CoordinatedGraphicsLayer::flushCompositingState(const FloatRect& rect)
{
if (!m_coordinator->isFlushingLayerChanges()) {
@@ -478,8 +487,6 @@
if (CoordinatedGraphicsLayer* replica = toCoordinatedGraphicsLayer(replicaLayer()))
replica->flushCompositingStateForThisLayerOnly();
- m_coordinator->syncFixedLayers();
-
flushCompositingStateForThisLayerOnly();
for (size_t i = 0; i < children().size(); ++i)
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (142142 => 142143)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2013-02-07 17:51:49 UTC (rev 142143)
@@ -72,7 +72,6 @@
virtual void setLayerAnimations(CoordinatedLayerID, const GraphicsLayerAnimations&) = 0;
virtual void detachLayer(CoordinatedGraphicsLayer*) = 0;
- virtual void syncFixedLayers() = 0;
virtual PassOwnPtr<GraphicsContext> beginContentUpdate(const IntSize&, CoordinatedSurface::Flags, uint32_t& atlasID, IntPoint&) = 0;
};
@@ -137,7 +136,7 @@
CoordinatedLayerID id() const;
- void setFixedToViewport(bool isFixed) { m_fixedToViewport = isFixed; }
+ void setFixedToViewport(bool isFixed);
IntRect coverRect() const { return m_mainBackingStore ? m_mainBackingStore->mapToContents(m_mainBackingStore->coverRect()) : IntRect(); }
Modified: trunk/Source/WebKit2/ChangeLog (142142 => 142143)
--- trunk/Source/WebKit2/ChangeLog 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebKit2/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
@@ -1,5 +1,19 @@
2013-02-07 Gavin Peters <[email protected]>
+ Unreviewed, rolling out r142141.
+ http://trac.webkit.org/changeset/142141
+ https://bugs.webkit.org/show_bug.cgi?id=108990
+
+ Reland r142112, will update Chromium expectations and create a
+ Chromium bug instead for the crash.
+
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::DrawingAreaImpl):
+
+2013-02-07 Gavin Peters <[email protected]>
+
Unreviewed, rolling out r142112.
http://trac.webkit.org/changeset/142112
https://bugs.webkit.org/show_bug.cgi?id=108990
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (142142 => 142143)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp 2013-02-07 17:51:49 UTC (rev 142143)
@@ -469,54 +469,6 @@
scheduleLayerFlush();
}
-static void updateOffsetFromViewportForSelf(RenderLayer* renderLayer)
-{
- // These conditions must match the conditions in RenderLayerCompositor::requiresCompositingForPosition.
- RenderLayerBacking* backing = renderLayer->backing();
- if (!backing)
- return;
-
- RenderStyle* style = renderLayer->renderer()->style();
- if (!style)
- return;
-
- if (!renderLayer->renderer()->isOutOfFlowPositioned() || renderLayer->renderer()->style()->position() != FixedPosition)
- return;
-
- if (!renderLayer->renderer()->container()->isRenderView())
- return;
-
- if (!renderLayer->isStackingContainer())
- return;
-
- CoordinatedGraphicsLayer* graphicsLayer = toCoordinatedGraphicsLayer(backing->graphicsLayer());
- graphicsLayer->setFixedToViewport(true);
-}
-
-static void updateOffsetFromViewportForLayer(RenderLayer* renderLayer)
-{
- updateOffsetFromViewportForSelf(renderLayer);
-
- if (renderLayer->firstChild())
- updateOffsetFromViewportForLayer(renderLayer->firstChild());
- if (renderLayer->nextSibling())
- updateOffsetFromViewportForLayer(renderLayer->nextSibling());
-}
-
-void CoordinatedLayerTreeHost::syncFixedLayers()
-{
- if (!m_webPage->corePage()->settings() || !m_webPage->corePage()->settings()->acceleratedCompositingForFixedPositionEnabled())
- return;
-
- if (!m_webPage->mainFrame()->view()->hasViewportConstrainedObjects())
- return;
-
- RenderLayer* rootRenderLayer = m_webPage->mainFrame()->contentRenderer()->compositor()->rootRenderLayer();
- ASSERT(rootRenderLayer);
- if (rootRenderLayer->firstChild())
- updateOffsetFromViewportForLayer(rootRenderLayer->firstChild());
-}
-
void CoordinatedLayerTreeHost::lockAnimations()
{
m_animationsLocked = true;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h (142142 => 142143)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h 2013-02-07 17:51:49 UTC (rev 142143)
@@ -105,7 +105,6 @@
#endif
virtual void setLayerRepaintCount(WebCore::CoordinatedLayerID, int) OVERRIDE;
virtual void detachLayer(WebCore::CoordinatedGraphicsLayer*);
- virtual void syncFixedLayers();
virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags, uint32_t& atlasID, WebCore::IntPoint&);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (142142 => 142143)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2013-02-07 17:51:49 UTC (rev 142143)
@@ -73,6 +73,7 @@
#if USE(COORDINATED_GRAPHICS)
m_alwaysUseCompositing = true;
+ webPage->corePage()->settings()->setScrollingCoordinatorEnabled(true);
#endif
if (m_alwaysUseCompositing)