summaryrefslogtreecommitdiffstats
path: root/WebCore/css
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-15 12:23:52 +0000
committerSteve Block <steveblock@google.com>2010-02-16 11:48:32 +0000
commit8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch)
tree73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/css
parentbf14be70295513b8076f3fa47a268a7e42b2c478 (diff)
downloadexternal_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip
external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz
external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/css')
-rw-r--r--WebCore/css/CSSFontFaceSource.cpp8
-rw-r--r--WebCore/css/CSSFontSelector.cpp2
-rw-r--r--WebCore/css/CSSImportRule.cpp8
-rw-r--r--WebCore/css/CSSParser.cpp282
-rw-r--r--WebCore/css/CSSPrimitiveValueMappings.h66
-rw-r--r--WebCore/css/CSSStyleSheet.h22
-rw-r--r--WebCore/css/CSSValueKeywords.in22
-rw-r--r--WebCore/css/StyleBase.cpp4
-rw-r--r--WebCore/css/StyleSheet.cpp19
-rw-r--r--WebCore/css/StyleSheet.h19
-rw-r--r--WebCore/css/svg.css17
11 files changed, 279 insertions, 190 deletions
diff --git a/WebCore/css/CSSFontFaceSource.cpp b/WebCore/css/CSSFontFaceSource.cpp
index 111cea2..1354e68 100644
--- a/WebCore/css/CSSFontFaceSource.cpp
+++ b/WebCore/css/CSSFontFaceSource.cpp
@@ -107,8 +107,7 @@ SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescri
#else
if (!m_font) {
#endif
- FontPlatformData* data = fontCache()->getCachedFontPlatformData(fontDescription, m_string);
- SimpleFontData* fontData = fontCache()->getCachedFontData(data);
+ SimpleFontData* fontData = fontCache()->getCachedFontData(fontDescription, m_string);
// We're local. Just return a SimpleFontData from the normal cache.
return fontData;
@@ -179,10 +178,11 @@ SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescri
if (DocLoader* docLoader = fontSelector->docLoader())
m_font->beginLoadIfNeeded(docLoader);
// FIXME: m_string is a URL so it makes no sense to pass it as a family name.
- FontPlatformData* tempData = fontCache()->getCachedFontPlatformData(fontDescription, m_string);
+ SimpleFontData* tempData = fontCache()->getCachedFontData(fontDescription, m_string);
if (!tempData)
tempData = fontCache()->getLastResortFallbackFont(fontDescription);
- fontData.set(new SimpleFontData(*tempData, true, true));
+
+ fontData.set(new SimpleFontData(tempData->platformData(), true, true));
}
m_fontDataTable.set(hashKey, fontData.get());
diff --git a/WebCore/css/CSSFontSelector.cpp b/WebCore/css/CSSFontSelector.cpp
index ce3253c..56ee261 100644
--- a/WebCore/css/CSSFontSelector.cpp
+++ b/WebCore/css/CSSFontSelector.cpp
@@ -394,7 +394,7 @@ static FontData* fontDataForGenericFamily(Document* document, const FontDescript
genericFamily = settings->standardFontFamily();
if (!genericFamily.isEmpty())
- return fontCache()->getCachedFontData(fontCache()->getCachedFontPlatformData(fontDescription, genericFamily));
+ return fontCache()->getCachedFontData(fontDescription, genericFamily);
return 0;
}
diff --git a/WebCore/css/CSSImportRule.cpp b/WebCore/css/CSSImportRule.cpp
index 7ad5456..95ed032 100644
--- a/WebCore/css/CSSImportRule.cpp
+++ b/WebCore/css/CSSImportRule.cpp
@@ -117,16 +117,16 @@ void CSSImportRule::insertedIntoParent()
return;
String absHref = m_strHref;
- if (!parentSheet->putativeBaseURL().isNull())
+ if (!parentSheet->finalURL().isNull())
// use parent styleheet's URL as the base URL
- absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
+ absHref = KURL(parentSheet->finalURL(), m_strHref).string();
// Check for a cycle in our import chain. If we encounter a stylesheet
// in our parent chain with the same URL, then just bail.
StyleBase* root = this;
for (StyleBase* curr = parent(); curr; curr = curr->parent()) {
- // FIXME: This is wrong if the putativeBaseURL was updated via document::updateBaseURL.
- if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->putativeBaseURL().string())
+ // FIXME: This is wrong if the finalURL was updated via document::updateBaseURL.
+ if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->finalURL().string())
return;
root = curr;
}
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index e6ff1f0..f5b2cbc 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -623,7 +623,7 @@ bool CSSParser::parseValue(int propId, bool important)
return true;
}
- bool valid_primitive = false;
+ bool validPrimitive = false;
RefPtr<CSSValue> parsedValue;
switch (static_cast<CSSPropertyID>(propId)) {
@@ -639,13 +639,13 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertySize: // <length>{1,2} | auto | portrait | landscape | inherit
case CSSPropertyQuotes: // [<string> <string>]+ | none | inherit
if (id)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyUnicodeBidi: // normal | embed | bidi-override | inherit
if (id == CSSValueNormal ||
id == CSSValueEmbed ||
id == CSSValueBidiOverride)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyPosition: // static | relative | absolute | fixed | inherit
@@ -653,7 +653,7 @@ bool CSSParser::parseValue(int propId, bool important)
id == CSSValueRelative ||
id == CSSValueAbsolute ||
id == CSSValueFixed)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyPageBreakAfter: // auto | always | avoid | left | right | inherit
@@ -665,19 +665,19 @@ bool CSSParser::parseValue(int propId, bool important)
id == CSSValueAvoid ||
id == CSSValueLeft ||
id == CSSValueRight)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyPageBreakInside: // avoid | auto | inherit
case CSSPropertyWebkitColumnBreakInside:
if (id == CSSValueAuto || id == CSSValueAvoid)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyEmptyCells: // show | hide | inherit
if (id == CSSValueShow ||
id == CSSValueHide)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyContent: // [ <string> | <uri> | <counter> | attr(X) | open-quote |
@@ -690,12 +690,12 @@ bool CSSParser::parseValue(int propId, bool important)
id == CSSValuePreWrap ||
id == CSSValuePreLine ||
id == CSSValueNowrap)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyClip: // <shape> | auto | inherit
if (id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
else if (value->unit == CSSParserValue::Function)
return parseShape(propId, important);
break;
@@ -706,17 +706,17 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyCaptionSide: // top | bottom | left | right | inherit
if (id == CSSValueLeft || id == CSSValueRight ||
id == CSSValueTop || id == CSSValueBottom)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyBorderCollapse: // collapse | separate | inherit
if (id == CSSValueCollapse || id == CSSValueSeparate)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyVisibility: // visible | hidden | collapse | inherit
if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueCollapse)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyOverflow: {
@@ -731,19 +731,19 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyOverflowY: // visible | hidden | scroll | auto | marquee | overlay | inherit
if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueScroll || id == CSSValueAuto ||
id == CSSValueOverlay || id == CSSValueWebkitMarquee)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyListStylePosition: // inside | outside | inherit
if (id == CSSValueInside || id == CSSValueOutside)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyListStyleType:
// See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in
// for the list of supported list-style-types.
if ((id >= CSSValueDisc && id <= CSSValueKatakanaIroha) || id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyDisplay:
@@ -755,41 +755,41 @@ bool CSSParser::parseValue(int propId, bool important)
#else
if ((id >= CSSValueInline && id <= CSSValueWebkitInlineBox) || id == CSSValueNone)
#endif
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyDirection: // ltr | rtl | inherit
if (id == CSSValueLtr || id == CSSValueRtl)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none | inherit
if ((id >= CSSValueCapitalize && id <= CSSValueLowercase) || id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyFloat: // left | right | none | inherit + center for buggy CSS
if (id == CSSValueLeft || id == CSSValueRight ||
id == CSSValueNone || id == CSSValueCenter)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyClear: // none | left | right | both | inherit
if (id == CSSValueNone || id == CSSValueLeft ||
id == CSSValueRight|| id == CSSValueBoth)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextAlign:
// left | right | center | justify | webkit_left | webkit_right | webkit_center | start | end | <string> | inherit
if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitCenter) || id == CSSValueStart || id == CSSValueEnd ||
value->unit == CSSPrimitiveValue::CSS_STRING)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyOutlineStyle: // (<border-style> except hidden) | auto | inherit
if (id == CSSValueAuto || id == CSSValueNone || (id >= CSSValueInset && id <= CSSValueDouble))
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyBorderTopStyle: //// <border-style> | inherit
@@ -798,7 +798,7 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderLeftStyle:
case CSSPropertyWebkitColumnRuleStyle:
if (id >= CSSValueNone && id <= CSSValueDouble)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyFontWeight: // normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit
@@ -825,13 +825,13 @@ bool CSSParser::parseValue(int propId, bool important)
}
case CSSPropertyWebkitBorderHorizontalSpacing:
case CSSPropertyWebkitBorderVerticalSpacing:
- valid_primitive = validUnit(value, FLength|FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FLength | FNonNeg, m_strict);
break;
case CSSPropertyOutlineColor: // <color> | invert | inherit
// Outline color has "invert" as additional keyword.
// Also, we want to allow the special focus color even in strict parsing mode.
if (propId == CSSPropertyOutlineColor && (id == CSSValueInvert || id == CSSValueWebkitFocusRingColor)) {
- valid_primitive = true;
+ validPrimitive = true;
break;
}
/* nobreak */
@@ -848,13 +848,13 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitTextFillColor:
case CSSPropertyWebkitTextStrokeColor:
if (id == CSSValueWebkitText)
- valid_primitive = true; // Always allow this, even when strict parsing is on,
+ validPrimitive = true; // Always allow this, even when strict parsing is on,
// since we use this in our UA sheets.
else if (id == CSSValueCurrentcolor)
- valid_primitive = true;
+ validPrimitive = true;
else if ((id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu ||
(id >= CSSValueWebkitFocusRingColor && id < CSSValueWebkitText && !m_strict)) {
- valid_primitive = true;
+ validPrimitive = true;
} else {
parsedValue = parseColor();
if (parsedValue)
@@ -911,9 +911,9 @@ bool CSSParser::parseValue(int propId, bool important)
id = value->id;
if (!m_strict && value->id == CSSValueHand) { // MSIE 5 compatibility :/
id = CSSValuePointer;
- valid_primitive = true;
+ validPrimitive = true;
} else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
}
@@ -991,27 +991,27 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderLeftWidth:
case CSSPropertyWebkitColumnRuleWidth:
if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength, m_strict);
break;
case CSSPropertyLetterSpacing: // normal | <length> | inherit
case CSSPropertyWordSpacing: // normal | <length> | inherit
if (id == CSSValueNormal)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength, m_strict);
break;
case CSSPropertyWordBreak: // normal | break-all | break-word (this is a custom extension)
if (id == CSSValueNormal || id == CSSValueBreakAll || id == CSSValueBreakWord)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWordWrap: // normal | break-word
if (id == CSSValueNormal || id == CSSValueBreakWord)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextIndent: // <length> | <percentage> | inherit
@@ -1020,30 +1020,30 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyPaddingBottom: // <length> | <percentage>
case CSSPropertyPaddingLeft: ////
case CSSPropertyWebkitPaddingStart:
- valid_primitive = (!id && validUnit(value, FLength|FPercent, m_strict));
+ validPrimitive = (!id && validUnit(value, FLength | FPercent, m_strict));
break;
case CSSPropertyMaxHeight: // <length> | <percentage> | none | inherit
case CSSPropertyMaxWidth: // <length> | <percentage> | none | inherit
if (id == CSSValueNone || id == CSSValueIntrinsic || id == CSSValueMinIntrinsic) {
- valid_primitive = true;
+ validPrimitive = true;
break;
}
/* nobreak */
case CSSPropertyMinHeight: // <length> | <percentage> | inherit
case CSSPropertyMinWidth: // <length> | <percentage> | inherit
if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (!id && validUnit(value, FLength|FPercent|FNonNeg, m_strict));
+ validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg, m_strict));
break;
case CSSPropertyFontSize:
// <absolute-size> | <relative-size> | <length> | <percentage> | inherit
if (id >= CSSValueXxSmall && id <= CSSValueLarger)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (validUnit(value, FLength|FPercent|FNonNeg, m_strict));
+ validPrimitive = (validUnit(value, FLength | FPercent | FNonNeg, m_strict));
break;
case CSSPropertyFontStyle: // normal | italic | oblique | inherit
@@ -1057,18 +1057,18 @@ bool CSSParser::parseValue(int propId, bool important)
// <percentage> | <length> | inherit
if (id >= CSSValueBaseline && id <= CSSValueWebkitBaselineMiddle)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (!id && validUnit(value, FLength|FPercent, m_strict));
+ validPrimitive = (!id && validUnit(value, FLength | FPercent, m_strict));
break;
case CSSPropertyHeight: // <length> | <percentage> | auto | inherit
case CSSPropertyWidth: // <length> | <percentage> | auto | inherit
if (id == CSSValueAuto || id == CSSValueIntrinsic || id == CSSValueMinIntrinsic)
- valid_primitive = true;
+ validPrimitive = true;
else
// ### handle multilength case where we allow relative units
- valid_primitive = (!id && validUnit(value, FLength|FPercent|FNonNeg, m_strict));
+ validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg, m_strict));
break;
case CSSPropertyBottom: // <length> | <percentage> | auto | inherit
@@ -1081,38 +1081,38 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyMarginLeft: ////
case CSSPropertyWebkitMarginStart:
if (id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (!id && validUnit(value, FLength|FPercent, m_strict));
+ validPrimitive = (!id && validUnit(value, FLength | FPercent, m_strict));
break;
case CSSPropertyZIndex: // auto | <integer> | inherit
if (id == CSSValueAuto) {
- valid_primitive = true;
+ validPrimitive = true;
break;
}
/* nobreak */
case CSSPropertyOrphans: // <integer> | inherit
case CSSPropertyWidows: // <integer> | inherit
// ### not supported later on
- valid_primitive = (!id && validUnit(value, FInteger, false));
+ validPrimitive = (!id && validUnit(value, FInteger, false));
break;
case CSSPropertyLineHeight: // normal | <number> | <length> | <percentage> | inherit
if (id == CSSValueNormal)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (!id && validUnit(value, FNumber|FLength|FPercent|FNonNeg, m_strict));
+ validPrimitive = (!id && validUnit(value, FNumber | FLength | FPercent | FNonNeg, m_strict));
break;
case CSSPropertyCounterIncrement: // [ <identifier> <integer>? ]+ | none | inherit
if (id != CSSValueNone)
return parseCounter(propId, 1, important);
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyCounterReset: // [ <identifier> <integer>? ]+ | none | inherit
if (id != CSSValueNone)
return parseCounter(propId, 0, important);
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyFontFamily:
// [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-family>] | inherit
@@ -1125,11 +1125,11 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitTextDecorationsInEffect:
// none | [ underline || overline || line-through || blink ] | inherit
if (id == CSSValueNone) {
- valid_primitive = true;
+ validPrimitive = true;
} else {
RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- bool is_valid = true;
- while (is_valid && value) {
+ bool isValid = true;
+ while (isValid && value) {
switch (value->id) {
case CSSValueBlink:
break;
@@ -1139,11 +1139,11 @@ bool CSSParser::parseValue(int propId, bool important)
list->append(CSSPrimitiveValue::createIdentifier(value->id));
break;
default:
- is_valid = false;
+ isValid = false;
}
value = m_valueList->next();
}
- if (list->length() && is_valid) {
+ if (list->length() && isValid) {
parsedValue = list.release();
m_valueList->next();
}
@@ -1152,14 +1152,14 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit
if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocument)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true));
+ validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true));
break;
case CSSPropertyTableLayout: // auto | fixed | inherit
if (id == CSSValueAuto || id == CSSValueFixed)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertySrc: // Only used within @font-face, so cannot use inherit | initial or be !important. This is a list of urls or local references.
@@ -1171,13 +1171,13 @@ bool CSSParser::parseValue(int propId, bool important)
/* CSS3 properties */
case CSSPropertyWebkitAppearance:
if ((id >= CSSValueCheckbox && id <= CSSValueTextarea) || id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBinding:
#if ENABLE(XBL)
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else {
RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
CSSParserValue* val;
@@ -1211,7 +1211,7 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitBorderImage:
case CSSPropertyWebkitMaskBoxImage:
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else {
RefPtr<CSSValue> result;
if (parseBorderImage(propId, important, result)) {
@@ -1226,15 +1226,15 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderBottomRightRadius: {
if (num != 1 && num != 2)
return false;
- valid_primitive = validUnit(value, FLength, m_strict);
- if (!valid_primitive)
+ validPrimitive = validUnit(value, FLength, m_strict);
+ if (!validPrimitive)
return false;
RefPtr<CSSPrimitiveValue> parsedValue1 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
RefPtr<CSSPrimitiveValue> parsedValue2;
if (num == 2) {
value = m_valueList->next();
- valid_primitive = validUnit(value, FLength, m_strict);
- if (!valid_primitive)
+ validPrimitive = validUnit(value, FLength, m_strict);
+ if (!validPrimitive)
return false;
parsedValue2 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
} else
@@ -1249,59 +1249,59 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitBorderRadius:
return parseBorderRadius(propId, important);
case CSSPropertyOutlineOffset:
- valid_primitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength, m_strict);
break;
case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
case CSSPropertyWebkitBoxShadow:
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else
return parseShadow(propId, important);
break;
case CSSPropertyWebkitBoxReflect:
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else
return parseReflect(propId, important);
break;
case CSSPropertyOpacity:
- valid_primitive = validUnit(value, FNumber, m_strict);
+ validPrimitive = validUnit(value, FNumber, m_strict);
break;
case CSSPropertyWebkitBoxAlign:
if (id == CSSValueStretch || id == CSSValueStart || id == CSSValueEnd ||
id == CSSValueCenter || id == CSSValueBaseline)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBoxDirection:
if (id == CSSValueNormal || id == CSSValueReverse)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBoxLines:
if (id == CSSValueSingle || id == CSSValueMultiple)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBoxOrient:
if (id == CSSValueHorizontal || id == CSSValueVertical ||
id == CSSValueInlineAxis || id == CSSValueBlockAxis)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBoxPack:
if (id == CSSValueStart || id == CSSValueEnd ||
id == CSSValueCenter || id == CSSValueJustify)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBoxFlex:
- valid_primitive = validUnit(value, FNumber, m_strict);
+ validPrimitive = validUnit(value, FNumber, m_strict);
break;
case CSSPropertyWebkitBoxFlexGroup:
case CSSPropertyWebkitBoxOrdinalGroup:
- valid_primitive = validUnit(value, FInteger|FNonNeg, true);
+ validPrimitive = validUnit(value, FInteger | FNonNeg, true);
break;
case CSSPropertyWebkitBoxSizing:
- valid_primitive = id == CSSValueBorderBox || id == CSSValueContentBox;
+ validPrimitive = id == CSSValueBorderBox || id == CSSValueContentBox;
break;
case CSSPropertyWebkitColorCorrection:
- valid_primitive = id == CSSValueSrgb || id == CSSValueDefault;
+ validPrimitive = id == CSSValueSrgb || id == CSSValueDefault;
break;
case CSSPropertyWebkitMarquee: {
const int properties[5] = { CSSPropertyWebkitMarqueeDirection, CSSPropertyWebkitMarqueeIncrement,
@@ -1313,71 +1313,71 @@ bool CSSParser::parseValue(int propId, bool important)
if (id == CSSValueForwards || id == CSSValueBackwards || id == CSSValueAhead ||
id == CSSValueReverse || id == CSSValueLeft || id == CSSValueRight || id == CSSValueDown ||
id == CSSValueUp || id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitMarqueeIncrement:
if (id == CSSValueSmall || id == CSSValueLarge || id == CSSValueMedium)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FLength|FPercent, m_strict);
+ validPrimitive = validUnit(value, FLength | FPercent, m_strict);
break;
case CSSPropertyWebkitMarqueeStyle:
if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitMarqueeRepetition:
if (id == CSSValueInfinite)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FInteger|FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FInteger | FNonNeg, m_strict);
break;
case CSSPropertyWebkitMarqueeSpeed:
if (id == CSSValueNormal || id == CSSValueSlow || id == CSSValueFast)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FTime|FInteger|FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
break;
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeDir:
if (id == CSSValueLtr || id == CSSValueRtl)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWapMarqueeStyle:
if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWapMarqueeLoop:
if (id == CSSValueInfinite)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FInteger | FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FInteger | FNonNeg, m_strict);
break;
case CSSPropertyWapMarqueeSpeed:
if (id == CSSValueNormal || id == CSSValueSlow || id == CSSValueFast)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
break;
#endif
case CSSPropertyWebkitUserDrag: // auto | none | element
if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueElement)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitUserModify: // read-only | read-write
if (id == CSSValueReadOnly || id == CSSValueReadWrite || id == CSSValueReadWritePlaintextOnly)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitUserSelect: // auto | none | text
if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueText)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextOverflow: // clip | ellipsis
if (id == CSSValueClip || id == CSSValueEllipsis)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitTransform:
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else {
PassRefPtr<CSSValue> val = parseTransform();
if (val) {
@@ -1407,18 +1407,18 @@ bool CSSParser::parseValue(int propId, bool important)
}
case CSSPropertyWebkitTransformStyle:
if (value->id == CSSValueFlat || value->id == CSSValuePreserve3d)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBackfaceVisibility:
if (value->id == CSSValueVisible || value->id == CSSValueHidden)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitPerspective:
if (id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
else {
// Accepting valueless numbers is a quirk of the -webkit prefixed version of the property.
- if (validUnit(value, FNumber|FLength|FNonNeg, m_strict)) {
+ if (validUnit(value, FNumber | FLength | FNonNeg, m_strict)) {
RefPtr<CSSValue> val = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
if (val) {
addProperty(propId, val.release(), important);
@@ -1482,13 +1482,13 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitMarginTopCollapse:
case CSSPropertyWebkitMarginBottomCollapse:
if (id == CSSValueCollapse || id == CSSValueSeparate || id == CSSValueDiscard)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextLineThroughMode:
case CSSPropertyTextOverlineMode:
case CSSPropertyTextUnderlineMode:
if (id == CSSValueContinuous || id == CSSValueSkipWhiteSpace)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextLineThroughStyle:
case CSSPropertyTextOverlineStyle:
@@ -1496,50 +1496,50 @@ bool CSSParser::parseValue(int propId, bool important)
if (id == CSSValueNone || id == CSSValueSolid || id == CSSValueDouble ||
id == CSSValueDashed || id == CSSValueDotDash || id == CSSValueDotDotDash ||
id == CSSValueWave)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision
if (id == CSSValueAuto || id == CSSValueOptimizespeed || id == CSSValueOptimizelegibility
|| id == CSSValueGeometricprecision)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyTextLineThroughWidth:
case CSSPropertyTextOverlineWidth:
case CSSPropertyTextUnderlineWidth:
if (id == CSSValueAuto || id == CSSValueNormal || id == CSSValueThin ||
id == CSSValueMedium || id == CSSValueThick)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = !id && validUnit(value, FNumber|FLength|FPercent, m_strict);
+ validPrimitive = !id && validUnit(value, FNumber | FLength | FPercent, m_strict);
break;
case CSSPropertyResize: // none | both | horizontal | vertical | auto
if (id == CSSValueNone || id == CSSValueBoth || id == CSSValueHorizontal || id == CSSValueVertical || id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitColumnCount:
if (id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = !id && validUnit(value, FInteger | FNonNeg, false);
+ validPrimitive = !id && validUnit(value, FInteger | FNonNeg, false);
break;
case CSSPropertyWebkitColumnGap: // normal | <length>
if (id == CSSValueNormal)
- valid_primitive = true;
+ validPrimitive = true;
else
- valid_primitive = validUnit(value, FLength | FNonNeg, m_strict);
+ validPrimitive = validUnit(value, FLength | FNonNeg, m_strict);
break;
case CSSPropertyWebkitColumnWidth: // auto | <length>
if (id == CSSValueAuto)
- valid_primitive = true;
+ validPrimitive = true;
else // Always parse this property in strict mode, since it would be ambiguous otherwise when used in the 'columns' shorthand property.
- valid_primitive = validUnit(value, FLength, true);
+ validPrimitive = validUnit(value, FLength, true);
break;
case CSSPropertyPointerEvents:
// none | visiblePainted | visibleFill | visibleStroke | visible |
// painted | fill | stroke | auto | all | inherit
if (id == CSSValueVisible || id == CSSValueNone || id == CSSValueAll || id == CSSValueAuto ||
(id >= CSSValueVisiblepainted && id <= CSSValueStroke))
- valid_primitive = true;
+ validPrimitive = true;
break;
// End of CSS3 properties
@@ -1549,56 +1549,56 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitLineClamp:
// When specifying number of lines, don't allow 0 as a valid value
// When specifying either type of unit, require non-negative integers
- valid_primitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTAGE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, false));
+ validPrimitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTAGE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, false));
break;
case CSSPropertyWebkitTextSizeAdjust:
if (id == CSSValueAuto || id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitRtlOrdering:
if (id == CSSValueLogical || id == CSSValueVisual)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitFontSizeDelta: // <length>
- valid_primitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength, m_strict);
break;
case CSSPropertyWebkitNbspMode: // normal | space
if (id == CSSValueNormal || id == CSSValueSpace)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitLineBreak: // normal | after-white-space
if (id == CSSValueNormal || id == CSSValueAfterWhiteSpace)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitMatchNearestMailBlockquoteColor: // normal | match
if (id == CSSValueNormal || id == CSSValueMatch)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitHighlight:
if (id == CSSValueNone || value->unit == CSSPrimitiveValue::CSS_STRING)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitBorderFit:
if (id == CSSValueBorder || id == CSSValueLines)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitTextSecurity:
// disc | circle | square | none | inherit
if (id == CSSValueDisc || id == CSSValueCircle || id == CSSValueSquare|| id == CSSValueNone)
- valid_primitive = true;
+ validPrimitive = true;
break;
case CSSPropertyWebkitFontSmoothing:
if (id == CSSValueAuto || id == CSSValueNone
|| id == CSSValueAntialiased || id == CSSValueSubpixelAntialiased)
- valid_primitive = true;
+ validPrimitive = true;
break;
#if ENABLE(DASHBOARD_SUPPORT)
@@ -1706,7 +1706,7 @@ bool CSSParser::parseValue(int propId, bool important)
// [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]?
// 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
if (id >= CSSValueCaption && id <= CSSValueStatusBar)
- valid_primitive = true;
+ validPrimitive = true;
else
return parseFont(important);
break;
@@ -1756,7 +1756,7 @@ bool CSSParser::parseValue(int propId, bool important)
#endif
}
- if (valid_primitive) {
+ if (validPrimitive) {
if (id != 0)
parsedValue = CSSPrimitiveValue::createIdentifier(id);
else if (value->unit == CSSPrimitiveValue::CSS_STRING)
@@ -2303,7 +2303,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillPositionXY(bool& xFound, bool& yFound)
percent = 50;
return CSSPrimitiveValue::create(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
}
- if (validUnit(m_valueList->current(), FPercent|FLength, m_strict))
+ if (validUnit(m_valueList->current(), FPercent | FLength, m_strict))
return CSSPrimitiveValue::create(m_valueList->current()->fValue,
(CSSPrimitiveValue::UnitTypes)m_valueList->current()->unit);
@@ -2411,7 +2411,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillSize(int propId, bool& allowComma)
if (value->id == CSSValueAuto)
parsedValue1 = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_UNKNOWN);
else {
- if (!validUnit(value, FLength|FPercent, m_strict))
+ if (!validUnit(value, FLength | FPercent, m_strict))
return 0;
parsedValue1 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
}
@@ -2424,7 +2424,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillSize(int propId, bool& allowComma)
else if (value->unit == CSSParserValue::Operator && value->iValue == ',')
allowComma = false;
else {
- if (!validUnit(value, FLength|FPercent, m_strict))
+ if (!validUnit(value, FLength | FPercent, m_strict))
return 0;
parsedValue2 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
}
@@ -2626,7 +2626,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationDirection()
PassRefPtr<CSSValue> CSSParser::parseAnimationDuration()
{
CSSParserValue* value = m_valueList->current();
- if (validUnit(value, FTime|FNonNeg, m_strict))
+ if (validUnit(value, FTime | FNonNeg, m_strict))
return CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
return 0;
}
@@ -2636,7 +2636,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationIterationCount()
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueInfinite)
return CSSPrimitiveValue::createIdentifier(value->id);
- if (validUnit(value, FInteger|FNonNeg, m_strict))
+ if (validUnit(value, FInteger | FNonNeg, m_strict))
return CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
return 0;
}
@@ -3107,7 +3107,7 @@ bool CSSParser::parseFont(bool important)
} else {
valid = false;
}
- } else if (!font->weight && validUnit(value, FInteger|FNonNeg, true)) {
+ } else if (!font->weight && validUnit(value, FInteger | FNonNeg, true)) {
int weight = (int)value->fValue;
int val = 0;
if (weight == 100)
@@ -3155,7 +3155,7 @@ bool CSSParser::parseFont(bool important)
// <absolute-size> | <relative-size> | <length> | <percentage> | inherit
if (value->id >= CSSValueXxSmall && value->id <= CSSValueLarger)
font->size = CSSPrimitiveValue::createIdentifier(value->id);
- else if (validUnit(value, FLength|FPercent|FNonNeg, m_strict))
+ else if (validUnit(value, FLength | FPercent | FNonNeg, m_strict))
font->size = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit);
value = m_valueList->next();
if (!font->size || !value)
@@ -3168,7 +3168,7 @@ bool CSSParser::parseFont(bool important)
return false;
if (value->id == CSSValueNormal) {
// default value, nothing to do
- } else if (validUnit(value, FNumber|FLength|FPercent|FNonNeg, m_strict))
+ } else if (validUnit(value, FNumber | FLength | FPercent | FNonNeg, m_strict))
font->lineHeight = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit);
else
return false;
@@ -4089,7 +4089,7 @@ bool CSSParser::parseBorderImage(int propId, bool important, RefPtr<CSSValue>& r
return false;
while ((val = m_valueList->next())) {
- if (context.allowNumber() && validUnit(val, FInteger|FNonNeg|FPercent, true)) {
+ if (context.allowNumber() && validUnit(val, FInteger | FNonNeg | FPercent, true)) {
context.commitNumber(val);
} else if (propId == CSSPropertyWebkitBorderImage && context.allowSlash() && val->unit == CSSParserValue::Operator && val->iValue == '/') {
context.commitSlash();
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index f920898..c20448e 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -945,9 +945,21 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case AmharicAbegede:
m_value.ident = CSSValueAmharicAbegede;
break;
+ case ArabicIndic:
+ m_value.ident = CSSValueArabicIndic;
+ break;
case Armenian:
m_value.ident = CSSValueArmenian;
break;
+ case BinaryListStyle:
+ m_value.ident = CSSValueBinary;
+ break;
+ case Bengali:
+ m_value.ident = CSSValueBengali;
+ break;
+ case Cambodian:
+ m_value.ident = CSSValueCambodian;
+ break;
case Circle:
m_value.ident = CSSValueCircle;
break;
@@ -966,6 +978,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case DecimalListStyle:
m_value.ident = CSSValueDecimal;
break;
+ case Devanagari:
+ m_value.ident = CSSValueDevanagari;
+ break;
case Disc:
m_value.ident = CSSValueDisc;
break;
@@ -1020,6 +1035,12 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case Georgian:
m_value.ident = CSSValueGeorgian;
break;
+ case Gujarati:
+ m_value.ident = CSSValueGujarati;
+ break;
+ case Gurmukhi:
+ m_value.ident = CSSValueGurmukhi;
+ break;
case Hangul:
m_value.ident = CSSValueHangul;
break;
@@ -1035,18 +1056,30 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case HiraganaIroha:
m_value.ident = CSSValueHiraganaIroha;
break;
+ case Kannada:
+ m_value.ident = CSSValueKannada;
+ break;
case Katakana:
m_value.ident = CSSValueKatakana;
break;
case KatakanaIroha:
m_value.ident = CSSValueKatakanaIroha;
break;
+ case Khmer:
+ m_value.ident = CSSValueKhmer;
+ break;
+ case Lao:
+ m_value.ident = CSSValueLao;
+ break;
case LowerAlpha:
m_value.ident = CSSValueLowerAlpha;
break;
case LowerGreek:
m_value.ident = CSSValueLowerGreek;
break;
+ case LowerHexadecimal:
+ m_value.ident = CSSValueLowerHexadecimal;
+ break;
case LowerLatin:
m_value.ident = CSSValueLowerLatin;
break;
@@ -1056,12 +1089,30 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case LowerRoman:
m_value.ident = CSSValueLowerRoman;
break;
+ case Malayalam:
+ m_value.ident = CSSValueMalayalam;
+ break;
+ case Mongolian:
+ m_value.ident = CSSValueMongolian;
+ break;
+ case Myanmar:
+ m_value.ident = CSSValueMyanmar;
+ break;
case NoneListStyle:
m_value.ident = CSSValueNone;
break;
+ case Octal:
+ m_value.ident = CSSValueOctal;
+ break;
+ case Oriya:
+ m_value.ident = CSSValueOriya;
+ break;
case Oromo:
m_value.ident = CSSValueOromo;
break;
+ case Persian:
+ m_value.ident = CSSValuePersian;
+ break;
case Sidama:
m_value.ident = CSSValueSidama;
break;
@@ -1071,6 +1122,15 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case Square:
m_value.ident = CSSValueSquare;
break;
+ case Telugu:
+ m_value.ident = CSSValueTelugu;
+ break;
+ case Thai:
+ m_value.ident = CSSValueThai;
+ break;
+ case Tibetan:
+ m_value.ident = CSSValueTibetan;
+ break;
case Tigre:
m_value.ident = CSSValueTigre;
break;
@@ -1092,6 +1152,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case UpperGreek:
m_value.ident = CSSValueUpperGreek;
break;
+ case UpperHexadecimal:
+ m_value.ident = CSSValueUpperHexadecimal;
+ break;
case UpperLatin:
m_value.ident = CSSValueUpperLatin;
break;
@@ -1101,6 +1164,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case UpperRoman:
m_value.ident = CSSValueUpperRoman;
break;
+ case Urdu:
+ m_value.ident = CSSValueUrdu;
+ break;
}
}
diff --git a/WebCore/css/CSSStyleSheet.h b/WebCore/css/CSSStyleSheet.h
index 2d8a912..bb14e28 100644
--- a/WebCore/css/CSSStyleSheet.h
+++ b/WebCore/css/CSSStyleSheet.h
@@ -44,21 +44,21 @@ public:
{
return adoptRef(new CSSStyleSheet(ownerNode, String(), KURL(), String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& originalURL, const KURL& finalURL)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, originalURL, finalURL, String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& originalURL, const KURL& finalURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, charset));
+ return adoptRef(new CSSStyleSheet(ownerNode, originalURL, finalURL, charset));
}
- static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& originalURL, const KURL& finalURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerRule, href, baseURL, charset));
+ return adoptRef(new CSSStyleSheet(ownerRule, originalURL, finalURL, charset));
}
- static PassRefPtr<CSSStyleSheet> createInline(Node* ownerNode, const KURL& baseURL)
+ static PassRefPtr<CSSStyleSheet> createInline(Node* ownerNode, const KURL& finalURL)
{
- return adoptRef(new CSSStyleSheet(ownerNode, baseURL.string(), baseURL, String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, finalURL.string(), finalURL, String()));
}
virtual ~CSSStyleSheet();
@@ -103,9 +103,9 @@ public:
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
private:
- CSSStyleSheet(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset);
- CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset);
- CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset);
+ CSSStyleSheet(Node* ownerNode, const String& originalURL, const KURL& finalURL, const String& charset);
+ CSSStyleSheet(CSSStyleSheet* parentSheet, const String& originalURL, const KURL& finalURL, const String& charset);
+ CSSStyleSheet(CSSRule* ownerRule, const String& originalURL, const KURL& finalURL, const String& charset);
virtual bool isCSSStyleSheet() const { return true; }
virtual String type() const { return "text/css"; }
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index 8236115..ca2a47a 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -225,6 +225,28 @@ circle
square
decimal
decimal-leading-zero
+arabic-indic
+binary
+bengali
+cambodian
+khmer
+devanagari
+gujarati
+gurmukhi
+kannada
+lower-hexadecimal
+lao
+malayalam
+mongolian
+myanmar
+octal
+oriya
+persian
+urdu
+telugu
+tibetan
+thai
+upper-hexadecimal
lower-roman
upper-roman
lower-greek
diff --git a/WebCore/css/StyleBase.cpp b/WebCore/css/StyleBase.cpp
index cc7c0d4..5d9d79d 100644
--- a/WebCore/css/StyleBase.cpp
+++ b/WebCore/css/StyleBase.cpp
@@ -56,8 +56,8 @@ KURL StyleBase::baseURL() const
StyleSheet* sheet = const_cast<StyleBase*>(this)->stylesheet();
if (!sheet)
return KURL();
- if (!sheet->putativeBaseURL().isNull())
- return sheet->putativeBaseURL();
+ if (!sheet->finalURL().isNull())
+ return sheet->finalURL();
if (sheet->parent())
return sheet->parent()->baseURL();
if (!sheet->ownerNode())
diff --git a/WebCore/css/StyleSheet.cpp b/WebCore/css/StyleSheet.cpp
index 15e1c3b..4f20a20 100644
--- a/WebCore/css/StyleSheet.cpp
+++ b/WebCore/css/StyleSheet.cpp
@@ -24,30 +24,29 @@
namespace WebCore {
-StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL)
+StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& originalURL, const KURL& finalURL)
: StyleList(parentSheet)
, m_parentNode(0)
- , m_href(href)
- , m_baseURL(baseURL)
+ , m_originalURL(originalURL)
+ , m_finalURL(finalURL)
, m_disabled(false)
{
}
-
-StyleSheet::StyleSheet(Node* parentNode, const String& href, const KURL& baseURL)
+StyleSheet::StyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL)
: StyleList(0)
, m_parentNode(parentNode)
- , m_href(href)
- , m_baseURL(baseURL)
+ , m_originalURL(originalURL)
+ , m_finalURL(finalURL)
, m_disabled(false)
{
}
-StyleSheet::StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL)
+StyleSheet::StyleSheet(StyleBase* owner, const String& originalURL, const KURL& finalURL)
: StyleList(owner)
, m_parentNode(0)
- , m_href(href)
- , m_baseURL(baseURL)
+ , m_originalURL(originalURL)
+ , m_finalURL(finalURL)
, m_disabled(false)
{
}
diff --git a/WebCore/css/StyleSheet.h b/WebCore/css/StyleSheet.h
index 5f8ad78..621733d 100644
--- a/WebCore/css/StyleSheet.h
+++ b/WebCore/css/StyleSheet.h
@@ -45,13 +45,10 @@ public:
// Note that href is the URL that started the redirect chain that led to
// this style sheet. This property probably isn't useful for much except
// the JavaScript binding (which needs to use this value for security).
- const String& href() const { return m_href; }
+ const String& href() const { return m_originalURL; }
- void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; }
-
- // Notice that this object inherits a baseURL function from StyleBase that
- // crawls the parent() relation looking for a non-0 putativeBaseURL.
- const KURL& putativeBaseURL() const { return m_baseURL; }
+ void setFinalURL(const KURL& finalURL) { m_finalURL = finalURL; }
+ const KURL& finalURL() const { return m_finalURL; }
const String& title() const { return m_strTitle; }
void setTitle(const String& s) { m_strTitle = s; }
@@ -68,16 +65,16 @@ public:
virtual bool parseString(const String&, bool strict = true) = 0;
protected:
- StyleSheet(Node* ownerNode, const String& href, const KURL& baseURL);
- StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL);
- StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL);
+ StyleSheet(Node* ownerNode, const String& href, const KURL& finalURL);
+ StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& finalURL);
+ StyleSheet(StyleBase* owner, const String& href, const KURL& finalURL);
private:
virtual bool isStyleSheet() const { return true; }
Node* m_parentNode;
- String m_href;
- KURL m_baseURL;
+ String m_originalURL;
+ KURL m_finalURL;
String m_strTitle;
RefPtr<MediaList> m_media;
bool m_disabled;
diff --git a/WebCore/css/svg.css b/WebCore/css/svg.css
index 322eda8..171c1c4 100644
--- a/WebCore/css/svg.css
+++ b/WebCore/css/svg.css
@@ -32,9 +32,18 @@
which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the
outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set
to the bounds of the initial viewport.
+
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout
+ [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then
+ the user agent will establish an initial clipping path equal to the bounds of the initial viewport; otherwise,
+ the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow].
+
+ Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for the outermost svg element - SVG 1.1 Errata
+ contains these changes as well as all future SVG specifications: see http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html
*/
-svg:root {
- overflow: hidden !important
+
+svg:not(:root), symbol, image, marker, pattern, foreignObject {
+ overflow: hidden
}
svg {
@@ -42,10 +51,6 @@ svg {
height: 100%;
}
-svg, symbol, marker, pattern {
- overflow: hidden
-}
-
text, foreignObject {
display: block
}