Title: [133248] trunk
- Revision
- 133248
- Author
- commit-qu...@webkit.org
- Date
- 2012-11-01 18:19:02 -0700 (Thu, 01 Nov 2012)
Log Message
Fix assertion failure in RenderGeometryMap::absoluteRect when frame scale != 1.0
https://bugs.webkit.org/show_bug.cgi?id=100912
Patch by Tien-Ren Chen <trc...@chromium.org> on 2012-11-01
Reviewed by Simon Fraser.
Frame scale will add transformation to RenderView, so fixed position doesn't
get propagated up to the viewport by RenderGeometryMap. This is handled
correctly in RenderView::mapLocalToContainer, causing the assertion to fail.
This patch corrects RenderGeometryMap::mapToAbsolute to handle the RenderView
transformation case.
A layout test is added to catch this issue. The test will crash debug build
without this patch.
Source/WebCore:
Test: compositing/geometry/fixed-position-composited-page-scale-scroll.html
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToAbsolute):
LayoutTests:
* compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt: Added.
* compositing/geometry/fixed-position-composited-page-scale-scroll.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (133247 => 133248)
--- trunk/LayoutTests/ChangeLog 2012-11-02 01:17:27 UTC (rev 133247)
+++ trunk/LayoutTests/ChangeLog 2012-11-02 01:19:02 UTC (rev 133248)
@@ -1,3 +1,23 @@
+2012-11-01 Tien-Ren Chen <trc...@chromium.org>
+
+ Fix assertion failure in RenderGeometryMap::absoluteRect when frame scale != 1.0
+ https://bugs.webkit.org/show_bug.cgi?id=100912
+
+ Reviewed by Simon Fraser.
+
+ Frame scale will add transformation to RenderView, so fixed position doesn't
+ get propagated up to the viewport by RenderGeometryMap. This is handled
+ correctly in RenderView::mapLocalToContainer, causing the assertion to fail.
+ This patch corrects RenderGeometryMap::mapToAbsolute to handle the RenderView
+ transformation case.
+
+ A layout test is added to catch this issue. The test will crash debug build
+ without this patch.
+
+
+ * compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt: Added.
+ * compositing/geometry/fixed-position-composited-page-scale-scroll.html: Added.
+
2012-11-01 Simon Fraser <simon.fra...@apple.com>
Rebaseline tests listed in Mac TestExpectations as needing new baselines, other than those that
Added: trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt (0 => 133248)
--- trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt 2012-11-02 01:19:02 UTC (rev 133248)
@@ -0,0 +1,2 @@
+This test should not hit an assertion in RenderGeometryMap in debug builds
+This test should not hit an assertion in RenderGeometryMap in debug builds
Added: trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll.html (0 => 133248)
--- trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll.html (rev 0)
+++ trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll.html 2012-11-02 01:19:02 UTC (rev 133248)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.fixed-no-z-index {
+ position: absolute;
+ left: 10px;
+}
+.fixed-with-z-index {
+ position: fixed;
+ z-index: 1;
+ left: 10px;
+ -webkit-transform:translateZ(0);
+}
+</style>
+<script>
+ function scale() {
+ if (window.internals) {
+ window.internals.settings.setEnableCompositingForFixedPosition(true);
+ window.internals.settings.setPageScaleFactor(2, 0, 0);
+ }
+ window.scrollTo(100,100);
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ }
+</script>
+</head>
+<body _onload_="scale();" style="width:2000px;height:2000px;">
+<div class="fixed-no-z-index">This test should not hit an assertion in RenderGeometryMap in debug builds</div><br>
+<div class="fixed-with-z-index">This test should not hit an assertion in RenderGeometryMap in debug builds</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (133247 => 133248)
--- trunk/Source/WebCore/ChangeLog 2012-11-02 01:17:27 UTC (rev 133247)
+++ trunk/Source/WebCore/ChangeLog 2012-11-02 01:19:02 UTC (rev 133248)
@@ -1,3 +1,24 @@
+2012-11-01 Tien-Ren Chen <trc...@chromium.org>
+
+ Fix assertion failure in RenderGeometryMap::absoluteRect when frame scale != 1.0
+ https://bugs.webkit.org/show_bug.cgi?id=100912
+
+ Reviewed by Simon Fraser.
+
+ Frame scale will add transformation to RenderView, so fixed position doesn't
+ get propagated up to the viewport by RenderGeometryMap. This is handled
+ correctly in RenderView::mapLocalToContainer, causing the assertion to fail.
+ This patch corrects RenderGeometryMap::mapToAbsolute to handle the RenderView
+ transformation case.
+
+ A layout test is added to catch this issue. The test will crash debug build
+ without this patch.
+
+ Test: compositing/geometry/fixed-position-composited-page-scale-scroll.html
+
+ * rendering/RenderGeometryMap.cpp:
+ (WebCore::RenderGeometryMap::mapToAbsolute):
+
2012-11-01 Adam Barth <aba...@webkit.org>
[V8] Generalize NodeWrapperMap to be able to handle other sorts of keys
Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (133247 => 133248)
--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2012-11-02 01:17:27 UTC (rev 133247)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2012-11-02 01:19:02 UTC (rev 133248)
@@ -104,7 +104,7 @@
// If this box has a transform, it acts as a fixed position container
// for fixed descendants, which prevents the propagation of 'fixed'
// unless the layer itself is also fixed position.
- if (currentStep.m_hasTransform && !currentStep.m_isFixedPosition)
+ if (i && currentStep.m_hasTransform && !currentStep.m_isFixedPosition)
inFixed = false;
else if (currentStep.m_isFixedPosition)
inFixed = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes