Diff
Modified: branches/safari-600.1-branch/LayoutTests/ChangeLog (172775 => 172776)
--- branches/safari-600.1-branch/LayoutTests/ChangeLog 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/LayoutTests/ChangeLog 2014-08-19 23:20:37 UTC (rev 172776)
@@ -1,5 +1,27 @@
2014-08-19 Dana Burkart <[email protected]>
+ Merge r172656. <rdar://problem/17961698>
+
+ 2014-08-15 Zalan Bujtas <[email protected]>
+
+ REGRESSION: Parts of the route/route options windows are invisible at maps.google.com
+ https://bugs.webkit.org/show_bug.cgi?id=135977
+ <rdar://problem/17961698>
+
+ Reviewed by Andreas Kling.
+
+ When the style change requires both layout and repaint, the style diff is set to
+ 'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint.
+ However, in compositing context, layout may not be followed by repaint, so when the style diff
+ indicates layout, we need to figure out whether it implies repaint too.
+ This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer.
+ -tracked here: webkit.org/b/135990
+
+ * compositing/cliprect-and-position-change-on-compositing-layer-expected.html: Added.
+ * compositing/cliprect-and-position-change-on-compositing-layer.html: Added.
+
+2014-08-19 Dana Burkart <[email protected]>
+
Merge r172603
2014-08-14 Martin Hock <[email protected]>
Copied: branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer-expected.html (from rev 172656, trunk/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer-expected.html) (0 => 172776)
--- branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer-expected.html (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer-expected.html 2014-08-19 23:20:37 UTC (rev 172776)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that compositing layers get repainted properly when cliprect is applied with position change.</title>
+<style>
+ #foo {
+ position: absolute;
+ top: 1px;
+ left: 0px;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ -webkit-transform: translateZ(0);
+}
+</style>
+</head>
+<body>
+<div id=foo></div>
+</body>
+</html>
Copied: branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer.html (from rev 172656, trunk/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer.html) (0 => 172776)
--- branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer.html (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/compositing/cliprect-and-position-change-on-compositing-layer.html 2014-08-19 23:20:37 UTC (rev 172776)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that compositing layers get repainted properly when cliprect is applied with position change.</title>
+<style>
+ #foo {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ clip: rect(70px, 102px, 102px, -1px);
+ -webkit-transform: translateZ(0);
+}
+</style>
+</head>
+<body>
+<div id=foo></div>
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ setTimeout(function() {
+ var box = document.getElementById("foo");
+ box.style.clip = "rect(0px, 102px, 202px, 0px)";
+ box.style.top = "1px";
+ box.offsetHeight;
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+</script>
+</body>
+</html>
Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (172775 => 172776)
--- branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-08-19 23:20:37 UTC (rev 172776)
@@ -1,5 +1,35 @@
2014-08-19 Dana Burkart <[email protected]>
+ Merge r172656. <rdar://problem/17961698>
+
+ 2014-08-15 Zalan Bujtas <[email protected]>
+
+ REGRESSION: Parts of the route/route options windows are invisible at maps.google.com
+ https://bugs.webkit.org/show_bug.cgi?id=135977
+ <rdar://problem/17961698>
+
+ Reviewed by Andreas Kling.
+
+ When the style change requires both layout and repaint, the style diff is set to
+ 'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint.
+ However, in compositing context, layout may not be followed by repaint, so when the style diff
+ indicates layout, we need to figure out whether it implies repaint too.
+ This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer.
+ -tracked here: webkit.org/b/135990
+
+ Test: compositing/cliprect-and-position-change-on-compositing-layer.html
+
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::setNeedsPositionedMovementLayout):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::changeRequiresLayerRepaint):
+ (WebCore::RenderStyle::diffRequiresLayerRepaint):
+ (WebCore::RenderStyle::diffRequiresRepaint): Deleted.
+ * rendering/style/RenderStyle.h:
+ * rendering/style/RenderStyleConstants.h:
+
+2014-08-19 Dana Burkart <[email protected]>
+
Merge r172603
2014-08-14 Martin Hock <[email protected]>
Modified: branches/safari-600.1-branch/Source/WebCore/rendering/RenderElement.cpp (172775 => 172776)
--- branches/safari-600.1-branch/Source/WebCore/rendering/RenderElement.cpp 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/RenderElement.cpp 2014-08-19 23:20:37 UTC (rev 172776)
@@ -1028,7 +1028,7 @@
setNeedsPositionedMovementLayoutBit(true);
markContainingBlocksForLayout();
if (hasLayer()) {
- if (oldStyle && style().diffRequiresRepaint(oldStyle))
+ if (oldStyle && style().diffRequiresLayerRepaint(*oldStyle, toRenderLayerModelObject(this)->layer()->isComposited()))
setLayerNeedsFullRepaint();
else
setLayerNeedsFullRepaintForPositionedMovementLayout();
Modified: branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.cpp (172775 => 172776)
--- branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.cpp 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.cpp 2014-08-19 23:20:37 UTC (rev 172776)
@@ -678,9 +678,10 @@
return true;
if (position() != StaticPosition) {
- if (visual->clip != other->visual->clip
- || visual->hasClip != other->visual->hasClip)
+ if (visual->clip != other->visual->clip || visual->hasClip != other->visual->hasClip) {
+ changedContextSensitiveProperties |= ContextSensitivePropertyClipRect;
return true;
+ }
}
#if ENABLE(CSS_COMPOSITING)
@@ -809,10 +810,17 @@
return StyleDifferenceEqual;
}
-bool RenderStyle::diffRequiresRepaint(const RenderStyle* style) const
+bool RenderStyle::diffRequiresLayerRepaint(const RenderStyle& style, bool isComposited) const
{
unsigned changedContextSensitiveProperties = 0;
- return changeRequiresRepaint(style, changedContextSensitiveProperties);
+
+ if (changeRequiresRepaint(&style, changedContextSensitiveProperties))
+ return true;
+
+ if (isComposited && changeRequiresLayerRepaint(&style, changedContextSensitiveProperties))
+ return changedContextSensitiveProperties & ContextSensitivePropertyClipRect;
+
+ return false;
}
void RenderStyle::setClip(Length top, Length right, Length bottom, Length left)
Modified: branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.h (172775 => 172776)
--- branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.h 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyle.h 2014-08-19 23:20:37 UTC (rev 172776)
@@ -1708,7 +1708,7 @@
#endif
StyleDifference diff(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
- bool diffRequiresRepaint(const RenderStyle*) const;
+ bool diffRequiresLayerRepaint(const RenderStyle&, bool isComposited) const;
bool isDisplayReplacedType() const { return isDisplayReplacedType(display()); }
bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
Modified: branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyleConstants.h (172775 => 172776)
--- branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-08-19 23:12:54 UTC (rev 172775)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-08-19 23:20:37 UTC (rev 172776)
@@ -64,7 +64,8 @@
ContextSensitivePropertyNone = 0,
ContextSensitivePropertyTransform = (1 << 0),
ContextSensitivePropertyOpacity = (1 << 1),
- ContextSensitivePropertyFilter = (1 << 2)
+ ContextSensitivePropertyFilter = (1 << 2),
+ ContextSensitivePropertyClipRect = (1 << 3)
};
// Static pseudo styles. Dynamic ones are produced on the fly.