| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 30d660fdd46a83bb9ff2393035101af091732607..24d7951ce9b05d70bf4eea37a1c1e7a7092464ba 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -110,7 +110,7 @@ using namespace XMLNames;
|
|
|
| class StyleResolverParentPusher {
|
| public:
|
| - StyleResolverParentPusher(Element* parent)
|
| + explicit StyleResolverParentPusher(Element& parent)
|
| : m_parent(parent)
|
| , m_pushedStyleResolver(0)
|
| {
|
| @@ -119,7 +119,7 @@ public:
|
| {
|
| if (m_pushedStyleResolver)
|
| return;
|
| - m_pushedStyleResolver = m_parent->document().styleResolver();
|
| + m_pushedStyleResolver = m_parent.document().styleResolver();
|
| m_pushedStyleResolver->pushParentElement(m_parent);
|
| }
|
| ~StyleResolverParentPusher()
|
| @@ -130,15 +130,15 @@ public:
|
|
|
| // This tells us that our pushed style selector is in a bad state,
|
| // so we should just bail out in that scenario.
|
| - ASSERT(m_pushedStyleResolver == m_parent->document().styleResolver());
|
| - if (m_pushedStyleResolver != m_parent->document().styleResolver())
|
| + ASSERT(m_pushedStyleResolver == m_parent.document().styleResolver());
|
| + if (m_pushedStyleResolver != m_parent.document().styleResolver())
|
| return;
|
|
|
| m_pushedStyleResolver->popParentElement(m_parent);
|
| }
|
|
|
| private:
|
| - Element* m_parent;
|
| + Element& m_parent;
|
| StyleResolver* m_pushedStyleResolver;
|
| };
|
|
|
| @@ -1370,7 +1370,7 @@ void Element::attach(const AttachContext& context)
|
| {
|
| ASSERT(document().inStyleRecalc());
|
|
|
| - StyleResolverParentPusher parentPusher(this);
|
| + StyleResolverParentPusher parentPusher(*this);
|
|
|
| // We've already been through detach when doing a lazyAttach, but we might
|
| // need to clear any state that's been added since then.
|
| @@ -1597,7 +1597,7 @@ void Element::recalcChildStyle(StyleRecalcChange change)
|
| {
|
| ASSERT(document().inStyleRecalc());
|
|
|
| - StyleResolverParentPusher parentPusher(this);
|
| + StyleResolverParentPusher parentPusher(*this);
|
|
|
| for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
|
| if (shouldRecalcStyle(change, root)) {
|
|
|