| OLD | NEW |
| 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 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 CSSPropertyUnicodeBidi, | 189 CSSPropertyUnicodeBidi, |
| 190 CSSPropertyVerticalAlign, | 190 CSSPropertyVerticalAlign, |
| 191 CSSPropertyWhiteSpace, | 191 CSSPropertyWhiteSpace, |
| 192 CSSPropertyWidows, | 192 CSSPropertyWidows, |
| 193 CSSPropertyWidth, | 193 CSSPropertyWidth, |
| 194 CSSPropertyWillChange, | 194 CSSPropertyWillChange, |
| 195 CSSPropertyWordBreak, | 195 CSSPropertyWordBreak, |
| 196 CSSPropertyWordSpacing, | 196 CSSPropertyWordSpacing, |
| 197 CSSPropertyWordWrap, | 197 CSSPropertyWordWrap, |
| 198 CSSPropertyZIndex, | 198 CSSPropertyZIndex, |
| 199 CSSPropertyZoom, | |
| 200 | 199 |
| 201 CSSPropertyWebkitAnimationDelay, | 200 CSSPropertyWebkitAnimationDelay, |
| 202 CSSPropertyWebkitAnimationDirection, | 201 CSSPropertyWebkitAnimationDirection, |
| 203 CSSPropertyWebkitAnimationDuration, | 202 CSSPropertyWebkitAnimationDuration, |
| 204 CSSPropertyWebkitAnimationFillMode, | 203 CSSPropertyWebkitAnimationFillMode, |
| 205 CSSPropertyWebkitAnimationIterationCount, | 204 CSSPropertyWebkitAnimationIterationCount, |
| 206 CSSPropertyWebkitAnimationName, | 205 CSSPropertyWebkitAnimationName, |
| 207 CSSPropertyWebkitAnimationPlayState, | 206 CSSPropertyWebkitAnimationPlayState, |
| 208 CSSPropertyWebkitAnimationTimingFunction, | 207 CSSPropertyWebkitAnimationTimingFunction, |
| 209 CSSPropertyBackfaceVisibility, | 208 CSSPropertyBackfaceVisibility, |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 439 |
| 441 // Create the border outset. | 440 // Create the border outset. |
| 442 RefPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset(), style); | 441 RefPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset(), style); |
| 443 | 442 |
| 444 // Create the repeat rules. | 443 // Create the repeat rules. |
| 445 RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image); | 444 RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image); |
| 446 | 445 |
| 447 return createBorderImageValue(imageValue.release(), imageSlices.release(), b
orderSlices.release(), outset.release(), repeat.release()); | 446 return createBorderImageValue(imageValue.release(), imageSlices.release(), b
orderSlices.release(), outset.release(), repeat.release()); |
| 448 } | 447 } |
| 449 | 448 |
| 450 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value,
const RenderStyle& style) | 449 // FIXME(sky): Rename and remove RenderStyle argument now that we don't have zoo
m. |
| 450 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value,
const RenderStyle&) |
| 451 { | 451 { |
| 452 return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style),
CSSPrimitiveValue::CSS_PX); | 452 return cssValuePool().createValue(value, CSSPrimitiveValue::CSS_PX); |
| 453 } | 453 } |
| 454 | 454 |
| 455 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value
, const RenderStyle& style) | 455 // FIXME(sky): Rename and remove RenderStyle argument now that we don't have zoo
m. |
| 456 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value
, const RenderStyle&) |
| 456 { | 457 { |
| 457 return cssValuePool().createValue(value / style.effectiveZoom(), CSSPrimitiv
eValue::CSS_NUMBER); | 458 return cssValuePool().createValue(value, CSSPrimitiveValue::CSS_NUMBER); |
| 458 } | 459 } |
| 459 | 460 |
| 461 // FIXME(sky): Rename now that we don't have zoom. |
| 460 static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Lengt
h& length, const RenderStyle& style) | 462 static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Lengt
h& length, const RenderStyle& style) |
| 461 { | 463 { |
| 462 if (length.isFixed()) | 464 if (length.isFixed()) |
| 463 return zoomAdjustedPixelValue(length.value(), style); | 465 return zoomAdjustedPixelValue(length.value(), style); |
| 464 return cssValuePool().createValue(length, style); | 466 return cssValuePool().createValue(length, style); |
| 465 } | 467 } |
| 466 | 468 |
| 467 static PassRefPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propert
yID, const FillLayer& layer, const RenderStyle& style) | 469 static PassRefPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propert
yID, const FillLayer& layer, const RenderStyle& style) |
| 468 { | 470 { |
| 469 RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated(); | 471 RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated(); |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1884 if (historicalLigaturesState != FontDescription::NormalLigaturesStat
e) | 1886 if (historicalLigaturesState != FontDescription::NormalLigaturesStat
e) |
| 1885 valueList->append(cssValuePool().createIdentifierValue(historica
lLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistorica
lLigatures : CSSValueHistoricalLigatures)); | 1887 valueList->append(cssValuePool().createIdentifierValue(historica
lLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistorica
lLigatures : CSSValueHistoricalLigatures)); |
| 1886 if (contextualLigaturesState != FontDescription::NormalLigaturesStat
e) | 1888 if (contextualLigaturesState != FontDescription::NormalLigaturesStat
e) |
| 1887 valueList->append(cssValuePool().createIdentifierValue(contextua
lLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoContextua
l : CSSValueContextual)); | 1889 valueList->append(cssValuePool().createIdentifierValue(contextua
lLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoContextua
l : CSSValueContextual)); |
| 1888 return valueList; | 1890 return valueList; |
| 1889 } | 1891 } |
| 1890 case CSSPropertyZIndex: | 1892 case CSSPropertyZIndex: |
| 1891 if (style->hasAutoZIndex()) | 1893 if (style->hasAutoZIndex()) |
| 1892 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1894 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1893 return cssValuePool().createValue(style->zIndex(), CSSPrimitiveValue
::CSS_NUMBER); | 1895 return cssValuePool().createValue(style->zIndex(), CSSPrimitiveValue
::CSS_NUMBER); |
| 1894 case CSSPropertyZoom: | |
| 1895 return cssValuePool().createValue(style->zoom(), CSSPrimitiveValue::
CSS_NUMBER); | |
| 1896 case CSSPropertyBoxSizing: | 1896 case CSSPropertyBoxSizing: |
| 1897 if (style->boxSizing() == CONTENT_BOX) | 1897 if (style->boxSizing() == CONTENT_BOX) |
| 1898 return cssValuePool().createIdentifierValue(CSSValueContentBox); | 1898 return cssValuePool().createIdentifierValue(CSSValueContentBox); |
| 1899 return cssValuePool().createIdentifierValue(CSSValueBorderBox); | 1899 return cssValuePool().createIdentifierValue(CSSValueBorderBox); |
| 1900 case CSSPropertyAnimationDelay: | 1900 case CSSPropertyAnimationDelay: |
| 1901 ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); | 1901 ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); |
| 1902 case CSSPropertyWebkitAnimationDelay: | 1902 case CSSPropertyWebkitAnimationDelay: |
| 1903 return valueForAnimationDelay(style->animations()); | 1903 return valueForAnimationDelay(style->animations()); |
| 1904 case CSSPropertyAnimationDirection: | 1904 case CSSPropertyAnimationDirection: |
| 1905 ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); | 1905 ASSERT(RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()); |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 case CSSPropertyWebkitMaskRepeatY: | 2283 case CSSPropertyWebkitMaskRepeatY: |
| 2284 case CSSPropertyWebkitPerspectiveOriginX: | 2284 case CSSPropertyWebkitPerspectiveOriginX: |
| 2285 case CSSPropertyWebkitPerspectiveOriginY: | 2285 case CSSPropertyWebkitPerspectiveOriginY: |
| 2286 case CSSPropertyWebkitTextStroke: | 2286 case CSSPropertyWebkitTextStroke: |
| 2287 case CSSPropertyWebkitTransformOriginX: | 2287 case CSSPropertyWebkitTransformOriginX: |
| 2288 case CSSPropertyWebkitTransformOriginY: | 2288 case CSSPropertyWebkitTransformOriginY: |
| 2289 case CSSPropertyWebkitTransformOriginZ: | 2289 case CSSPropertyWebkitTransformOriginZ: |
| 2290 break; | 2290 break; |
| 2291 | 2291 |
| 2292 /* @viewport rule properties */ | 2292 /* @viewport rule properties */ |
| 2293 case CSSPropertyMaxZoom: | |
| 2294 case CSSPropertyMinZoom: | |
| 2295 case CSSPropertyOrientation: | 2293 case CSSPropertyOrientation: |
| 2296 case CSSPropertyUserZoom: | |
| 2297 break; | 2294 break; |
| 2298 | 2295 |
| 2299 case CSSPropertyAll: | 2296 case CSSPropertyAll: |
| 2300 return nullptr; | 2297 return nullptr; |
| 2301 } | 2298 } |
| 2302 | 2299 |
| 2303 logUnimplementedPropertyID(propertyID); | 2300 logUnimplementedPropertyID(propertyID); |
| 2304 return nullptr; | 2301 return nullptr; |
| 2305 } | 2302 } |
| 2306 | 2303 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 return list.release(); | 2481 return list.release(); |
| 2485 } | 2482 } |
| 2486 | 2483 |
| 2487 void CSSComputedStyleDeclaration::trace(Visitor* visitor) | 2484 void CSSComputedStyleDeclaration::trace(Visitor* visitor) |
| 2488 { | 2485 { |
| 2489 visitor->trace(m_node); | 2486 visitor->trace(m_node); |
| 2490 CSSStyleDeclaration::trace(visitor); | 2487 CSSStyleDeclaration::trace(visitor); |
| 2491 } | 2488 } |
| 2492 | 2489 |
| 2493 } // namespace blink | 2490 } // namespace blink |
| OLD | NEW |