Bug 1443553: Devirtualize ContentStateChanged / DocumentStatesChanged / StyleRule*. r=smaug

MozReview-Commit-ID: RE6rrBQMMU
This commit is contained in:
Emilio Cobos Álvarez 2018-03-06 16:38:18 +01:00
Родитель cd0b749f03
Коммит 44c8fa419b
3 изменённых файлов: 14 добавлений и 27 удалений

Просмотреть файл

@ -5487,7 +5487,7 @@ nsDocument::UnblockDOMContentLoaded()
}
void
nsDocument::ContentStateChanged(nsIContent* aContent, EventStates aStateMask)
nsIDocument::ContentStateChanged(nsIContent* aContent, EventStates aStateMask)
{
NS_PRECONDITION(!nsContentUtils::IsSafeToRunScript(),
"Someone forgot a scriptblocker");
@ -5496,14 +5496,14 @@ nsDocument::ContentStateChanged(nsIContent* aContent, EventStates aStateMask)
}
void
nsDocument::DocumentStatesChanged(EventStates aStateMask)
nsIDocument::DocumentStatesChanged(EventStates aStateMask)
{
UpdateDocumentStates(aStateMask);
NS_DOCUMENT_NOTIFY_OBSERVERS(DocumentStatesChanged, (this, aStateMask));
}
void
nsDocument::StyleRuleChanged(StyleSheet* aSheet, css::Rule* aStyleRule)
nsIDocument::StyleRuleChanged(StyleSheet* aSheet, css::Rule* aStyleRule)
{
if (!StyleSheetChangeEventsEnabled()) {
return;
@ -5516,7 +5516,7 @@ nsDocument::StyleRuleChanged(StyleSheet* aSheet, css::Rule* aStyleRule)
}
void
nsDocument::StyleRuleAdded(StyleSheet* aSheet, css::Rule* aStyleRule)
nsIDocument::StyleRuleAdded(StyleSheet* aSheet, css::Rule* aStyleRule)
{
if (!StyleSheetChangeEventsEnabled()) {
return;
@ -5529,7 +5529,7 @@ nsDocument::StyleRuleAdded(StyleSheet* aSheet, css::Rule* aStyleRule)
}
void
nsDocument::StyleRuleRemoved(StyleSheet* aSheet, css::Rule* aStyleRule)
nsIDocument::StyleRuleRemoved(StyleSheet* aSheet, css::Rule* aStyleRule)
{
if (!StyleSheetChangeEventsEnabled()) {
return;

Просмотреть файл

@ -499,19 +499,6 @@ public:
virtual void SetReadyStateInternal(ReadyState rs) override;
virtual void ContentStateChanged(nsIContent* aContent,
mozilla::EventStates aStateMask)
override;
virtual void DocumentStatesChanged(
mozilla::EventStates aStateMask) override;
virtual void StyleRuleChanged(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) override;
virtual void StyleRuleAdded(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) override;
virtual void StyleRuleRemoved(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) override;
void FlushPendingNotifications(mozilla::FlushType aType) final;
virtual void FlushExternalResources(mozilla::FlushType aType) override;
virtual void SetXMLDeclaration(const char16_t *aVersion,

Просмотреть файл

@ -1694,22 +1694,22 @@ public:
// notify that a content node changed state. This must happen under
// a scriptblocker but NOT within a begin/end update.
virtual void ContentStateChanged(nsIContent* aContent,
mozilla::EventStates aStateMask) = 0;
void ContentStateChanged(
nsIContent* aContent, mozilla::EventStates aStateMask);
// Notify that a document state has changed.
// This should only be called by callers whose state is also reflected in the
// implementation of nsDocument::GetDocumentState.
virtual void DocumentStatesChanged(mozilla::EventStates aStateMask) = 0;
void DocumentStatesChanged(mozilla::EventStates aStateMask);
// Observation hooks for style data to propagate notifications
// to document observers
virtual void StyleRuleChanged(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) = 0;
virtual void StyleRuleAdded(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) = 0;
virtual void StyleRuleRemoved(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule) = 0;
void StyleRuleChanged(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule);
void StyleRuleAdded(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule);
void StyleRuleRemoved(mozilla::StyleSheet* aStyleSheet,
mozilla::css::Rule* aStyleRule);
/**
* Flush notifications for this document and its parent documents