Changeset 206880 in webkit


Ignore:
Timestamp:
Oct 6, 2016 1:53:08 PM (8 years ago)
Author:
Antti Koivisto
Message:

Mutating styleSheet in shadow tree doesn't update the style
https://bugs.webkit.org/show_bug.cgi?id=162744
<rdar://problem/28550588>

Reviewed by Ryosuke Niwa.

Source/WebCore:

We weren't always invalidating the right AuthorStyleSheets (to be renamed) instance
for the scope after mutations.

Test: fast/shadow-dom/mutating-stylesheet-in-shadow-tree.html

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::didMutate):
(WebCore::CSSStyleSheet::clearOwnerNode):
(WebCore::CSSStyleSheet::rootStyleSheet):
(WebCore::CSSStyleSheet::ownerDocument):
(WebCore::CSSStyleSheet::styleSheetScope):

Invalidate the right scope after stylesheet mutations.

  • css/CSSStyleSheet.h:
  • dom/AuthorStyleSheets.cpp:

(WebCore::AuthorStyleSheets::styleResolver):
(WebCore::AuthorStyleSheets::styleResolverIfExists):

Take care to update the right style resolver.

(WebCore::AuthorStyleSheets::forNode):
(WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode):

Start the update timer so clients don't need to request update separately.

(WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
(WebCore::AuthorStyleSheets::updateActiveStyleSheets):
(WebCore::AuthorStyleSheets::updateStyleResolver):

  • dom/AuthorStyleSheets.h:
  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::insertedIntoDocument):

Save the scope we were inserted into so removals can be done reliably.

(WebCore::InlineStyleSheetOwner::removedFromDocument):

Use and clear the saved scope.
Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call.

(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
(WebCore::authorStyleSheetsForElement): Deleted.

  • dom/InlineStyleSheetOwner.h:

(WebCore::InlineStyleSheetOwner::styleSheetScope):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::styleResolverIfExists):

  • dom/ShadowRoot.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::removedFrom):

Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call.

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::~HTMLStyleElement):
(WebCore::HTMLStyleElement::parseAttribute):

Fix a bug where we wouldn't create stylesheet if a style element was activated by removing a media attribute.

(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::getMatchedCSSRules):

  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::~SVGStyleElement):
(WebCore::SVGStyleElement::insertedInto):
(WebCore::SVGStyleElement::removedFrom):

LayoutTests:

  • fast/shadow-dom/mutating-stylesheet-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/mutating-stylesheet-in-shadow-tree.html: Added.
Location:
trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206868 r206880  
     12016-10-06  Antti Koivisto  <antti@apple.com>
     2
     3        Mutating styleSheet in shadow tree doesn't update the style
     4        https://bugs.webkit.org/show_bug.cgi?id=162744
     5        <rdar://problem/28550588>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        * fast/shadow-dom/mutating-stylesheet-in-shadow-tree-expected.html: Added.
     10        * fast/shadow-dom/mutating-stylesheet-in-shadow-tree.html: Added.
     11
    1122016-10-06  Adam Bergkvist  <adam.bergkvist@ericsson.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r206879 r206880  
     12016-10-06  Antti Koivisto  <antti@apple.com>
     2
     3        Mutating styleSheet in shadow tree doesn't update the style
     4        https://bugs.webkit.org/show_bug.cgi?id=162744
     5        <rdar://problem/28550588>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        We weren't always invalidating the right AuthorStyleSheets (to be renamed) instance
     10        for the scope after mutations.
     11
     12        Test: fast/shadow-dom/mutating-stylesheet-in-shadow-tree.html
     13
     14        * css/CSSStyleSheet.cpp:
     15        (WebCore::CSSStyleSheet::didMutateRules):
     16        (WebCore::CSSStyleSheet::didMutate):
     17        (WebCore::CSSStyleSheet::clearOwnerNode):
     18        (WebCore::CSSStyleSheet::rootStyleSheet):
     19        (WebCore::CSSStyleSheet::ownerDocument):
     20        (WebCore::CSSStyleSheet::styleSheetScope):
     21
     22            Invalidate the right scope after stylesheet mutations.
     23
     24        * css/CSSStyleSheet.h:
     25        * dom/AuthorStyleSheets.cpp:
     26        (WebCore::AuthorStyleSheets::styleResolver):
     27        (WebCore::AuthorStyleSheets::styleResolverIfExists):
     28
     29            Take care to update the right style resolver.
     30
     31        (WebCore::AuthorStyleSheets::forNode):
     32        (WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode):
     33
     34            Start the update timer so clients don't need to request update separately.
     35
     36        (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
     37        (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
     38        (WebCore::AuthorStyleSheets::updateStyleResolver):
     39        * dom/AuthorStyleSheets.h:
     40        * dom/InlineStyleSheetOwner.cpp:
     41        (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
     42
     43            Save the scope we were inserted into so removals can be done reliably.
     44
     45        (WebCore::InlineStyleSheetOwner::removedFromDocument):
     46
     47            Use and clear the saved scope.
     48            Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call.
     49
     50        (WebCore::InlineStyleSheetOwner::clearDocumentData):
     51        (WebCore::InlineStyleSheetOwner::createSheet):
     52        (WebCore::InlineStyleSheetOwner::sheetLoaded):
     53        (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
     54        (WebCore::authorStyleSheetsForElement): Deleted.
     55        * dom/InlineStyleSheetOwner.h:
     56        (WebCore::InlineStyleSheetOwner::styleSheetScope):
     57        * dom/ShadowRoot.cpp:
     58        (WebCore::ShadowRoot::styleResolverIfExists):
     59        * dom/ShadowRoot.h:
     60        * html/HTMLLinkElement.cpp:
     61        (WebCore::HTMLLinkElement::removedFrom):
     62
     63            Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call.
     64
     65        * html/HTMLStyleElement.cpp:
     66        (WebCore::HTMLStyleElement::~HTMLStyleElement):
     67        (WebCore::HTMLStyleElement::parseAttribute):
     68
     69            Fix a bug where we wouldn't create stylesheet if a style element was activated by removing a media attribute.
     70
     71        (WebCore::HTMLStyleElement::insertedInto):
     72        (WebCore::HTMLStyleElement::removedFrom):
     73        * page/DOMWindow.cpp:
     74        (WebCore::DOMWindow::getMatchedCSSRules):
     75        * svg/SVGStyleElement.cpp:
     76        (WebCore::SVGStyleElement::~SVGStyleElement):
     77        (WebCore::SVGStyleElement::insertedInto):
     78        (WebCore::SVGStyleElement::removedFrom):
     79
    1802016-10-06  Alex Christensen  <achristensen@webkit.org>
    281
  • trunk/Source/WebCore/css/CSSStyleSheet.cpp

    r206361 r206880  
    4242#include "SVGStyleElement.h"
    4343#include "SecurityOrigin.h"
     44#include "ShadowRoot.h"
    4445#include "StyleResolver.h"
    4546#include "StyleRule.h"
     
    170171    ASSERT(m_contents->hasOneClient());
    171172
    172     Document* owner = ownerDocument();
    173     if (!owner)
     173    auto* scope = styleSheetScope();
     174    if (!scope)
    174175        return;
    175176
    176     if (mutationType == RuleInsertion && !contentsWereClonedForMutation && !owner->authorStyleSheets().activeStyleSheetsContains(this)) {
     177    if (mutationType == RuleInsertion && !contentsWereClonedForMutation && !scope->activeStyleSheetsContains(this)) {
    177178        if (insertedKeyframesRule) {
    178             if (StyleResolver* resolver = owner->styleResolverIfExists())
     179            if (auto* resolver = scope->styleResolverIfExists())
    179180                resolver->addKeyframeStyle(*insertedKeyframesRule);
    180181            return;
    181182        }
    182         owner->authorStyleSheets().scheduleActiveSetUpdate();
     183        scope->scheduleActiveSetUpdate();
    183184        return;
    184185    }
    185186
    186     owner->authorStyleSheets().didChangeContentsOrInterpretation();
     187    scope->didChangeContentsOrInterpretation();
    187188
    188189    m_mutatedRules = true;
     
    191192void CSSStyleSheet::didMutate()
    192193{
    193     Document* owner = ownerDocument();
    194     if (!owner)
     194    auto* scope = styleSheetScope();
     195    if (!scope)
    195196        return;
    196     owner->authorStyleSheets().didChangeContentsOrInterpretation();
     197    scope->didChangeContentsOrInterpretation();
    197198}
    198199
    199200void CSSStyleSheet::clearOwnerNode()
    200201{
    201     Document* owner = ownerDocument();
    202     m_ownerNode = 0;
    203     if (!owner)
    204         return;
    205     owner->authorStyleSheets().didChangeCandidatesForActiveSet();
     202    m_ownerNode = nullptr;
    206203}
    207204
     
    400397}
    401398
    402 Document* CSSStyleSheet::ownerDocument() const
    403 {
    404     const CSSStyleSheet* root = this;
     399CSSStyleSheet& CSSStyleSheet::rootStyleSheet()
     400{
     401    auto* root = this;
    405402    while (root->parentStyleSheet())
    406403        root = root->parentStyleSheet();
    407     return root->ownerNode() ? &root->ownerNode()->document() : nullptr;
     404    return *root;
     405}
     406
     407const CSSStyleSheet& CSSStyleSheet::rootStyleSheet() const
     408{
     409    return const_cast<CSSStyleSheet&>(*this).rootStyleSheet();
     410}
     411
     412Document* CSSStyleSheet::ownerDocument() const
     413{
     414    auto& root = rootStyleSheet();
     415    return root.ownerNode() ? &root.ownerNode()->document() : nullptr;
     416}
     417
     418AuthorStyleSheets* CSSStyleSheet::styleSheetScope()
     419{
     420    auto* ownerNode = rootStyleSheet().ownerNode();
     421    if (!ownerNode)
     422        return nullptr;
     423    return &AuthorStyleSheets::forNode(*ownerNode);
    408424}
    409425
  • trunk/Source/WebCore/css/CSSStyleSheet.h

    r205455 r206880  
    3232namespace WebCore {
    3333
     34class AuthorStyleSheets;
    3435class CSSCharsetRule;
    3536class CSSImportRule;
     
    8384   
    8485    void clearOwnerRule() { m_ownerRule = 0; }
     86
    8587    Document* ownerDocument() const;
     88    CSSStyleSheet& rootStyleSheet();
     89    const CSSStyleSheet& rootStyleSheet() const;
     90    AuthorStyleSheets* styleSheetScope();
     91
    8692    MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); }
    8793    void setMediaQueries(Ref<MediaQuerySet>&&);
  • trunk/Source/WebCore/dom/AuthorStyleSheets.cpp

    r206641 r206880  
    7070}
    7171
     72StyleResolver& AuthorStyleSheets::styleResolver()
     73{
     74    if (m_shadowRoot)
     75        return m_shadowRoot->styleResolver();
     76
     77    return m_document.ensureStyleResolver();
     78}
     79
     80StyleResolver* AuthorStyleSheets::styleResolverIfExists()
     81{
     82    if (m_shadowRoot)
     83        return m_shadowRoot->styleResolverIfExists();
     84
     85    return m_document.styleResolverIfExists();
     86}
     87
     88AuthorStyleSheets& AuthorStyleSheets::forNode(Node& node)
     89{
     90    ASSERT(node.inDocument());
     91    auto* shadowRoot = node.containingShadowRoot();
     92    if (shadowRoot)
     93        return shadowRoot->authorStyleSheets();
     94    return node.document().authorStyleSheets();
     95}
     96
    7297// This method is called whenever a top-level stylesheet has finished loading.
    7398void AuthorStyleSheets::removePendingSheet(RemovePendingSheetNotificationType notification)
     
    134159void AuthorStyleSheets::removeStyleSheetCandidateNode(Node& node)
    135160{
    136     m_styleSheetCandidateNodes.remove(&node);
     161    if (m_styleSheetCandidateNodes.remove(&node))
     162        scheduleActiveSetUpdate();
    137163}
    138164
     
    221247    unsigned newStylesheetCount = newStylesheets.size();
    222248
    223     if (!m_document.styleResolverIfExists())
     249    if (!styleResolverIfExists())
    224250        return Reconstruct;
    225251
    226     StyleResolver& styleResolver = *m_document.styleResolverIfExists();
     252    StyleResolver& styleResolver = *styleResolverIfExists();
    227253
    228254    // Find out which stylesheets are new.
     
    307333    }
    308334
     335    // FIXME: Support optimized invalidation in shadow trees.
     336    if (m_shadowRoot)
     337        updateType = UpdateType::ContentsOrInterpretation;
     338
    309339    m_didUpdateActiveStyleSheets = true;
    310340
     
    353383        return;
    354384    }
    355     auto& styleResolver = m_document.ensureStyleResolver();
    356     auto& userAgentShadowTreeStyleResolver = m_document.userAgentShadowTreeStyleResolver();
     385    auto& styleResolver = this->styleResolver();
    357386
    358387    if (updateType == Reset) {
     
    367396    }
    368397
    369     userAgentShadowTreeStyleResolver.ruleSets().resetAuthorStyle();
    370     auto& authorRuleSet = styleResolver.ruleSets().authorStyle();
    371     if (authorRuleSet.hasShadowPseudoElementRules())
    372         userAgentShadowTreeStyleResolver.ruleSets().authorStyle().copyShadowPseudoElementRulesFrom(authorRuleSet);
     398    if (!m_shadowRoot) {
     399        auto& userAgentShadowTreeStyleResolver = m_document.userAgentShadowTreeStyleResolver();
     400        userAgentShadowTreeStyleResolver.ruleSets().resetAuthorStyle();
     401        auto& authorRuleSet = styleResolver.ruleSets().authorStyle();
     402        if (authorRuleSet.hasShadowPseudoElementRules())
     403            userAgentShadowTreeStyleResolver.ruleSets().authorStyle().copyShadowPseudoElementRulesFrom(authorRuleSet);
     404    }
    373405}
    374406
     
    423455void AuthorStyleSheets::scheduleActiveSetUpdate()
    424456{
     457    if (m_shadowRoot) {
     458        // FIXME: We need to flush updates recursively to support asynchronous updates in shadow trees.
     459        didChangeCandidatesForActiveSet();
     460        return;
     461    }
    425462    if (m_pendingUpdateTimer.isActive())
    426463        return;
  • trunk/Source/WebCore/dom/AuthorStyleSheets.h

    r206641 r206880  
    4343class Document;
    4444class Node;
     45class StyleResolver;
    4546class StyleSheet;
    4647class StyleSheetContents;
     
    8788    bool hasPendingUpdate() const { return !!m_pendingUpdateType; }
    8889    void flushPendingUpdate();
     90
     91    StyleResolver& styleResolver();
     92    StyleResolver* styleResolverIfExists();
     93
     94    static AuthorStyleSheets& forNode(Node&);
    8995
    9096private:
  • trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp

    r206361 r206880  
    5050}
    5151
    52 static AuthorStyleSheets& authorStyleSheetsForElement(Element& element)
     52void InlineStyleSheetOwner::insertedIntoDocument(Element& element)
    5353{
    54     auto* shadowRoot = element.containingShadowRoot();
    55     return shadowRoot ? shadowRoot->authorStyleSheets() : element.document().authorStyleSheets();
    56 }
    57 
    58 void InlineStyleSheetOwner::insertedIntoDocument(Document&, Element& element)
    59 {
    60     authorStyleSheetsForElement(element).addStyleSheetCandidateNode(element, m_isParsingChildren);
     54    m_styleSheetScope = &AuthorStyleSheets::forNode(element);
     55    m_styleSheetScope->addStyleSheetCandidateNode(element, m_isParsingChildren);
    6156
    6257    if (m_isParsingChildren)
     
    6560}
    6661
    67 void InlineStyleSheetOwner::removedFromDocument(Document& document, Element& element)
     62void InlineStyleSheetOwner::removedFromDocument(Element& element)
    6863{
    69     authorStyleSheetsForElement(element).removeStyleSheetCandidateNode(element);
    70 
     64    if (m_styleSheetScope) {
     65        m_styleSheetScope->removeStyleSheetCandidateNode(element);
     66        m_styleSheetScope = nullptr;
     67    }
    7168    if (m_sheet)
    7269        clearSheet();
    73 
    74     // If we're in document teardown, then we don't need to do any notification of our sheet's removal.
    75     if (document.hasLivingRenderTree())
    76         document.authorStyleSheets().didChangeContentsOrInterpretation();
    7770}
    7871
    79 void InlineStyleSheetOwner::clearDocumentData(Document&, Element& element)
     72void InlineStyleSheetOwner::clearDocumentData(Element& element)
    8073{
    8174    if (m_sheet)
    8275        m_sheet->clearOwnerNode();
    8376
    84     if (!element.inDocument())
    85         return;
    86     authorStyleSheetsForElement(element).removeStyleSheetCandidateNode(element);
     77    if (m_styleSheetScope) {
     78        m_styleSheetScope->removeStyleSheetCandidateNode(element);
     79        m_styleSheetScope = nullptr;
     80    }
    8781}
    8882
     
    131125    Document& document = element.document();
    132126    if (m_sheet) {
    133         if (m_sheet->isLoading())
    134             document.authorStyleSheets().removePendingSheet();
     127        if (m_sheet->isLoading() && m_styleSheetScope)
     128            m_styleSheetScope->removePendingSheet();
    135129        clearSheet();
    136130    }
     
    156150        return;
    157151
    158     authorStyleSheetsForElement(element).addPendingSheet();
     152    if (m_styleSheetScope)
     153        m_styleSheetScope->addPendingSheet();
    159154
    160155    m_loading = true;
     
    178173}
    179174
    180 bool InlineStyleSheetOwner::sheetLoaded(Element& element)
     175bool InlineStyleSheetOwner::sheetLoaded(Element&)
    181176{
    182177    if (isLoading())
    183178        return false;
    184179
    185     authorStyleSheetsForElement(element).removePendingSheet();
     180    if (m_styleSheetScope)
     181        m_styleSheetScope->removePendingSheet();
     182
    186183    return true;
    187184}
    188185
    189 void InlineStyleSheetOwner::startLoadingDynamicSheet(Element& element)
     186void InlineStyleSheetOwner::startLoadingDynamicSheet(Element&)
    190187{
    191     authorStyleSheetsForElement(element).addPendingSheet();
     188    if (m_styleSheetScope)
     189        m_styleSheetScope->addPendingSheet();
    192190}
    193191
  • trunk/Source/WebCore/dom/InlineStyleSheetOwner.h

    r190256 r206880  
    4545    void startLoadingDynamicSheet(Element&);
    4646
    47     void insertedIntoDocument(Document&, Element&);
    48     void removedFromDocument(Document&, Element&);
    49     void clearDocumentData(Document&, Element&);
     47    void insertedIntoDocument(Element&);
     48    void removedFromDocument(Element&);
     49    void clearDocumentData(Element&);
    5050    void childrenChanged(Element&);
    5151    void finishParsingChildren(Element&);
     52
     53    AuthorStyleSheets* styleSheetScope() { return m_styleSheetScope; }
    5254
    5355private:
     
    6264    AtomicString m_media;
    6365    RefPtr<CSSStyleSheet> m_sheet;
     66    AuthorStyleSheets* m_styleSheetScope { nullptr };
    6467};
    6568
  • trunk/Source/WebCore/dom/ShadowRoot.cpp

    r206361 r206880  
    9595}
    9696
     97StyleResolver* ShadowRoot::styleResolverIfExists()
     98{
     99    if (m_type == Mode::UserAgent)
     100        return &document().userAgentShadowTreeStyleResolver();
     101
     102    return m_styleResolver.get();
     103}
     104
    97105void ShadowRoot::resetStyleResolver()
    98106{
  • trunk/Source/WebCore/dom/ShadowRoot.h

    r204543 r206880  
    6464
    6565    StyleResolver& styleResolver();
     66    StyleResolver* styleResolverIfExists();
    6667    AuthorStyleSheets& authorStyleSheets();
    67    
     68
    6869    void updateStyle();
    6970    void resetStyleResolver();
  • trunk/Source/WebCore/html/HTMLLinkElement.cpp

    r206867 r206880  
    329329    if (styleSheetIsLoading())
    330330        removePendingSheet(RemovePendingSheetNotifyLater);
    331 
    332     if (document().hasLivingRenderTree())
    333         document().authorStyleSheets().didChangeCandidatesForActiveSet();
    334331}
    335332
  • trunk/Source/WebCore/html/HTMLStyleElement.cpp

    r206603 r206880  
    5959HTMLStyleElement::~HTMLStyleElement()
    6060{
    61     // During tear-down, willRemove isn't called, so m_scopedStyleRegistrationState may still be RegisteredAsScoped or RegisteredInShadowRoot here.
    62     // Therefore we can't ASSERT(m_scopedStyleRegistrationState == NotRegistered).
    63     m_styleSheetOwner.clearDocumentData(document(), *this);
     61    m_styleSheetOwner.clearDocumentData(*this);
    6462
    6563    styleLoadEventSender().cancelEvent(*this);
     
    7977        if (sheet()) {
    8078            sheet()->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value));
    81             if (inDocument() && document().hasLivingRenderTree())
    82                 document().authorStyleSheets().didChangeContentsOrInterpretation();
    83         }
     79            if (auto* scope = m_styleSheetOwner.styleSheetScope())
     80                scope->didChangeContentsOrInterpretation();
     81        } else
     82            m_styleSheetOwner.childrenChanged(*this);
    8483    } else if (name == typeAttr)
    8584        m_styleSheetOwner.setContentType(value);
     
    9897    HTMLElement::insertedInto(insertionPoint);
    9998    if (insertionPoint.inDocument())
    100         m_styleSheetOwner.insertedIntoDocument(document(), *this);
     99        m_styleSheetOwner.insertedIntoDocument(*this);
    101100
    102101    return InsertionDone;
     
    108107
    109108    if (insertionPoint.inDocument())
    110         m_styleSheetOwner.removedFromDocument(document(), *this);
     109        m_styleSheetOwner.removedFromDocument(*this);
    111110}
    112111
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r206751 r206880  
    2828#include "DOMWindow.h"
    2929
     30#include "AuthorStyleSheets.h"
    3031#include "BackForwardController.h"
    3132#include "BarProp.h"
     
    14321433        return nullptr;
    14331434
     1435    m_frame->document()->authorStyleSheets().flushPendingUpdate();
     1436
    14341437    unsigned rulesToInclude = StyleResolver::AuthorCSSRules;
    14351438    if (!authorOnly)
  • trunk/Source/WebCore/svg/SVGStyleElement.cpp

    r203324 r206880  
    4242SVGStyleElement::~SVGStyleElement()
    4343{
    44     m_styleSheetOwner.clearDocumentData(document(), *this);
     44    m_styleSheetOwner.clearDocumentData(*this);
    4545}
    4646
     
    124124    SVGElement::insertedInto(rootParent);
    125125    if (rootParent.inDocument())
    126         m_styleSheetOwner.insertedIntoDocument(document(), *this);
     126        m_styleSheetOwner.insertedIntoDocument(*this);
    127127    return InsertionDone;
    128128}
     
    132132    SVGElement::removedFrom(rootParent);
    133133    if (rootParent.inDocument())
    134         m_styleSheetOwner.removedFromDocument(document(), *this);
     134        m_styleSheetOwner.removedFromDocument(*this);
    135135}
    136136
Note: See TracChangeset for help on using the changeset viewer.