OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/css/parser/CSSPropertyParser.h" | 6 #include "core/css/parser/CSSPropertyParser.h" |
7 | 7 |
8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
10 #include "core/css/CSSCursorImageValue.h" | 10 #include "core/css/CSSCursorImageValue.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 parseSuccess = (RuntimeEnabledFeatures::cssViewportEnabled() || isUAShee
tBehavior(context.mode())) | 76 parseSuccess = (RuntimeEnabledFeatures::cssViewportEnabled() || isUAShee
tBehavior(context.mode())) |
77 && parser.parseViewportDescriptor(resolvedProperty, important); | 77 && parser.parseViewportDescriptor(resolvedProperty, important); |
78 } else if (ruleType == StyleRule::FontFace) { | 78 } else if (ruleType == StyleRule::FontFace) { |
79 parseSuccess = parser.parseFontFaceDescriptor(resolvedProperty); | 79 parseSuccess = parser.parseFontFaceDescriptor(resolvedProperty); |
80 } else { | 80 } else { |
81 parseSuccess = parser.parseValueStart(unresolvedProperty, important); | 81 parseSuccess = parser.parseValueStart(unresolvedProperty, important); |
82 } | 82 } |
83 | 83 |
84 // This doesn't count UA style sheets | 84 // This doesn't count UA style sheets |
85 if (parseSuccess && context.useCounter()) | 85 if (parseSuccess && context.useCounter()) |
86 context.useCounter()->count(context, unresolvedProperty); | 86 context.useCounter()->count(context.mode(), unresolvedProperty); |
87 | 87 |
88 if (!parseSuccess) | 88 if (!parseSuccess) |
89 parser.rollbackLastProperties(parsedProperties.size() - parsedProperties
Size); | 89 parser.rollbackLastProperties(parsedProperties.size() - parsedProperties
Size); |
90 | 90 |
91 return parseSuccess; | 91 return parseSuccess; |
92 } | 92 } |
93 | 93 |
94 bool CSSPropertyParser::isValidNumericValue(double value) | 94 bool CSSPropertyParser::isValidNumericValue(double value) |
95 { | 95 { |
96 return std::isfinite(value) | 96 return std::isfinite(value) |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 if (functionId < CSSValueRgb || functionId > CSSValueHsla) | 684 if (functionId < CSSValueRgb || functionId > CSSValueHsla) |
685 return false; | 685 return false; |
686 CSSParserTokenRange colorRange = range; | 686 CSSParserTokenRange colorRange = range; |
687 if ((functionId <= CSSValueRgba && !parseRGBParameters(colorRange, result, f
unctionId == CSSValueRgba)) | 687 if ((functionId <= CSSValueRgba && !parseRGBParameters(colorRange, result, f
unctionId == CSSValueRgba)) |
688 || (functionId >= CSSValueHsl && !parseHSLParameters(colorRange, result,
functionId == CSSValueHsla))) | 688 || (functionId >= CSSValueHsl && !parseHSLParameters(colorRange, result,
functionId == CSSValueHsla))) |
689 return false; | 689 return false; |
690 range = colorRange; | 690 range = colorRange; |
691 return true; | 691 return true; |
692 } | 692 } |
693 | 693 |
694 static PassRefPtrWillBeRawPtr<CSSValue> consumeColor(CSSParserTokenRange& range,
const CSSParserContext& context, bool acceptQuirkyColors = false) | 694 static PassRefPtrWillBeRawPtr<CSSValue> consumeColor(CSSParserTokenRange& range,
CSSParserMode cssParserMode, bool acceptQuirkyColors = false) |
695 { | 695 { |
696 CSSValueID id = range.peek().id(); | 696 CSSValueID id = range.peek().id(); |
697 if (CSSPropertyParser::isColorKeyword(id)) { | 697 if (CSSPropertyParser::isColorKeyword(id)) { |
698 if (!isValueAllowedInMode(id, context.mode())) | 698 if (!isValueAllowedInMode(id, cssParserMode)) |
699 return nullptr; | 699 return nullptr; |
700 return consumeIdent(range); | 700 return consumeIdent(range); |
701 } | 701 } |
702 RGBA32 color = Color::transparent; | 702 RGBA32 color = Color::transparent; |
703 if (!parseHexColor(range, color, acceptQuirkyColors) && !parseColorFunction(
range, color)) | 703 if (!parseHexColor(range, color, acceptQuirkyColors) && !parseColorFunction(
range, color)) |
704 return nullptr; | 704 return nullptr; |
705 return cssValuePool().createColorValue(color); | 705 return cssValuePool().createColorValue(color); |
706 } | 706 } |
707 | 707 |
708 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumePositionComponent(CSSPar
serTokenRange& range, CSSParserMode cssParserMode, UnitlessQuirk unitless) | 708 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumePositionComponent(CSSPar
serTokenRange& range, CSSParserMode cssParserMode, UnitlessQuirk unitless) |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 return consumePositiveInteger(range); | 1751 return consumePositiveInteger(range); |
1752 } | 1752 } |
1753 | 1753 |
1754 static PassRefPtrWillBeRawPtr<CSSValue> consumeZIndex(CSSParserTokenRange& range
) | 1754 static PassRefPtrWillBeRawPtr<CSSValue> consumeZIndex(CSSParserTokenRange& range
) |
1755 { | 1755 { |
1756 if (range.peek().id() == CSSValueAuto) | 1756 if (range.peek().id() == CSSValueAuto) |
1757 return consumeIdent(range); | 1757 return consumeIdent(range); |
1758 return consumeInteger(range); | 1758 return consumeInteger(range); |
1759 } | 1759 } |
1760 | 1760 |
1761 static PassRefPtrWillBeRawPtr<CSSShadowValue> parseSingleShadow(CSSParserTokenRa
nge& range, const CSSParserContext& context, bool allowInset, bool allowSpread) | 1761 static PassRefPtrWillBeRawPtr<CSSShadowValue> parseSingleShadow(CSSParserTokenRa
nge& range, CSSParserMode cssParserMode, bool allowInset, bool allowSpread) |
1762 { | 1762 { |
1763 RefPtrWillBeRawPtr<CSSPrimitiveValue> style = nullptr; | 1763 RefPtrWillBeRawPtr<CSSPrimitiveValue> style = nullptr; |
1764 RefPtrWillBeRawPtr<CSSValue> color = nullptr; | 1764 RefPtrWillBeRawPtr<CSSValue> color = nullptr; |
1765 | 1765 |
1766 if (range.atEnd()) | 1766 if (range.atEnd()) |
1767 return nullptr; | 1767 return nullptr; |
1768 if (range.peek().id() == CSSValueInset) { | 1768 if (range.peek().id() == CSSValueInset) { |
1769 if (!allowInset) | 1769 if (!allowInset) |
1770 return nullptr; | 1770 return nullptr; |
1771 style = consumeIdent(range); | 1771 style = consumeIdent(range); |
1772 } | 1772 } |
1773 color = consumeColor(range, context); | 1773 color = consumeColor(range, cssParserMode); |
1774 | 1774 |
1775 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalOffset = consumeLength(range
, context.mode(), ValueRangeAll); | 1775 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalOffset = consumeLength(range
, cssParserMode, ValueRangeAll); |
1776 if (!horizontalOffset) | 1776 if (!horizontalOffset) |
1777 return nullptr; | 1777 return nullptr; |
1778 | 1778 |
1779 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalOffset = consumeLength(range,
context.mode(), ValueRangeAll); | 1779 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalOffset = consumeLength(range,
cssParserMode, ValueRangeAll); |
1780 if (!verticalOffset) | 1780 if (!verticalOffset) |
1781 return nullptr; | 1781 return nullptr; |
1782 | 1782 |
1783 RefPtrWillBeRawPtr<CSSPrimitiveValue> blurRadius = consumeLength(range, cont
ext.mode(), ValueRangeAll); | 1783 RefPtrWillBeRawPtr<CSSPrimitiveValue> blurRadius = consumeLength(range, cssP
arserMode, ValueRangeAll); |
1784 RefPtrWillBeRawPtr<CSSPrimitiveValue> spreadDistance = nullptr; | 1784 RefPtrWillBeRawPtr<CSSPrimitiveValue> spreadDistance = nullptr; |
1785 if (blurRadius) { | 1785 if (blurRadius) { |
1786 // Blur radius must be non-negative. | 1786 // Blur radius must be non-negative. |
1787 if (blurRadius->getDoubleValue() < 0) | 1787 if (blurRadius->getDoubleValue() < 0) |
1788 return nullptr; | 1788 return nullptr; |
1789 if (allowSpread) | 1789 if (allowSpread) |
1790 spreadDistance = consumeLength(range, context.mode(), ValueRangeAll)
; | 1790 spreadDistance = consumeLength(range, cssParserMode, ValueRangeAll); |
1791 } | 1791 } |
1792 | 1792 |
1793 if (!range.atEnd()) { | 1793 if (!range.atEnd()) { |
1794 if (!color) | 1794 if (!color) |
1795 color = consumeColor(range, context); | 1795 color = consumeColor(range, cssParserMode); |
1796 if (range.peek().id() == CSSValueInset) { | 1796 if (range.peek().id() == CSSValueInset) { |
1797 if (!allowInset || style) | 1797 if (!allowInset || style) |
1798 return nullptr; | 1798 return nullptr; |
1799 style = consumeIdent(range); | 1799 style = consumeIdent(range); |
1800 } | 1800 } |
1801 } | 1801 } |
1802 return CSSShadowValue::create(horizontalOffset.release(), verticalOffset.rel
ease(), blurRadius.release(), | 1802 return CSSShadowValue::create(horizontalOffset.release(), verticalOffset.rel
ease(), blurRadius.release(), |
1803 spreadDistance.release(), style.release(), color.release()); | 1803 spreadDistance.release(), style.release(), color.release()); |
1804 } | 1804 } |
1805 | 1805 |
1806 static PassRefPtrWillBeRawPtr<CSSValue> consumeShadow(CSSParserTokenRange& range
, const CSSParserContext& context, bool isBoxShadowProperty) | 1806 static PassRefPtrWillBeRawPtr<CSSValue> consumeShadow(CSSParserTokenRange& range
, CSSParserMode cssParserMode, bool isBoxShadowProperty) |
1807 { | 1807 { |
1808 if (range.peek().id() == CSSValueNone) | 1808 if (range.peek().id() == CSSValueNone) |
1809 return consumeIdent(range); | 1809 return consumeIdent(range); |
1810 | 1810 |
1811 RefPtrWillBeRawPtr<CSSValueList> shadowValueList = CSSValueList::createComma
Separated(); | 1811 RefPtrWillBeRawPtr<CSSValueList> shadowValueList = CSSValueList::createComma
Separated(); |
1812 do { | 1812 do { |
1813 if (RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = parseSingleShadow(r
ange, context, isBoxShadowProperty, isBoxShadowProperty)) | 1813 if (RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = parseSingleShadow(r
ange, cssParserMode, isBoxShadowProperty, isBoxShadowProperty)) |
1814 shadowValueList->append(shadowValue.release()); | 1814 shadowValueList->append(shadowValue.release()); |
1815 else | 1815 else |
1816 return nullptr; | 1816 return nullptr; |
1817 } while (consumeCommaIncludingWhitespace(range)); | 1817 } while (consumeCommaIncludingWhitespace(range)); |
1818 return shadowValueList; | 1818 return shadowValueList; |
1819 } | 1819 } |
1820 | 1820 |
1821 static PassRefPtrWillBeRawPtr<CSSFunctionValue> consumeFilterFunction(CSSParserT
okenRange& range, const CSSParserContext& context) | 1821 static PassRefPtrWillBeRawPtr<CSSFunctionValue> consumeFilterFunction(CSSParserT
okenRange& range, CSSParserMode cssParserMode) |
1822 { | 1822 { |
1823 CSSValueID filterType = range.peek().functionId(); | 1823 CSSValueID filterType = range.peek().functionId(); |
1824 if (filterType < CSSValueInvert || filterType > CSSValueDropShadow) | 1824 if (filterType < CSSValueInvert || filterType > CSSValueDropShadow) |
1825 return nullptr; | 1825 return nullptr; |
1826 CSSParserTokenRange args = consumeFunction(range); | 1826 CSSParserTokenRange args = consumeFunction(range); |
1827 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = CSSFunctionValue::create(
filterType); | 1827 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = CSSFunctionValue::create(
filterType); |
1828 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; | 1828 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; |
1829 | 1829 |
1830 if (filterType == CSSValueDropShadow) { | 1830 if (filterType == CSSValueDropShadow) { |
1831 parsedValue = parseSingleShadow(args, context, false, false); | 1831 parsedValue = parseSingleShadow(args, cssParserMode, false, false); |
1832 } else { | 1832 } else { |
1833 // TODO(timloh): Add UseCounters for empty filter arguments. | 1833 // TODO(timloh): Add UseCounters for empty filter arguments. |
1834 if (args.atEnd()) | 1834 if (args.atEnd()) |
1835 return filterValue.release(); | 1835 return filterValue.release(); |
1836 if (filterType == CSSValueBrightness) { | 1836 if (filterType == CSSValueBrightness) { |
1837 // FIXME (crbug.com/397061): Support calc expressions like calc(10%
+ 0.5) | 1837 // FIXME (crbug.com/397061): Support calc expressions like calc(10%
+ 0.5) |
1838 parsedValue = consumePercent(args, ValueRangeAll); | 1838 parsedValue = consumePercent(args, ValueRangeAll); |
1839 if (!parsedValue) | 1839 if (!parsedValue) |
1840 parsedValue = consumeNumber(args, ValueRangeAll); | 1840 parsedValue = consumeNumber(args, ValueRangeAll); |
1841 } else if (filterType == CSSValueHueRotate) { | 1841 } else if (filterType == CSSValueHueRotate) { |
1842 parsedValue = consumeAngle(args, context.mode()); | 1842 parsedValue = consumeAngle(args, cssParserMode); |
1843 } else if (filterType == CSSValueBlur) { | 1843 } else if (filterType == CSSValueBlur) { |
1844 parsedValue = consumeLength(args, HTMLStandardMode, ValueRangeNonNeg
ative); | 1844 parsedValue = consumeLength(args, HTMLStandardMode, ValueRangeNonNeg
ative); |
1845 } else { | 1845 } else { |
1846 // FIXME (crbug.com/397061): Support calc expressions like calc(10%
+ 0.5) | 1846 // FIXME (crbug.com/397061): Support calc expressions like calc(10%
+ 0.5) |
1847 parsedValue = consumePercent(args, ValueRangeNonNegative); | 1847 parsedValue = consumePercent(args, ValueRangeNonNegative); |
1848 if (!parsedValue) | 1848 if (!parsedValue) |
1849 parsedValue = consumeNumber(args, ValueRangeNonNegative); | 1849 parsedValue = consumeNumber(args, ValueRangeNonNegative); |
1850 if (parsedValue && filterType != CSSValueSaturate && filterType != C
SSValueContrast) { | 1850 if (parsedValue && filterType != CSSValueSaturate && filterType != C
SSValueContrast) { |
1851 double maxAllowed = toCSSPrimitiveValue(parsedValue.get())->isPe
rcentage() ? 100.0 : 1.0; | 1851 double maxAllowed = toCSSPrimitiveValue(parsedValue.get())->isPe
rcentage() ? 100.0 : 1.0; |
1852 if (toCSSPrimitiveValue(parsedValue.get())->getDoubleValue() > m
axAllowed) | 1852 if (toCSSPrimitiveValue(parsedValue.get())->getDoubleValue() > m
axAllowed) |
1853 return nullptr; | 1853 return nullptr; |
1854 } | 1854 } |
1855 } | 1855 } |
1856 } | 1856 } |
1857 if (!parsedValue || !args.atEnd()) | 1857 if (!parsedValue || !args.atEnd()) |
1858 return nullptr; | 1858 return nullptr; |
1859 filterValue->append(parsedValue.release()); | 1859 filterValue->append(parsedValue.release()); |
1860 return filterValue.release(); | 1860 return filterValue.release(); |
1861 } | 1861 } |
1862 | 1862 |
1863 static PassRefPtrWillBeRawPtr<CSSValue> consumeFilter(CSSParserTokenRange& range
, const CSSParserContext& context) | 1863 static PassRefPtrWillBeRawPtr<CSSValue> consumeFilter(CSSParserTokenRange& range
, CSSParserMode cssParserMode) |
1864 { | 1864 { |
1865 if (range.peek().id() == CSSValueNone) | 1865 if (range.peek().id() == CSSValueNone) |
1866 return consumeIdent(range); | 1866 return consumeIdent(range); |
1867 | 1867 |
1868 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 1868 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
1869 do { | 1869 do { |
1870 String url = consumeUrl(range); | 1870 String url = consumeUrl(range); |
1871 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; | 1871 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; |
1872 if (!url.isNull()) { | 1872 if (!url.isNull()) { |
1873 filterValue = CSSFunctionValue::create(CSSValueUrl); | 1873 filterValue = CSSFunctionValue::create(CSSValueUrl); |
1874 filterValue->append(CSSSVGDocumentValue::create(url)); | 1874 filterValue->append(CSSSVGDocumentValue::create(url)); |
1875 } else { | 1875 } else { |
1876 filterValue = consumeFilterFunction(range, context); | 1876 filterValue = consumeFilterFunction(range, cssParserMode); |
1877 if (!filterValue) | 1877 if (!filterValue) |
1878 return nullptr; | 1878 return nullptr; |
1879 } | 1879 } |
1880 list->append(filterValue.release()); | 1880 list->append(filterValue.release()); |
1881 } while (!range.atEnd()); | 1881 } while (!range.atEnd()); |
1882 return list.release(); | 1882 return list.release(); |
1883 } | 1883 } |
1884 | 1884 |
1885 static PassRefPtrWillBeRawPtr<CSSValue> consumeTextDecorationLine(CSSParserToken
Range& range) | 1885 static PassRefPtrWillBeRawPtr<CSSValue> consumeTextDecorationLine(CSSParserToken
Range& range) |
1886 { | 1886 { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 parsedValues->append(shape.release()); | 1986 parsedValues->append(shape.release()); |
1987 return parsedValues.release(); | 1987 return parsedValues.release(); |
1988 } | 1988 } |
1989 if (fill) | 1989 if (fill) |
1990 return fill.release(); | 1990 return fill.release(); |
1991 if (shape) | 1991 if (shape) |
1992 return shape.release(); | 1992 return shape.release(); |
1993 return nullptr; | 1993 return nullptr; |
1994 } | 1994 } |
1995 | 1995 |
1996 static PassRefPtrWillBeRawPtr<CSSValue> consumeOutlineColor(CSSParserTokenRange&
range, const CSSParserContext& context) | 1996 static PassRefPtrWillBeRawPtr<CSSValue> consumeOutlineColor(CSSParserTokenRange&
range, CSSParserMode cssParserMode) |
1997 { | 1997 { |
1998 // Outline color has "invert" as additional keyword. | 1998 // Outline color has "invert" as additional keyword. |
1999 // Also, we want to allow the special focus color even in HTML Standard pars
ing mode. | 1999 // Also, we want to allow the special focus color even in HTML Standard pars
ing mode. |
2000 if (range.peek().id() == CSSValueInvert || range.peek().id() == CSSValueWebk
itFocusRingColor) | 2000 if (range.peek().id() == CSSValueInvert || range.peek().id() == CSSValueWebk
itFocusRingColor) |
2001 return consumeIdent(range); | 2001 return consumeIdent(range); |
2002 return consumeColor(range, context); | 2002 return consumeColor(range, cssParserMode); |
2003 } | 2003 } |
2004 | 2004 |
2005 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineWidth(CSSParserToken
Range& range, CSSParserMode cssParserMode) | 2005 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineWidth(CSSParserToken
Range& range, CSSParserMode cssParserMode) |
2006 { | 2006 { |
2007 CSSValueID id = range.peek().id(); | 2007 CSSValueID id = range.peek().id(); |
2008 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) | 2008 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) |
2009 return consumeIdent(range); | 2009 return consumeIdent(range); |
2010 return consumeLength(range, cssParserMode, ValueRangeNonNegative); | 2010 return consumeLength(range, cssParserMode, ValueRangeNonNegative); |
2011 } | 2011 } |
2012 | 2012 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 static PassRefPtrWillBeRawPtr<CSSValue> consumePositionX(CSSParserTokenRange& ra
nge, CSSParserMode cssParserMode) | 2195 static PassRefPtrWillBeRawPtr<CSSValue> consumePositionX(CSSParserTokenRange& ra
nge, CSSParserMode cssParserMode) |
2196 { | 2196 { |
2197 return consumePositionLonghand<CSSValueLeft, CSSValueRight>(range, cssParser
Mode); | 2197 return consumePositionLonghand<CSSValueLeft, CSSValueRight>(range, cssParser
Mode); |
2198 } | 2198 } |
2199 | 2199 |
2200 static PassRefPtrWillBeRawPtr<CSSValue> consumePositionY(CSSParserTokenRange& ra
nge, CSSParserMode cssParserMode) | 2200 static PassRefPtrWillBeRawPtr<CSSValue> consumePositionY(CSSParserTokenRange& ra
nge, CSSParserMode cssParserMode) |
2201 { | 2201 { |
2202 return consumePositionLonghand<CSSValueTop, CSSValueBottom>(range, cssParser
Mode); | 2202 return consumePositionLonghand<CSSValueTop, CSSValueBottom>(range, cssParser
Mode); |
2203 } | 2203 } |
2204 | 2204 |
2205 static PassRefPtrWillBeRawPtr<CSSValue> consumePaint(CSSParserTokenRange& range,
CSSParserContext context) | 2205 static PassRefPtrWillBeRawPtr<CSSValue> consumePaint(CSSParserTokenRange& range,
CSSParserMode cssParserMode) |
2206 { | 2206 { |
2207 if (range.peek().id() == CSSValueNone) | 2207 if (range.peek().id() == CSSValueNone) |
2208 return consumeIdent(range); | 2208 return consumeIdent(range); |
2209 String url = consumeUrl(range); | 2209 String url = consumeUrl(range); |
2210 if (!url.isNull()) { | 2210 if (!url.isNull()) { |
2211 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; | 2211 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; |
2212 if (range.peek().id() == CSSValueNone) | 2212 if (range.peek().id() == CSSValueNone) |
2213 parsedValue = consumeIdent(range); | 2213 parsedValue = consumeIdent(range); |
2214 else | 2214 else |
2215 parsedValue = consumeColor(range, context); | 2215 parsedValue = consumeColor(range, cssParserMode); |
2216 if (parsedValue) { | 2216 if (parsedValue) { |
2217 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceS
eparated(); | 2217 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceS
eparated(); |
2218 values->append(CSSURIValue::create(url)); | 2218 values->append(CSSURIValue::create(url)); |
2219 values->append(parsedValue); | 2219 values->append(parsedValue); |
2220 return values.release(); | 2220 return values.release(); |
2221 } | 2221 } |
2222 return CSSURIValue::create(url); | 2222 return CSSURIValue::create(url); |
2223 } | 2223 } |
2224 return consumeColor(range, context); | 2224 return consumeColor(range, cssParserMode); |
2225 } | 2225 } |
2226 | 2226 |
2227 static PassRefPtrWillBeRawPtr<CSSValue> consumePaintOrder(CSSParserTokenRange& r
ange) | 2227 static PassRefPtrWillBeRawPtr<CSSValue> consumePaintOrder(CSSParserTokenRange& r
ange) |
2228 { | 2228 { |
2229 if (range.peek().id() == CSSValueNormal) | 2229 if (range.peek().id() == CSSValueNormal) |
2230 return consumeIdent(range); | 2230 return consumeIdent(range); |
2231 | 2231 |
2232 Vector<CSSValueID, 3> paintTypeList; | 2232 Vector<CSSValueID, 3> paintTypeList; |
2233 RefPtrWillBeRawPtr<CSSPrimitiveValue> fill = nullptr; | 2233 RefPtrWillBeRawPtr<CSSPrimitiveValue> fill = nullptr; |
2234 RefPtrWillBeRawPtr<CSSPrimitiveValue> stroke = nullptr; | 2234 RefPtrWillBeRawPtr<CSSPrimitiveValue> stroke = nullptr; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2310 } | 2310 } |
2311 | 2311 |
2312 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBaselineShift(CSSParserT
okenRange& range) | 2312 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBaselineShift(CSSParserT
okenRange& range) |
2313 { | 2313 { |
2314 CSSValueID id = range.peek().id(); | 2314 CSSValueID id = range.peek().id(); |
2315 if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper) | 2315 if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper) |
2316 return consumeIdent(range); | 2316 return consumeIdent(range); |
2317 return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll, Unitle
ssQuirk::Forbid); | 2317 return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll, Unitle
ssQuirk::Forbid); |
2318 } | 2318 } |
2319 | 2319 |
2320 static PassRefPtrWillBeRawPtr<CSSValue> consumeImageSet(CSSParserTokenRange& ran
ge, CSSParserContext context) | 2320 static PassRefPtrWillBeRawPtr<CSSValue> consumeImageSet(CSSParserTokenRange& ran
ge, const CSSParserContext& context) |
2321 { | 2321 { |
2322 CSSParserTokenRange rangeCopy = range; | 2322 CSSParserTokenRange rangeCopy = range; |
2323 CSSParserTokenRange args = consumeFunction(rangeCopy); | 2323 CSSParserTokenRange args = consumeFunction(rangeCopy); |
2324 RefPtrWillBeRawPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create(); | 2324 RefPtrWillBeRawPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create(); |
2325 do { | 2325 do { |
2326 AtomicString urlValue(consumeUrl(args)); | 2326 AtomicString urlValue(consumeUrl(args)); |
2327 if (urlValue.isNull()) | 2327 if (urlValue.isNull()) |
2328 return nullptr; | 2328 return nullptr; |
2329 | 2329 |
2330 RefPtrWillBeRawPtr<CSSValue> image = CSSPropertyParser::createCSSImageVa
lueWithReferrer(urlValue, context); | 2330 RefPtrWillBeRawPtr<CSSValue> image = CSSPropertyParser::createCSSImageVa
lueWithReferrer(urlValue, context); |
2331 imageSet->append(image); | 2331 imageSet->append(image); |
2332 | 2332 |
2333 const CSSParserToken& token = args.consumeIncludingWhitespace(); | 2333 const CSSParserToken& token = args.consumeIncludingWhitespace(); |
2334 if (token.type() != DimensionToken) | 2334 if (token.type() != DimensionToken) |
2335 return nullptr; | 2335 return nullptr; |
2336 if (String(token.value()) != "x") | 2336 if (String(token.value()) != "x") |
2337 return nullptr; | 2337 return nullptr; |
2338 ASSERT(token.unitType() == CSSPrimitiveValue::UnitType::Unknown); | 2338 ASSERT(token.unitType() == CSSPrimitiveValue::UnitType::Unknown); |
2339 double imageScaleFactor = token.numericValue(); | 2339 double imageScaleFactor = token.numericValue(); |
2340 if (imageScaleFactor <= 0) | 2340 if (imageScaleFactor <= 0) |
2341 return nullptr; | 2341 return nullptr; |
2342 imageSet->append(cssValuePool().createValue(imageScaleFactor, CSSPrimiti
veValue::UnitType::Number)); | 2342 imageSet->append(cssValuePool().createValue(imageScaleFactor, CSSPrimiti
veValue::UnitType::Number)); |
2343 } while (consumeCommaIncludingWhitespace(args)); | 2343 } while (consumeCommaIncludingWhitespace(args)); |
2344 if (!args.atEnd()) | 2344 if (!args.atEnd()) |
2345 return nullptr; | 2345 return nullptr; |
2346 range = rangeCopy; | 2346 range = rangeCopy; |
2347 return imageSet.release(); | 2347 return imageSet.release(); |
2348 } | 2348 } |
2349 | 2349 |
2350 static PassRefPtrWillBeRawPtr<CSSValue> consumeCursor(CSSParserTokenRange& range
, CSSParserContext context, bool inQuirksMode) | 2350 static PassRefPtrWillBeRawPtr<CSSValue> consumeCursor(CSSParserTokenRange& range
, const CSSParserContext& context, bool inQuirksMode) |
2351 { | 2351 { |
2352 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; | 2352 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; |
2353 while (!range.atEnd()) { | 2353 while (!range.atEnd()) { |
2354 RefPtrWillBeRawPtr<CSSValue> image = nullptr; | 2354 RefPtrWillBeRawPtr<CSSValue> image = nullptr; |
2355 AtomicString uri(consumeUrl(range)); | 2355 AtomicString uri(consumeUrl(range)); |
2356 if (!uri.isNull()) { | 2356 if (!uri.isNull()) { |
2357 image = CSSPropertyParser::createCSSImageValueWithReferrer(uri, cont
ext); | 2357 image = CSSPropertyParser::createCSSImageValueWithReferrer(uri, cont
ext); |
2358 } else if (range.peek().type() == FunctionToken && range.peek().function
Id() == CSSValueWebkitImageSet) { | 2358 } else if (range.peek().type() == FunctionToken && range.peek().function
Id() == CSSValueWebkitImageSet) { |
2359 image = consumeImageSet(range, context); | 2359 image = consumeImageSet(range, context); |
2360 if (!image) | 2360 if (!image) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNe
gative); | 2533 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNe
gative); |
2534 case CSSPropertyShapeImageThreshold: | 2534 case CSSPropertyShapeImageThreshold: |
2535 return consumeNumber(m_range, ValueRangeAll); | 2535 return consumeNumber(m_range, ValueRangeAll); |
2536 case CSSPropertyWebkitBoxOrdinalGroup: | 2536 case CSSPropertyWebkitBoxOrdinalGroup: |
2537 return consumePositiveInteger(m_range); | 2537 return consumePositiveInteger(m_range); |
2538 case CSSPropertyOrphans: | 2538 case CSSPropertyOrphans: |
2539 case CSSPropertyWidows: | 2539 case CSSPropertyWidows: |
2540 return consumeWidowsOrOrphans(m_range); | 2540 return consumeWidowsOrOrphans(m_range); |
2541 case CSSPropertyTextDecorationColor: | 2541 case CSSPropertyTextDecorationColor: |
2542 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); | 2542 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); |
2543 return consumeColor(m_range, m_context); | 2543 return consumeColor(m_range, m_context.mode()); |
2544 case CSSPropertyWebkitTextStrokeWidth: | 2544 case CSSPropertyWebkitTextStrokeWidth: |
2545 return consumeTextStrokeWidth(m_range, m_context.mode()); | 2545 return consumeTextStrokeWidth(m_range, m_context.mode()); |
2546 case CSSPropertyWebkitTextFillColor: | 2546 case CSSPropertyWebkitTextFillColor: |
2547 case CSSPropertyWebkitTapHighlightColor: | 2547 case CSSPropertyWebkitTapHighlightColor: |
2548 case CSSPropertyWebkitTextEmphasisColor: | 2548 case CSSPropertyWebkitTextEmphasisColor: |
2549 case CSSPropertyWebkitBorderStartColor: | 2549 case CSSPropertyWebkitBorderStartColor: |
2550 case CSSPropertyWebkitBorderEndColor: | 2550 case CSSPropertyWebkitBorderEndColor: |
2551 case CSSPropertyWebkitBorderBeforeColor: | 2551 case CSSPropertyWebkitBorderBeforeColor: |
2552 case CSSPropertyWebkitBorderAfterColor: | 2552 case CSSPropertyWebkitBorderAfterColor: |
2553 case CSSPropertyWebkitTextStrokeColor: | 2553 case CSSPropertyWebkitTextStrokeColor: |
2554 case CSSPropertyStopColor: | 2554 case CSSPropertyStopColor: |
2555 case CSSPropertyFloodColor: | 2555 case CSSPropertyFloodColor: |
2556 case CSSPropertyLightingColor: | 2556 case CSSPropertyLightingColor: |
2557 case CSSPropertyWebkitColumnRuleColor: | 2557 case CSSPropertyWebkitColumnRuleColor: |
2558 return consumeColor(m_range, m_context); | 2558 return consumeColor(m_range, m_context.mode()); |
2559 case CSSPropertyColor: | 2559 case CSSPropertyColor: |
2560 return consumeColor(m_range, m_context, inQuirksMode()); | 2560 return consumeColor(m_range, m_context.mode(), inQuirksMode()); |
2561 case CSSPropertyWebkitBorderStartWidth: | 2561 case CSSPropertyWebkitBorderStartWidth: |
2562 case CSSPropertyWebkitBorderEndWidth: | 2562 case CSSPropertyWebkitBorderEndWidth: |
2563 case CSSPropertyWebkitBorderBeforeWidth: | 2563 case CSSPropertyWebkitBorderBeforeWidth: |
2564 case CSSPropertyWebkitBorderAfterWidth: | 2564 case CSSPropertyWebkitBorderAfterWidth: |
2565 return consumeBorderWidth(m_range, m_context.mode()); | 2565 return consumeBorderWidth(m_range, m_context.mode()); |
2566 case CSSPropertyZIndex: | 2566 case CSSPropertyZIndex: |
2567 return consumeZIndex(m_range); | 2567 return consumeZIndex(m_range); |
2568 case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS
3, so treat as CSS3 | 2568 case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS
3, so treat as CSS3 |
2569 case CSSPropertyBoxShadow: | 2569 case CSSPropertyBoxShadow: |
2570 return consumeShadow(m_range, m_context, property == CSSPropertyBoxShado
w); | 2570 return consumeShadow(m_range, m_context.mode(), property == CSSPropertyB
oxShadow); |
2571 case CSSPropertyWebkitFilter: | 2571 case CSSPropertyWebkitFilter: |
2572 case CSSPropertyBackdropFilter: | 2572 case CSSPropertyBackdropFilter: |
2573 return consumeFilter(m_range, m_context); | 2573 return consumeFilter(m_range, m_context.mode()); |
2574 case CSSPropertyWebkitTextDecorationsInEffect: | 2574 case CSSPropertyWebkitTextDecorationsInEffect: |
2575 case CSSPropertyTextDecorationLine: | 2575 case CSSPropertyTextDecorationLine: |
2576 return consumeTextDecorationLine(m_range); | 2576 return consumeTextDecorationLine(m_range); |
2577 case CSSPropertyMotionPath: | 2577 case CSSPropertyMotionPath: |
2578 return consumeMotionPath(m_range); | 2578 return consumeMotionPath(m_range); |
2579 case CSSPropertyMotionOffset: | 2579 case CSSPropertyMotionOffset: |
2580 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll); | 2580 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll); |
2581 case CSSPropertyMotionRotation: | 2581 case CSSPropertyMotionRotation: |
2582 return consumeMotionRotation(m_range, m_context.mode()); | 2582 return consumeMotionRotation(m_range, m_context.mode()); |
2583 case CSSPropertyWebkitTextEmphasisStyle: | 2583 case CSSPropertyWebkitTextEmphasisStyle: |
2584 return consumeTextEmphasisStyle(m_range); | 2584 return consumeTextEmphasisStyle(m_range); |
2585 case CSSPropertyOutlineColor: | 2585 case CSSPropertyOutlineColor: |
2586 return consumeOutlineColor(m_range, m_context); | 2586 return consumeOutlineColor(m_range, m_context.mode()); |
2587 case CSSPropertyOutlineOffset: | 2587 case CSSPropertyOutlineOffset: |
2588 return consumeLength(m_range, m_context.mode(), ValueRangeAll); | 2588 return consumeLength(m_range, m_context.mode(), ValueRangeAll); |
2589 case CSSPropertyOutlineWidth: | 2589 case CSSPropertyOutlineWidth: |
2590 return consumeLineWidth(m_range, m_context.mode()); | 2590 return consumeLineWidth(m_range, m_context.mode()); |
2591 case CSSPropertyTransform: | 2591 case CSSPropertyTransform: |
2592 return consumeTransform(m_range, m_context.mode(), unresolvedProperty ==
CSSPropertyAliasWebkitTransform); | 2592 return consumeTransform(m_range, m_context.mode(), unresolvedProperty ==
CSSPropertyAliasWebkitTransform); |
2593 case CSSPropertyWebkitTransformOriginX: | 2593 case CSSPropertyWebkitTransformOriginX: |
2594 case CSSPropertyWebkitPerspectiveOriginX: | 2594 case CSSPropertyWebkitPerspectiveOriginX: |
2595 return consumePositionX(m_range, m_context.mode()); | 2595 return consumePositionX(m_range, m_context.mode()); |
2596 case CSSPropertyWebkitTransformOriginY: | 2596 case CSSPropertyWebkitTransformOriginY: |
2597 case CSSPropertyWebkitPerspectiveOriginY: | 2597 case CSSPropertyWebkitPerspectiveOriginY: |
2598 return consumePositionY(m_range, m_context.mode()); | 2598 return consumePositionY(m_range, m_context.mode()); |
2599 case CSSPropertyWebkitTransformOriginZ: | 2599 case CSSPropertyWebkitTransformOriginZ: |
2600 return consumeLength(m_range, m_context.mode(), ValueRangeAll); | 2600 return consumeLength(m_range, m_context.mode(), ValueRangeAll); |
2601 case CSSPropertyFill: | 2601 case CSSPropertyFill: |
2602 case CSSPropertyStroke: | 2602 case CSSPropertyStroke: |
2603 return consumePaint(m_range, m_context); | 2603 return consumePaint(m_range, m_context.mode()); |
2604 case CSSPropertyPaintOrder: | 2604 case CSSPropertyPaintOrder: |
2605 return consumePaintOrder(m_range); | 2605 return consumePaintOrder(m_range); |
2606 case CSSPropertyMarkerStart: | 2606 case CSSPropertyMarkerStart: |
2607 case CSSPropertyMarkerMid: | 2607 case CSSPropertyMarkerMid: |
2608 case CSSPropertyMarkerEnd: | 2608 case CSSPropertyMarkerEnd: |
2609 case CSSPropertyClipPath: | 2609 case CSSPropertyClipPath: |
2610 case CSSPropertyFilter: | 2610 case CSSPropertyFilter: |
2611 case CSSPropertyMask: | 2611 case CSSPropertyMask: |
2612 return consumeNoneOrURI(m_range); | 2612 return consumeNoneOrURI(m_range); |
2613 case CSSPropertyFlexBasis: | 2613 case CSSPropertyFlexBasis: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 UChar32 start = token.unicodeRangeStart(); | 2661 UChar32 start = token.unicodeRangeStart(); |
2662 UChar32 end = token.unicodeRangeEnd(); | 2662 UChar32 end = token.unicodeRangeEnd(); |
2663 if (start > end) | 2663 if (start > end) |
2664 return nullptr; | 2664 return nullptr; |
2665 values->append(CSSUnicodeRangeValue::create(start, end)); | 2665 values->append(CSSUnicodeRangeValue::create(start, end)); |
2666 } while (consumeCommaIncludingWhitespace(range)); | 2666 } while (consumeCommaIncludingWhitespace(range)); |
2667 | 2667 |
2668 return values.release(); | 2668 return values.release(); |
2669 } | 2669 } |
2670 | 2670 |
2671 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcURI(CSSParserTokenRang
e& range, CSSParserContext context) | 2671 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcURI(CSSParserTokenRang
e& range, const CSSParserContext& context) |
2672 { | 2672 { |
2673 String url = consumeUrl(range); | 2673 String url = consumeUrl(range); |
2674 if (url.isNull()) | 2674 if (url.isNull()) |
2675 return nullptr; | 2675 return nullptr; |
2676 RefPtrWillBeRawPtr<CSSFontFaceSrcValue> uriValue(CSSFontFaceSrcValue::create
(context.completeURL(url), context.shouldCheckContentSecurityPolicy())); | 2676 RefPtrWillBeRawPtr<CSSFontFaceSrcValue> uriValue(CSSFontFaceSrcValue::create
(context.completeURL(url), context.shouldCheckContentSecurityPolicy())); |
2677 uriValue->setReferrer(context.referrer()); | 2677 uriValue->setReferrer(context.referrer()); |
2678 | 2678 |
2679 if (range.peek().functionId() != CSSValueFormat) | 2679 if (range.peek().functionId() != CSSValueFormat) |
2680 return uriValue.release(); | 2680 return uriValue.release(); |
2681 | 2681 |
2682 // FIXME: https://drafts.csswg.org/css-fonts says that format() contains a c
omma-separated list of strings, | 2682 // FIXME: https://drafts.csswg.org/css-fonts says that format() contains a c
omma-separated list of strings, |
2683 // but CSSFontFaceSrcValue stores only one format. Allowing one format for n
ow. | 2683 // but CSSFontFaceSrcValue stores only one format. Allowing one format for n
ow. |
2684 // FIXME: IdentToken should not be supported here. | 2684 // FIXME: IdentToken should not be supported here. |
2685 CSSParserTokenRange args = consumeFunction(range); | 2685 CSSParserTokenRange args = consumeFunction(range); |
2686 const CSSParserToken& arg = args.consumeIncludingWhitespace(); | 2686 const CSSParserToken& arg = args.consumeIncludingWhitespace(); |
2687 if ((arg.type() != StringToken && arg.type() != IdentToken) || !args.atEnd()
) | 2687 if ((arg.type() != StringToken && arg.type() != IdentToken) || !args.atEnd()
) |
2688 return nullptr; | 2688 return nullptr; |
2689 uriValue->setFormat(arg.value()); | 2689 uriValue->setFormat(arg.value()); |
2690 return uriValue.release(); | 2690 return uriValue.release(); |
2691 } | 2691 } |
2692 | 2692 |
2693 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcLocal(CSSParserTokenRa
nge& range, CSSParserContext context) | 2693 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcLocal(CSSParserTokenRa
nge& range, const CSSParserContext& context) |
2694 { | 2694 { |
2695 CSSParserTokenRange args = consumeFunction(range); | 2695 CSSParserTokenRange args = consumeFunction(range); |
2696 ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy = context.
shouldCheckContentSecurityPolicy(); | 2696 ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy = context.
shouldCheckContentSecurityPolicy(); |
2697 if (args.peek().type() == StringToken) { | 2697 if (args.peek().type() == StringToken) { |
2698 const CSSParserToken& arg = args.consumeIncludingWhitespace(); | 2698 const CSSParserToken& arg = args.consumeIncludingWhitespace(); |
2699 if (!args.atEnd()) | 2699 if (!args.atEnd()) |
2700 return nullptr; | 2700 return nullptr; |
2701 return CSSFontFaceSrcValue::createLocal(arg.value(), shouldCheckContentS
ecurityPolicy); | 2701 return CSSFontFaceSrcValue::createLocal(arg.value(), shouldCheckContentS
ecurityPolicy); |
2702 } | 2702 } |
2703 if (args.peek().type() == IdentToken) { | 2703 if (args.peek().type() == IdentToken) { |
2704 String familyName = concatenateFamilyName(args); | 2704 String familyName = concatenateFamilyName(args); |
2705 if (!args.atEnd()) | 2705 if (!args.atEnd()) |
2706 return nullptr; | 2706 return nullptr; |
2707 return CSSFontFaceSrcValue::createLocal(familyName, shouldCheckContentSe
curityPolicy); | 2707 return CSSFontFaceSrcValue::createLocal(familyName, shouldCheckContentSe
curityPolicy); |
2708 } | 2708 } |
2709 return nullptr; | 2709 return nullptr; |
2710 } | 2710 } |
2711 | 2711 |
2712 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceSrc(CSSParserTokenRan
ge& range, CSSParserContext context) | 2712 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceSrc(CSSParserTokenRan
ge& range, const CSSParserContext& context) |
2713 { | 2713 { |
2714 RefPtrWillBeRawPtr<CSSValueList> values(CSSValueList::createCommaSeparated()
); | 2714 RefPtrWillBeRawPtr<CSSValueList> values(CSSValueList::createCommaSeparated()
); |
2715 | 2715 |
2716 do { | 2716 do { |
2717 const CSSParserToken& token = range.peek(); | 2717 const CSSParserToken& token = range.peek(); |
2718 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; | 2718 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; |
2719 if (token.functionId() == CSSValueLocal) | 2719 if (token.functionId() == CSSValueLocal) |
2720 parsedValue = consumeFontFaceSrcLocal(range, context); | 2720 parsedValue = consumeFontFaceSrcLocal(range, context); |
2721 else | 2721 else |
2722 parsedValue = consumeFontFaceSrcURI(range, context); | 2722 parsedValue = consumeFontFaceSrcURI(range, context); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3234 return consumeShorthandGreedily(flexFlowShorthand(), important); | 3234 return consumeShorthandGreedily(flexFlowShorthand(), important); |
3235 case CSSPropertyWebkitColumnRule: | 3235 case CSSPropertyWebkitColumnRule: |
3236 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); | 3236 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); |
3237 default: | 3237 default: |
3238 m_currentShorthand = oldShorthand; | 3238 m_currentShorthand = oldShorthand; |
3239 return false; | 3239 return false; |
3240 } | 3240 } |
3241 } | 3241 } |
3242 | 3242 |
3243 } // namespace blink | 3243 } // namespace blink |
OLD | NEW |