Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 957 box->layoutIfNeeded(); | 957 box->layoutIfNeeded(); |
| 958 } | 958 } |
| 959 | 959 |
| 960 LayoutCallback* Element::layoutManager() const | 960 LayoutCallback* Element::layoutManager() const |
| 961 { | 961 { |
| 962 return m_layoutManager.get(); | 962 return m_layoutManager.get(); |
| 963 } | 963 } |
| 964 | 964 |
| 965 void Element::setLayoutManager(PassOwnPtr<LayoutCallback> callback) | 965 void Element::setLayoutManager(PassOwnPtr<LayoutCallback> callback) |
| 966 { | 966 { |
| 967 if (renderer() && !renderer()->isRenderCustomLayout()) { | 967 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
| |
| 968 bool requiresCustomLayout = callback; | |
| 969 if (requiresCustomLayout != isAlreadyCustomLayout) { | |
| 968 // We don't go through the normal reattach codepaths because | 970 // We don't go through the normal reattach codepaths because |
| 969 // those are all tied to changes to the RenderStyle. | 971 // those are all tied to changes to the RenderStyle. |
| 970 markAncestorsWithChildNeedsStyleRecalc(); | 972 markAncestorsWithChildNeedsStyleRecalc(); |
| 971 detach(); | 973 detach(); |
| 972 } | 974 } |
| 973 m_layoutManager = callback; | 975 m_layoutManager = callback; |
| 974 } | 976 } |
| 975 | 977 |
| 976 void Element::childrenChanged(const ChildrenChange& change) | 978 void Element::childrenChanged(const ChildrenChange& change) |
| 977 { | 979 { |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1642 return false; | 1644 return false; |
| 1643 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1645 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1644 return true; | 1646 return true; |
| 1645 // Host rules could also have effects. | 1647 // Host rules could also have effects. |
| 1646 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1648 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1647 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1649 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1648 return false; | 1650 return false; |
| 1649 } | 1651 } |
| 1650 | 1652 |
| 1651 } // namespace blink | 1653 } // namespace blink |
| OLD | NEW |