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

Side by Side Diff: sky/engine/core/css/CSSStyleSheet.cpp

Issue 774953002: Always Reconstruct when stylesheets change. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 didMutate(PartialRuleUpdate); 157 didMutate(PartialRuleUpdate);
158 } 158 }
159 159
160 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) 160 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType)
161 { 161 {
162 Document* owner = ownerDocument(); 162 Document* owner = ownerDocument();
163 if (!owner) 163 if (!owner)
164 return; 164 return;
165 165
166 // Need FullStyleUpdate when insertRule or deleteRule, 166 owner->modifiedStyleSheet(this);
167 // because StyleSheetCollection::analyzeStyleSheetChange cannot detect parti al rule update.
168 StyleResolverUpdateMode updateMode = updateType != PartialRuleUpdate ? Analy zedStyleUpdate : FullStyleUpdate;
169 owner->modifiedStyleSheet(this, updateMode);
170 } 167 }
171 168
172 void CSSStyleSheet::reattachChildRuleCSSOMWrappers() 169 void CSSStyleSheet::reattachChildRuleCSSOMWrappers()
173 { 170 {
174 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { 171 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) {
175 if (!m_childRuleCSSOMWrappers[i]) 172 if (!m_childRuleCSSOMWrappers[i])
176 continue; 173 continue;
177 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i)); 174 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i));
178 } 175 }
179 } 176 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 { 327 {
331 return ownerNode() ? &ownerNode()->document() : 0; 328 return ownerNode() ? &ownerNode()->document() : 0;
332 } 329 }
333 330
334 void CSSStyleSheet::clearChildRuleCSSOMWrappers() 331 void CSSStyleSheet::clearChildRuleCSSOMWrappers()
335 { 332 {
336 m_childRuleCSSOMWrappers.clear(); 333 m_childRuleCSSOMWrappers.clear();
337 } 334 }
338 335
339 } // namespace blink 336 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/invalidation/StyleSheetInvalidationAnalysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698