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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 } else if (contentValue->isAttr()) { | 790 } else if (contentValue->isAttr()) { |
791 // FIXME: Can a namespace be specified for an attr(foo)? | 791 // FIXME: Can a namespace be specified for an attr(foo)? |
792 if (state.style()->styleType() == NOPSEUDO) | 792 if (state.style()->styleType() == NOPSEUDO) |
793 state.style()->setUnique(); | 793 state.style()->setUnique(); |
794 else | 794 else |
795 state.parentStyle()->setUnique(); | 795 state.parentStyle()->setUnique(); |
796 QualifiedName attr(nullAtom, AtomicString(contentValue->getStringVal
ue()), nullAtom); | 796 QualifiedName attr(nullAtom, AtomicString(contentValue->getStringVal
ue()), nullAtom); |
797 const AtomicString& value = state.element()->getAttribute(attr); | 797 const AtomicString& value = state.element()->getAttribute(attr); |
798 state.style()->setContent(value.isNull() ? emptyString() : value.str
ing(), didSet); | 798 state.style()->setContent(value.isNull() ? emptyString() : value.str
ing(), didSet); |
799 didSet = true; | 799 didSet = true; |
800 // register the fact that the attribute value affects the style | |
801 state.contentAttrValues().append(attr.localName()); | |
802 } else if (contentValue->isCounter()) { | 800 } else if (contentValue->isCounter()) { |
803 Counter* counterValue = contentValue->getCounterValue(); | 801 Counter* counterValue = contentValue->getCounterValue(); |
804 EListStyleType listStyleType = NoneListStyle; | 802 EListStyleType listStyleType = NoneListStyle; |
805 CSSValueID listStyleIdent = counterValue->listStyleIdent(); | 803 CSSValueID listStyleIdent = counterValue->listStyleIdent(); |
806 if (listStyleIdent != CSSValueNone) | 804 if (listStyleIdent != CSSValueNone) |
807 listStyleType = static_cast<EListStyleType>(listStyleIdent - CSS
ValueDisc); | 805 listStyleType = static_cast<EListStyleType>(listStyleIdent - CSS
ValueDisc); |
808 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(AtomicS
tring(counterValue->identifier()), listStyleType, AtomicString(counterValue->sep
arator()))); | 806 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(AtomicS
tring(counterValue->identifier()), listStyleType, AtomicString(counterValue->sep
arator()))); |
809 state.style()->setContent(counter.release(), didSet); | 807 state.style()->setContent(counter.release(), didSet); |
810 didSet = true; | 808 didSet = true; |
811 } else { | 809 } else { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 return; | 905 return; |
908 case CSSValueSuper: | 906 case CSSValueSuper: |
909 svgStyle.setBaselineShift(BS_SUPER); | 907 svgStyle.setBaselineShift(BS_SUPER); |
910 return; | 908 return; |
911 default: | 909 default: |
912 ASSERT_NOT_REACHED(); | 910 ASSERT_NOT_REACHED(); |
913 } | 911 } |
914 } | 912 } |
915 | 913 |
916 } // namespace blink | 914 } // namespace blink |
OLD | NEW |