#include "core/css/CSSFontValue.h"
#include "core/css/CSSFunctionValue.h"
#include "core/css/CSSGridLineNamesValue.h"
-#include "core/css/CSSGridTemplateValue.h"
+#include "core/css/CSSGridTemplateAreasValue.h"
#include "core/css/CSSLineBoxContainValue.h"
#include "core/css/parser/BisonCSSParser.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/PseudoElement.h"
-#include "core/frame/animation/AnimationController.h"
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderGrid.h"
#include "core/rendering/style/ContentData.h"
CSSPropertyFontSize,
CSSPropertyFontStyle,
CSSPropertyFontVariant,
+ CSSPropertyFontVariantLigatures,
CSSPropertyFontWeight,
CSSPropertyHeight,
CSSPropertyImageRendering,
CSSPropertyFlexWrap,
CSSPropertyJustifyContent,
CSSPropertyWebkitFontSmoothing,
- CSSPropertyWebkitFontVariantLigatures,
CSSPropertyGridAutoColumns,
CSSPropertyGridAutoFlow,
CSSPropertyGridAutoRows,
CSSPropertyGridColumnEnd,
CSSPropertyGridColumnStart,
- CSSPropertyGridDefinitionColumns,
- CSSPropertyGridDefinitionRows,
+ CSSPropertyGridTemplateColumns,
+ CSSPropertyGridTemplateRows,
CSSPropertyGridRowEnd,
CSSPropertyGridRowStart,
CSSPropertyWebkitHighlight,
CSSPropertyWebkitHyphenateCharacter,
- CSSPropertyWebkitLineAlign,
CSSPropertyWebkitLineBoxContain,
CSSPropertyWebkitLineBreak,
CSSPropertyWebkitLineClamp,
- CSSPropertyWebkitLineGrid,
- CSSPropertyWebkitLineSnap,
CSSPropertyWebkitLocale,
CSSPropertyWebkitMarginBeforeCollapse,
CSSPropertyWebkitMarginAfterCollapse,
CSSPropertyWebkitUserModify,
CSSPropertyWebkitUserSelect,
CSSPropertyWebkitWritingMode,
- CSSPropertyWebkitFlowInto,
- CSSPropertyWebkitFlowFrom,
- CSSPropertyWebkitRegionBreakAfter,
- CSSPropertyWebkitRegionBreakBefore,
- CSSPropertyWebkitRegionBreakInside,
- CSSPropertyWebkitRegionFragment,
CSSPropertyWebkitAppRegion,
CSSPropertyWebkitWrapFlow,
CSSPropertyWebkitWrapThrough,
}
}
-static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
+static PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
{
// Create the slices.
- RefPtr<CSSPrimitiveValue> top;
- RefPtr<CSSPrimitiveValue> right;
- RefPtr<CSSPrimitiveValue> bottom;
- RefPtr<CSSPrimitiveValue> left;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> top;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> right;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> left;
if (image.imageSlices().top().isPercent())
top = cssValuePool().createValue(image.imageSlices().top().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.release()), image.fill());
}
-static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const BorderImageLengthBox& box, const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const BorderImageLengthBox& box, const RenderStyle& style)
{
// Create the slices.
- RefPtr<CSSPrimitiveValue> top;
- RefPtr<CSSPrimitiveValue> right;
- RefPtr<CSSPrimitiveValue> bottom;
- RefPtr<CSSPrimitiveValue> left;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> top;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> right;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> left;
if (box.top().isNumber())
top = cssValuePool().createValue(box.top().number(), CSSPrimitiveValue::CSS_NUMBER);
static PassRefPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& image)
{
- RefPtr<CSSPrimitiveValue> horizontalRepeat;
- RefPtr<CSSPrimitiveValue> verticalRepeat;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat;
horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(image.horizontalRule()));
if (image.horizontalRule() == image.verticalRule())
imageValue = image.image()->cssValue();
// Create the image slice.
- RefPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image);
+ RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image);
// Create the border area slices.
RefPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image.borderSlices(), style);
return createBorderImageValue(imageValue.release(), imageSlices.release(), borderSlices.release(), outset.release(), repeat.release());
}
-inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value, const RenderStyle& style)
+inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value, const RenderStyle& style)
{
return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
}
-inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const RenderStyle& style)
+inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const RenderStyle& style)
{
return cssValuePool().createValue(value / style.effectiveZoom(), CSSPrimitiveValue::CSS_NUMBER);
}
-static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Length& length, const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Length& length, const RenderStyle& style)
{
if (length.isFixed())
return zoomAdjustedPixelValue(length.value(), style);
if (!reflection)
return cssValuePool().createIdentifierValue(CSSValueNone);
- RefPtr<CSSPrimitiveValue> offset;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> offset;
if (reflection->offset().isPercent())
offset = cssValuePool().createValue(reflection->offset().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
else
offset = zoomAdjustedPixelValue(reflection->offset().value(), style);
- RefPtr<CSSPrimitiveValue> direction;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> direction;
switch (reflection->direction()) {
case ReflectionBelow:
direction = cssValuePool().createIdentifierValue(CSSValueBelow);
return CSSReflectValue::create(direction.release(), offset.release(), valueForNinePieceImage(reflection->mask(), style));
}
-static PassRefPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer* layer, const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer* layer, const RenderStyle& style)
{
- RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
if (layer->isBackgroundXOriginSet()) {
ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
positionList->append(cssValuePool().createValue(layer->backgroundXOrigin()));
return zoomAdjustedPixelValueForLength(l, style);
}
-PassRefPtr<CSSPrimitiveValue> CSSComputedStyleDeclaration::currentColorOrValidColor(const RenderStyle& style, const StyleColor& color) const
+PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSComputedStyleDeclaration::currentColorOrValidColor(const RenderStyle& style, const StyleColor& color) const
{
// This function does NOT look at visited information, so that computed style doesn't expose that.
return cssValuePool().createColorValue(color.resolve(style.color()).rgb());
}
-static PassRefPtr<CSSValueList> valuesForBorderRadiusCorner(LengthSize radius, const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBorderRadiusCorner(LengthSize radius, const RenderStyle& style)
{
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (radius.width().type() == Percent)
list->append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
else
static PassRefPtr<CSSValue> valueForBorderRadiusCorner(LengthSize radius, const RenderStyle& style)
{
- RefPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style);
+ RefPtrWillBeRawPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style);
if (list->item(0)->equals(*list->item(1)))
return list->item(0);
return list.release();
}
-static PassRefPtr<CSSValueList> valueForBorderRadiusShorthand(const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSValueList> valueForBorderRadiusShorthand(const RenderStyle& style)
{
- RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
bool showHorizontalBottomLeft = style.borderTopRightRadius().width() != style.borderBottomLeftRadius().width();
bool showHorizontalBottomRight = showHorizontalBottomLeft || (style.borderBottomRightRadius().width() != style.borderTopLeftRadius().width());
bool showVerticalBottomRight = showVerticalBottomLeft || (style.borderBottomRightRadius().height() != style.borderTopLeftRadius().height());
bool showVerticalTopRight = showVerticalBottomRight || (style.borderTopRightRadius().height() != style.borderTopLeftRadius().height());
- RefPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style.borderTopLeftRadius(), style);
- RefPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style.borderTopRightRadius(), style);
- RefPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style.borderBottomRightRadius(), style);
- RefPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style.borderBottomLeftRadius(), style);
+ RefPtrWillBeRawPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style.borderTopLeftRadius(), style);
+ RefPtrWillBeRawPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style.borderTopRightRadius(), style);
+ RefPtrWillBeRawPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style.borderBottomRightRadius(), style);
+ RefPtrWillBeRawPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style.borderBottomLeftRadius(), style);
- RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
horizontalRadii->append(topLeftRadius->item(0));
if (showHorizontalTopRight)
horizontalRadii->append(topRightRadius->item(0));
list->append(horizontalRadii.release());
- RefPtr<CSSValueList> verticalRadii = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> verticalRadii = CSSValueList::createSpaceSeparated();
verticalRadii->append(topLeftRadius->item(1));
if (showVerticalTopRight)
verticalRadii->append(topRightRadius->item(1));
return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box->computedCSSContentBoxRect();
}
-static PassRefPtr<CSSTransformValue> valueForMatrixTransform(const TransformationMatrix& transform, const RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSTransformValue> valueForMatrixTransform(const TransformationMatrix& transform, const RenderStyle& style)
{
- RefPtr<CSSTransformValue> transformValue;
+ RefPtrWillBeRawPtr<CSSTransformValue> transformValue;
if (transform.isAffine()) {
transformValue = CSSTransformValue::create(CSSTransformValue::MatrixTransformOperation);
style.applyTransform(transform, box.size(), RenderStyle::ExcludeTransformOrigin);
// FIXME: Need to print out individual functions (https://bugs.webkit.org/show_bug.cgi?id=23924)
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(valueForMatrixTransform(transform, style));
return list.release();
if (style.filter().operations().isEmpty())
return cssValuePool().createIdentifierValue(CSSValueNone);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- RefPtr<CSSFilterValue> filterValue;
+ RefPtrWillBeRawPtr<CSSFilterValue> filterValue;
Vector<RefPtr<FilterOperation> >::const_iterator end = style.filter().operations().end();
for (Vector<RefPtr<FilterOperation> >::const_iterator it = style.filter().operations().begin(); it != end; ++it) {
case LengthTrackSizing:
return specifiedValueForGridTrackBreadth(trackSize.length(), style);
case MinMaxTrackSizing:
- RefPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSeparated();
minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
return CSSFunctionValue::create("minmax(", minMaxTrackBreadths);
if (namedGridLines.isEmpty())
return;
- RefPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
+ RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
for (size_t j = 0; j < namedGridLines.size(); ++j)
lineNames->append(cssValuePool().createValue(namedGridLines[j], CSSPrimitiveValue::CSS_STRING));
list.append(lineNames.release());
static PassRefPtr<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle& style)
{
- const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gridDefinitionColumns() : style.gridDefinitionRows();
+ const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gridTemplateColumns() : style.gridTemplateRows();
const OrderedNamedGridLines& orderedNamedGridLines = direction == ForColumns ? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines();
// Handle the 'none' case here.
return cssValuePool().createIdentifierValue(CSSValueNone);
}
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (renderer && renderer->isRenderGrid()) {
const Vector<LayoutUnit>& trackPositions = direction == ForColumns ? toRenderGrid(renderer)->columnPositions() : toRenderGrid(renderer)->rowPositions();
// There are at least #tracks + 1 grid lines (trackPositions). Apart from that, the grid container can generate implicit grid tracks,
if (position.isNamedGridArea())
return cssValuePool().createValue(position.namedGridLine(), CSSPrimitiveValue::CSS_STRING);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (position.isSpan()) {
list->append(cssValuePool().createIdentifierValue(CSSValueSpan));
list->append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiveValue::CSS_NUMBER));
}
static PassRefPtr<CSSValue> valueForTransitionProperty(const CSSAnimationDataList* animList)
{
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
if (animList) {
for (size_t i = 0; i < animList->size(); ++i)
list->append(createTransitionPropertyValue(animList->animation(i)));
static PassRefPtr<CSSValue> valueForAnimationDelay(const CSSAnimationDataList* animList)
{
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
if (animList) {
for (size_t i = 0; i < animList->size(); ++i)
list->append(cssValuePool().createValue(animList->animation(i)->delay(), CSSPrimitiveValue::CSS_S));
static PassRefPtr<CSSValue> valueForAnimationDuration(const CSSAnimationDataList* animList)
{
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
if (animList) {
for (size_t i = 0; i < animList->size(); ++i)
list->append(cssValuePool().createValue(animList->animation(i)->duration(), CSSPrimitiveValue::CSS_S));
static PassRefPtr<CSSValue> valueForAnimationTimingFunction(const CSSAnimationDataList* animList)
{
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
if (animList) {
for (size_t i = 0; i < animList->size(); ++i)
list->append(createTimingFunctionValue(animList->animation(i)->timingFunction()));
PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadowData(const ShadowData& shadow, const RenderStyle& style, bool useSpread) const
{
- RefPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(), style);
- RefPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(), style);
- RefPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.blur(), style);
- RefPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixelValue(shadow.spread(), style) : PassRefPtr<CSSPrimitiveValue>();
- RefPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifierValue(CSSValueInset);
- RefPtr<CSSPrimitiveValue> color = currentColorOrValidColor(style, shadow.color());
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.blur(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixelValue(shadow.spread(), style) : PassRefPtrWillBeRawPtr<CSSPrimitiveValue>();
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal ? PassRefPtrWillBeRawPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifierValue(CSSValueInset);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> color = currentColorOrValidColor(style, shadow.color());
return CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), shadowStyle.release(), color.release());
}
if (!shadowList)
return cssValuePool().createIdentifierValue(CSSValueNone);
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
size_t shadowCount = shadowList->shadows().size();
for (size_t i = 0; i < shadowCount; ++i)
list->append(valueForShadowData(shadowList->shadows()[i], style, useSpread));
return CSSValueInvalid;
}
-static PassRefPtr<CSSPrimitiveValue> valueForFamily(const AtomicString& family)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFamily(const AtomicString& family)
{
if (CSSValueID familyIdentifier = identifierForFamily(family))
return cssValuePool().createIdentifierValue(familyIdentifier);
static PassRefPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration)
{
// Blink value is ignored.
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (textDecoration & TextDecorationUnderline)
list->append(cssValuePool().createIdentifierValue(CSSValueUnderline));
if (textDecoration & TextDecorationOverline)
if (xRepeat == NoRepeatFill && yRepeat == RepeatFill)
return cssValuePool().createIdentifierValue(CSSValueRepeatY);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(cssValuePool().createValue(xRepeat));
list->append(cssValuePool().createValue(yRepeat));
return list.release();
if (fillSize.size.height().isAuto())
return zoomAdjustedPixelValueForLength(fillSize.size.width(), style);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(zoomAdjustedPixelValueForLength(fillSize.size.width(), style));
list->append(zoomAdjustedPixelValueForLength(fillSize.size.height(), style));
return list.release();
static PassRefPtr<CSSValue> valueForContentData(const RenderStyle& style)
{
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (const ContentData* contentData = style.contentData(); contentData; contentData = contentData->next()) {
if (contentData->isCounter()) {
const CounterContent* counter = static_cast<const CounterContentData*>(contentData)->counter();
} else if (contentData->isText())
list->append(cssValuePool().createValue(static_cast<const TextContentData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
}
- if (style.hasFlowFrom())
- list->append(cssValuePool().createValue(style.regionThread(), CSSPrimitiveValue::CSS_STRING));
return list.release();
}
if (!map)
return 0;
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (CounterDirectiveMap::const_iterator it = map->begin(); it != map->end(); ++it) {
list->append(cssValuePool().createValue(it->key, CSSPrimitiveValue::CSS_STRING));
short number = propertyID == CSSPropertyCounterIncrement ? it->value.incrementValue() : it->value.resetValue();
WTF_LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPropertyName(propertyID));
}
-static PassRefPtr<CSSValueList> valueForFontFamily(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSValueList> valueForFontFamily(RenderStyle& style)
{
const FontFamily& firstFamily = style.fontDescription().family();
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FontFamily* family = &firstFamily; family; family = family->next())
list->append(valueForFamily(family->family()));
return list.release();
}
-static PassRefPtr<CSSPrimitiveValue> valueForLineHeight(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(RenderStyle& style)
{
Length length = style.lineHeight();
if (length.isNegative())
return zoomAdjustedPixelValue(floatValueForLength(length, style.fontDescription().specifiedSize()), style);
}
-static PassRefPtr<CSSPrimitiveValue> valueForFontSize(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontSize(RenderStyle& style)
{
return zoomAdjustedPixelValue(style.fontDescription().computedPixelSize(), style);
}
-static PassRefPtr<CSSPrimitiveValue> valueForFontStyle(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontStyle(RenderStyle& style)
{
if (style.fontDescription().italic())
return cssValuePool().createIdentifierValue(CSSValueItalic);
return cssValuePool().createIdentifierValue(CSSValueNormal);
}
-static PassRefPtr<CSSPrimitiveValue> valueForFontVariant(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontVariant(RenderStyle& style)
{
if (style.fontDescription().smallCaps())
return cssValuePool().createIdentifierValue(CSSValueSmallCaps);
return cssValuePool().createIdentifierValue(CSSValueNormal);
}
-static PassRefPtr<CSSPrimitiveValue> valueForFontWeight(RenderStyle& style)
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontWeight(RenderStyle& style)
{
switch (style.fontDescription().weight()) {
case FontWeight100:
static PassRefPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction)
{
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (touchAction == TouchActionAuto)
list->append(cssValuePool().createIdentifierValue(CSSValueAuto));
if (touchAction & TouchActionNone) {
// FIXME: Some of these cases could be narrowed down or optimized better.
switch (propertyID) {
case CSSPropertyBottom:
- case CSSPropertyGridDefinitionColumns:
- case CSSPropertyGridDefinitionRows:
+ case CSSPropertyGridTemplateColumns:
+ case CSSPropertyGridTemplateRows:
case CSSPropertyHeight:
case CSSPropertyLeft:
case CSSPropertyRight:
{
Node* styledNode = this->styledNode();
ASSERT(styledNode);
- RenderObject* renderer = styledNode->renderer();
- if (renderer && renderer->compositingState() == PaintsIntoOwnBacking
- && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() && AnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) {
- AnimationUpdateBlock animationUpdateBlock(renderer->animation());
- if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) {
- // FIXME: This cached pseudo style will only exist if the animation has been run at least once.
- return renderer->animation().getAnimatedStyleForRenderer(renderer)->getCachedPseudoStyle(m_pseudoElementSpecifier);
- }
- return renderer->animation().getAnimatedStyleForRenderer(renderer);
- }
return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier);
}
return m_node.get();
}
-static PassRefPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment)
+static PassRefPtrWillBeRawPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment)
{
- RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
result->append(CSSPrimitiveValue::create(itemPosition));
if (itemPosition >= ItemPositionCenter && overflowAlignment != OverflowAlignmentDefault)
result->append(CSSPrimitiveValue::create(overflowAlignment));
if (updateLayout) {
Document& document = styledNode->document();
- // If a compositor animation is running we may need to service animations
- // in order to generate an up to date value.
+ // If a compositor animation is running or animations have been updated
+ // via the api we may need to service animations in order to generate
+ // an up to date value.
DocumentAnimations::serviceBeforeGetComputedStyle(*styledNode, propertyID);
document.updateStyleForNodeIfNeeded(styledNode);
switch (propertyID) {
case CSSPropertyInvalid:
- case CSSPropertyVariable:
break;
case CSSPropertyBackgroundColor:
return cssValuePool().createIdentifierValue(CSSValueNone);
}
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
if (currLayer->image())
list->append(currLayer->image()->cssValue());
if (!layers->next())
return valueForFillSize(layers->size(), *style);
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(valueForFillSize(currLayer->size(), *style));
if (!layers->next())
return valueForFillRepeat(layers->repeatX(), layers->repeatY());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY()));
if (!layers->next())
return valueForFillSourceType(layers->maskSourceType());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(valueForFillSourceType(currLayer->maskSourceType()));
if (!layers->next())
return cssValuePool().createValue(layers->composite());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->composite()));
if (!layers->next())
return cssValuePool().createValue(layers->attachment());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->attachment()));
return cssValuePool().createValue(box);
}
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
list->append(cssValuePool().createValue(box));
if (!layers->next())
return createPositionListForLayer(propertyID, layers, *style);
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(createPositionListForLayer(propertyID, currLayer, *style));
return list.release();
if (!layers->next())
return cssValuePool().createValue(layers->xPosition());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->xPosition()));
if (!layers->next())
return cssValuePool().createValue(layers->yPosition());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->yPosition()));
return cssValuePool().createIdentifierValue(CSSValueCollapse);
return cssValuePool().createIdentifierValue(CSSValueSeparate);
case CSSPropertyBorderSpacing: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(zoomAdjustedPixelValue(style->horizontalBorderSpacing(), *style));
list->append(zoomAdjustedPixelValue(style->verticalBorderSpacing(), *style));
return list.release();
return zoomAdjustedPixelValue(style->columnWidth(), *style);
case CSSPropertyTabSize:
return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValue::CSS_NUMBER);
- case CSSPropertyWebkitRegionBreakAfter:
- return cssValuePool().createValue(style->regionBreakAfter());
- case CSSPropertyWebkitRegionBreakBefore:
- return cssValuePool().createValue(style->regionBreakBefore());
- case CSSPropertyWebkitRegionBreakInside:
- return cssValuePool().createValue(style->regionBreakInside());
case CSSPropertyCursor: {
- RefPtr<CSSValueList> list;
+ RefPtrWillBeRawPtr<CSSValueList> list;
CursorList* cursors = style->cursors();
if (cursors && cursors->size() > 0) {
list = CSSValueList::createCommaSeparated();
return cssValuePool().createIdentifierValue(CSSValueNone);
return cssValuePool().createValue(style->floating());
case CSSPropertyFont: {
- RefPtr<CSSFontValue> computedFont = CSSFontValue::create();
+ RefPtrWillBeRawPtr<CSSFontValue> computedFont = CSSFontValue::create();
computedFont->style = valueForFontStyle(*style);
computedFont->variant = valueForFontVariant(*style);
computedFont->weight = valueForFontWeight(*style);
return computedFont.release();
}
case CSSPropertyFontFamily: {
- RefPtr<CSSValueList> fontFamilyList = valueForFontFamily(*style);
+ RefPtrWillBeRawPtr<CSSValueList> fontFamilyList = valueForFontFamily(*style);
// If there's only a single family, return that as a CSSPrimitiveValue.
// NOTE: Gecko always returns this as a comma-separated CSSPrimitiveValue string.
if (fontFamilyList->length() == 1)
const FontFeatureSettings* featureSettings = style->fontDescription().featureSettings();
if (!featureSettings || !featureSettings->size())
return cssValuePool().createIdentifierValue(CSSValueNormal);
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (unsigned i = 0; i < featureSettings->size(); ++i) {
const FontFeature& feature = featureSettings->at(i);
- RefPtr<CSSFontFeatureValue> featureValue = CSSFontFeatureValue::create(feature.tag(), feature.value());
+ RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFeatureValue::create(feature.tag(), feature.value());
list->append(featureValue.release());
}
return list.release();
case CSSPropertyGridAutoRows:
return specifiedValueForGridTrackSize(style->gridAutoRows(), *style);
- case CSSPropertyGridDefinitionColumns:
+ case CSSPropertyGridTemplateColumns:
return valueForGridTrackList(ForColumns, renderer, *style);
- case CSSPropertyGridDefinitionRows:
+ case CSSPropertyGridTemplateRows:
return valueForGridTrackList(ForRows, renderer, *style);
case CSSPropertyGridColumnStart:
case CSSPropertyGridArea:
return valuesForGridShorthand(gridAreaShorthand());
- case CSSPropertyGridTemplate:
+ case CSSPropertyGridTemplateAreas:
if (!style->namedGridAreaRowCount()) {
ASSERT(!style->namedGridAreaColumnCount());
return cssValuePool().createIdentifierValue(CSSValueNone);
}
- return CSSGridTemplateValue::create(style->namedGridArea(), style->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
+ return CSSGridTemplateAreasValue::create(style->namedGridArea(), style->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
case CSSPropertyHeight:
if (renderer) {
case TextEmphasisMarkDoubleCircle:
case TextEmphasisMarkTriangle:
case TextEmphasisMarkSesame: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(cssValuePool().createValue(style->textEmphasisFill()));
list->append(cssValuePool().createValue(style->textEmphasisMark()));
return list.release();
case CSSPropertyTextIndent: {
RefPtr<CSSValue> textIndent = zoomAdjustedPixelValueForLength(style->textIndent(), *style);
if (RuntimeEnabledFeatures::css3TextEnabled() && style->textIndentLine() == TextIndentEachLine) {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(textIndent.release());
list->append(cssValuePool().createIdentifierValue(CSSValueEachLine));
return list.release();
return cssValuePool().createValue(style->fontDescription().kerning());
case CSSPropertyWebkitFontSmoothing:
return cssValuePool().createValue(style->fontDescription().fontSmoothing());
- case CSSPropertyWebkitFontVariantLigatures: {
+ case CSSPropertyFontVariantLigatures: {
FontDescription::LigaturesState commonLigaturesState = style->fontDescription().commonLigaturesState();
FontDescription::LigaturesState discretionaryLigaturesState = style->fontDescription().discretionaryLigaturesState();
FontDescription::LigaturesState historicalLigaturesState = style->fontDescription().historicalLigaturesState();
&& historicalLigaturesState == FontDescription::NormalLigaturesState)
return cssValuePool().createIdentifierValue(CSSValueNormal);
- RefPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
if (commonLigaturesState != FontDescription::NormalLigaturesState)
valueList->append(cssValuePool().createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
if (discretionaryLigaturesState != FontDescription::NormalLigaturesState)
case CSSPropertyAnimationDirection:
ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
case CSSPropertyWebkitAnimationDirection: {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i)
case CSSPropertyAnimationFillMode:
ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
case CSSPropertyWebkitAnimationFillMode: {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i)
case CSSPropertyAnimationIterationCount:
ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
case CSSPropertyWebkitAnimationIterationCount: {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i) {
case CSSPropertyAnimationName:
ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
case CSSPropertyWebkitAnimationName: {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i)
case CSSPropertyAnimationPlayState:
ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled());
case CSSPropertyWebkitAnimationPlayState: {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i) {
case CSSPropertyWebkitAnimation: {
const CSSAnimationDataList* animations = style->animations();
if (animations) {
- RefPtr<CSSValueList> animationsList = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> animationsList = CSSValueList::createCommaSeparated();
for (size_t i = 0; i < animations->size(); ++i) {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
const CSSAnimationData* animation = animations->animation(i);
list->append(cssValuePool().createValue(animation->name(), CSSPrimitiveValue::CSS_STRING));
list->append(cssValuePool().createValue(animation->duration(), CSSPrimitiveValue::CSS_S));
return animationsList.release();
}
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
// animation-name default value.
list->append(cssValuePool().createIdentifierValue(CSSValueNone));
list->append(cssValuePool().createValue(CSSAnimationData::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
return cssValuePool().createIdentifierValue(CSSValueNone);
return zoomAdjustedPixelValue(style->perspective(), *style);
case CSSPropertyWebkitPerspectiveOrigin: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (renderer) {
LayoutRect box;
if (renderer->isBox())
case CSSPropertyWebkitTransform:
return computedTransform(renderer, *style);
case CSSPropertyWebkitTransformOrigin: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (renderer) {
LayoutRect box;
if (renderer->isBox())
case CSSPropertyWebkitTransition: {
const CSSAnimationDataList* animList = style->transitions();
if (animList) {
- RefPtr<CSSValueList> transitionsList = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> transitionsList = CSSValueList::createCommaSeparated();
for (size_t i = 0; i < animList->size(); ++i) {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
const CSSAnimationData* animation = animList->animation(i);
list->append(createTransitionPropertyValue(animation));
list->append(cssValuePool().createValue(animation->duration(), CSSPrimitiveValue::CSS_S));
return transitionsList.release();
}
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
// transition-property default value.
list->append(cssValuePool().createIdentifierValue(CSSValueAll));
list->append(cssValuePool().createValue(CSSAnimationData::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
}
case CSSPropertyPointerEvents:
return cssValuePool().createValue(style->pointerEvents());
- case CSSPropertyWebkitLineGrid:
- if (style->lineGrid().isNull())
- return cssValuePool().createIdentifierValue(CSSValueNone);
- return cssValuePool().createValue(style->lineGrid(), CSSPrimitiveValue::CSS_STRING);
- case CSSPropertyWebkitLineSnap:
- return CSSPrimitiveValue::create(style->lineSnap());
- case CSSPropertyWebkitLineAlign:
- return CSSPrimitiveValue::create(style->lineAlign());
case CSSPropertyWebkitWritingMode:
return cssValuePool().createValue(style->writingMode());
case CSSPropertyWebkitTextCombine:
return CSSPrimitiveValue::create(toReferenceClipPathOperation(operation)->url(), CSSPrimitiveValue::CSS_URI);
}
return cssValuePool().createIdentifierValue(CSSValueNone);
- case CSSPropertyWebkitFlowInto:
- if (style->flowThread().isNull())
- return cssValuePool().createIdentifierValue(CSSValueNone);
- return cssValuePool().createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
- case CSSPropertyWebkitFlowFrom:
- if (!style->hasFlowFrom())
- return cssValuePool().createIdentifierValue(CSSValueNone);
- return cssValuePool().createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING);
- case CSSPropertyWebkitRegionFragment:
- return cssValuePool().createValue(style->regionFragment());
case CSSPropertyWebkitWrapFlow:
return cssValuePool().createValue(style->wrapFlow());
case CSSPropertyShapeMargin:
if (!layers->next())
return cssValuePool().createValue(layers->blendMode());
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->blendMode()));
return copyPropertiesInSet(computableProperties());
}
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForShorthandProperty(const StylePropertyShorthand& shorthand) const
+PassRefPtrWillBeRawPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForShorthandProperty(const StylePropertyShorthand& shorthand) const
{
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (size_t i = 0; i < shorthand.length(); ++i) {
RefPtr<CSSValue> value = getPropertyCSSValue(shorthand.properties()[i], DoNotUpdateLayout);
list->append(value);
return list.release();
}
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForSidesShorthand(const StylePropertyShorthand& shorthand) const
+PassRefPtrWillBeRawPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForSidesShorthand(const StylePropertyShorthand& shorthand) const
{
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
// Assume the properties are in the usual order top, right, bottom, left.
RefPtr<CSSValue> topValue = getPropertyCSSValue(shorthand.properties()[0], DoNotUpdateLayout);
RefPtr<CSSValue> rightValue = getPropertyCSSValue(shorthand.properties()[1], DoNotUpdateLayout);
return list.release();
}
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForGridShorthand(const StylePropertyShorthand& shorthand) const
+PassRefPtrWillBeRawPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForGridShorthand(const StylePropertyShorthand& shorthand) const
{
- RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
for (size_t i = 0; i < shorthand.length(); ++i) {
RefPtr<CSSValue> value = getPropertyCSSValue(shorthand.properties()[i], DoNotUpdateLayout);
list->append(value.release());
exceptionState.throwDOMException(NoModificationAllowedError, "These styles are computed, and therefore the '" + getPropertyNameString(id) + "' property is read-only.");
}
-const HashMap<AtomicString, String>* CSSComputedStyleDeclaration::variableMap() const
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- Node* styledNode = this->styledNode();
- if (!styledNode)
- return 0;
- RefPtr<RenderStyle> style = styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier);
- if (!style)
- return 0;
- return style->variables();
-}
-
-unsigned CSSComputedStyleDeclaration::variableCount() const
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- const HashMap<AtomicString, String>* variables = variableMap();
- if (!variables)
- return 0;
- return variables->size();
-}
-
-String CSSComputedStyleDeclaration::variableValue(const AtomicString& name) const
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- const HashMap<AtomicString, String>* variables = variableMap();
- if (!variables)
- return emptyString();
- HashMap<AtomicString, String>::const_iterator it = variables->find(name);
- if (it == variables->end())
- return emptyString();
- return it->value;
-}
-
-bool CSSComputedStyleDeclaration::setVariableValue(const AtomicString& name, const String&, ExceptionState& exceptionState)
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- exceptionState.throwDOMException(NoModificationAllowedError, "These styles are computed, and therefore the '" + name + "' property is read-only.");
- return false;
-}
-
-bool CSSComputedStyleDeclaration::removeVariable(const AtomicString&)
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- return false;
-}
-
-bool CSSComputedStyleDeclaration::clearVariables(ExceptionState& exceptionState)
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- exceptionState.throwDOMException(NoModificationAllowedError, "These styles are computed, and therefore variables may not be cleared.");
- return false;
-}
-
-CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesIterator(const HashMap<AtomicString, String>* variables)
- : m_active(variables)
-{
- ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- if (m_active) {
- m_it = variables->begin();
- m_end = variables->end();
- }
-}
-
-void CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::advance()
-{
- ASSERT(m_active);
- ++m_it;
- m_active = !atEnd();
-}
-
-AtomicString CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::name() const
-{
- ASSERT(m_active);
- return m_it->key;
-}
-
-String CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::value() const
-{
- ASSERT(m_active);
- return m_it->value;
-}
-
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForBackgroundShorthand() const
+PassRefPtrWillBeRawPtr<CSSValueList> CSSComputedStyleDeclaration::valuesForBackgroundShorthand() const
{
static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage,
CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment,
static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyBackgroundSize, CSSPropertyBackgroundOrigin,
CSSPropertyBackgroundClip };
- RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperator))));
list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator))));
return list.release();