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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1356 { | 1356 { |
1357 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal) { | 1357 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal) { |
1358 state.fontBuilder().setFeatureSettingsNormal(); | 1358 state.fontBuilder().setFeatureSettingsNormal(); |
1359 return; | 1359 return; |
1360 } | 1360 } |
1361 | 1361 |
1362 if (value->isValueList()) | 1362 if (value->isValueList()) |
1363 state.fontBuilder().setFeatureSettingsValue(value); | 1363 state.fontBuilder().setFeatureSettingsValue(value); |
1364 } | 1364 } |
1365 | 1365 |
1366 void StyleBuilderFunctions::applyInheritCSSPropertyBaselineShift(StyleResolverSt ate& state) | |
1367 { | |
1368 const SVGRenderStyle* parentSvgStyle = state.parentStyle()->svgStyle(); | |
1369 EBaselineShift baselineShift = parentSvgStyle->baselineShift(); | |
1370 SVGRenderStyle* svgStyle = state.style()->accessSVGStyle(); | |
1371 svgStyle->setBaselineShift(baselineShift); | |
pdr.
2014/06/24 19:56:33
Can this lead to either svgStyle or parentSvgStyle
Timothy Loh
2014/06/25 01:33:46
I'm pretty sure this is fine.
fs
2014/06/25 08:02:26
This is:
void setBaselineShift(EBaselineShift val
| |
1372 if (baselineShift == BS_LENGTH) | |
1373 svgStyle->setBaselineShiftValue(parentSvgStyle->baselineShiftValue()); | |
1374 } | |
1366 | 1375 |
1367 void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(StyleResolverStat e& state, CSSValue* value) | 1376 void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(StyleResolverStat e& state, CSSValue* value) |
1368 { | 1377 { |
1369 if (!value->isPrimitiveValue()) | 1378 if (!value->isPrimitiveValue()) |
1370 return; | 1379 return; |
1371 | 1380 |
1372 SVGRenderStyle* svgStyle = state.style()->accessSVGStyle(); | 1381 SVGRenderStyle* svgStyle = state.style()->accessSVGStyle(); |
1373 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 1382 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
1374 if (primitiveValue->getValueID()) { | 1383 if (primitiveValue->getValueID()) { |
1375 switch (primitiveValue->getValueID()) { | 1384 switch (primitiveValue->getValueID()) { |
1376 case CSSValueBaseline: | 1385 case CSSValueBaseline: |
1377 svgStyle->setBaselineShift(BS_BASELINE); | 1386 svgStyle->setBaselineShift(BS_BASELINE); |
1378 break; | 1387 break; |
1379 case CSSValueSub: | 1388 case CSSValueSub: |
1380 svgStyle->setBaselineShift(BS_SUB); | 1389 svgStyle->setBaselineShift(BS_SUB); |
1381 break; | 1390 break; |
1382 case CSSValueSuper: | 1391 case CSSValueSuper: |
1383 svgStyle->setBaselineShift(BS_SUPER); | 1392 svgStyle->setBaselineShift(BS_SUPER); |
1384 break; | 1393 break; |
1385 default: | 1394 default: |
1386 break; | 1395 break; |
1387 } | 1396 } |
1388 } else { | 1397 } else { |
1389 svgStyle->setBaselineShift(BS_LENGTH); | 1398 svgStyle->setBaselineShift(BS_LENGTH); |
1390 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti veValue)); | 1399 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti veValue)); |
1391 } | 1400 } |
1392 } | 1401 } |
1393 | 1402 |
1394 } // namespace WebCore | 1403 } // namespace WebCore |
OLD | NEW |