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

Unified Diff: sky/engine/core/rendering/style/RenderStyle.cpp

Issue 839153002: Fix crash in continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review nit Created 5 years, 11 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 | « sky/engine/core/rendering/style/RenderStyle.h ('k') | sky/tests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/style/RenderStyle.cpp
diff --git a/sky/engine/core/rendering/style/RenderStyle.cpp b/sky/engine/core/rendering/style/RenderStyle.cpp
index b131493481958b5cce8113b558097815abec1d6b..4e01acc17b6d2076fd5133db441c1ae8be30d719 100644
--- a/sky/engine/core/rendering/style/RenderStyle.cpp
+++ b/sky/engine/core/rendering/style/RenderStyle.cpp
@@ -227,6 +227,28 @@ bool RenderStyle::inheritedDataShared(const RenderStyle* other) const
&& rareInheritedData.get() == other->rareInheritedData.get();
}
+bool RenderStyle::requiresOnlyBlockChildren()
+{
+ switch (display()) {
+ case PARAGRAPH:
+ case INLINE:
+ return false;
+
+ case BLOCK:
+ case FLEX:
+ case INLINE_FLEX:
+ case INLINE_BLOCK:
+ return true;
+
+ case NONE:
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
static bool positionedObjectMovedOnly(const LengthBox& a, const LengthBox& b, const Length& width)
{
// If any unit types are different, then we can't guarantee
« no previous file with comments | « sky/engine/core/rendering/style/RenderStyle.h ('k') | sky/tests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698