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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/SharedStyleFinder.cpp ('k') | Source/core/dom/ContextFeatures.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 const WillBeHeapVector<RawPtrWillBeMember<StyleRuleFontFace> > fontFaceR ules = authorRules.fontFaceRules(); 248 const WillBeHeapVector<RawPtrWillBeMember<StyleRuleFontFace> > fontFaceR ules = authorRules.fontFaceRules();
249 for (unsigned i = 0; i < fontFaceRules.size(); ++i) 249 for (unsigned i = 0; i < fontFaceRules.size(); ++i)
250 addFontFaceRule(&m_document, document().styleEngine()->fontSelector( ), fontFaceRules[i]); 250 addFontFaceRule(&m_document, document().styleEngine()->fontSelector( ), fontFaceRules[i]);
251 if (fontFaceRules.size()) 251 if (fontFaceRules.size())
252 invalidateMatchedPropertiesCache(); 252 invalidateMatchedPropertiesCache();
253 } 253 }
254 } 254 }
255 255
256 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) 256 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode)
257 { 257 {
258 // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleCh ild has been already modified.
259 // So we cannot use hasScopedHTMLStyleChild flag here.
260 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument(); 258 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument();
261 if (!resolver) 259 if (!resolver)
262 return; 260 return;
263 261
264 m_treeBoundaryCrossingRules.reset(scopingNode); 262 m_treeBoundaryCrossingRules.reset(scopingNode);
265 263
266 resolver->resetAuthorStyle(); 264 resolver->resetAuthorStyle();
267 resetRuleFeatures(); 265 resetRuleFeatures();
268 if (!scopingNode) 266 if (!scopingNode)
269 return; 267 return;
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 visitor->trace(m_viewportStyleResolver); 1505 visitor->trace(m_viewportStyleResolver);
1508 visitor->trace(m_features); 1506 visitor->trace(m_features);
1509 visitor->trace(m_siblingRuleSet); 1507 visitor->trace(m_siblingRuleSet);
1510 visitor->trace(m_uncommonAttributeRuleSet); 1508 visitor->trace(m_uncommonAttributeRuleSet);
1511 visitor->trace(m_watchedSelectorsRules); 1509 visitor->trace(m_watchedSelectorsRules);
1512 visitor->trace(m_treeBoundaryCrossingRules); 1510 visitor->trace(m_treeBoundaryCrossingRules);
1513 visitor->trace(m_pendingStyleSheets); 1511 visitor->trace(m_pendingStyleSheets);
1514 } 1512 }
1515 1513
1516 } // namespace WebCore 1514 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/SharedStyleFinder.cpp ('k') | Source/core/dom/ContextFeatures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698