OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 break; | 288 break; |
289 case CSSValueLighter: | 289 case CSSValueLighter: |
290 state.fontBuilder().setWeight(state.parentStyle()->fontDescription().wei
ght()); | 290 state.fontBuilder().setWeight(state.parentStyle()->fontDescription().wei
ght()); |
291 state.fontBuilder().setWeightLighter(); | 291 state.fontBuilder().setWeightLighter(); |
292 break; | 292 break; |
293 default: | 293 default: |
294 state.fontBuilder().setWeight(*primitiveValue); | 294 state.fontBuilder().setWeight(*primitiveValue); |
295 } | 295 } |
296 } | 296 } |
297 | 297 |
| 298 |
| 299 void StyleBuilderFunctions::applyInitialCSSPropertyFontStretch(StyleResolverStat
e& state) |
| 300 { |
| 301 state.fontBuilder().setStretch(FontStretchNormal); |
| 302 } |
| 303 |
| 304 void StyleBuilderFunctions::applyInheritCSSPropertyFontStretch(StyleResolverStat
e& state) |
| 305 { |
| 306 state.fontBuilder().setStretch(state.parentFontDescription().stretch()); |
| 307 } |
| 308 |
| 309 void StyleBuilderFunctions::applyValueCSSPropertyFontStretch(StyleResolverState&
state, CSSValue* value) |
| 310 { |
| 311 if (!value->isPrimitiveValue()) |
| 312 return; |
| 313 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 314 switch (primitiveValue->getValueID()) { |
| 315 case CSSValueInvalid: |
| 316 ASSERT_NOT_REACHED(); |
| 317 break; |
| 318 case CSSValueUltraCondensed: |
| 319 state.fontBuilder().setStretch(FontStretchUltraCondensed); |
| 320 break; |
| 321 case CSSValueExtraCondensed: |
| 322 state.fontBuilder().setStretch(FontStretchExtraCondensed); |
| 323 break; |
| 324 case CSSValueCondensed: |
| 325 state.fontBuilder().setStretch(FontStretchCondensed); |
| 326 break; |
| 327 case CSSValueSemiCondensed: |
| 328 state.fontBuilder().setStretch(FontStretchSemiCondensed); |
| 329 break; |
| 330 case CSSValueNormal: |
| 331 state.fontBuilder().setStretch(FontStretchNormal); |
| 332 break; |
| 333 case CSSValueSemiExpanded: |
| 334 state.fontBuilder().setStretch(FontStretchSemiExpanded); |
| 335 break; |
| 336 case CSSValueExpanded: |
| 337 state.fontBuilder().setStretch(FontStretchExpanded); |
| 338 break; |
| 339 case CSSValueExtraExpanded: |
| 340 state.fontBuilder().setStretch(FontStretchExtraExpanded); |
| 341 break; |
| 342 case CSSValueUltraExpanded: |
| 343 state.fontBuilder().setStretch(FontStretchUltraExpanded); |
| 344 break; |
| 345 default: |
| 346 return; |
| 347 } |
| 348 } |
| 349 |
298 void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolverState&
state, CSSValue* value) | 350 void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolverState&
state, CSSValue* value) |
299 { | 351 { |
300 if (!value->isPrimitiveValue()) | 352 if (!value->isPrimitiveValue()) |
301 return; | 353 return; |
302 | 354 |
303 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 355 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
304 Length lineHeight; | 356 Length lineHeight; |
305 | 357 |
306 if (primitiveValue->getValueID() == CSSValueNormal) { | 358 if (primitiveValue->getValueID() == CSSValueNormal) { |
307 lineHeight = RenderStyle::initialLineHeight(); | 359 lineHeight = RenderStyle::initialLineHeight(); |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 case CSSPropertyWebkitLogicalHeight: | 1555 case CSSPropertyWebkitLogicalHeight: |
1504 case CSSPropertyWebkitMinLogicalWidth: | 1556 case CSSPropertyWebkitMinLogicalWidth: |
1505 case CSSPropertyWebkitMinLogicalHeight: | 1557 case CSSPropertyWebkitMinLogicalHeight: |
1506 case CSSPropertyWebkitMaxLogicalWidth: | 1558 case CSSPropertyWebkitMaxLogicalWidth: |
1507 case CSSPropertyWebkitMaxLogicalHeight: | 1559 case CSSPropertyWebkitMaxLogicalHeight: |
1508 { | 1560 { |
1509 CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, sta
te.style()->direction(), state.style()->writingMode()); | 1561 CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, sta
te.style()->direction(), state.style()->writingMode()); |
1510 ASSERT(newId != id); | 1562 ASSERT(newId != id); |
1511 return applyProperty(newId, state, value); | 1563 return applyProperty(newId, state, value); |
1512 } | 1564 } |
1513 case CSSPropertyFontStretch: | |
1514 case CSSPropertyPage: | 1565 case CSSPropertyPage: |
1515 case CSSPropertyTextLineThroughColor: | 1566 case CSSPropertyTextLineThroughColor: |
1516 case CSSPropertyTextLineThroughMode: | 1567 case CSSPropertyTextLineThroughMode: |
1517 case CSSPropertyTextLineThroughStyle: | 1568 case CSSPropertyTextLineThroughStyle: |
1518 case CSSPropertyTextLineThroughWidth: | 1569 case CSSPropertyTextLineThroughWidth: |
1519 case CSSPropertyTextOverlineColor: | 1570 case CSSPropertyTextOverlineColor: |
1520 case CSSPropertyTextOverlineMode: | 1571 case CSSPropertyTextOverlineMode: |
1521 case CSSPropertyTextOverlineStyle: | 1572 case CSSPropertyTextOverlineStyle: |
1522 case CSSPropertyTextOverlineWidth: | 1573 case CSSPropertyTextOverlineWidth: |
1523 case CSSPropertyTextUnderlineColor: | 1574 case CSSPropertyTextUnderlineColor: |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 case CSSPropertyColor: | 1848 case CSSPropertyColor: |
1798 case CSSPropertyCounterIncrement: | 1849 case CSSPropertyCounterIncrement: |
1799 case CSSPropertyCounterReset: | 1850 case CSSPropertyCounterReset: |
1800 case CSSPropertyCursor: | 1851 case CSSPropertyCursor: |
1801 case CSSPropertyDirection: | 1852 case CSSPropertyDirection: |
1802 case CSSPropertyDisplay: | 1853 case CSSPropertyDisplay: |
1803 case CSSPropertyEmptyCells: | 1854 case CSSPropertyEmptyCells: |
1804 case CSSPropertyFloat: | 1855 case CSSPropertyFloat: |
1805 case CSSPropertyFontKerning: | 1856 case CSSPropertyFontKerning: |
1806 case CSSPropertyFontSize: | 1857 case CSSPropertyFontSize: |
| 1858 case CSSPropertyFontStretch: |
1807 case CSSPropertyFontStyle: | 1859 case CSSPropertyFontStyle: |
1808 case CSSPropertyFontVariant: | 1860 case CSSPropertyFontVariant: |
1809 case CSSPropertyFontVariantLigatures: | 1861 case CSSPropertyFontVariantLigatures: |
1810 case CSSPropertyFontWeight: | 1862 case CSSPropertyFontWeight: |
1811 case CSSPropertyHeight: | 1863 case CSSPropertyHeight: |
1812 case CSSPropertyImageRendering: | 1864 case CSSPropertyImageRendering: |
1813 case CSSPropertyIsolation: | 1865 case CSSPropertyIsolation: |
1814 case CSSPropertyLeft: | 1866 case CSSPropertyLeft: |
1815 case CSSPropertyLetterSpacing: | 1867 case CSSPropertyLetterSpacing: |
1816 case CSSPropertyLineHeight: | 1868 case CSSPropertyLineHeight: |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 break; | 2229 break; |
2178 } | 2230 } |
2179 case CSSPropertyEnableBackground: | 2231 case CSSPropertyEnableBackground: |
2180 // Silently ignoring this property for now | 2232 // Silently ignoring this property for now |
2181 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2233 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
2182 break; | 2234 break; |
2183 } | 2235 } |
2184 } | 2236 } |
2185 | 2237 |
2186 } // namespace WebCore | 2238 } // namespace WebCore |
OLD | NEW |