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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "core/css/StylePropertySet.h" | 59 #include "core/css/StylePropertySet.h" |
60 #include "core/css/StyleRule.h" | 60 #include "core/css/StyleRule.h" |
61 #include "core/css/resolver/CSSVariableResolver.h" | 61 #include "core/css/resolver/CSSVariableResolver.h" |
62 #include "core/css/resolver/ElementStyleResources.h" | 62 #include "core/css/resolver/ElementStyleResources.h" |
63 #include "core/css/resolver/FilterOperationResolver.h" | 63 #include "core/css/resolver/FilterOperationResolver.h" |
64 #include "core/css/resolver/FontBuilder.h" | 64 #include "core/css/resolver/FontBuilder.h" |
65 #include "core/css/resolver/StyleBuilder.h" | 65 #include "core/css/resolver/StyleBuilder.h" |
66 #include "core/css/resolver/TransformBuilder.h" | 66 #include "core/css/resolver/TransformBuilder.h" |
67 #include "core/frame/LocalFrame.h" | 67 #include "core/frame/LocalFrame.h" |
68 #include "core/frame/Settings.h" | 68 #include "core/frame/Settings.h" |
| 69 #include "core/style/ComputedStyle.h" |
| 70 #include "core/style/ComputedStyleConstants.h" |
69 #include "core/style/ContentData.h" | 71 #include "core/style/ContentData.h" |
70 #include "core/style/CounterContent.h" | 72 #include "core/style/CounterContent.h" |
71 #include "core/style/ComputedStyle.h" | |
72 #include "core/style/ComputedStyleConstants.h" | |
73 #include "core/style/QuotesData.h" | 73 #include "core/style/QuotesData.h" |
74 #include "core/style/SVGComputedStyle.h" | 74 #include "core/style/SVGComputedStyle.h" |
75 #include "core/style/StyleGeneratedImage.h" | 75 #include "core/style/StyleGeneratedImage.h" |
76 #include "core/style/StyleVariableData.h" | 76 #include "core/style/StyleVariableData.h" |
77 #include "platform/fonts/FontDescription.h" | 77 #include "platform/fonts/FontDescription.h" |
78 #include "wtf/MathExtras.h" | 78 #include "wtf/MathExtras.h" |
| 79 #include "wtf/PtrUtil.h" |
79 #include "wtf/StdLibExtras.h" | 80 #include "wtf/StdLibExtras.h" |
80 #include "wtf/Vector.h" | 81 #include "wtf/Vector.h" |
| 82 #include <memory> |
81 | 83 |
82 namespace blink { | 84 namespace blink { |
83 | 85 |
84 namespace { | 86 namespace { |
85 | 87 |
86 static inline bool isValidVisitedLinkProperty(CSSPropertyID id) | 88 static inline bool isValidVisitedLinkProperty(CSSPropertyID id) |
87 { | 89 { |
88 switch (id) { | 90 switch (id) { |
89 case CSSPropertyBackgroundColor: | 91 case CSSPropertyBackgroundColor: |
90 case CSSPropertyBorderLeftColor: | 92 case CSSPropertyBorderLeftColor: |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 for (auto& item : toCSSValueList(value)) { | 702 for (auto& item : toCSSValueList(value)) { |
701 ContentData* nextContent = nullptr; | 703 ContentData* nextContent = nullptr; |
702 if (item->isImageGeneratorValue() || item->isImageSetValue() || item->is
ImageValue()) { | 704 if (item->isImageGeneratorValue() || item->isImageSetValue() || item->is
ImageValue()) { |
703 nextContent = ContentData::create(state.styleImage(CSSPropertyConten
t, *item)); | 705 nextContent = ContentData::create(state.styleImage(CSSPropertyConten
t, *item)); |
704 } else if (item->isCounterValue()) { | 706 } else if (item->isCounterValue()) { |
705 const CSSCounterValue* counterValue = toCSSCounterValue(item.get()); | 707 const CSSCounterValue* counterValue = toCSSCounterValue(item.get()); |
706 EListStyleType listStyleType = NoneListStyle; | 708 EListStyleType listStyleType = NoneListStyle; |
707 CSSValueID listStyleIdent = counterValue->listStyle(); | 709 CSSValueID listStyleIdent = counterValue->listStyle(); |
708 if (listStyleIdent != CSSValueNone) | 710 if (listStyleIdent != CSSValueNone) |
709 listStyleType = static_cast<EListStyleType>(listStyleIdent - CSS
ValueDisc); | 711 listStyleType = static_cast<EListStyleType>(listStyleIdent - CSS
ValueDisc); |
710 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(AtomicS
tring(counterValue->identifier()), listStyleType, AtomicString(counterValue->sep
arator()))); | 712 std::unique_ptr<CounterContent> counter = wrapUnique(new CounterCont
ent(AtomicString(counterValue->identifier()), listStyleType, AtomicString(counte
rValue->separator()))); |
711 nextContent = ContentData::create(std::move(counter)); | 713 nextContent = ContentData::create(std::move(counter)); |
712 } else if (item->isPrimitiveValue()) { | 714 } else if (item->isPrimitiveValue()) { |
713 QuoteType quoteType; | 715 QuoteType quoteType; |
714 switch (toCSSPrimitiveValue(*item).getValueID()) { | 716 switch (toCSSPrimitiveValue(*item).getValueID()) { |
715 default: | 717 default: |
716 NOTREACHED(); | 718 NOTREACHED(); |
717 case CSSValueOpenQuote: | 719 case CSSValueOpenQuote: |
718 quoteType = OPEN_QUOTE; | 720 quoteType = OPEN_QUOTE; |
719 break; | 721 break; |
720 case CSSValueCloseQuote: | 722 case CSSValueCloseQuote: |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 } | 873 } |
872 } | 874 } |
873 | 875 |
874 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(StyleResolverState&
state) | 876 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(StyleResolverState&
state) |
875 { | 877 { |
876 if (!state.parentNode()->isDocumentNode()) | 878 if (!state.parentNode()->isDocumentNode()) |
877 state.style()->setPosition(state.parentStyle()->position()); | 879 state.style()->setPosition(state.parentStyle()->position()); |
878 } | 880 } |
879 | 881 |
880 } // namespace blink | 882 } // namespace blink |
OLD | NEW |