Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
index d6f52fd0b0c271ec706d1afb9f2cfae2aa32b1f1..9dc1e328895813bfd4f710bace5692aa108fe813 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
@@ -2280,46 +2280,16 @@ LayoutRect LayoutBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, La |
void LayoutBlock::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot includeBlockOverflows) const |
{ |
- // For blocks inside inlines, we go ahead and include margins so that we run right up to the |
- // inline boxes above and below us (thus getting merged with them to form a single irregular |
- // shape). |
- const LayoutInline* inlineElementContinuation = this->inlineElementContinuation(); |
- if (inlineElementContinuation) { |
- // FIXME: This check really isn't accurate. |
- bool nextInlineHasLineBox = inlineElementContinuation->firstLineBox(); |
- // FIXME: This is wrong. The principal layoutObject may not be the continuation preceding this block. |
- // FIXME: This is wrong for vertical writing-modes. |
- // https://bugs.webkit.org/show_bug.cgi?id=46781 |
- bool prevInlineHasLineBox = toLayoutInline(inlineElementContinuation->node()->layoutObject())->firstLineBox(); |
- LayoutUnit topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : LayoutUnit(); |
- LayoutUnit bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : LayoutUnit(); |
- if (topMargin || bottomMargin) { |
- LayoutRect rect(additionalOffset, size()); |
- rect.expandEdges(topMargin, LayoutUnit(), bottomMargin, LayoutUnit()); |
- rects.append(rect); |
- } |
- } else if (!isAnonymous()) { // For anonymous blocks, the children add outline rects. |
+ if (!isAnonymous()) // For anonymous blocks, the children add outline rects. |
rects.append(LayoutRect(additionalOffset, size())); |
- } |
if (includeBlockOverflows == IncludeBlockVisualOverflow && !hasOverflowClip() && !hasControlClip()) { |
- for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { |
- LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top()); |
- LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height()); |
- LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top); |
- if (!rect.isEmpty()) |
- rects.append(rect); |
- } |
- |
addOutlineRectsForNormalChildren(rects, additionalOffset, includeBlockOverflows); |
if (TrackedLayoutBoxListHashSet* positionedObjects = this->positionedObjects()) { |
for (auto* box : *positionedObjects) |
addOutlineRectsForDescendant(*box, rects, additionalOffset, includeBlockOverflows); |
} |
} |
- |
- if (inlineElementContinuation) |
- inlineElementContinuation->addOutlineRects(rects, additionalOffset + (inlineElementContinuation->containingBlock()->location() - location()), includeBlockOverflows); |
} |
LayoutBox* LayoutBlock::createAnonymousBoxWithSameTypeAs(const LayoutObject* parent) const |