mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #2112 - Part 10: Remove remaining Stylo/Servo includes and code
Some classes have been marked for removal/merging, macros used for forwarding/casting were moved to DeprecatedUtils.h.
This commit is contained in:
parent
b96b733bfa
commit
d6852b3170
54 changed files with 35 additions and 2957 deletions
|
|
@ -39,10 +39,6 @@
|
|||
#include "nsCoord.h"
|
||||
#include "nsFontMetrics.h"
|
||||
|
||||
// Ensure the binding function declarations in nsStyleContext.h matches
|
||||
// those in ServoBindings.h.
|
||||
#include "mozilla/ServoBindings.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
@ -124,18 +120,6 @@ nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
|||
FinishConstruction(aSkipParentDisplayBasedStyleFixup);
|
||||
}
|
||||
|
||||
nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
||||
nsPresContext* aPresContext,
|
||||
nsIAtom* aPseudoTag,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
already_AddRefed<ServoComputedValues> aComputedValues,
|
||||
bool aSkipParentDisplayBasedStyleFixup)
|
||||
: nsStyleContext(aParent, OwningStyleContextSource(Move(aComputedValues)),
|
||||
aPseudoTag, aPseudoType)
|
||||
{
|
||||
FinishConstruction(aSkipParentDisplayBasedStyleFixup);
|
||||
}
|
||||
|
||||
void
|
||||
nsStyleContext::FinishConstruction(bool aSkipParentDisplayBasedStyleFixup)
|
||||
{
|
||||
|
|
@ -644,14 +628,6 @@ ShouldBlockifyChildren(const nsStyleDisplay* aStyleDisp)
|
|||
void
|
||||
nsStyleContext::SetStyleBits()
|
||||
{
|
||||
// XXXbholley: We should get this information directly from the
|
||||
// ServoComputedValues rather than computing it here. This setup for
|
||||
// ServoComputedValues-backed nsStyleContexts is probably not something
|
||||
// we should ship.
|
||||
//
|
||||
// For example, NS_STYLE_IS_TEXT_COMBINED is still set in ApplyStyleFixups,
|
||||
// which isn't called for ServoComputedValues.
|
||||
|
||||
// See if we have any text decorations.
|
||||
// First see if our parent has text decorations. If our parent does, then we inherit the bit.
|
||||
if (mParent && mParent->HasTextDecorationLines()) {
|
||||
|
|
@ -1255,44 +1231,6 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
|
|||
aEqualStructs, aSamePointerStructs);
|
||||
}
|
||||
|
||||
class MOZ_STACK_CLASS FakeStyleContext
|
||||
{
|
||||
public:
|
||||
explicit FakeStyleContext(const ServoComputedValues* aComputedValues)
|
||||
: mComputedValues(aComputedValues) {}
|
||||
|
||||
mozilla::NonOwningStyleContextSource StyleSource() const {
|
||||
return mozilla::NonOwningStyleContextSource(mComputedValues);
|
||||
}
|
||||
|
||||
nsStyleContext* GetStyleIfVisited() {
|
||||
// XXXbholley: This is wrong. Need to implement to get visited handling
|
||||
// corrrect!
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#define STYLE_STRUCT(name_, checkdata_cb_) \
|
||||
const nsStyle##name_ * Style##name_() { \
|
||||
return Servo_GetStyle##name_(mComputedValues); \
|
||||
}
|
||||
#include "nsStyleStructList.h"
|
||||
#undef STYLE_STRUCT
|
||||
|
||||
private:
|
||||
const ServoComputedValues* MOZ_NON_OWNING_REF mComputedValues;
|
||||
};
|
||||
|
||||
nsChangeHint
|
||||
nsStyleContext::CalcStyleDifference(const ServoComputedValues* aNewComputedValues,
|
||||
nsChangeHint aParentHintsNotHandledForDescendants,
|
||||
uint32_t* aEqualStructs,
|
||||
uint32_t* aSamePointerStructs)
|
||||
{
|
||||
FakeStyleContext newContext(aNewComputedValues);
|
||||
return CalcStyleDifferenceInternal(&newContext, aParentHintsNotHandledForDescendants,
|
||||
aEqualStructs, aSamePointerStructs);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void nsStyleContext::List(FILE* out, int32_t aIndent, bool aListDescendants)
|
||||
{
|
||||
|
|
@ -1392,21 +1330,6 @@ NS_NewStyleContext(nsStyleContext* aParentContext,
|
|||
return context.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsStyleContext>
|
||||
NS_NewStyleContext(nsStyleContext* aParentContext,
|
||||
nsPresContext* aPresContext,
|
||||
nsIAtom* aPseudoTag,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
already_AddRefed<ServoComputedValues> aComputedValues,
|
||||
bool aSkipParentDisplayBasedStyleFixup)
|
||||
{
|
||||
RefPtr<nsStyleContext> context =
|
||||
new (aPresContext)
|
||||
nsStyleContext(aParentContext, aPresContext, aPseudoTag, aPseudoType,
|
||||
Move(aComputedValues), aSkipParentDisplayBasedStyleFixup);
|
||||
return context.forget();
|
||||
}
|
||||
|
||||
nsIPresShell*
|
||||
nsStyleContext::Arena()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue