mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1420117 - Part 1: Add a ServoCSSParser::ParseCounterStyleName method. r=xidorn
MozReview-Commit-ID: DAaUi5lLrFS --HG-- extra : rebase_source : 5b53cbfc9a1286e7ece3a62fb20b536de28a73d6
This commit is contained in:
parent
1d69d9bcb9
commit
aaf7ca9322
@ -755,6 +755,8 @@ SERVO_BINDING_FUNC(Servo_ParseTransformIntoMatrix, bool,
|
||||
const nsAString* value,
|
||||
bool* contains_3d_transform,
|
||||
RawGeckoGfxMatrix4x4* result);
|
||||
SERVO_BINDING_FUNC(Servo_ParseCounterStyleName, nsAtom*,
|
||||
const nsACString* value);
|
||||
|
||||
// AddRef / Release functions
|
||||
#define SERVO_ARC_TYPE(name_, type_) \
|
||||
|
@ -32,3 +32,11 @@ ServoCSSParser::ParseIntersectionObserverRootMargin(const nsAString& aValue,
|
||||
{
|
||||
return Servo_ParseIntersectionObserverRootMargin(&aValue, aResult);
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<nsAtom>
|
||||
ServoCSSParser::ParseCounterStyleName(const nsAString& aValue)
|
||||
{
|
||||
NS_ConvertUTF16toUTF8 value(aValue);
|
||||
nsAtom* atom = Servo_ParseCounterStyleName(&value);
|
||||
return already_AddRefed<nsAtom>(atom);
|
||||
}
|
||||
|
@ -49,6 +49,15 @@ public:
|
||||
*/
|
||||
static bool ParseIntersectionObserverRootMargin(const nsAString& aValue,
|
||||
nsCSSRect* aResult);
|
||||
|
||||
/**
|
||||
* Parses a @counter-style name.
|
||||
*
|
||||
* @param aValue The name to parse.
|
||||
* @return The name as an atom, lowercased if a built-in counter style name,
|
||||
* or nullptr if parsing failed or if the name was invalid (like "inherit").
|
||||
*/
|
||||
static already_AddRefed<nsAtom> ParseCounterStyleName(const nsAString& aValue);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user