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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 1082273004: Fix crash when removing layout managers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 | sky/tests/layout/custom.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index ff0798b1e8f8e33578a31697508606879cc972c9..8537adb6d5e8cd8e4607ab5959d4f2b2b3877168 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -964,7 +964,9 @@ LayoutCallback* Element::layoutManager() const
void Element::setLayoutManager(PassOwnPtr<LayoutCallback> callback)
{
- if (renderer() && !renderer()->isRenderCustomLayout()) {
+ bool isAlreadyCustomLayout = renderer() && renderer()->isRenderCustomLayout();
Hixie 2015/04/14 20:53:38 Shouldn't this be checking callback != m_layoutMan
ojan 2015/04/14 20:55:05 Hmmm...this points to a different bug. If the layo
+ bool requiresCustomLayout = callback;
+ if (requiresCustomLayout != isAlreadyCustomLayout) {
// We don't go through the normal reattach codepaths because
// those are all tied to changes to the RenderStyle.
markAncestorsWithChildNeedsStyleRecalc();
« no previous file with comments | « no previous file | sky/tests/layout/custom.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698