Index: Source/core/layout/LayoutBoxModelObject.cpp |
diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp |
index 322bb7e4a5ebb6323025e044c5ed1568a0ac6880..3fdd847e19d204854f8f835095ec7ef653f4b2a6 100644 |
--- a/Source/core/layout/LayoutBoxModelObject.cpp |
+++ b/Source/core/layout/LayoutBoxModelObject.cpp |
@@ -414,6 +414,15 @@ void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc |
return; |
} |
+ if (descendant.isLayoutInline()) { |
+ // As an optimization, an ancestor has added rects for its line boxes covering descendants' |
+ // line boxes, so descendants don't need to add line boxes again. In particular, LayoutBlock |
chrishtr
2015/08/10 21:54:10
LayoutBlock is not necessarily the root entry poin
Xianzhu
2015/08/10 21:57:13
Done.
|
+ // adds rects for its RootOutlineBoxes, which cover the line boxes of this LayoutInline. |
+ // So the LayoutInline needs to add rects for children and continuations only. |
+ toLayoutInline(descendant).addOutlineRectsForChildrenAndContinuations(rects, additionalOffset); |
+ return; |
+ } |
+ |
descendant.addOutlineRects(rects, additionalOffset); |
} |