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

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

Issue 1876123002: Absolute positioned child with percent should include containing block padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply mstensho's comment 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
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index ecf56523406d81926d8ab38ceb3fe04ae5cb079c..c2925569776f92ed9e6ce698abc03735b8d539f4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1652,6 +1652,8 @@ LayoutUnit LayoutBox::containingBlockLogicalWidthForContent() const
return overrideContainingBlockContentLogicalWidth();
LayoutBlock* cb = containingBlock();
+ if (!isTable() && isOutOfFlowPositioned())
+ return cb->clientLogicalWidth();
return cb->availableLogicalWidth();
}

Powered by Google App Engine
This is Rietveld 408576698