| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 void StyleBuilderFunctions::applyValueCSSPropertyCursor(StyleResolverState& stat
e, CSSValue* value) | 218 void StyleBuilderFunctions::applyValueCSSPropertyCursor(StyleResolverState& stat
e, CSSValue* value) |
| 219 { | 219 { |
| 220 state.style()->clearCursorList(); | 220 state.style()->clearCursorList(); |
| 221 if (value->isValueList()) { | 221 if (value->isValueList()) { |
| 222 CSSValueList* list = toCSSValueList(value); | 222 CSSValueList* list = toCSSValueList(value); |
| 223 int len = list->length(); | 223 int len = list->length(); |
| 224 state.style()->setCursor(CURSOR_AUTO); | 224 state.style()->setCursor(CURSOR_AUTO); |
| 225 for (int i = 0; i < len; i++) { | 225 for (int i = 0; i < len; i++) { |
| 226 CSSValue* item = list->itemWithoutBoundsCheck(i); | 226 CSSValue* item = list->item(i); |
| 227 if (item->isCursorImageValue()) { | 227 if (item->isCursorImageValue()) { |
| 228 CSSCursorImageValue* image = toCSSCursorImageValue(item); | 228 CSSCursorImageValue* image = toCSSCursorImageValue(item); |
| 229 if (image->updateIfSVGCursorIsUsed(state.element())) // Elements
with SVG cursors are not allowed to share style. | 229 if (image->updateIfSVGCursorIsUsed(state.element())) // Elements
with SVG cursors are not allowed to share style. |
| 230 state.style()->setUnique(); | 230 state.style()->setUnique(); |
| 231 state.style()->addCursor(state.styleImage(CSSPropertyCursor, ima
ge), image->hotSpot()); | 231 state.style()->addCursor(state.styleImage(CSSPropertyCursor, ima
ge), image->hotSpot()); |
| 232 } else { | 232 } else { |
| 233 state.style()->setCursor(*toCSSPrimitiveValue(item)); | 233 state.style()->setCursor(*toCSSPrimitiveValue(item)); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 } else { | 236 } else { |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextEmphasisStyle(StyleRe
solverState& state, CSSValue* value) | 1025 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextEmphasisStyle(StyleRe
solverState& state, CSSValue* value) |
| 1026 { | 1026 { |
| 1027 if (value->isValueList()) { | 1027 if (value->isValueList()) { |
| 1028 CSSValueList* list = toCSSValueList(value); | 1028 CSSValueList* list = toCSSValueList(value); |
| 1029 ASSERT(list->length() == 2); | 1029 ASSERT(list->length() == 2); |
| 1030 if (list->length() != 2) | 1030 if (list->length() != 2) |
| 1031 return; | 1031 return; |
| 1032 for (unsigned i = 0; i < 2; ++i) { | 1032 for (unsigned i = 0; i < 2; ++i) { |
| 1033 CSSValue* item = list->itemWithoutBoundsCheck(i); | 1033 CSSValue* item = list->item(i); |
| 1034 if (!item->isPrimitiveValue()) | 1034 if (!item->isPrimitiveValue()) |
| 1035 continue; | 1035 continue; |
| 1036 | 1036 |
| 1037 CSSPrimitiveValue* value = toCSSPrimitiveValue(item); | 1037 CSSPrimitiveValue* value = toCSSPrimitiveValue(item); |
| 1038 if (value->getValueID() == CSSValueFilled || value->getValueID() ==
CSSValueOpen) | 1038 if (value->getValueID() == CSSValueFilled || value->getValueID() ==
CSSValueOpen) |
| 1039 state.style()->setTextEmphasisFill(*value); | 1039 state.style()->setTextEmphasisFill(*value); |
| 1040 else | 1040 else |
| 1041 state.style()->setTextEmphasisMark(*value); | 1041 state.style()->setTextEmphasisMark(*value); |
| 1042 } | 1042 } |
| 1043 state.style()->setTextEmphasisCustomMark(nullAtom); | 1043 state.style()->setTextEmphasisCustomMark(nullAtom); |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 default: | 1385 default: |
| 1386 break; | 1386 break; |
| 1387 } | 1387 } |
| 1388 } else { | 1388 } else { |
| 1389 svgStyle->setBaselineShift(BS_LENGTH); | 1389 svgStyle->setBaselineShift(BS_LENGTH); |
| 1390 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti
veValue)); | 1390 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti
veValue)); |
| 1391 } | 1391 } |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 } // namespace WebCore | 1394 } // namespace WebCore |
| OLD | NEW |