| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 | 211 |
| 212 void StyleBuilderFunctions::applyValueCSSPropertyCursor( | 212 void StyleBuilderFunctions::applyValueCSSPropertyCursor( |
| 213 StyleResolverState& state, | 213 StyleResolverState& state, |
| 214 const CSSValue& value) { | 214 const CSSValue& value) { |
| 215 state.style()->clearCursorList(); | 215 state.style()->clearCursorList(); |
| 216 if (value.isValueList()) { | 216 if (value.isValueList()) { |
| 217 state.style()->setCursor(ECursor::kAuto); | 217 state.style()->setCursor(ECursor::kAuto); |
| 218 for (const auto& item : toCSSValueList(value)) { | 218 for (const auto& item : toCSSValueList(value)) { |
| 219 if (item->isCursorImageValue()) { | 219 if (item->isCursorImageValue()) { |
| 220 const CSSCursorImageValue& cursor = toCSSCursorImageValue(*item); | 220 const cssvalue::CSSCursorImageValue& cursor = |
| 221 cssvalue::toCSSCursorImageValue(*item); |
| 221 const CSSValue& image = cursor.imageValue(); | 222 const CSSValue& image = cursor.imageValue(); |
| 222 state.style()->addCursor(state.styleImage(CSSPropertyCursor, image), | 223 state.style()->addCursor(state.styleImage(CSSPropertyCursor, image), |
| 223 cursor.hotSpotSpecified(), cursor.hotSpot()); | 224 cursor.hotSpotSpecified(), cursor.hotSpot()); |
| 224 } else { | 225 } else { |
| 225 state.style()->setCursor( | 226 state.style()->setCursor( |
| 226 toCSSIdentifierValue(*item).convertTo<ECursor>()); | 227 toCSSIdentifierValue(*item).convertTo<ECursor>()); |
| 227 } | 228 } |
| 228 } | 229 } |
| 229 } else { | 230 } else { |
| 230 state.style()->setCursor(toCSSIdentifierValue(value).convertTo<ECursor>()); | 231 state.style()->setCursor(toCSSIdentifierValue(value).convertTo<ECursor>()); |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 | 717 |
| 717 ContentData* firstContent = nullptr; | 718 ContentData* firstContent = nullptr; |
| 718 ContentData* prevContent = nullptr; | 719 ContentData* prevContent = nullptr; |
| 719 for (auto& item : toCSSValueList(value)) { | 720 for (auto& item : toCSSValueList(value)) { |
| 720 ContentData* nextContent = nullptr; | 721 ContentData* nextContent = nullptr; |
| 721 if (item->isImageGeneratorValue() || item->isImageSetValue() || | 722 if (item->isImageGeneratorValue() || item->isImageSetValue() || |
| 722 item->isImageValue()) { | 723 item->isImageValue()) { |
| 723 nextContent = | 724 nextContent = |
| 724 ContentData::create(state.styleImage(CSSPropertyContent, *item)); | 725 ContentData::create(state.styleImage(CSSPropertyContent, *item)); |
| 725 } else if (item->isCounterValue()) { | 726 } else if (item->isCounterValue()) { |
| 726 const CSSCounterValue* counterValue = toCSSCounterValue(item.get()); | 727 const cssvalue::CSSCounterValue* counterValue = |
| 728 cssvalue::toCSSCounterValue(item.get()); |
| 727 const auto listStyleType = | 729 const auto listStyleType = |
| 728 cssValueIDToPlatformEnum<EListStyleType>(counterValue->listStyle()); | 730 cssValueIDToPlatformEnum<EListStyleType>(counterValue->listStyle()); |
| 729 std::unique_ptr<CounterContent> counter = | 731 std::unique_ptr<CounterContent> counter = |
| 730 WTF::wrapUnique(new CounterContent( | 732 WTF::wrapUnique(new CounterContent( |
| 731 AtomicString(counterValue->identifier()), listStyleType, | 733 AtomicString(counterValue->identifier()), listStyleType, |
| 732 AtomicString(counterValue->separator()))); | 734 AtomicString(counterValue->separator()))); |
| 733 nextContent = ContentData::create(std::move(counter)); | 735 nextContent = ContentData::create(std::move(counter)); |
| 734 } else if (item->isIdentifierValue()) { | 736 } else if (item->isIdentifierValue()) { |
| 735 QuoteType quoteType; | 737 QuoteType quoteType; |
| 736 switch (toCSSIdentifierValue(*item).getValueID()) { | 738 switch (toCSSIdentifierValue(*item).getValueID()) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 state.style()->setCaretColor( | 994 state.style()->setCaretColor( |
| 993 StyleBuilderConverter::convertStyleAutoColor(state, value)); | 995 StyleBuilderConverter::convertStyleAutoColor(state, value)); |
| 994 } | 996 } |
| 995 if (state.applyPropertyToVisitedLinkStyle()) { | 997 if (state.applyPropertyToVisitedLinkStyle()) { |
| 996 state.style()->setVisitedLinkCaretColor( | 998 state.style()->setVisitedLinkCaretColor( |
| 997 StyleBuilderConverter::convertStyleAutoColor(state, value, true)); | 999 StyleBuilderConverter::convertStyleAutoColor(state, value, true)); |
| 998 } | 1000 } |
| 999 } | 1001 } |
| 1000 | 1002 |
| 1001 } // namespace blink | 1003 } // namespace blink |
| OLD | NEW |