| Index: Source/core/layout/LayoutBoxModelObject.cpp
|
| diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp
|
| index 322bb7e4a5ebb6323025e044c5ed1568a0ac6880..1cf99d2bc82979715fcac0c08540c58d41ba5ed1 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. For example, if the parent
|
| + // is a LayoutBlock, it 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);
|
| }
|
|
|
|
|