Skip to content

Commit

Permalink
Bug 1552628 - Remove some more dead nsCSSValue code. r=xidorn
Browse files Browse the repository at this point in the history
Most of it is not used at this point, this leaves the parts that are used by
MathML, which are minimal.

Differential Revision: https://phabricator.services.mozilla.com/D31706

--HG--
extra : moz-landing-system : lando
  • Loading branch information
emilio committed May 19, 2019
1 parent ba8e59a commit f4c3990
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1,048 deletions.
7 changes: 0 additions & 7 deletions layout/base/nsLayoutUtils.h
Expand Up @@ -3021,13 +3021,6 @@ class nsLayoutUtils {
mozilla::LookAndFeel::FontID aFontID,
const nsFont* aDefaultVariableFont);

static void ComputeFontFeatures(const nsCSSValuePairList* aFeaturesList,
nsTArray<gfxFontFeature>& aFeatureSettings);

static void ComputeFontVariations(
const nsCSSValuePairList* aVariationsList,
nsTArray<gfxFontVariation>& aVariationSettings);

static uint32_t ParseFontLanguageOverride(const nsAString& aLangTag);

/**
Expand Down
20 changes: 0 additions & 20 deletions layout/style/CounterStyleManager.cpp
Expand Up @@ -1167,11 +1167,6 @@ void CustomCounterStyle::GetNegative(NegativeType& aResult) {
aResult = mNegative;
}

static inline bool IsRangeValueInfinite(const nsCSSValue& aValue) {
return aValue.GetUnit() == eCSSUnit_Enumerated &&
aValue.GetIntValue() == NS_STYLE_COUNTER_RANGE_INFINITE;
}

/* virtual */
bool CustomCounterStyle::IsOrdinalInRange(CounterValue aOrdinal) {
auto inRange = Servo_CounterStyleRule_IsInRange(mRule, aOrdinal);
Expand Down Expand Up @@ -1515,21 +1510,6 @@ AnonymousCounterStyle::AnonymousCounterStyle(const nsAString& aContent)
mSymbols.AppendElement(aContent);
}

static nsTArray<nsString> CollectSymbolsFromCSSValueList(
const nsCSSValueList* aList) {
nsTArray<nsString> symbols;
for (const nsCSSValueList* item = aList; item; item = item->mNext) {
item->mValue.GetStringValue(*symbols.AppendElement());
}
symbols.Compact();
return symbols;
}

AnonymousCounterStyle::AnonymousCounterStyle(const nsCSSValue::Array* aParams)
: AnonymousCounterStyle(
aParams->Item(0).GetIntValue(),
CollectSymbolsFromCSSValueList(aParams->Item(1).GetListValue())) {}

AnonymousCounterStyle::AnonymousCounterStyle(uint8_t aSystem,
nsTArray<nsString> aSymbols)
: CounterStyle(NS_STYLE_LIST_STYLE_CUSTOM),
Expand Down
3 changes: 0 additions & 3 deletions layout/style/CounterStyleManager.h
Expand Up @@ -16,8 +16,6 @@

#include "mozilla/Attributes.h"

#include "nsCSSValue.h"

class nsPresContext;

namespace mozilla {
Expand Down Expand Up @@ -96,7 +94,6 @@ class AnonymousCounterStyle final : public CounterStyle {
public:
explicit AnonymousCounterStyle(const nsAString& aContent);
AnonymousCounterStyle(uint8_t aSystem, nsTArray<nsString> aSymbols);
explicit AnonymousCounterStyle(const nsCSSValue::Array* aValue);

virtual void GetPrefix(nsAString& aResult) override;
virtual void GetSuffix(nsAString& aResult) override;
Expand Down
2 changes: 0 additions & 2 deletions layout/style/FontFaceSet.cpp
Expand Up @@ -212,8 +212,6 @@ void FontFaceSet::ParseFontShorthandForMatching(
float stretch;
float weight;

// FIXME(emilio): This Servo -> nsCSSValue -> Gecko conversion is stupid,
// Servo understands the font types.
RefPtr<URLExtraData> url = ServoCSSParser::GetURLExtraData(mDocument);
if (!ServoCSSParser::ParseFontShorthandForMatching(aFont, url, aFamilyList,
style, stretch, weight)) {
Expand Down
1 change: 0 additions & 1 deletion layout/style/ServoCSSParser.h
Expand Up @@ -18,7 +18,6 @@
#include "nsDOMCSSDeclaration.h"
#include "nsStringFwd.h"

class nsCSSValue;
struct nsCSSRect;
struct nsTimingFunction;
struct RawServoDeclarationBlock;
Expand Down

0 comments on commit f4c3990

Please sign in to comment.