Merge inbound to mozilla-central. a=merge
This commit is contained in:
@@ -183,9 +183,6 @@
|
||||
#include "nsLayoutStylesheetCache.h"
|
||||
#include "mozilla/layers/InputAPZContext.h"
|
||||
#include "mozilla/layers/FocusTarget.h"
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
#include "nsStyleSet.h"
|
||||
#endif
|
||||
#include "mozilla/StyleSetHandle.h"
|
||||
#include "mozilla/StyleSetHandleInlines.h"
|
||||
#include "mozilla/StyleSheet.h"
|
||||
@@ -612,12 +609,7 @@ VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager)
|
||||
NS_ERROR("stylo: cannot verify style tree with a ServoRestyleManager");
|
||||
return;
|
||||
}
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
nsIFrame* rootFrame = aFrameManager->GetRootFrame();
|
||||
aPresContext->RestyleManager()->AsGecko()->DebugVerifyStyleTree(rootFrame);
|
||||
#else
|
||||
MOZ_CRASH("old style system disabled");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#define VERIFY_STYLE_TREE ::VerifyStyleTree(mPresContext, mFrameConstructor)
|
||||
@@ -4388,21 +4380,7 @@ PresShell::DocumentStatesChanged(nsIDocument* aDocument, EventStates aStateMask)
|
||||
if (mStyleSet->IsServo()) {
|
||||
mStyleSet->AsServo()->InvalidateStyleForDocumentStateChanges(aStateMask);
|
||||
} else {
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
if (Element* rootElement = aDocument->GetRootElement()) {
|
||||
const bool needRestyle =
|
||||
mStyleSet->AsGecko()->HasDocumentStateDependentStyle(
|
||||
rootElement, aStateMask);
|
||||
if (needRestyle) {
|
||||
mPresContext->RestyleManager()->PostRestyleEvent(rootElement,
|
||||
eRestyle_Subtree,
|
||||
nsChangeHint(0));
|
||||
VERIFY_STYLE_TREE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
MOZ_CRASH("old style system disabled");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9611,15 +9589,6 @@ CopySheetsIntoClone(StyleSetHandle aSet, StyleSetHandle aClone)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
nsStyleSet*
|
||||
PresShell::CloneStyleSet(nsStyleSet* aSet)
|
||||
{
|
||||
nsStyleSet* clone = new nsStyleSet();
|
||||
CopySheetsIntoClone(aSet, clone);
|
||||
return clone;
|
||||
}
|
||||
#endif
|
||||
|
||||
ServoStyleSet*
|
||||
PresShell::CloneStyleSet(ServoStyleSet* aSet)
|
||||
@@ -9679,27 +9648,16 @@ PresShell::VerifyIncrementalReflow()
|
||||
|
||||
// Create a new presentation shell to view the document. Use the
|
||||
// exact same style information that this document has.
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
nsAutoPtr<nsStyleSet> newGeckoSet;
|
||||
#endif
|
||||
nsAutoPtr<ServoStyleSet> newServoSet;
|
||||
StyleSetHandle newSet;
|
||||
if (mStyleSet->IsServo()) {
|
||||
newServoSet = CloneStyleSet(mStyleSet->AsServo());
|
||||
newSet = newServoSet;
|
||||
} else {
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
newGeckoSet = CloneStyleSet(mStyleSet->AsGecko());
|
||||
newSet = newGeckoSet;
|
||||
#else
|
||||
MOZ_CRASH("old style system disabled");
|
||||
#endif
|
||||
}
|
||||
nsCOMPtr<nsIPresShell> sh = mDocument->CreateShell(cx, vm, newSet);
|
||||
NS_ENSURE_TRUE(sh, false);
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
newGeckoSet.forget();
|
||||
#endif
|
||||
newServoSet.forget();
|
||||
// Note that after we create the shell, we must make sure to destroy it
|
||||
sh->SetVerifyReflowEnable(false); // turn off verify reflow while we're reflowing the test frame tree
|
||||
@@ -10429,11 +10387,7 @@ PresShell::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const
|
||||
mFramesToDirty.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
|
||||
if (StyleSet()->IsGecko()) {
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
StyleSet()->AsGecko()->AddSizeOfIncludingThis(aSizes);
|
||||
#else
|
||||
MOZ_CRASH("old style system disabled");
|
||||
#endif
|
||||
} else {
|
||||
StyleSet()->AsServo()->AddSizeOfIncludingThis(aSizes);
|
||||
}
|
||||
@@ -10634,14 +10588,7 @@ nsIPresShell::HasRuleProcessorUsedByMultipleStyleSets(uint32_t aSheetType,
|
||||
{
|
||||
*aRetVal = false;
|
||||
if (mStyleSet->IsGecko()) {
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
nsStyleSet* styleSet = mStyleSet->AsGecko();
|
||||
// ServoStyleSets do not have rule processors.
|
||||
SheetType type = ToSheetType(aSheetType);
|
||||
*aRetVal = styleSet->HasRuleProcessorUsedByMultipleStyleSets(type);
|
||||
#else
|
||||
MOZ_CRASH("old style system disabled");
|
||||
#endif
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user