Index: Source/WebCore/dom/Document.h |
=================================================================== |
--- Source/WebCore/dom/Document.h (revision 126674) |
+++ Source/WebCore/dom/Document.h (working copy) |
@@ -480,8 +480,14 @@ |
/** |
* Updates the pending sheet count and then calls updateActiveStylesheets. |
*/ |
- void removePendingSheet(); |
+ enum RemovePendingSheetNotificationType { |
+ RemovePendingSheetNotifyImmediately, |
+ RemovePendingSheetNotifyLater |
+ }; |
+ void removePendingSheet(RemovePendingSheetNotificationType = RemovePendingSheetNotifyImmediately); |
+ void notifyRemovePendingSheetIfNeeded(); |
+ |
/** |
* This method returns true if all top-level stylesheets have loaded (including |
* any @imports that they may be loading). |
@@ -1226,6 +1232,8 @@ |
void collectActiveStylesheets(Vector<RefPtr<StyleSheet> >&); |
bool testAddedStylesheetRequiresStyleRecalc(StyleSheetContents*); |
void analyzeStylesheetChange(StyleResolverUpdateFlag, const Vector<RefPtr<StyleSheet> >& newStylesheets, bool& requiresStyleResolverReset, bool& requiresFullStyleRecalc); |
+ void didRemoveAllPendingStylesheet(); |
+ void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPendingStylesheet = true; } |
void seamlessParentUpdatedStylesheets(); |
void notifySeamlessChildDocumentsOfStylesheetUpdate() const; |
@@ -1301,7 +1309,8 @@ |
// But sometimes you need to ignore pending stylesheet count to |
// force an immediate layout when requested by JS. |
- bool m_ignorePendingStylesheets; |
+ bool m_ignorePendingStylesheets : 1; |
+ bool m_needsNotifyRemoveAllPendingStylesheet : 1; |
// If we do ignore the pending stylesheet count, then we need to add a boolean |
// to track that this happened so that we can do a full repaint when the stylesheets |
@@ -1555,6 +1564,12 @@ |
#endif |
}; |
+inline void Document::notifyRemovePendingSheetIfNeeded() |
+{ |
+ if (m_needsNotifyRemoveAllPendingStylesheet) |
+ didRemoveAllPendingStylesheet(); |
+} |
+ |
// Put these methods here, because they require the Document definition, but we really want to inline them. |
inline bool Node::isDocumentNode() const |