Title: [110643] trunk
- Revision
- 110643
- Author
- [email protected]
- Date
- 2012-03-13 16:58:59 -0700 (Tue, 13 Mar 2012)
Log Message
<rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
https://bugs.webkit.org/show_bug.cgi?id=81051
Reviewed by Simon Fraser.
.:
* ManualTests/inline-repaint-container.html: Added.
Source/WebCore:
Test: ManualTests/inline-repaint-container.html.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
case of the repaint container being a descendant of the containing block correctly, leading
to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
container is a descendant of the containing block, just return the rect in the repaint
container coordinates.
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (110642 => 110643)
--- trunk/ChangeLog 2012-03-13 23:57:32 UTC (rev 110642)
+++ trunk/ChangeLog 2012-03-13 23:58:59 UTC (rev 110643)
@@ -1,3 +1,12 @@
+2012-03-13 Dan Bernstein <[email protected]>
+
+ <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
+ https://bugs.webkit.org/show_bug.cgi?id=81051
+
+ Reviewed by Simon Fraser.
+
+ * ManualTests/inline-repaint-container.html: Added.
+
2012-03-13 Adam Barth <[email protected]> && Benjamin Poulain <[email protected]>
Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
Added: trunk/ManualTests/inline-repaint-container.html (0 => 110643)
--- trunk/ManualTests/inline-repaint-container.html (rev 0)
+++ trunk/ManualTests/inline-repaint-container.html 2012-03-13 23:58:59 UTC (rev 110643)
@@ -0,0 +1,12 @@
+<div style="-webkit-transform: translatez(0)">
+</div>
+<div style="position: relative;">
+ <span style="position: relative; z-index: 10; top: 40px; left: 30px;">
+ <span style="position: relative; top: 50px; font: 60px ahem; color: red;" id="target">X</span>
+ </span>
+</div>
+<script>
+ setTimeout(function() {
+ document.getElementById("target").style.color = "green";
+ }, 0);
+</script>
Modified: trunk/Source/WebCore/ChangeLog (110642 => 110643)
--- trunk/Source/WebCore/ChangeLog 2012-03-13 23:57:32 UTC (rev 110642)
+++ trunk/Source/WebCore/ChangeLog 2012-03-13 23:58:59 UTC (rev 110643)
@@ -1,5 +1,21 @@
2012-03-13 Dan Bernstein <[email protected]>
+ <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
+ https://bugs.webkit.org/show_bug.cgi?id=81051
+
+ Reviewed by Simon Fraser.
+
+ Test: ManualTests/inline-repaint-container.html.
+
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
+ case of the repaint container being a descendant of the containing block correctly, leading
+ to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
+ container is a descendant of the containing block, just return the rect in the repaint
+ container coordinates.
+
+2012-03-13 Dan Bernstein <[email protected]>
+
<rdar://problem/11025217> [Mac] Assertion failure in collectComplexTextRunsForCharactersCoreText
https://bugs.webkit.org/show_bug.cgi?id=77044
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (110642 => 110643)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2012-03-13 23:57:32 UTC (rev 110642)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2012-03-13 23:58:59 UTC (rev 110643)
@@ -1011,18 +1011,27 @@
// Now invalidate a rectangle.
LayoutUnit ow = style() ? style()->outlineSize() : 0;
-
+
+ bool hitRepaintContainer = false;
+
// We need to add in the relative position offsets of any inlines (including us) up to our
// containing block.
RenderBlock* cb = containingBlock();
for (const RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isRenderInline() && inlineFlow != cb;
inlineFlow = inlineFlow->parent()) {
- if (inlineFlow->style()->position() == RelativePosition && inlineFlow->hasLayer())
+ if (inlineFlow == repaintContainer) {
+ hitRepaintContainer = true;
+ break;
+ }
+ if (inlineFlow->style()->position() == RelativePosition && inlineFlow->hasLayer())
toRenderInline(inlineFlow)->layer()->relativePositionOffset(left, top);
}
LayoutRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2);
+ if (hitRepaintContainer)
+ return r;
+
if (cb->hasColumns())
cb->adjustRectForColumns(r);
@@ -1036,12 +1045,9 @@
LayoutRect boxRect(LayoutPoint(), cb->cachedSizeForOverflowClip());
r = intersection(repaintRect, boxRect);
}
-
- // FIXME: need to ensure that we compute the correct repaint rect when the repaint container
- // is an inline.
- if (repaintContainer != this)
- cb->computeRectForRepaint(repaintContainer, r);
+ cb->computeRectForRepaint(repaintContainer, r);
+
if (ow) {
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if (!curr->isText()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes