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

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

Issue 2867293002: [LayoutNG] Compute baseline from fragment tree (Closed)
Patch Set: Cleanup Created 3 years, 5 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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 0a9ba371a29c5677d8c4b4c21d54144b49db650f..025d62cd87cdf923e5b28e13c69dae025ecaad77 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -2606,18 +2606,7 @@ int LayoutBlockFlow::FirstLineBoxBaseline() const {
int LayoutBlockFlow::InlineBlockBaseline(
LineDirectionMode line_direction) const {
- // CSS2.1 states that the baseline of an 'inline-block' is:
- // the baseline of the last line box in the normal flow, unless it has
- // either no in-flow line boxes or if its 'overflow' property has a computed
- // value other than 'visible', in which case the baseline is the bottom
- // margin edge.
- // We likewise avoid using the last line box in the case of size containment,
- // where the block's contents shouldn't be considered when laying out its
- // ancestors or siblings.
-
- if ((!Style()->IsOverflowVisible() &&
- !ShouldIgnoreOverflowPropertyForInlineBlockBaseline()) ||
- Style()->ContainsSize()) {
+ if (UseLogicalBottomMarginEdgeForInlineBlockBaseline()) {
// We are not calling baselinePosition here because the caller should add
// the margin-top/margin-right, not us.
return (line_direction == kHorizontalLine ? Size().Height() + MarginBottom()

Powered by Google App Engine
This is Rietveld 408576698