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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_box.cc

Issue 2320393002: Let LayoutNG handle childless block flows. (Closed)
Patch Set: 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 | « no previous file | 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/ng/ng_box.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.cc b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
index 026d7bde3f958322c119b0cb8ed96425fa6dd9bc..d8085c90e7ec7dddb05805c0d512fa0f77bdacd7 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
@@ -132,8 +132,9 @@ void NGBox::PositionUpdated() {
bool NGBox::CanUseNewLayout() {
if (!layout_box_)
return true;
- if (layout_box_->isLayoutBlockFlow() && !layout_box_->childrenInline())
- return true;
- return false;
+ if (!layout_box_->isLayoutBlockFlow())
+ return false;
+ const LayoutBlockFlow* block_flow = toLayoutBlockFlow(layout_box_);
+ return !block_flow->childrenInline() || !block_flow->firstChild();
}
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698