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

Side by Side Diff: Source/core/dom/Document.h

Issue 296743003: Removed RecalcStyleTime. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 7 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/CSSStyleSheet.cpp ('k') | Source/core/dom/Document.cpp » ('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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 class TransformSource; 168 class TransformSource;
169 class TreeWalker; 169 class TreeWalker;
170 class VisitedLinkState; 170 class VisitedLinkState;
171 class WebGLRenderingContext; 171 class WebGLRenderingContext;
172 class XMLHttpRequest; 172 class XMLHttpRequest;
173 173
174 struct AnnotatedRegionValue; 174 struct AnnotatedRegionValue;
175 175
176 typedef int ExceptionCode; 176 typedef int ExceptionCode;
177 177
178 enum RecalcStyleTime {
179 RecalcStyleImmediately, // synchronous
180 RecalcStyleDeferred // asynchronous
181 };
182
183 enum StyleResolverUpdateMode { 178 enum StyleResolverUpdateMode {
184 // Discards the StyleResolver and rebuilds it. 179 // Discards the StyleResolver and rebuilds it.
185 FullStyleUpdate, 180 FullStyleUpdate,
186 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire StyleResolver. 181 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire StyleResolver.
187 AnalyzedStyleUpdate 182 AnalyzedStyleUpdate
188 }; 183 };
189 184
190 enum NodeListInvalidationType { 185 enum NodeListInvalidationType {
191 DoNotInvalidateOnAttributeChanges = 0, 186 DoNotInvalidateOnAttributeChanges = 0,
192 InvalidateOnClassAttrChange, 187 InvalidateOnClassAttrChange,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 429
435 // This is a DOM function. 430 // This is a DOM function.
436 StyleSheetList* styleSheets(); 431 StyleSheetList* styleSheets();
437 432
438 StyleEngine* styleEngine() { return m_styleEngine.get(); } 433 StyleEngine* styleEngine() { return m_styleEngine.get(); }
439 434
440 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter StylesheetsLoad; } 435 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter StylesheetsLoad; }
441 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft erStylesheetsLoad = b; } 436 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft erStylesheetsLoad = b; }
442 437
443 // Called when one or more stylesheets in the document may have been added, removed, or changed. 438 // Called when one or more stylesheets in the document may have been added, removed, or changed.
444 void styleResolverChanged(RecalcStyleTime, StyleResolverUpdateMode = FullSty leUpdate); 439 void styleResolverChanged(StyleResolverUpdateMode = FullStyleUpdate);
445 void styleResolverMayHaveChanged(); 440 void styleResolverMayHaveChanged();
446 441
447 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them 442 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them
448 // do something smarter. 443 // do something smarter.
449 void removedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDeferr ed, StyleResolverUpdateMode = FullStyleUpdate); 444 void removedStyleSheet(StyleSheet*, StyleResolverUpdateMode = FullStyleUpdat e);
450 void addedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDeferred ) { styleResolverChanged(when); } 445 void addedStyleSheet(StyleSheet*) { styleResolverChanged(); }
451 void modifiedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDefer red, StyleResolverUpdateMode = FullStyleUpdate); 446 void modifiedStyleSheet(StyleSheet*, StyleResolverUpdateMode = FullStyleUpda te);
452 void changedSelectorWatch() { styleResolverChanged(RecalcStyleDeferred); } 447 void changedSelectorWatch() { styleResolverChanged(); }
453 448
454 void scheduleUseShadowTreeUpdate(SVGUseElement&); 449 void scheduleUseShadowTreeUpdate(SVGUseElement&);
455 void unscheduleUseShadowTreeUpdate(SVGUseElement&); 450 void unscheduleUseShadowTreeUpdate(SVGUseElement&);
456 451
457 // FIXME: This should be eliminated and elements that use it should be made to 452 // FIXME: This should be eliminated and elements that use it should be made to
458 // always have a layer so they don't need to go about creating one from reas ons 453 // always have a layer so they don't need to go about creating one from reas ons
459 // external to style. 454 // external to style.
460 void scheduleLayerUpdate(Element&); 455 void scheduleLayerUpdate(Element&);
461 void unscheduleLayerUpdate(Element&); 456 void unscheduleLayerUpdate(Element&);
462 457
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 inline bool Node::isDocumentNode() const 1436 inline bool Node::isDocumentNode() const
1442 { 1437 {
1443 return this == document(); 1438 return this == document();
1444 } 1439 }
1445 1440
1446 Node* eventTargetNodeForDocument(Document*); 1441 Node* eventTargetNodeForDocument(Document*);
1447 1442
1448 } // namespace WebCore 1443 } // namespace WebCore
1449 1444
1450 #endif // Document_h 1445 #endif // Document_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698