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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2303773002: Align reference box computation for inline boxes with Gecko (Closed)
Patch Set: Maybe now Created 4 years, 3 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/LayoutTests/css3/masking/clip-path-reference-box-inline-expected.html ('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/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 37a94ac80e0939e43eb374798ff3684fdb5e86ef..0023fca995480ad91ab50f3517d37182e635d94e 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2061,7 +2061,13 @@ LayoutRect PaintLayer::boxForClipPath() const
{
if (!layoutObject()->isBox()) {
SECURITY_DCHECK(layoutObject()->isLayoutInline());
- return toLayoutInline(layoutObject())->linesBoundingBox();
+ const LayoutInline& layoutInline = toLayoutInline(*layoutObject());
+ // This somewhat convoluted computation matches what Gecko does.
+ // See crbug.com/641907.
+ LayoutRect inlineBBox = layoutInline.linesBoundingBox();
+ const InlineFlowBox* flowBox = layoutInline.firstLineBox();
+ inlineBBox.setHeight(flowBox ? flowBox->frameRect().height() : LayoutUnit(0));
+ return inlineBBox;
}
return toLayoutBox(layoutObject())->borderBoxRect();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/masking/clip-path-reference-box-inline-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698