Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 1968553002: Move absoluteRects() and absoluteQuads() overrides to LayoutBlockFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 1f11e9809007648f8021300f03ebf495772820d2..3c0e8e524324b24f76f99f8fdd84e63985fd79fc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -1936,6 +1936,40 @@ void LayoutBlockFlow::computeSelfHitTestRects(Vector<LayoutRect>& rects, const L
}
}
+void LayoutBlockFlow::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
+{
+ if (!isAnonymousBlockContinuation()) {
+ LayoutBlock::absoluteRects(rects, accumulatedOffset);
+ return;
+ }
+ // 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).
+ // FIXME: This is wrong for vertical writing-modes.
+ // https://bugs.webkit.org/show_bug.cgi?id=46781
+ LayoutRect rect(accumulatedOffset, size());
+ rect.expand(collapsedMarginBoxLogicalOutsets());
+ rects.append(pixelSnappedIntRect(rect));
+ continuation()->absoluteRects(rects, accumulatedOffset - toLayoutSize(location() + inlineElementContinuation()->containingBlock()->location()));
+}
+
+void LayoutBlockFlow::absoluteQuads(Vector<FloatQuad>& quads) const
+{
+ if (!isAnonymousBlockContinuation()) {
+ LayoutBlock::absoluteQuads(quads);
+ return;
+ }
+ // 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).
+ // FIXME: This is wrong for vertical writing-modes.
+ // https://bugs.webkit.org/show_bug.cgi?id=46781
+ LayoutRect localRect(LayoutPoint(), size());
+ localRect.expand(collapsedMarginBoxLogicalOutsets());
+ quads.append(localToAbsoluteQuad(FloatRect(localRect)));
+ continuation()->absoluteQuads(quads);
+}
+
RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox()
{
RootInlineBox* rootBox = createRootInlineBox();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698