OLD | NEW |
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 class FontFaceSet; | 166 class FontFaceSet; |
167 | 167 |
168 typedef int ExceptionCode; | 168 typedef int ExceptionCode; |
169 | 169 |
170 enum PageshowEventPersistence { | 170 enum PageshowEventPersistence { |
171 PageshowEventNotPersisted = 0, | 171 PageshowEventNotPersisted = 0, |
172 PageshowEventPersisted = 1 | 172 PageshowEventPersisted = 1 |
173 }; | 173 }; |
174 | 174 |
175 enum StyleResolverUpdateType { RecalcStyleImmediately, RecalcStyleDeferred }; | 175 enum RecalcStyleTime { |
| 176 RecalcStyleImmediately, // synchronous |
| 177 RecalcStyleDeferred // asynchronous |
| 178 }; |
176 | 179 |
177 enum StyleResolverUpdateMode { | 180 enum StyleResolverUpdateMode { |
178 // Discards the StyleResolver and rebuilds it. | 181 // Discards the StyleResolver and rebuilds it. |
179 FullStyleUpdate, | 182 FullStyleUpdate, |
180 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire
StyleResolver. | 183 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire
StyleResolver. |
181 AnalyzedStyleUpdate | 184 AnalyzedStyleUpdate |
182 }; | 185 }; |
183 | 186 |
184 enum NodeListInvalidationType { | 187 enum NodeListInvalidationType { |
185 DoNotInvalidateOnAttributeChanges = 0, | 188 DoNotInvalidateOnAttributeChanges = 0, |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 446 |
444 // This is a DOM function. | 447 // This is a DOM function. |
445 StyleSheetList* styleSheets(); | 448 StyleSheetList* styleSheets(); |
446 | 449 |
447 StyleEngine* styleEngine() { return m_styleEngine.get(); } | 450 StyleEngine* styleEngine() { return m_styleEngine.get(); } |
448 | 451 |
449 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter
StylesheetsLoad; } | 452 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter
StylesheetsLoad; } |
450 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft
erStylesheetsLoad = b; } | 453 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft
erStylesheetsLoad = b; } |
451 | 454 |
452 // Called when one or more stylesheets in the document may have been added,
removed, or changed. | 455 // Called when one or more stylesheets in the document may have been added,
removed, or changed. |
453 void styleResolverChanged(StyleResolverUpdateType, StyleResolverUpdateMode =
FullStyleUpdate); | 456 void styleResolverChanged(RecalcStyleTime, StyleResolverUpdateMode = FullSty
leUpdate); |
454 | 457 |
455 // FIXME: Switch all callers of styleResolverChanged to these or better ones
and then make them | 458 // FIXME: Switch all callers of styleResolverChanged to these or better ones
and then make them |
456 // do something smarter. | 459 // do something smarter. |
457 void removedStyleSheet(StyleSheet*, StyleResolverUpdateType type = RecalcSty
leDeferred) { styleResolverChanged(type); } | 460 void removedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDeferr
ed) { styleResolverChanged(when); } |
458 void addedStyleSheet(StyleSheet*, StyleResolverUpdateType type = RecalcStyle
Deferred) { styleResolverChanged(type); } | 461 void addedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDeferred
) { styleResolverChanged(when); } |
459 void modifiedStyleSheet(StyleSheet*, StyleResolverUpdateType type = RecalcSt
yleDeferred) { styleResolverChanged(type); } | 462 void modifiedStyleSheet(StyleSheet*, RecalcStyleTime when = RecalcStyleDefer
red) { styleResolverChanged(when); } |
460 void changedSelectorWatch() { styleResolverChanged(RecalcStyleDeferred); } | 463 void changedSelectorWatch() { styleResolverChanged(RecalcStyleDeferred); } |
461 | 464 |
462 void didAccessStyleResolver() { ++m_styleResolverAccessCount; } | 465 void didAccessStyleResolver() { ++m_styleResolverAccessCount; } |
463 | 466 |
464 void evaluateMediaQueryList(); | 467 void evaluateMediaQueryList(); |
465 | 468 |
466 // Never returns 0. | 469 // Never returns 0. |
467 FormController* formController(); | 470 FormController* formController(); |
468 Vector<String> formElementsState() const; | 471 Vector<String> formElementsState() const; |
469 void setStateForNewFormElements(const Vector<String>&); | 472 void setStateForNewFormElements(const Vector<String>&); |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 inline bool Node::isDocumentNode() const | 1416 inline bool Node::isDocumentNode() const |
1414 { | 1417 { |
1415 return this == documentInternal(); | 1418 return this == documentInternal(); |
1416 } | 1419 } |
1417 | 1420 |
1418 Node* eventTargetNodeForDocument(Document*); | 1421 Node* eventTargetNodeForDocument(Document*); |
1419 | 1422 |
1420 } // namespace WebCore | 1423 } // namespace WebCore |
1421 | 1424 |
1422 #endif // Document_h | 1425 #endif // Document_h |
OLD | NEW |