Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/WebCore/dom/StyledElement.h

Issue 14234005: CSP blocks style application in cloned nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSP blocks style application in cloned nodes Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/dom/Element.cpp ('k') | Source/WebCore/dom/StyledElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 const StylePropertySet* presentationAttributeStyle(); 60 const StylePropertySet* presentationAttributeStyle();
61 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) { } 61 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) { }
62 62
63 protected: 63 protected:
64 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp e type) 64 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp e type)
65 : Element(name, document, type) 65 : Element(name, document, type)
66 { 66 {
67 } 67 }
68 68
69 virtual void attributeChanged(const QualifiedName&, const AtomicString&) OVE RRIDE; 69 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE;
70 70
71 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; } 71 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; }
72 72
73 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, int identifier); 73 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, int identifier);
74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitTypes); 74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitTypes);
75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); 75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value);
76 76
77 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 77 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
78 78
79 private: 79 private:
80 void styleAttributeChanged(const AtomicString& newStyleString); 80 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi ficationReason);
81 81
82 void inlineStyleChanged(); 82 void inlineStyleChanged();
83 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); 83 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper();
84 void setInlineStyleFromString(const AtomicString&); 84 void setInlineStyleFromString(const AtomicString&);
85 MutableStylePropertySet* ensureMutableInlineStyle(); 85 MutableStylePropertySet* ensureMutableInlineStyle();
86 86
87 void makePresentationAttributeCacheKey(PresentationAttributeCacheKey&) const ; 87 void makePresentationAttributeCacheKey(PresentationAttributeCacheKey&) const ;
88 void rebuildPresentationAttributeStyle(); 88 void rebuildPresentationAttributeStyle();
89 }; 89 };
90 90
91 inline void StyledElement::invalidateStyleAttribute() 91 inline void StyledElement::invalidateStyleAttribute()
92 { 92 {
93 ASSERT(elementData()); 93 ASSERT(elementData());
94 elementData()->m_styleAttributeIsDirty = true; 94 elementData()->m_styleAttributeIsDirty = true;
95 } 95 }
96 96
97 inline const StylePropertySet* StyledElement::presentationAttributeStyle() 97 inline const StylePropertySet* StyledElement::presentationAttributeStyle()
98 { 98 {
99 if (!elementData()) 99 if (!elementData())
100 return 0; 100 return 0;
101 if (elementData()->m_presentationAttributeStyleIsDirty) 101 if (elementData()->m_presentationAttributeStyleIsDirty)
102 rebuildPresentationAttributeStyle(); 102 rebuildPresentationAttributeStyle();
103 return elementData()->presentationAttributeStyle(); 103 return elementData()->presentationAttributeStyle();
104 } 104 }
105 105
106 } //namespace 106 } //namespace
107 107
108 #endif 108 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Element.cpp ('k') | Source/WebCore/dom/StyledElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698