Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
index 371420ce9ac45a68745517b2c482dd04877da2ae..9db05fa22eeb916073af17a7aa3c5e5e5d1e1239 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
@@ -81,16 +81,16 @@ public:
static bool parseValue(CSSPropertyID, bool important,
const CSSParserTokenRange&, const CSSParserContext&,
- WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
+ HeapVector<CSSProperty, 256>&, StyleRule::Type);
static bool isSystemColor(CSSValueID);
static bool isColorKeyword(CSSValueID);
static bool isValidNumericValue(double);
// TODO(rwlbuis): move to CSSPropertyParser.cpp once CSSParserToken conversion is done.
- static PassRefPtrWillBeRawPtr<CSSValue> createCSSImageValueWithReferrer(const AtomicString& rawValue, const CSSParserContext& context)
+ static RawPtr<CSSValue> createCSSImageValueWithReferrer(const AtomicString& rawValue, const CSSParserContext& context)
{
- RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, context.completeURL(rawValue));
+ RawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, context.completeURL(rawValue));
toCSSImageValue(imageValue.get())->setReferrer(context.referrer());
return imageValue;
}
@@ -107,14 +107,14 @@ public:
private:
CSSPropertyParser(const CSSParserTokenRange&, const CSSParserContext&,
- WillBeHeapVector<CSSProperty, 256>&);
+ HeapVector<CSSProperty, 256>&);
// TODO(timloh): Rename once the CSSParserValue-based parseValue is removed
bool parseValueStart(CSSPropertyID unresolvedProperty, bool important);
bool consumeCSSWideKeyword(CSSPropertyID unresolvedProperty, bool important);
- PassRefPtrWillBeRawPtr<CSSValue> parseSingleValue(CSSPropertyID);
+ RawPtr<CSSValue> parseSingleValue(CSSPropertyID);
- PassRefPtrWillBeRawPtr<CSSValue> legacyParseValue(CSSPropertyID);
+ RawPtr<CSSValue> legacyParseValue(CSSPropertyID);
bool legacyParseAndApplyValue(CSSPropertyID, bool important);
bool legacyParseShorthand(CSSPropertyID, bool important);
@@ -124,37 +124,37 @@ private:
bool parseViewportDescriptor(CSSPropertyID propId, bool important);
bool parseFontFaceDescriptor(CSSPropertyID);
- void addProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool important, bool implicit = false);
- void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue>, bool);
+ void addProperty(CSSPropertyID, RawPtr<CSSValue>, bool important, bool implicit = false);
+ void addExpandedPropertyForValue(CSSPropertyID propId, RawPtr<CSSValue>, bool);
bool consumeBorder(bool important);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParserValue*);
+ RawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParserValue*);
bool parseShorthand(CSSPropertyID, bool important);
bool consumeShorthandGreedily(const StylePropertyShorthand&, bool important);
bool consume4Values(const StylePropertyShorthand&, bool important);
- bool parseFillImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
+ bool parseFillImage(CSSParserValueList*, RawPtr<CSSValue>&);
enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 };
enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKeyword = 1 };
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSParserValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsingMode = ResolveValuesAsPercent, Units = FUnknown);
- PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionX(CSSParserValueList*);
- PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionY(CSSParserValueList*);
- void parse2ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&, Units = FUnknown);
+ RawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSParserValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsingMode = ResolveValuesAsPercent, Units = FUnknown);
+ RawPtr<CSSValue> parseFillPositionX(CSSParserValueList*);
+ RawPtr<CSSValue> parseFillPositionY(CSSParserValueList*);
+ void parse2ValuesFillPosition(CSSParserValueList*, RawPtr<CSSValue>&, RawPtr<CSSValue>&, Units = FUnknown);
bool isPotentialPositionValue(CSSParserValue*);
- void parseFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&, Units = FUnknown);
- void parse3ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>);
- void parse4ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>);
+ void parseFillPosition(CSSParserValueList*, RawPtr<CSSValue>&, RawPtr<CSSValue>&, Units = FUnknown);
+ void parse3ValuesFillPosition(CSSParserValueList*, RawPtr<CSSValue>&, RawPtr<CSSValue>&, RawPtr<CSSPrimitiveValue>, RawPtr<CSSPrimitiveValue>);
+ void parse4ValuesFillPosition(CSSParserValueList*, RawPtr<CSSValue>&, RawPtr<CSSValue>&, RawPtr<CSSPrimitiveValue>, RawPtr<CSSPrimitiveValue>);
- void parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&);
- PassRefPtrWillBeRawPtr<CSSValue> parseFillSize(CSSPropertyID);
+ void parseFillRepeat(RawPtr<CSSValue>&, RawPtr<CSSValue>&);
+ RawPtr<CSSValue> parseFillSize(CSSPropertyID);
- bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&);
+ bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2, RawPtr<CSSValue>&, RawPtr<CSSValue>&);
bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int numProperties, bool important);
- void addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr<CSSValue> rval);
+ void addFillValue(RawPtr<CSSValue>& lval, RawPtr<CSSValue> rval);
bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result);
@@ -164,26 +164,26 @@ private:
bool consumeColumns(bool important);
enum TrackSizeRestriction { FixedSizeOnly, AllowAll };
- PassRefPtrWillBeRawPtr<CSSValue> parseGridPosition();
- bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimitiveValue>& numericValue, RefPtrWillBeRawPtr<CSSCustomIdentValue>& gridLineName);
+ RawPtr<CSSValue> parseGridPosition();
+ bool parseIntegerOrCustomIdentFromGridPosition(RawPtr<CSSPrimitiveValue>& numericValue, RawPtr<CSSCustomIdentValue>& gridLineName);
bool parseGridItemPositionShorthand(CSSPropertyID, bool important);
- bool parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue>, bool important);
+ bool parseGridTemplateRowsAndAreas(RawPtr<CSSValue>, bool important);
bool parseGridTemplateShorthand(bool important);
bool parseGridShorthand(bool important);
bool parseGridAreaShorthand(bool important);
bool parseGridGapShorthand(bool important);
- bool parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>&);
- PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList();
+ bool parseSingleGridAreaLonghand(RawPtr<CSSValue>&);
+ RawPtr<CSSValue> parseGridTrackList();
bool parseGridTrackRepeatFunction(CSSValueList&, bool& isAutoRepeat);
- PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList, TrackSizeRestriction = AllowAll);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*, TrackSizeRestriction = AllowAll);
+ RawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList, TrackSizeRestriction = AllowAll);
+ RawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*, TrackSizeRestriction = AllowAll);
bool parseGridTemplateAreasRow(NamedGridAreaMap&, const size_t, size_t&);
- PassRefPtrWillBeRawPtr<CSSValue> parseGridTemplateAreas();
+ RawPtr<CSSValue> parseGridTemplateAreas();
bool parseGridLineNames(CSSParserValueList&, CSSValueList&, CSSGridLineNamesValue* = nullptr);
- PassRefPtrWillBeRawPtr<CSSValue> parseGridAutoFlow(CSSParserValueList&);
+ RawPtr<CSSValue> parseGridAutoFlow(CSSParserValueList&);
- PassRefPtrWillBeRawPtr<CSSValue> parseLegacyPosition();
- PassRefPtrWillBeRawPtr<CSSValue> parseItemPositionOverflowPosition();
+ RawPtr<CSSValue> parseLegacyPosition();
+ RawPtr<CSSValue> parseItemPositionOverflowPosition();
bool consumeFont(bool important);
bool consumeSystemFont(bool important);
@@ -192,44 +192,44 @@ private:
bool parseColorParameters(const CSSParserValue*, int* colorValues, bool parseAlpha);
bool parseHSLParameters(const CSSParserValue*, double* colorValues, bool parseAlpha);
- PassRefPtrWillBeRawPtr<CSSValue> parseColor(const CSSParserValue*, bool acceptQuirkyColors = false);
+ RawPtr<CSSValue> parseColor(const CSSParserValue*, bool acceptQuirkyColors = false);
bool parseColorFromValue(const CSSParserValue*, RGBA32&, bool acceptQuirkyColors = false);
// CSS3 Parsing Routines (for properties specific to CSS3)
bool parseBorderImageShorthand(CSSPropertyID, bool important);
- PassRefPtrWillBeRawPtr<CSSValue> parseBorderImage(CSSPropertyID);
- bool parseBorderImageRepeat(RefPtrWillBeRawPtr<CSSValue>&);
- bool parseBorderImageSlice(CSSPropertyID, RefPtrWillBeRawPtr<CSSBorderImageSliceValue>&);
- bool parseBorderImageWidth(RefPtrWillBeRawPtr<CSSQuadValue>&);
- bool parseBorderImageOutset(RefPtrWillBeRawPtr<CSSQuadValue>&);
- bool parseRadii(RefPtrWillBeRawPtr<CSSPrimitiveValue> radii[4], RefPtrWillBeRawPtr<CSSPrimitiveValue> radii2[4], CSSParserValueList*, CSSPropertyID = CSSPropertyInvalid);
+ RawPtr<CSSValue> parseBorderImage(CSSPropertyID);
+ bool parseBorderImageRepeat(RawPtr<CSSValue>&);
+ bool parseBorderImageSlice(CSSPropertyID, RawPtr<CSSBorderImageSliceValue>&);
+ bool parseBorderImageWidth(RawPtr<CSSQuadValue>&);
+ bool parseBorderImageOutset(RawPtr<CSSQuadValue>&);
+ bool parseRadii(RawPtr<CSSPrimitiveValue> radii[4], RawPtr<CSSPrimitiveValue> radii2[4], CSSParserValueList*, CSSPropertyID = CSSPropertyInvalid);
- PassRefPtrWillBeRawPtr<CSSValue> parseReflect();
+ RawPtr<CSSValue> parseReflect();
bool consumeFlex(bool important);
// Image generators
- bool parseDeprecatedGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
- bool parseDeprecatedLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
- bool parseDeprecatedRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
- bool parseLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
- bool parseRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
+ bool parseDeprecatedGradient(CSSParserValueList*, RawPtr<CSSValue>&);
+ bool parseDeprecatedLinearGradient(CSSParserValueList*, RawPtr<CSSValue>&, CSSGradientRepeat repeating);
+ bool parseDeprecatedRadialGradient(CSSParserValueList*, RawPtr<CSSValue>&, CSSGradientRepeat repeating);
+ bool parseLinearGradient(CSSParserValueList*, RawPtr<CSSValue>&, CSSGradientRepeat repeating);
+ bool parseRadialGradient(CSSParserValueList*, RawPtr<CSSValue>&, CSSGradientRepeat repeating);
bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool expectComma);
- bool parseCrossfade(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
+ bool parseCrossfade(CSSParserValueList*, RawPtr<CSSValue>&);
- PassRefPtrWillBeRawPtr<CSSValue> parseImageSet(CSSParserValueList*);
+ RawPtr<CSSValue> parseImageSet(CSSParserValueList*);
- PassRefPtrWillBeRawPtr<CSSValueList> parseFilter();
- PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSParserValueList*, CSSValueID);
+ RawPtr<CSSValueList> parseFilter();
+ RawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSParserValueList*, CSSValueID);
bool parseCalculation(CSSParserValue*, ValueRange);
- bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
+ bool parseGeneratedImage(CSSParserValueList*, RawPtr<CSSValue>&);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
- PassRefPtrWillBeRawPtr<CSSStringValue> createPrimitiveStringValue(CSSParserValue*);
- PassRefPtrWillBeRawPtr<CSSCustomIdentValue> createPrimitiveCustomIdentValue(CSSParserValue*);
+ RawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
+ RawPtr<CSSStringValue> createPrimitiveStringValue(CSSParserValue*);
+ RawPtr<CSSCustomIdentValue> createPrimitiveCustomIdentValue(CSSParserValue*);
class ImplicitScope {
STACK_ALLOCATED();
@@ -285,15 +285,15 @@ private:
inline bool validUnit(CSSParserValue* value, Units unitflags, ReleaseParsedCalcValueCondition releaseCalc = DoNotReleaseParsedCalcValue) { return validUnit(value, unitflags, m_context.mode(), releaseCalc); }
bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValueCondition releaseCalc = DoNotReleaseParsedCalcValue);
- bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSQuadValue>&);
+ bool parseBorderImageQuad(Units, RawPtr<CSSQuadValue>&);
int colorIntFromValue(CSSParserValue*);
bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&);
bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop&);
- PassRefPtrWillBeRawPtr<CSSValue> parseDeprecatedGradientStopColor(const CSSParserValue*);
+ RawPtr<CSSValue> parseDeprecatedGradientStopColor(const CSSParserValue*);
- void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool important);
+ void commitBorderImageProperty(CSSPropertyID, RawPtr<CSSValue>, bool important);
private:
// Inputs:
@@ -302,13 +302,13 @@ private:
const CSSParserContext& m_context;
// Outputs:
- WillBeHeapVector<CSSProperty, 256>& m_parsedProperties;
+ HeapVector<CSSProperty, 256>& m_parsedProperties;
// Locals during parsing:
int m_inParseShorthand;
CSSPropertyID m_currentShorthand;
bool m_implicitShorthand;
- RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
+ Member<CSSCalcValue> m_parsedCalculation;
};
CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);

Powered by Google App Engine
This is Rietveld 408576698