mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 966168 - Implement symbols() CSS function. r=dbaron
This commit is contained in:
parent
49e2d85c76
commit
f69d6b2935
@ -48,8 +48,17 @@ nsCounterUseNode::GetCounterStyle()
|
||||
{
|
||||
if (!mCounterStyle) {
|
||||
const nsCSSValue& style = mCounterFunction->Item(mAllCounters ? 2 : 1);
|
||||
mCounterStyle = mPresContext->CounterStyleManager()->
|
||||
BuildCounterStyle(nsDependentString(style.GetStringBufferValue()));
|
||||
CounterStyleManager* manager = mPresContext->CounterStyleManager();
|
||||
if (style.GetUnit() == eCSSUnit_Ident) {
|
||||
nsString ident;
|
||||
style.GetStringValue(ident);
|
||||
mCounterStyle = manager->BuildCounterStyle(ident);
|
||||
} else if (style.GetUnit() == eCSSUnit_Symbols) {
|
||||
mCounterStyle = manager->BuildCounterStyle(style.GetArrayValue());
|
||||
} else {
|
||||
NS_NOTREACHED("Unknown counter style");
|
||||
mCounterStyle = CounterStyleManager::GetDecimalStyle();
|
||||
}
|
||||
}
|
||||
return mCounterStyle;
|
||||
}
|
||||
|
@ -31,3 +31,5 @@ fails-if(B2G) == descriptor-suffix.html descriptor-suffix-ref.html # B2G kerni
|
||||
== redefine-builtin.html redefine-builtin-ref.html
|
||||
== redefine-attr-mapping.html redefine-attr-mapping-ref.html
|
||||
== disclosure-styles.html disclosure-styles-ref.html
|
||||
== symbols-function.html symbols-function-ref.html
|
||||
== symbols-function-invalid.html symbols-function-invalid-ref.html
|
||||
|
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="test-common.css">
|
||||
<style type="text/css">
|
||||
.invalid {
|
||||
list-style-type: lower-greek;
|
||||
}
|
||||
</style>
|
||||
<ol start="-2" class="invalid">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
18
layout/reftests/counter-style/symbols-function-invalid.html
Normal file
18
layout/reftests/counter-style/symbols-function-invalid.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="test-common.css">
|
||||
<style type="text/css">
|
||||
.invalid {
|
||||
list-style-type: lower-greek;
|
||||
list-style-type: symbols(a b c);
|
||||
list-style-type: symbols(alphabetic a b c);
|
||||
list-style-type: symbols(numeric 0 1 2);
|
||||
list-style-type: symbols(additive 'a' 'b');
|
||||
list-style-type: symbols(fixed);
|
||||
list-style-type: symbols(alphabetic 'a');
|
||||
list-style-type: symbols(numeric '0');
|
||||
}
|
||||
</style>
|
||||
<ol start="-2" class="invalid">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
86
layout/reftests/counter-style/symbols-function-ref.html
Normal file
86
layout/reftests/counter-style/symbols-function-ref.html
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="test-common.css">
|
||||
<style type="text/css">
|
||||
@counter-style cyclic {
|
||||
system: cyclic;
|
||||
symbols: '*' '\2020' '\2021' '\A7';
|
||||
suffix: ' ';
|
||||
}
|
||||
@counter-style numeric {
|
||||
system: numeric;
|
||||
symbols: '0' '1' '2';
|
||||
suffix: ' ';
|
||||
}
|
||||
@counter-style alphabetic {
|
||||
system: alphabetic;
|
||||
symbols: '\26AA' '\26AB';
|
||||
suffix: ' ';
|
||||
}
|
||||
@counter-style symbolic {
|
||||
system: symbolic;
|
||||
symbols: '*' '\2020' '\2021' '\A7';
|
||||
suffix: ' ';
|
||||
}
|
||||
@counter-style fixed {
|
||||
system: fixed;
|
||||
symbols: '\25F0' '\25F1' '\25F2' '\25F3';
|
||||
suffix: ' ';
|
||||
}
|
||||
@counter-style counter {
|
||||
symbols: '*';
|
||||
}
|
||||
@counter-style counters {
|
||||
system: numeric;
|
||||
symbols: '0' '1';
|
||||
}
|
||||
.counter { counter-reset: a; }
|
||||
.counter p { counter-increment: a 1; }
|
||||
.counter p::after {
|
||||
content: counter(a, counter);
|
||||
}
|
||||
.counter, .counters {
|
||||
list-style-type: none;
|
||||
counter-reset: a;
|
||||
}
|
||||
.counter li, .counters li {
|
||||
counter-increment: a;
|
||||
padding-right: .5em;
|
||||
}
|
||||
.counter li::after {
|
||||
content: counter(a, counter);
|
||||
}
|
||||
.counters .counters li::after {
|
||||
content: counters(a, '.', counters);
|
||||
}
|
||||
</style>
|
||||
<ol start="-2" style="list-style-type: symbolic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" style="list-style-type: cyclic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" style="list-style-type: numeric">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" style="list-style-type: alphabetic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" style="list-style-type: symbolic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" style="list-style-type: fixed">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol class="counter">
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol class="counters">
|
||||
<li><ol class="counters"><li><li><li><li><li></ol></li>
|
||||
<li><ol class="counters"><li><li><li><li><li></ol></li>
|
||||
</ol>
|
67
layout/reftests/counter-style/symbols-function.html
Normal file
67
layout/reftests/counter-style/symbols-function.html
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="test-common.css">
|
||||
<style type="text/css">
|
||||
.default {
|
||||
list-style-type: symbols('*' '\2020' '\2021' '\A7');
|
||||
}
|
||||
.cyclic {
|
||||
list-style-type: symbols(cyclic '*' '\2020' '\2021' '\A7');
|
||||
}
|
||||
.numeric {
|
||||
list-style-type: symbols(numeric '0' '1' '2');
|
||||
}
|
||||
.alphabetic {
|
||||
list-style-type: symbols(alphabetic '\26AA' '\26AB');
|
||||
}
|
||||
.symbolic {
|
||||
list-style-type: symbols(symbolic '*' '\2020' '\2021' '\A7');
|
||||
}
|
||||
.fixed {
|
||||
list-style-type: symbols(fixed '\25F0' '\25F1' '\25F2' '\25F3');
|
||||
}
|
||||
.counter, .counters {
|
||||
list-style-type: none;
|
||||
counter-reset: a;
|
||||
}
|
||||
.counter li, .counters li {
|
||||
counter-increment: a;
|
||||
padding-right: .5em;
|
||||
}
|
||||
.counter li::after {
|
||||
content: counter(a, symbols('*'));
|
||||
}
|
||||
.counters .counters li::after {
|
||||
content: counters(a, '.', symbols(numeric '0' '1'));
|
||||
}
|
||||
</style>
|
||||
<ol start="-2" class="default">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" class="cyclic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" class="numeric">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" class="alphabetic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" class="symbolic">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol start="-2" class="fixed">
|
||||
<li><li><li><li><li>
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol class="counter">
|
||||
<li><li><li><li><li>
|
||||
</ol>
|
||||
<ol class="counters">
|
||||
<li><ol class="counters"><li><li><li><li><li></ol></li>
|
||||
<li><ol class="counters"><li><li><li><li><li></ol></li>
|
||||
</ol>
|
@ -542,6 +542,37 @@ EthiopicToText(CounterValue aOrdinal, nsSubstring& aResult)
|
||||
return true;
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
GetDefaultSpeakAsForSystem(uint8_t aSystem)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aSystem != NS_STYLE_COUNTER_SYSTEM_EXTENDS,
|
||||
"Extends system does not have static default speak-as");
|
||||
switch (aSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_SPELL_OUT;
|
||||
case NS_STYLE_COUNTER_SYSTEM_CYCLIC:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_BULLETS;
|
||||
default:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_NUMBERS;
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
SystemUsesNegativeSign(uint8_t aSystem)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aSystem != NS_STYLE_COUNTER_SYSTEM_EXTENDS,
|
||||
"Cannot check this for extending style");
|
||||
switch (aSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_SYMBOLIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_NUMERIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_ADDITIVE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class BuiltinCounterStyle : public CounterStyle
|
||||
{
|
||||
public:
|
||||
@ -576,10 +607,6 @@ public:
|
||||
virtual uint8_t GetSpeakAs() MOZ_OVERRIDE;
|
||||
virtual bool UseNegativeSign() MOZ_OVERRIDE;
|
||||
|
||||
virtual void CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
bool& aIsRTL) MOZ_OVERRIDE;
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
@ -846,15 +873,6 @@ BuiltinCounterStyle::UseNegativeSign()
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
BuiltinCounterStyle::CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
GetFallback()->GetCounterText(aOrdinal, aWritingMode, aResult, aIsRTL);
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
BuiltinCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
@ -1355,17 +1373,10 @@ CustomCounterStyle::GetSpeakAs()
|
||||
/* virtual */ bool
|
||||
CustomCounterStyle::UseNegativeSign()
|
||||
{
|
||||
switch (mSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_SYMBOLIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_NUMERIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_ADDITIVE:
|
||||
return true;
|
||||
case NS_STYLE_COUNTER_SYSTEM_EXTENDS:
|
||||
return GetExtendsRoot()->UseNegativeSign();
|
||||
default:
|
||||
return false;
|
||||
if (mSystem == NS_STYLE_COUNTER_SYSTEM_EXTENDS) {
|
||||
return GetExtendsRoot()->UseNegativeSign();
|
||||
}
|
||||
return SystemUsesNegativeSign(mSystem);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
@ -1456,14 +1467,7 @@ CustomCounterStyle::GetSpeakAsAutoValue()
|
||||
}
|
||||
system = static_cast<CustomCounterStyle*>(root)->mSystem;
|
||||
}
|
||||
switch (system) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_SPELL_OUT;
|
||||
case NS_STYLE_COUNTER_SYSTEM_CYCLIC:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_BULLETS;
|
||||
default:
|
||||
return NS_STYLE_COUNTER_SPEAKAS_NUMBERS;
|
||||
}
|
||||
return GetDefaultSpeakAsForSystem(system);
|
||||
}
|
||||
|
||||
// This method corresponds to the first stage of computation of the
|
||||
@ -1651,6 +1655,119 @@ CustomCounterStyle::GetExtendsRoot()
|
||||
return mExtendsRoot;
|
||||
}
|
||||
|
||||
AnonymousCounterStyle::AnonymousCounterStyle(const nsCSSValue::Array* aParams)
|
||||
: CounterStyle(NS_STYLE_LIST_STYLE_CUSTOM)
|
||||
{
|
||||
mSystem = aParams->Item(0).GetIntValue();
|
||||
for (const nsCSSValueList* item = aParams->Item(1).GetListValue();
|
||||
item; item = item->mNext) {
|
||||
item->mValue.GetStringValue(*mSymbols.AppendElement());
|
||||
}
|
||||
mSymbols.Compact();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
AnonymousCounterStyle::GetPrefix(nsAString& aResult)
|
||||
{
|
||||
aResult.Truncate();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
AnonymousCounterStyle::GetSuffix(nsAString& aResult)
|
||||
{
|
||||
aResult = ' ';
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
AnonymousCounterStyle::IsBullet()
|
||||
{
|
||||
switch (mSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_CYCLIC:
|
||||
// Only use ::-moz-list-bullet for cyclic system
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
AnonymousCounterStyle::GetNegative(NegativeType& aResult)
|
||||
{
|
||||
aResult.before.AssignLiteral(MOZ_UTF16("-"));
|
||||
aResult.after.Truncate();
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
AnonymousCounterStyle::IsOrdinalInRange(CounterValue aOrdinal)
|
||||
{
|
||||
switch (mSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_CYCLIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_NUMERIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_FIXED:
|
||||
return true;
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_SYMBOLIC:
|
||||
return aOrdinal >= 1;
|
||||
default:
|
||||
NS_NOTREACHED("Invalid system.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
AnonymousCounterStyle::IsOrdinalInAutoRange(CounterValue aOrdinal)
|
||||
{
|
||||
return AnonymousCounterStyle::IsOrdinalInRange(aOrdinal);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
AnonymousCounterStyle::GetPad(PadType& aResult)
|
||||
{
|
||||
aResult.width = 0;
|
||||
aResult.symbol.Truncate();
|
||||
}
|
||||
|
||||
/* virtual */ CounterStyle*
|
||||
AnonymousCounterStyle::GetFallback()
|
||||
{
|
||||
return CounterStyleManager::GetDecimalStyle();
|
||||
}
|
||||
|
||||
/* virtual */ uint8_t
|
||||
AnonymousCounterStyle::GetSpeakAs()
|
||||
{
|
||||
return GetDefaultSpeakAsForSystem(mSystem);
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
AnonymousCounterStyle::UseNegativeSign()
|
||||
{
|
||||
return SystemUsesNegativeSign(mSystem);
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
AnonymousCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
switch (mSystem) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_CYCLIC:
|
||||
return GetCyclicCounterText(aOrdinal, aResult, mSymbols);
|
||||
case NS_STYLE_COUNTER_SYSTEM_FIXED:
|
||||
return GetFixedCounterText(aOrdinal, aResult, 1, mSymbols);
|
||||
case NS_STYLE_COUNTER_SYSTEM_SYMBOLIC:
|
||||
return GetSymbolicCounterText(aOrdinal, aResult, mSymbols);
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
return GetAlphabeticCounterText(aOrdinal, aResult, mSymbols);
|
||||
case NS_STYLE_COUNTER_SYSTEM_NUMERIC:
|
||||
return GetNumericCounterText(aOrdinal, aResult, mSymbols);
|
||||
default:
|
||||
NS_NOTREACHED("Invalid system.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CounterStyle::IsDependentStyle() const
|
||||
{
|
||||
@ -1782,6 +1899,15 @@ CounterStyle::GetSpokenCounterText(CounterValue aOrdinal,
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
CounterStyle::CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
GetFallback()->GetCounterText(aOrdinal, aWritingMode, aResult, aIsRTL);
|
||||
}
|
||||
|
||||
static BuiltinCounterStyle gBuiltinStyleTable[NS_STYLE_LIST_STYLE__MAX];
|
||||
|
||||
CounterStyleManager::CounterStyleManager(nsPresContext* aPresContext)
|
||||
@ -1861,6 +1987,12 @@ CounterStyleManager::BuildCounterStyle(const nsSubstring& aName)
|
||||
return data;
|
||||
}
|
||||
|
||||
CounterStyle*
|
||||
CounterStyleManager::BuildCounterStyle(const nsCSSValue::Array* aParams)
|
||||
{
|
||||
return new AnonymousCounterStyle(aParams);
|
||||
}
|
||||
|
||||
/* static */ CounterStyle*
|
||||
CounterStyleManager::GetBuiltinStyle(int32_t aStyle)
|
||||
{
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include "mozilla/NullPtr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "nsCSSValue.h"
|
||||
|
||||
class nsPresContext;
|
||||
class nsCSSCounterStyleRule;
|
||||
|
||||
@ -25,6 +27,7 @@ class WritingMode;
|
||||
typedef int32_t CounterValue;
|
||||
|
||||
class CounterStyleManager;
|
||||
class AnonymousCounterStyle;
|
||||
|
||||
struct NegativeType;
|
||||
struct PadType;
|
||||
@ -86,12 +89,14 @@ public:
|
||||
virtual void CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
bool& aIsRTL) = 0;
|
||||
bool& aIsRTL);
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
bool& aIsRTL) = 0;
|
||||
|
||||
virtual AnonymousCounterStyle* AsAnonymous() { return nullptr; }
|
||||
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef() = 0;
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release() = 0;
|
||||
|
||||
@ -99,6 +104,42 @@ protected:
|
||||
int32_t mStyle;
|
||||
};
|
||||
|
||||
class AnonymousCounterStyle MOZ_FINAL : public CounterStyle
|
||||
{
|
||||
public:
|
||||
AnonymousCounterStyle(const nsCSSValue::Array* aValue);
|
||||
|
||||
virtual void GetPrefix(nsAString& aResult) MOZ_OVERRIDE;
|
||||
virtual void GetSuffix(nsAString& aResult) MOZ_OVERRIDE;
|
||||
virtual bool IsBullet() MOZ_OVERRIDE;
|
||||
|
||||
virtual void GetNegative(NegativeType& aResult) MOZ_OVERRIDE;
|
||||
virtual bool IsOrdinalInRange(CounterValue aOrdinal) MOZ_OVERRIDE;
|
||||
virtual bool IsOrdinalInAutoRange(CounterValue aOrdinal) MOZ_OVERRIDE;
|
||||
virtual void GetPad(PadType& aResult) MOZ_OVERRIDE;
|
||||
virtual CounterStyle* GetFallback() MOZ_OVERRIDE;
|
||||
virtual uint8_t GetSpeakAs() MOZ_OVERRIDE;
|
||||
virtual bool UseNegativeSign() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
bool& aIsRTL) MOZ_OVERRIDE;
|
||||
|
||||
virtual AnonymousCounterStyle* AsAnonymous() MOZ_OVERRIDE { return this; }
|
||||
|
||||
uint8_t GetSystem() const { return mSystem; }
|
||||
const nsTArray<nsString>& GetSymbols() const { return mSymbols; }
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(AnonymousCounterStyle)
|
||||
|
||||
private:
|
||||
~AnonymousCounterStyle() {}
|
||||
|
||||
uint8_t mSystem;
|
||||
nsTArray<nsString> mSymbols;
|
||||
};
|
||||
|
||||
class CounterStyleManager MOZ_FINAL
|
||||
{
|
||||
private:
|
||||
@ -117,6 +158,7 @@ public:
|
||||
}
|
||||
|
||||
CounterStyle* BuildCounterStyle(const nsSubstring& aName);
|
||||
CounterStyle* BuildCounterStyle(const nsCSSValue::Array* aParams);
|
||||
|
||||
static CounterStyle* GetBuiltinStyle(int32_t aStyle);
|
||||
static CounterStyle* GetNoneStyle()
|
||||
|
@ -723,6 +723,7 @@ CSS_KEY(reset-size, reset_size)
|
||||
//CSS_KEY(start, start)
|
||||
CSS_KEY(srgb, srgb)
|
||||
CSS_KEY(symbolic, symbolic)
|
||||
CSS_KEY(symbols, symbols)
|
||||
CSS_KEY(text-after-edge, text_after_edge)
|
||||
CSS_KEY(text-before-edge, text_before_edge)
|
||||
CSS_KEY(use-script, use_script)
|
||||
|
@ -513,6 +513,7 @@ protected:
|
||||
|
||||
bool ParseCounterStyleRule(RuleAppendFunc aAppendFunc, void* aProcessData);
|
||||
bool ParseCounterStyleName(nsAString& aName, bool aForDefinition);
|
||||
bool ParseCounterStyleNameValue(nsCSSValue& aValue);
|
||||
bool ParseCounterDescriptor(nsCSSCounterStyleRule *aRule);
|
||||
bool ParseCounterDescriptorValue(nsCSSCounterDesc aDescID,
|
||||
nsCSSValue& aValue);
|
||||
@ -936,6 +937,7 @@ protected:
|
||||
const nsCSSProps::KTableValue aPropertyKTable[] = nullptr);
|
||||
bool ParseCounter(nsCSSValue& aValue);
|
||||
bool ParseAttr(nsCSSValue& aValue);
|
||||
bool ParseSymbols(nsCSSValue& aValue);
|
||||
bool SetValueToURL(nsCSSValue& aValue, const nsString& aURL);
|
||||
bool TranslateDimension(nsCSSValue& aValue, int32_t aVariantMask,
|
||||
float aNumber, const nsString& aUnit);
|
||||
@ -4358,6 +4360,17 @@ CSSParserImpl::ParseCounterStyleName(nsAString& aName, bool aForDefinition)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseCounterStyleNameValue(nsCSSValue& aValue)
|
||||
{
|
||||
nsString name;
|
||||
if (ParseCounterStyleName(name, false)) {
|
||||
aValue.SetStringValue(name, eCSSUnit_Ident);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseCounterDescriptor(nsCSSCounterStyleRule* aRule)
|
||||
{
|
||||
@ -4419,12 +4432,12 @@ CSSParserImpl::ParseCounterDescriptorValue(nsCSSCounterDesc aDescID,
|
||||
return true;
|
||||
}
|
||||
case NS_STYLE_COUNTER_SYSTEM_EXTENDS: {
|
||||
nsString name;
|
||||
if (!ParseCounterStyleName(name, false)) {
|
||||
nsCSSValue name;
|
||||
if (!ParseCounterStyleNameValue(name)) {
|
||||
REPORT_UNEXPECTED_TOKEN(PECounterExtendsNotIdent);
|
||||
return false;
|
||||
}
|
||||
aValue.SetPairValue(system, nsCSSValue(name, eCSSUnit_Ident));
|
||||
aValue.SetPairValue(system, name);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
@ -4482,14 +4495,8 @@ CSSParserImpl::ParseCounterDescriptorValue(nsCSSCounterDesc aDescID,
|
||||
return true;
|
||||
}
|
||||
|
||||
case eCSSCounterDesc_Fallback: {
|
||||
nsString name;
|
||||
if (!ParseCounterStyleName(name, false)) {
|
||||
return false;
|
||||
}
|
||||
aValue.SetStringValue(name, eCSSUnit_Ident);
|
||||
return true;
|
||||
}
|
||||
case eCSSCounterDesc_Fallback:
|
||||
return ParseCounterStyleNameValue(aValue);
|
||||
|
||||
case eCSSCounterDesc_Symbols: {
|
||||
nsCSSValueList* item = nullptr;
|
||||
@ -4539,7 +4546,7 @@ CSSParserImpl::ParseCounterDescriptorValue(nsCSSCounterDesc aDescID,
|
||||
// should always return in the loop
|
||||
}
|
||||
|
||||
case eCSSCounterDesc_SpeakAs: {
|
||||
case eCSSCounterDesc_SpeakAs:
|
||||
if (ParseVariant(aValue, VARIANT_AUTO | VARIANT_KEYWORD,
|
||||
nsCSSProps::kCounterSpeakAsKTable)) {
|
||||
if (aValue.GetUnit() == eCSSUnit_Enumerated &&
|
||||
@ -4551,13 +4558,7 @@ CSSParserImpl::ParseCounterDescriptorValue(nsCSSCounterDesc aDescID,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
nsString name;
|
||||
if (ParseCounterStyleName(name, false)) {
|
||||
aValue.SetStringValue(name, eCSSUnit_Ident);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return ParseCounterStyleNameValue(aValue);
|
||||
|
||||
default:
|
||||
NS_NOTREACHED("unknown descriptor");
|
||||
@ -7206,16 +7207,16 @@ CSSParserImpl::ParseCounter(nsCSSValue& aValue)
|
||||
}
|
||||
|
||||
// get optional type
|
||||
nsString type = NS_LITERAL_STRING("decimal");
|
||||
int32_t typeItem = eCSSUnit_Counters == unit ? 2 : 1;
|
||||
nsCSSValue& type = val->Item(typeItem);
|
||||
if (ExpectSymbol(',', true)) {
|
||||
if (!ParseCounterStyleName(type, false)) {
|
||||
if (!ParseCounterStyleNameValue(type) && !ParseSymbols(type)) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
type.SetStringValue(NS_LITERAL_STRING("decimal"), eCSSUnit_Ident);
|
||||
}
|
||||
|
||||
int32_t typeItem = eCSSUnit_Counters == unit ? 2 : 1;
|
||||
val->Item(typeItem).SetStringValue(type, eCSSUnit_Ident);
|
||||
|
||||
if (!ExpectSymbol(')', true)) {
|
||||
break;
|
||||
}
|
||||
@ -7294,6 +7295,54 @@ CSSParserImpl::ParseAttr(nsCSSValue& aValue)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseSymbols(nsCSSValue& aValue)
|
||||
{
|
||||
if (!GetToken(true)) {
|
||||
return false;
|
||||
}
|
||||
if (mToken.mType != eCSSToken_Function &&
|
||||
!mToken.mIdent.LowerCaseEqualsLiteral("symbols")) {
|
||||
UngetToken();
|
||||
return false;
|
||||
}
|
||||
|
||||
nsRefPtr<nsCSSValue::Array> params = nsCSSValue::Array::Create(2);
|
||||
nsCSSValue& type = params->Item(0);
|
||||
nsCSSValue& symbols = params->Item(1);
|
||||
|
||||
if (!ParseEnum(type, nsCSSProps::kCounterSymbolsSystemKTable)) {
|
||||
type.SetIntValue(NS_STYLE_COUNTER_SYSTEM_SYMBOLIC, eCSSUnit_Enumerated);
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
nsCSSValueList* item = symbols.SetListValue();
|
||||
for (;;) {
|
||||
// FIXME Should also include VARIANT_IMAGE. See bug 1071436.
|
||||
if (!ParseVariant(item->mValue, VARIANT_STRING, nullptr)) {
|
||||
break;
|
||||
}
|
||||
if (ExpectSymbol(')', true)) {
|
||||
if (first) {
|
||||
switch (type.GetIntValue()) {
|
||||
case NS_STYLE_COUNTER_SYSTEM_NUMERIC:
|
||||
case NS_STYLE_COUNTER_SYSTEM_ALPHABETIC:
|
||||
// require at least two symbols
|
||||
return false;
|
||||
}
|
||||
}
|
||||
aValue.SetArrayValue(params, eCSSUnit_Symbols);
|
||||
return true;
|
||||
}
|
||||
item->mNext = new nsCSSValueList;
|
||||
item = item->mNext;
|
||||
first = false;
|
||||
}
|
||||
|
||||
SkipUntil(')');
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::SetValueToURL(nsCSSValue& aValue, const nsString& aURL)
|
||||
{
|
||||
@ -12869,11 +12918,10 @@ CSSParserImpl::ParseListStyleType(nsCSSValue& aValue)
|
||||
return true;
|
||||
}
|
||||
|
||||
nsString name;
|
||||
if (ParseCounterStyleName(name, false)) {
|
||||
aValue.SetStringValue(name, eCSSUnit_Ident);
|
||||
if (ParseCounterStyleNameValue(aValue) || ParseSymbols(aValue)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1982,6 +1982,15 @@ const KTableValue nsCSSProps::kCounterSystemKTable[] = {
|
||||
eCSSKeyword_UNKNOWN, -1
|
||||
};
|
||||
|
||||
const KTableValue nsCSSProps::kCounterSymbolsSystemKTable[] = {
|
||||
eCSSKeyword_cyclic, NS_STYLE_COUNTER_SYSTEM_CYCLIC,
|
||||
eCSSKeyword_numeric, NS_STYLE_COUNTER_SYSTEM_NUMERIC,
|
||||
eCSSKeyword_alphabetic, NS_STYLE_COUNTER_SYSTEM_ALPHABETIC,
|
||||
eCSSKeyword_symbolic, NS_STYLE_COUNTER_SYSTEM_SYMBOLIC,
|
||||
eCSSKeyword_fixed, NS_STYLE_COUNTER_SYSTEM_FIXED,
|
||||
eCSSKeyword_UNKNOWN, -1
|
||||
};
|
||||
|
||||
const KTableValue nsCSSProps::kCounterRangeKTable[] = {
|
||||
eCSSKeyword_infinite, NS_STYLE_COUNTER_RANGE_INFINITE,
|
||||
eCSSKeyword_UNKNOWN, -1
|
||||
|
@ -657,6 +657,7 @@ public:
|
||||
static const KTableValue kWritingModeKTable[];
|
||||
static const KTableValue kHyphensKTable[];
|
||||
static const KTableValue kCounterSystemKTable[];
|
||||
static const KTableValue kCounterSymbolsSystemKTable[];
|
||||
static const KTableValue kCounterRangeKTable[];
|
||||
static const KTableValue kCounterSpeakAsKTable[];
|
||||
};
|
||||
|
@ -853,12 +853,13 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
||||
nsStyleUtil::AppendEscapedCSSIdent(buffer, aResult);
|
||||
}
|
||||
}
|
||||
else if (eCSSUnit_Array <= unit && unit <= eCSSUnit_Steps) {
|
||||
else if (eCSSUnit_Array <= unit && unit <= eCSSUnit_Symbols) {
|
||||
switch (unit) {
|
||||
case eCSSUnit_Counter: aResult.AppendLiteral("counter("); break;
|
||||
case eCSSUnit_Counters: aResult.AppendLiteral("counters("); break;
|
||||
case eCSSUnit_Cubic_Bezier: aResult.AppendLiteral("cubic-bezier("); break;
|
||||
case eCSSUnit_Steps: aResult.AppendLiteral("steps("); break;
|
||||
case eCSSUnit_Symbols: aResult.AppendLiteral("symbols("); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -866,8 +867,9 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
||||
bool mark = false;
|
||||
for (size_t i = 0, i_end = array->Count(); i < i_end; ++i) {
|
||||
if (mark && array->Item(i).GetUnit() != eCSSUnit_Null) {
|
||||
if (unit == eCSSUnit_Array &&
|
||||
eCSSProperty_transition_timing_function != aProperty)
|
||||
if ((unit == eCSSUnit_Array &&
|
||||
eCSSProperty_transition_timing_function != aProperty) ||
|
||||
unit == eCSSUnit_Symbols)
|
||||
aResult.Append(' ');
|
||||
else
|
||||
aResult.AppendLiteral(", ");
|
||||
@ -887,6 +889,17 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (unit == eCSSUnit_Symbols && i == 0) {
|
||||
NS_ABORT_IF_FALSE(array->Item(i).GetUnit() == eCSSUnit_Enumerated,
|
||||
"unexpected value");
|
||||
int32_t system = array->Item(i).GetIntValue();
|
||||
if (system != NS_STYLE_COUNTER_SYSTEM_SYMBOLIC) {
|
||||
AppendASCIItoUTF16(nsCSSProps::ValueToKeyword(
|
||||
system, nsCSSProps::kCounterSystemKTable), aResult);
|
||||
mark = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
nsCSSProperty prop =
|
||||
((eCSSUnit_Counter <= unit && unit <= eCSSUnit_Counters) &&
|
||||
i == array->Count() - 1)
|
||||
@ -1405,6 +1418,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
||||
case eCSSUnit_Attr:
|
||||
case eCSSUnit_Cubic_Bezier:
|
||||
case eCSSUnit_Steps:
|
||||
case eCSSUnit_Symbols:
|
||||
case eCSSUnit_Counter:
|
||||
case eCSSUnit_Counters: aResult.Append(char16_t(')')); break;
|
||||
case eCSSUnit_Local_Font: break;
|
||||
@ -1511,6 +1525,7 @@ nsCSSValue::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||
case eCSSUnit_Counters:
|
||||
case eCSSUnit_Cubic_Bezier:
|
||||
case eCSSUnit_Steps:
|
||||
case eCSSUnit_Symbols:
|
||||
case eCSSUnit_Function:
|
||||
case eCSSUnit_Calc:
|
||||
case eCSSUnit_Calc_Plus:
|
||||
|
@ -265,7 +265,8 @@ enum nsCSSUnit {
|
||||
eCSSUnit_Counters = 22, // (nsCSSValue::Array*) a counters(string,string[,string]) value
|
||||
eCSSUnit_Cubic_Bezier = 23, // (nsCSSValue::Array*) a list of float values
|
||||
eCSSUnit_Steps = 24, // (nsCSSValue::Array*) a list of (integer, enumerated)
|
||||
eCSSUnit_Function = 25, // (nsCSSValue::Array*) a function with
|
||||
eCSSUnit_Symbols = 25, // (nsCSSValue::Array*) a symbols(enumerated, symbols) value
|
||||
eCSSUnit_Function = 26, // (nsCSSValue::Array*) a function with
|
||||
// parameters. First elem of array is name,
|
||||
// an nsCSSKeyword as eCSSUnit_Enumerated,
|
||||
// the rest of the values are arguments.
|
||||
|
@ -1064,10 +1064,11 @@ nsComputedDOMStyle::DoGetContent()
|
||||
NS_ABORT_IF_FALSE(eCSSUnit_None != a->Item(typeItem).GetUnit(),
|
||||
"'none' should be handled as identifier value");
|
||||
nsString type;
|
||||
a->Item(typeItem).GetStringValue(type);
|
||||
a->Item(typeItem).AppendToString(eCSSProperty_list_style_type,
|
||||
type, nsCSSValue::eNormalized);
|
||||
if (!type.LowerCaseEqualsLiteral("decimal")) {
|
||||
str.AppendLiteral(", ");
|
||||
nsStyleUtil::AppendEscapedCSSIdent(type, str);
|
||||
str.Append(type);
|
||||
}
|
||||
|
||||
str.Append(char16_t(')'));
|
||||
@ -2977,12 +2978,42 @@ CSSValue*
|
||||
nsComputedDOMStyle::DoGetListStyleType()
|
||||
{
|
||||
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
|
||||
// want SetIdent
|
||||
nsString type;
|
||||
StyleList()->GetListStyleType(type);
|
||||
nsString value;
|
||||
nsStyleUtil::AppendEscapedCSSIdent(type, value);
|
||||
val->SetString(value);
|
||||
CounterStyle* style = StyleList()->GetCounterStyle();
|
||||
AnonymousCounterStyle* anonymous = style->AsAnonymous();
|
||||
if (!anonymous) {
|
||||
// want SetIdent
|
||||
nsString type;
|
||||
StyleList()->GetListStyleType(type);
|
||||
nsString value;
|
||||
nsStyleUtil::AppendEscapedCSSIdent(type, value);
|
||||
val->SetString(value);
|
||||
} else {
|
||||
nsAutoString tmp;
|
||||
tmp.AppendLiteral("symbols(");
|
||||
|
||||
uint8_t system = anonymous->GetSystem();
|
||||
NS_ASSERTION(system == NS_STYLE_COUNTER_SYSTEM_CYCLIC ||
|
||||
system == NS_STYLE_COUNTER_SYSTEM_NUMERIC ||
|
||||
system == NS_STYLE_COUNTER_SYSTEM_ALPHABETIC ||
|
||||
system == NS_STYLE_COUNTER_SYSTEM_SYMBOLIC ||
|
||||
system == NS_STYLE_COUNTER_SYSTEM_FIXED,
|
||||
"Invalid system for anonymous counter style.");
|
||||
if (system != NS_STYLE_COUNTER_SYSTEM_SYMBOLIC) {
|
||||
AppendASCIItoUTF16(nsCSSProps::ValueToKeyword(
|
||||
system, nsCSSProps::kCounterSystemKTable), tmp);
|
||||
tmp.Append(' ');
|
||||
}
|
||||
|
||||
const nsTArray<nsString>& symbols = anonymous->GetSymbols();
|
||||
NS_ASSERTION(symbols.Length() > 0,
|
||||
"No symbols in the anonymous counter style");
|
||||
for (size_t i = 0, iend = symbols.Length(); i < iend; i++) {
|
||||
nsStyleUtil::AppendEscapedCSSString(symbols[i], tmp);
|
||||
tmp.Append(' ');
|
||||
}
|
||||
tmp.Replace(tmp.Length() - 1, 1, char16_t(')'));
|
||||
val->SetString(tmp);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -7146,6 +7146,11 @@ nsRuleNode::ComputeListData(void* aStartStruct,
|
||||
list->SetListStyleType(name, mPresContext);
|
||||
break;
|
||||
}
|
||||
case eCSSUnit_Symbols:
|
||||
list->SetListStyleType(NS_LITERAL_STRING(""),
|
||||
mPresContext->CounterStyleManager()->
|
||||
BuildCounterStyle(typeValue->GetArrayValue()));
|
||||
break;
|
||||
case eCSSUnit_Null:
|
||||
break;
|
||||
default:
|
||||
|
@ -2354,7 +2354,7 @@ var gCSSProperties = {
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
/* XXX needs to be on pseudo-elements */
|
||||
initial_values: [ "normal", "none" ],
|
||||
other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ],
|
||||
other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content", "counter(foo, symbols('*'))", "counter(foo, symbols(numeric '0' '1'))", "counters(foo, '.', symbols('*'))", "counters(foo, '.', symbols(numeric '0' '1'))" ],
|
||||
invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ]
|
||||
},
|
||||
"counter-increment": {
|
||||
@ -2716,6 +2716,12 @@ var gCSSProperties = {
|
||||
subproperties: [ "list-style-type", "list-style-position", "list-style-image" ],
|
||||
initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ],
|
||||
other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", "outside outside", "outside inside", "\\32 style", "\\32 style inside",
|
||||
"symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
"symbols(cyclic \"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
"inside symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
"symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\") outside",
|
||||
"none symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
"inside none symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
|
||||
'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
|
||||
'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
|
||||
@ -2786,7 +2792,9 @@ var gCSSProperties = {
|
||||
"-moz-ethiopic-halehame", "-moz-ethiopic-numeric",
|
||||
"-moz-ethiopic-halehame-am",
|
||||
"-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et",
|
||||
"other-style", "inside", "outside", "\\32 style"
|
||||
"other-style", "inside", "outside", "\\32 style",
|
||||
"symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")",
|
||||
"symbols(cyclic '*' '\\2020' '\\2021' '\\A7')"
|
||||
],
|
||||
invalid_values: []
|
||||
},
|
||||
|
@ -167,7 +167,7 @@ function test_system_dep_desc() {
|
||||
},
|
||||
tests: {
|
||||
system: [
|
||||
[null, "extends", "fixed", "cyclic"],
|
||||
[null, "extends", "fixed", "cyclic", "extends symbols('*')"],
|
||||
["extends cjk-decimal", "ExTends cjk-decimal", "extends CJK-decimal"],
|
||||
],
|
||||
symbols: [
|
||||
@ -235,13 +235,13 @@ function test_system_indep_desc() {
|
||||
[null, "0", "\"\"", "0 0", "a a", "0 a a"],
|
||||
],
|
||||
fallback: [
|
||||
[null, "", "-", "0", "a b"],
|
||||
[null, "", "-", "0", "a b", "symbols('*')"],
|
||||
["a"],
|
||||
["A"],
|
||||
["decimal", "Decimal"],
|
||||
],
|
||||
speakAs: [
|
||||
[null, "", "-", "0", "a b"],
|
||||
[null, "", "-", "0", "a b", "symbols('*')"],
|
||||
["auto", "AuTo"],
|
||||
["bullets", "BULLETs"],
|
||||
["numbers", "NumBers"],
|
||||
|
Loading…
Reference in New Issue
Block a user