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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 { 1376 {
1377 StyleVariableData* variables = style.variables(); 1377 StyleVariableData* variables = style.variables();
1378 if (variables) 1378 if (variables)
1379 return variables->getVariables(); 1379 return variables->getVariables();
1380 return nullptr; 1380 return nullptr;
1381 } 1381 }
1382 1382
1383 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle) 1383 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
1384 { 1384 {
1385 const SVGComputedStyle& svgStyle = style.svgStyle(); 1385 const SVGComputedStyle& svgStyle = style.svgStyle();
1386 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style.di rection(), style.writingMode()); 1386 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style.di rection(), style.getWritingMode());
1387 switch (propertyID) { 1387 switch (propertyID) {
1388 case CSSPropertyInvalid: 1388 case CSSPropertyInvalid:
1389 return nullptr; 1389 return nullptr;
1390 1390
1391 case CSSPropertyBackgroundColor: 1391 case CSSPropertyBackgroundColor:
1392 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited DependentColor(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(sty le, style.backgroundColor()); 1392 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited DependentColor(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(sty le, style.backgroundColor());
1393 case CSSPropertyBackgroundImage: 1393 case CSSPropertyBackgroundImage:
1394 case CSSPropertyWebkitMaskImage: { 1394 case CSSPropertyWebkitMaskImage: {
1395 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat ed(); 1395 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat ed();
1396 const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskImage ? &style.maskLayers() : &style.backgroundLayers(); 1396 const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskImage ? &style.maskLayers() : &style.backgroundLayers();
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 return valueForReflection(style.boxReflect(), style); 1545 return valueForReflection(style.boxReflect(), style);
1546 case CSSPropertyBoxShadow: 1546 case CSSPropertyBoxShadow:
1547 return valueForShadowList(style.boxShadow(), style, true); 1547 return valueForShadowList(style.boxShadow(), style, true);
1548 case CSSPropertyCaptionSide: 1548 case CSSPropertyCaptionSide:
1549 return cssValuePool().createValue(style.captionSide()); 1549 return cssValuePool().createValue(style.captionSide());
1550 case CSSPropertyClear: 1550 case CSSPropertyClear:
1551 return cssValuePool().createValue(style.clear()); 1551 return cssValuePool().createValue(style.clear());
1552 case CSSPropertyColor: 1552 case CSSPropertyColor:
1553 return cssValuePool().createColorValue(allowVisitedStyle ? style.visited DependentColor(CSSPropertyColor).rgb() : style.color().rgb()); 1553 return cssValuePool().createColorValue(allowVisitedStyle ? style.visited DependentColor(CSSPropertyColor).rgb() : style.color().rgb());
1554 case CSSPropertyWebkitPrintColorAdjust: 1554 case CSSPropertyWebkitPrintColorAdjust:
1555 return cssValuePool().createValue(style.printColorAdjust()); 1555 return cssValuePool().createValue(style.getPrintColorAdjust());
1556 case CSSPropertyColumnCount: 1556 case CSSPropertyColumnCount:
1557 if (style.hasAutoColumnCount()) 1557 if (style.hasAutoColumnCount())
1558 return cssValuePool().createIdentifierValue(CSSValueAuto); 1558 return cssValuePool().createIdentifierValue(CSSValueAuto);
1559 return cssValuePool().createValue(style.columnCount(), CSSPrimitiveValue ::UnitType::Number); 1559 return cssValuePool().createValue(style.columnCount(), CSSPrimitiveValue ::UnitType::Number);
1560 case CSSPropertyColumnFill: 1560 case CSSPropertyColumnFill:
1561 ASSERT(RuntimeEnabledFeatures::columnFillEnabled()); 1561 ASSERT(RuntimeEnabledFeatures::columnFillEnabled());
1562 return cssValuePool().createValue(style.columnFill()); 1562 return cssValuePool().createValue(style.getColumnFill());
1563 case CSSPropertyColumnGap: 1563 case CSSPropertyColumnGap:
1564 if (style.hasNormalColumnGap()) 1564 if (style.hasNormalColumnGap())
1565 return cssValuePool().createIdentifierValue(CSSValueNormal); 1565 return cssValuePool().createIdentifierValue(CSSValueNormal);
1566 return zoomAdjustedPixelValue(style.columnGap(), style); 1566 return zoomAdjustedPixelValue(style.columnGap(), style);
1567 case CSSPropertyColumnRuleColor: 1567 case CSSPropertyColumnRuleColor:
1568 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited DependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style, style.columnRuleColor()); 1568 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited DependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style, style.columnRuleColor());
1569 case CSSPropertyColumnRuleStyle: 1569 case CSSPropertyColumnRuleStyle:
1570 return cssValuePool().createValue(style.columnRuleStyle()); 1570 return cssValuePool().createValue(style.columnRuleStyle());
1571 case CSSPropertyColumnRuleWidth: 1571 case CSSPropertyColumnRuleWidth:
1572 return zoomAdjustedPixelValue(style.columnRuleWidth(), style); 1572 return zoomAdjustedPixelValue(style.columnRuleWidth(), style);
1573 case CSSPropertyColumnSpan: 1573 case CSSPropertyColumnSpan:
1574 return cssValuePool().createIdentifierValue(style.columnSpan() ? CSSValu eAll : CSSValueNone); 1574 return cssValuePool().createIdentifierValue(style.getColumnSpan() ? CSSV alueAll : CSSValueNone);
1575 case CSSPropertyWebkitColumnBreakAfter: 1575 case CSSPropertyWebkitColumnBreakAfter:
1576 return cssValuePool().createValue(mapToColumnBreakValue(style.breakAfter ())); 1576 return cssValuePool().createValue(mapToColumnBreakValue(style.breakAfter ()));
1577 case CSSPropertyWebkitColumnBreakBefore: 1577 case CSSPropertyWebkitColumnBreakBefore:
1578 return cssValuePool().createValue(mapToColumnBreakValue(style.breakBefor e())); 1578 return cssValuePool().createValue(mapToColumnBreakValue(style.breakBefor e()));
1579 case CSSPropertyWebkitColumnBreakInside: 1579 case CSSPropertyWebkitColumnBreakInside:
1580 return cssValuePool().createValue(mapToColumnBreakValue(style.breakInsid e())); 1580 return cssValuePool().createValue(mapToColumnBreakValue(style.breakInsid e()));
1581 case CSSPropertyColumnWidth: 1581 case CSSPropertyColumnWidth:
1582 if (style.hasAutoColumnWidth()) 1582 if (style.hasAutoColumnWidth())
1583 return cssValuePool().createIdentifierValue(CSSValueAuto); 1583 return cssValuePool().createIdentifierValue(CSSValueAuto);
1584 return zoomAdjustedPixelValue(style.columnWidth(), style); 1584 return zoomAdjustedPixelValue(style.columnWidth(), style);
1585 case CSSPropertyTabSize: 1585 case CSSPropertyTabSize:
1586 return cssValuePool().createValue( 1586 return cssValuePool().createValue(
1587 style.tabSize().getPixelSize(1.0), style.tabSize().isSpaces() ? CSSP rimitiveValue::UnitType::Number : CSSPrimitiveValue::UnitType::Pixels); 1587 style.getTabSize().getPixelSize(1.0), style.getTabSize().isSpaces() ? CSSPrimitiveValue::UnitType::Number : CSSPrimitiveValue::UnitType::Pixels);
1588 case CSSPropertyCursor: { 1588 case CSSPropertyCursor: {
1589 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; 1589 RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
1590 CursorList* cursors = style.cursors(); 1590 CursorList* cursors = style.cursors();
1591 if (cursors && cursors->size() > 0) { 1591 if (cursors && cursors->size() > 0) {
1592 list = CSSValueList::createCommaSeparated(); 1592 list = CSSValueList::createCommaSeparated();
1593 for (unsigned i = 0; i < cursors->size(); ++i) { 1593 for (unsigned i = 0; i < cursors->size(); ++i) {
1594 if (StyleImage* image = cursors->at(i).image()) 1594 if (StyleImage* image = cursors->at(i).image())
1595 list->append(image->computedCSSValue()); 1595 list->append(image->computedCSSValue());
1596 } 1596 }
1597 } 1597 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat ed(); 1668 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat ed();
1669 for (unsigned i = 0; i < featureSettings->size(); ++i) { 1669 for (unsigned i = 0; i < featureSettings->size(); ++i) {
1670 const FontFeature& feature = featureSettings->at(i); 1670 const FontFeature& feature = featureSettings->at(i);
1671 RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFeatur eValue::create(feature.tag(), feature.value()); 1671 RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFeatur eValue::create(feature.tag(), feature.value());
1672 list->append(featureValue.release()); 1672 list->append(featureValue.release());
1673 } 1673 }
1674 return list.release(); 1674 return list.release();
1675 } 1675 }
1676 case CSSPropertyGridAutoFlow: { 1676 case CSSPropertyGridAutoFlow: {
1677 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 1677 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
1678 switch (style.gridAutoFlow()) { 1678 switch (style.getGridAutoFlow()) {
1679 case AutoFlowRow: 1679 case AutoFlowRow:
1680 case AutoFlowRowDense: 1680 case AutoFlowRowDense:
1681 list->append(cssValuePool().createIdentifierValue(CSSValueRow)); 1681 list->append(cssValuePool().createIdentifierValue(CSSValueRow));
1682 break; 1682 break;
1683 case AutoFlowColumn: 1683 case AutoFlowColumn:
1684 case AutoFlowColumnDense: 1684 case AutoFlowColumnDense:
1685 list->append(cssValuePool().createIdentifierValue(CSSValueColumn)); 1685 list->append(cssValuePool().createIdentifierValue(CSSValueColumn));
1686 break; 1686 break;
1687 default: 1687 default:
1688 ASSERT_NOT_REACHED(); 1688 ASSERT_NOT_REACHED();
1689 } 1689 }
1690 1690
1691 switch (style.gridAutoFlow()) { 1691 switch (style.getGridAutoFlow()) {
1692 case AutoFlowRowDense: 1692 case AutoFlowRowDense:
1693 case AutoFlowColumnDense: 1693 case AutoFlowColumnDense:
1694 list->append(cssValuePool().createIdentifierValue(CSSValueDense)); 1694 list->append(cssValuePool().createIdentifierValue(CSSValueDense));
1695 break; 1695 break;
1696 default: 1696 default:
1697 // Do nothing. 1697 // Do nothing.
1698 break; 1698 break;
1699 } 1699 }
1700 1700
1701 return list.release(); 1701 return list.release();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 return zoomAdjustedPixelValueForLength(style.minHeight(), style); 1859 return zoomAdjustedPixelValueForLength(style.minHeight(), style);
1860 case CSSPropertyMinWidth: 1860 case CSSPropertyMinWidth:
1861 if (style.minWidth().isAuto()) { 1861 if (style.minWidth().isAuto()) {
1862 Node* parent = styledNode->parentNode(); 1862 Node* parent = styledNode->parentNode();
1863 if (isFlexOrGrid(parent ? parent->ensureComputedStyle() : nullptr)) 1863 if (isFlexOrGrid(parent ? parent->ensureComputedStyle() : nullptr))
1864 return cssValuePool().createIdentifierValue(CSSValueAuto); 1864 return cssValuePool().createIdentifierValue(CSSValueAuto);
1865 return zoomAdjustedPixelValue(0, style); 1865 return zoomAdjustedPixelValue(0, style);
1866 } 1866 }
1867 return zoomAdjustedPixelValueForLength(style.minWidth(), style); 1867 return zoomAdjustedPixelValueForLength(style.minWidth(), style);
1868 case CSSPropertyObjectFit: 1868 case CSSPropertyObjectFit:
1869 return cssValuePool().createValue(style.objectFit()); 1869 return cssValuePool().createValue(style.getObjectFit());
1870 case CSSPropertyObjectPosition: 1870 case CSSPropertyObjectPosition:
1871 return CSSValuePair::create( 1871 return CSSValuePair::create(
1872 zoomAdjustedPixelValueForLength(style.objectPosition().x(), style), 1872 zoomAdjustedPixelValueForLength(style.objectPosition().x(), style),
1873 zoomAdjustedPixelValueForLength(style.objectPosition().y(), style), 1873 zoomAdjustedPixelValueForLength(style.objectPosition().y(), style),
1874 CSSValuePair::KeepIdenticalValues); 1874 CSSValuePair::KeepIdenticalValues);
1875 case CSSPropertyOpacity: 1875 case CSSPropertyOpacity:
1876 return cssValuePool().createValue(style.opacity(), CSSPrimitiveValue::Un itType::Number); 1876 return cssValuePool().createValue(style.opacity(), CSSPrimitiveValue::Un itType::Number);
1877 case CSSPropertyOrphans: 1877 case CSSPropertyOrphans:
1878 if (style.hasAutoOrphans()) 1878 if (style.hasAutoOrphans())
1879 return cssValuePool().createIdentifierValue(CSSValueAuto); 1879 return cssValuePool().createIdentifierValue(CSSValueAuto);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 for (int i = 0; i < style.quotes()->size(); i++) { 1944 for (int i = 0; i < style.quotes()->size(); i++) {
1945 list->append(CSSStringValue::create(style.quotes()->getOpenQuote (i))); 1945 list->append(CSSStringValue::create(style.quotes()->getOpenQuote (i)));
1946 list->append(CSSStringValue::create(style.quotes()->getCloseQuot e(i))); 1946 list->append(CSSStringValue::create(style.quotes()->getCloseQuot e(i)));
1947 } 1947 }
1948 return list.release(); 1948 return list.release();
1949 } 1949 }
1950 return cssValuePool().createIdentifierValue(CSSValueNone); 1950 return cssValuePool().createIdentifierValue(CSSValueNone);
1951 case CSSPropertyRight: 1951 case CSSPropertyRight:
1952 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); 1952 return valueForPositionOffset(style, CSSPropertyRight, layoutObject);
1953 case CSSPropertyWebkitRubyPosition: 1953 case CSSPropertyWebkitRubyPosition:
1954 return cssValuePool().createValue(style.rubyPosition()); 1954 return cssValuePool().createValue(style.getRubyPosition());
1955 case CSSPropertyScrollBehavior: 1955 case CSSPropertyScrollBehavior:
1956 return cssValuePool().createValue(style.scrollBehavior()); 1956 return cssValuePool().createValue(style.getScrollBehavior());
1957 case CSSPropertyTableLayout: 1957 case CSSPropertyTableLayout:
1958 return cssValuePool().createValue(style.tableLayout()); 1958 return cssValuePool().createValue(style.tableLayout());
1959 case CSSPropertyTextAlign: 1959 case CSSPropertyTextAlign:
1960 return cssValuePool().createValue(style.textAlign()); 1960 return cssValuePool().createValue(style.textAlign());
1961 case CSSPropertyTextAlignLast: 1961 case CSSPropertyTextAlignLast:
1962 return cssValuePool().createValue(style.textAlignLast()); 1962 return cssValuePool().createValue(style.getTextAlignLast());
1963 case CSSPropertyTextDecoration: 1963 case CSSPropertyTextDecoration:
1964 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) 1964 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled())
1965 return valuesForShorthandProperty(textDecorationShorthand(), style, layoutObject, styledNode, allowVisitedStyle); 1965 return valuesForShorthandProperty(textDecorationShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
1966 // Fall through. 1966 // Fall through.
1967 case CSSPropertyTextDecorationLine: 1967 case CSSPropertyTextDecorationLine:
1968 return renderTextDecorationFlagsToCSSValue(style.textDecoration()); 1968 return renderTextDecorationFlagsToCSSValue(style.getTextDecoration());
1969 case CSSPropertyTextDecorationStyle: 1969 case CSSPropertyTextDecorationStyle:
1970 return valueForTextDecorationStyle(style.textDecorationStyle()); 1970 return valueForTextDecorationStyle(style.getTextDecorationStyle());
1971 case CSSPropertyTextDecorationColor: 1971 case CSSPropertyTextDecorationColor:
1972 return currentColorOrValidColor(style, style.textDecorationColor()); 1972 return currentColorOrValidColor(style, style.textDecorationColor());
1973 case CSSPropertyTextJustify: 1973 case CSSPropertyTextJustify:
1974 return cssValuePool().createValue(style.textJustify()); 1974 return cssValuePool().createValue(style.getTextJustify());
1975 case CSSPropertyTextUnderlinePosition: 1975 case CSSPropertyTextUnderlinePosition:
1976 return cssValuePool().createValue(style.textUnderlinePosition()); 1976 return cssValuePool().createValue(style.getTextUnderlinePosition());
1977 case CSSPropertyWebkitTextDecorationsInEffect: 1977 case CSSPropertyWebkitTextDecorationsInEffect:
1978 return renderTextDecorationFlagsToCSSValue(style.textDecorationsInEffect ()); 1978 return renderTextDecorationFlagsToCSSValue(style.textDecorationsInEffect ());
1979 case CSSPropertyWebkitTextFillColor: 1979 case CSSPropertyWebkitTextFillColor:
1980 return currentColorOrValidColor(style, style.textFillColor()); 1980 return currentColorOrValidColor(style, style.textFillColor());
1981 case CSSPropertyWebkitTextEmphasisColor: 1981 case CSSPropertyWebkitTextEmphasisColor:
1982 return currentColorOrValidColor(style, style.textEmphasisColor()); 1982 return currentColorOrValidColor(style, style.textEmphasisColor());
1983 case CSSPropertyWebkitTextEmphasisPosition: 1983 case CSSPropertyWebkitTextEmphasisPosition:
1984 return cssValuePool().createValue(style.textEmphasisPosition()); 1984 return cssValuePool().createValue(style.getTextEmphasisPosition());
1985 case CSSPropertyWebkitTextEmphasisStyle: 1985 case CSSPropertyWebkitTextEmphasisStyle:
1986 switch (style.textEmphasisMark()) { 1986 switch (style.getTextEmphasisMark()) {
1987 case TextEmphasisMarkNone: 1987 case TextEmphasisMarkNone:
1988 return cssValuePool().createIdentifierValue(CSSValueNone); 1988 return cssValuePool().createIdentifierValue(CSSValueNone);
1989 case TextEmphasisMarkCustom: 1989 case TextEmphasisMarkCustom:
1990 return CSSStringValue::create(style.textEmphasisCustomMark()); 1990 return CSSStringValue::create(style.textEmphasisCustomMark());
1991 case TextEmphasisMarkAuto: 1991 case TextEmphasisMarkAuto:
1992 ASSERT_NOT_REACHED(); 1992 ASSERT_NOT_REACHED();
1993 // Fall through 1993 // Fall through
1994 case TextEmphasisMarkDot: 1994 case TextEmphasisMarkDot:
1995 case TextEmphasisMarkCircle: 1995 case TextEmphasisMarkCircle:
1996 case TextEmphasisMarkDoubleCircle: 1996 case TextEmphasisMarkDoubleCircle:
1997 case TextEmphasisMarkTriangle: 1997 case TextEmphasisMarkTriangle:
1998 case TextEmphasisMarkSesame: { 1998 case TextEmphasisMarkSesame: {
1999 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep arated(); 1999 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep arated();
2000 list->append(cssValuePool().createValue(style.textEmphasisFill())); 2000 list->append(cssValuePool().createValue(style.getTextEmphasisFill()) );
2001 list->append(cssValuePool().createValue(style.textEmphasisMark())); 2001 list->append(cssValuePool().createValue(style.getTextEmphasisMark()) );
2002 return list.release(); 2002 return list.release();
2003 } 2003 }
2004 } 2004 }
2005 case CSSPropertyTextIndent: { 2005 case CSSPropertyTextIndent: {
2006 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 2006 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2007 list->append(zoomAdjustedPixelValueForLength(style.textIndent(), style)) ; 2007 list->append(zoomAdjustedPixelValueForLength(style.textIndent(), style)) ;
2008 if (RuntimeEnabledFeatures::css3TextEnabled() && (style.textIndentLine() == TextIndentEachLine || style.textIndentType() == TextIndentHanging)) { 2008 if (RuntimeEnabledFeatures::css3TextEnabled() && (style.getTextIndentLin e() == TextIndentEachLine || style.getTextIndentType() == TextIndentHanging)) {
2009 if (style.textIndentLine() == TextIndentEachLine) 2009 if (style.getTextIndentLine() == TextIndentEachLine)
2010 list->append(cssValuePool().createIdentifierValue(CSSValueEachLi ne)); 2010 list->append(cssValuePool().createIdentifierValue(CSSValueEachLi ne));
2011 if (style.textIndentType() == TextIndentHanging) 2011 if (style.getTextIndentType() == TextIndentHanging)
2012 list->append(cssValuePool().createIdentifierValue(CSSValueHangin g)); 2012 list->append(cssValuePool().createIdentifierValue(CSSValueHangin g));
2013 } 2013 }
2014 return list.release(); 2014 return list.release();
2015 } 2015 }
2016 case CSSPropertyTextShadow: 2016 case CSSPropertyTextShadow:
2017 return valueForShadowList(style.textShadow(), style, false); 2017 return valueForShadowList(style.textShadow(), style, false);
2018 case CSSPropertyTextRendering: 2018 case CSSPropertyTextRendering:
2019 return cssValuePool().createValue(style.fontDescription().textRendering( )); 2019 return cssValuePool().createValue(style.fontDescription().textRendering( ));
2020 case CSSPropertyTextOverflow: 2020 case CSSPropertyTextOverflow:
2021 if (style.textOverflow()) 2021 if (style.getTextOverflow())
2022 return cssValuePool().createIdentifierValue(CSSValueEllipsis); 2022 return cssValuePool().createIdentifierValue(CSSValueEllipsis);
2023 return cssValuePool().createIdentifierValue(CSSValueClip); 2023 return cssValuePool().createIdentifierValue(CSSValueClip);
2024 case CSSPropertyWebkitTextSecurity: 2024 case CSSPropertyWebkitTextSecurity:
2025 return cssValuePool().createValue(style.textSecurity()); 2025 return cssValuePool().createValue(style.textSecurity());
2026 case CSSPropertyWebkitTextStrokeColor: 2026 case CSSPropertyWebkitTextStrokeColor:
2027 return currentColorOrValidColor(style, style.textStrokeColor()); 2027 return currentColorOrValidColor(style, style.textStrokeColor());
2028 case CSSPropertyWebkitTextStrokeWidth: 2028 case CSSPropertyWebkitTextStrokeWidth:
2029 return zoomAdjustedPixelValue(style.textStrokeWidth(), style); 2029 return zoomAdjustedPixelValue(style.textStrokeWidth(), style);
2030 case CSSPropertyTextTransform: 2030 case CSSPropertyTextTransform:
2031 return cssValuePool().createValue(style.textTransform()); 2031 return cssValuePool().createValue(style.textTransform());
2032 case CSSPropertyTop: 2032 case CSSPropertyTop:
2033 return valueForPositionOffset(style, CSSPropertyTop, layoutObject); 2033 return valueForPositionOffset(style, CSSPropertyTop, layoutObject);
2034 case CSSPropertyTouchAction: 2034 case CSSPropertyTouchAction:
2035 return touchActionFlagsToCSSValue(style.touchAction()); 2035 return touchActionFlagsToCSSValue(style.getTouchAction());
2036 case CSSPropertyUnicodeBidi: 2036 case CSSPropertyUnicodeBidi:
2037 return cssValuePool().createValue(style.unicodeBidi()); 2037 return cssValuePool().createValue(style.unicodeBidi());
2038 case CSSPropertyVerticalAlign: 2038 case CSSPropertyVerticalAlign:
2039 switch (style.verticalAlign()) { 2039 switch (style.verticalAlign()) {
2040 case BASELINE: 2040 case BASELINE:
2041 return cssValuePool().createIdentifierValue(CSSValueBaseline); 2041 return cssValuePool().createIdentifierValue(CSSValueBaseline);
2042 case MIDDLE: 2042 case MIDDLE:
2043 return cssValuePool().createIdentifierValue(CSSValueMiddle); 2043 return cssValuePool().createIdentifierValue(CSSValueMiddle);
2044 case SUB: 2044 case SUB:
2045 return cssValuePool().createIdentifierValue(CSSValueSub); 2045 return cssValuePool().createIdentifierValue(CSSValueSub);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 return zoomAdjustedPixelValueForLength(style.width(), style); 2077 return zoomAdjustedPixelValueForLength(style.width(), style);
2078 case CSSPropertyWillChange: 2078 case CSSPropertyWillChange:
2079 return valueForWillChange(style.willChangeProperties(), style.willChange Contents(), style.willChangeScrollPosition()); 2079 return valueForWillChange(style.willChangeProperties(), style.willChange Contents(), style.willChangeScrollPosition());
2080 case CSSPropertyWordBreak: 2080 case CSSPropertyWordBreak:
2081 return cssValuePool().createValue(style.wordBreak()); 2081 return cssValuePool().createValue(style.wordBreak());
2082 case CSSPropertyWordSpacing: 2082 case CSSPropertyWordSpacing:
2083 return zoomAdjustedPixelValue(style.wordSpacing(), style); 2083 return zoomAdjustedPixelValue(style.wordSpacing(), style);
2084 case CSSPropertyWordWrap: 2084 case CSSPropertyWordWrap:
2085 return cssValuePool().createValue(style.overflowWrap()); 2085 return cssValuePool().createValue(style.overflowWrap());
2086 case CSSPropertyWebkitLineBreak: 2086 case CSSPropertyWebkitLineBreak:
2087 return cssValuePool().createValue(style.lineBreak()); 2087 return cssValuePool().createValue(style.getLineBreak());
2088 case CSSPropertyResize: 2088 case CSSPropertyResize:
2089 return cssValuePool().createValue(style.resize()); 2089 return cssValuePool().createValue(style.resize());
2090 case CSSPropertyFontKerning: 2090 case CSSPropertyFontKerning:
2091 return cssValuePool().createValue(style.fontDescription().kerning()); 2091 return cssValuePool().createValue(style.fontDescription().kerning());
2092 case CSSPropertyWebkitFontSmoothing: 2092 case CSSPropertyWebkitFontSmoothing:
2093 return cssValuePool().createValue(style.fontDescription().fontSmoothing( )); 2093 return cssValuePool().createValue(style.fontDescription().fontSmoothing( ));
2094 case CSSPropertyFontVariantLigatures: { 2094 case CSSPropertyFontVariantLigatures: {
2095 FontDescription::LigaturesState commonLigaturesState = style.fontDescrip tion().commonLigaturesState(); 2095 FontDescription::LigaturesState commonLigaturesState = style.fontDescrip tion().commonLigaturesState();
2096 FontDescription::LigaturesState discretionaryLigaturesState = style.font Description().discretionaryLigaturesState(); 2096 FontDescription::LigaturesState discretionaryLigaturesState = style.font Description().discretionaryLigaturesState();
2097 FontDescription::LigaturesState historicalLigaturesState = style.fontDes cription().historicalLigaturesState(); 2097 FontDescription::LigaturesState historicalLigaturesState = style.fontDes cription().historicalLigaturesState();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 list->append(cssValuePool().createIdentifierValue(CSSValueAll)); 2358 list->append(cssValuePool().createIdentifierValue(CSSValueAll));
2359 list->append(cssValuePool().createValue(CSSTransitionData::initialDurati on(), CSSPrimitiveValue::UnitType::Seconds)); 2359 list->append(cssValuePool().createValue(CSSTransitionData::initialDurati on(), CSSPrimitiveValue::UnitType::Seconds));
2360 list->append(createTimingFunctionValue(CSSTransitionData::initialTimingF unction().get())); 2360 list->append(createTimingFunctionValue(CSSTransitionData::initialTimingF unction().get()));
2361 list->append(cssValuePool().createValue(CSSTransitionData::initialDelay( ), CSSPrimitiveValue::UnitType::Seconds)); 2361 list->append(cssValuePool().createValue(CSSTransitionData::initialDelay( ), CSSPrimitiveValue::UnitType::Seconds));
2362 return list.release(); 2362 return list.release();
2363 } 2363 }
2364 case CSSPropertyPointerEvents: 2364 case CSSPropertyPointerEvents:
2365 return cssValuePool().createValue(style.pointerEvents()); 2365 return cssValuePool().createValue(style.pointerEvents());
2366 case CSSPropertyWritingMode: 2366 case CSSPropertyWritingMode:
2367 case CSSPropertyWebkitWritingMode: 2367 case CSSPropertyWebkitWritingMode:
2368 return cssValuePool().createValue(style.writingMode()); 2368 return cssValuePool().createValue(style.getWritingMode());
2369 case CSSPropertyWebkitTextCombine: 2369 case CSSPropertyWebkitTextCombine:
2370 if (style.textCombine() == TextCombineAll) 2370 if (style.getTextCombine() == TextCombineAll)
2371 return CSSPrimitiveValue::createIdentifier(CSSValueHorizontal); 2371 return CSSPrimitiveValue::createIdentifier(CSSValueHorizontal);
2372 case CSSPropertyTextCombineUpright: 2372 case CSSPropertyTextCombineUpright:
2373 return cssValuePool().createValue(style.textCombine()); 2373 return cssValuePool().createValue(style.getTextCombine());
2374 case CSSPropertyWebkitTextOrientation: 2374 case CSSPropertyWebkitTextOrientation:
2375 if (style.textOrientation() == TextOrientationMixed) 2375 if (style.getTextOrientation() == TextOrientationMixed)
2376 return CSSPrimitiveValue::createIdentifier(CSSValueVerticalRight); 2376 return CSSPrimitiveValue::createIdentifier(CSSValueVerticalRight);
2377 case CSSPropertyTextOrientation: 2377 case CSSPropertyTextOrientation:
2378 return CSSPrimitiveValue::create(style.textOrientation()); 2378 return CSSPrimitiveValue::create(style.getTextOrientation());
2379 case CSSPropertyContent: 2379 case CSSPropertyContent:
2380 return valueForContentData(style); 2380 return valueForContentData(style);
2381 case CSSPropertyCounterIncrement: 2381 case CSSPropertyCounterIncrement:
2382 return valueForCounterDirectives(style, propertyID); 2382 return valueForCounterDirectives(style, propertyID);
2383 case CSSPropertyCounterReset: 2383 case CSSPropertyCounterReset:
2384 return valueForCounterDirectives(style, propertyID); 2384 return valueForCounterDirectives(style, propertyID);
2385 case CSSPropertyWebkitClipPath: 2385 case CSSPropertyWebkitClipPath:
2386 if (ClipPathOperation* operation = style.clipPath()) { 2386 if (ClipPathOperation* operation = style.clipPath()) {
2387 if (operation->type() == ClipPathOperation::SHAPE) 2387 if (operation->type() == ClipPathOperation::SHAPE)
2388 return valueForBasicShape(style, toShapeClipPathOperation(operat ion)->basicShape()); 2388 return valueForBasicShape(style, toShapeClipPathOperation(operat ion)->basicShape());
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 return zoomAdjustedPixelValueForLength(svgStyle.x(), style); 2652 return zoomAdjustedPixelValueForLength(svgStyle.x(), style);
2653 case CSSPropertyY: 2653 case CSSPropertyY:
2654 return zoomAdjustedPixelValueForLength(svgStyle.y(), style); 2654 return zoomAdjustedPixelValueForLength(svgStyle.y(), style);
2655 case CSSPropertyR: 2655 case CSSPropertyR:
2656 return zoomAdjustedPixelValueForLength(svgStyle.r(), style); 2656 return zoomAdjustedPixelValueForLength(svgStyle.r(), style);
2657 case CSSPropertyRx: 2657 case CSSPropertyRx:
2658 return zoomAdjustedPixelValueForLength(svgStyle.rx(), style); 2658 return zoomAdjustedPixelValueForLength(svgStyle.rx(), style);
2659 case CSSPropertyRy: 2659 case CSSPropertyRy:
2660 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style); 2660 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style);
2661 case CSSPropertyScrollSnapType: 2661 case CSSPropertyScrollSnapType:
2662 return cssValuePool().createValue(style.scrollSnapType()); 2662 return cssValuePool().createValue(style.getScrollSnapType());
2663 case CSSPropertyScrollSnapPointsX: 2663 case CSSPropertyScrollSnapPointsX:
2664 return valueForScrollSnapPoints(style.scrollSnapPointsX(), style); 2664 return valueForScrollSnapPoints(style.scrollSnapPointsX(), style);
2665 case CSSPropertyScrollSnapPointsY: 2665 case CSSPropertyScrollSnapPointsY:
2666 return valueForScrollSnapPoints(style.scrollSnapPointsY(), style); 2666 return valueForScrollSnapPoints(style.scrollSnapPointsY(), style);
2667 case CSSPropertyScrollSnapCoordinate: 2667 case CSSPropertyScrollSnapCoordinate:
2668 return valueForScrollSnapCoordinate(style.scrollSnapCoordinate(), style) ; 2668 return valueForScrollSnapCoordinate(style.scrollSnapCoordinate(), style) ;
2669 case CSSPropertyScrollSnapDestination: 2669 case CSSPropertyScrollSnapDestination:
2670 return valueForScrollSnapDestination(style.scrollSnapDestination(), styl e); 2670 return valueForScrollSnapDestination(style.scrollSnapDestination(), styl e);
2671 case CSSPropertyTranslate: { 2671 case CSSPropertyTranslate: {
2672 if (!style.translate()) 2672 if (!style.translate())
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 case CSSPropertyAll: 2750 case CSSPropertyAll:
2751 return nullptr; 2751 return nullptr;
2752 default: 2752 default:
2753 break; 2753 break;
2754 } 2754 }
2755 ASSERT_NOT_REACHED(); 2755 ASSERT_NOT_REACHED();
2756 return nullptr; 2756 return nullptr;
2757 } 2757 }
2758 2758
2759 } // namespace blink 2759 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698