Title: [88617] trunk/Source/WebCore
- Revision
- 88617
- Author
- m...@apple.com
- Date
- 2011-06-12 11:27:00 -0700 (Sun, 12 Jun 2011)
Log Message
<rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes
https://bugs.webkit.org/show_bug.cgi?id=61557
Reviewed by Darin Adler.
Replaced the fix for bug 58500 with a refined version.
* rendering/RenderText.cpp:
(WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is
across a layer boundary.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (88616 => 88617)
--- trunk/Source/WebCore/ChangeLog 2011-06-12 17:23:28 UTC (rev 88616)
+++ trunk/Source/WebCore/ChangeLog 2011-06-12 18:27:00 UTC (rev 88617)
@@ -1,3 +1,16 @@
+2011-06-12 Dan Bernstein <m...@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes
+ https://bugs.webkit.org/show_bug.cgi?id=61557
+
+ Replaced the fix for bug 58500 with a refined version.
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is
+ across a layer boundary.
+
2011-06-12 Adam Barth <aba...@webkit.org>
Reviewed by Andreas Kling.
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (88616 => 88617)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2011-06-12 17:23:28 UTC (rev 88616)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2011-06-12 18:27:00 UTC (rev 88617)
@@ -1367,13 +1367,18 @@
IntRect RenderText::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)
{
- bool repaintContainerSkipped;
- RenderObject* container = this->container(repaintContainer, &repaintContainerSkipped);
- // The container may be an ancestor of repaintContainer, but we need to do a repaintContainer-relative repaint.
- if (repaintContainerSkipped)
+ RenderObject* rendererToRepaint = containingBlock();
+
+ // Do not cross self-painting layer boundaries.
+ RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer();
+ if (enclosingLayerRenderer != rendererToRepaint && !rendererToRepaint->isDescendantOf(enclosingLayerRenderer))
+ rendererToRepaint = enclosingLayerRenderer;
+
+ // The renderer we chose to repaint may be an ancestor of repaintContainer, but we need to do a repaintContainer-relative repaint.
+ if (repaintContainer && repaintContainer != rendererToRepaint && !rendererToRepaint->isDescendantOf(repaintContainer))
return repaintContainer->clippedOverflowRectForRepaint(repaintContainer);
- return container->clippedOverflowRectForRepaint(repaintContainer);
+ return rendererToRepaint->clippedOverflowRectForRepaint(repaintContainer);
}
IntRect RenderText::selectionRectForRepaint(RenderBoxModelObject* repaintContainer, bool clipToVisibleContent)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes