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

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

Issue 2444323003: CanUseNewLayout should work for more cases (Closed)
Patch Set: Adjust TestExpectations Created 4 years, 2 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/TestExpectations ('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/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 8fe304a5ad05878ebc01b75b3f24ab52320d11bc..13f790844a421e87d8c086081e50bbb862332853 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
@@ -118,7 +118,13 @@ bool NGBox::CanUseNewLayout() {
if (!layout_box_->isLayoutBlockFlow())
return false;
const LayoutBlockFlow* block_flow = toLayoutBlockFlow(layout_box_);
- return !block_flow->childrenInline() || !block_flow->firstChild();
+ LayoutObject* child = block_flow->firstChild();
+ while (child) {
+ if (child->isInline())
+ return false;
+ child = child->nextSibling();
+ }
+ return true;
}
void NGBox::CopyFragmentDataToLayoutBox(
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698