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

Unified Diff: sky/engine/core/css/resolver/StyleAdjuster.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/css/resolver/SharedStyleFinder.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/StyleAdjuster.cpp
diff --git a/sky/engine/core/css/resolver/StyleAdjuster.cpp b/sky/engine/core/css/resolver/StyleAdjuster.cpp
index f465d6b06a268ef2a85f3d075050b515a8075b0b..621476167e3f1685b39c6a889fa4292e99ea0f51 100644
--- a/sky/engine/core/css/resolver/StyleAdjuster.cpp
+++ b/sky/engine/core/css/resolver/StyleAdjuster.cpp
@@ -41,28 +41,6 @@
namespace blink {
-static bool requiresOnlyBlockChildren(RenderStyle* parentStyle)
-{
- switch (parentStyle->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 EDisplay equivalentInlineDisplay(EDisplay display)
{
switch (display) {
@@ -161,7 +139,7 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
if (style->hasOutOfFlowPosition() || element.document().documentElement() == element)
style->setDisplay(equivalentBlockDisplay(style->display()));
- if (requiresOnlyBlockChildren(parentStyle))
+ if (parentStyle->requiresOnlyBlockChildren())
style->setDisplay(equivalentBlockDisplay(style->display()));
else
style->setDisplay(equivalentInlineDisplay(style->display()));
« no previous file with comments | « sky/engine/core/css/resolver/SharedStyleFinder.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698