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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.h

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Created 4 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
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-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class MutableStylePropertySet; 61 class MutableStylePropertySet;
62 class NodeIntersectionObserverData; 62 class NodeIntersectionObserverData;
63 class PropertySetCSSStyleDeclaration; 63 class PropertySetCSSStyleDeclaration;
64 class PseudoElement; 64 class PseudoElement;
65 class ScrollState; 65 class ScrollState;
66 class ScrollStateCallback; 66 class ScrollStateCallback;
67 class ScrollToOptions; 67 class ScrollToOptions;
68 class ShadowRoot; 68 class ShadowRoot;
69 class ShadowRootInit; 69 class ShadowRootInit;
70 class StylePropertySet; 70 class StylePropertySet;
71 class StylePropertyMap;
71 72
72 enum SpellcheckAttributeState { 73 enum SpellcheckAttributeState {
73 SpellcheckAttributeTrue, 74 SpellcheckAttributeTrue,
74 SpellcheckAttributeFalse, 75 SpellcheckAttributeFalse,
75 SpellcheckAttributeDefault 76 SpellcheckAttributeDefault
76 }; 77 };
77 78
78 enum ElementFlags { 79 enum ElementFlags {
79 TabIndexWasSetExplicitly = 1 << 0, 80 TabIndexWasSetExplicitly = 1 << 0,
80 StyleAffectedByEmpty = 1 << 1, 81 StyleAffectedByEmpty = 1 << 1,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 RawPtr<Attr> setAttributeNode(Attr*, ExceptionState&); 237 RawPtr<Attr> setAttributeNode(Attr*, ExceptionState&);
237 RawPtr<Attr> setAttributeNodeNS(Attr*, ExceptionState&); 238 RawPtr<Attr> setAttributeNodeNS(Attr*, ExceptionState&);
238 RawPtr<Attr> removeAttributeNode(Attr*, ExceptionState&); 239 RawPtr<Attr> removeAttributeNode(Attr*, ExceptionState&);
239 240
240 RawPtr<Attr> attrIfExists(const QualifiedName&); 241 RawPtr<Attr> attrIfExists(const QualifiedName&);
241 RawPtr<Attr> ensureAttr(const QualifiedName&); 242 RawPtr<Attr> ensureAttr(const QualifiedName&);
242 243
243 AttrNodeList* attrNodeList(); 244 AttrNodeList* attrNodeList();
244 245
245 CSSStyleDeclaration* style(); 246 CSSStyleDeclaration* style();
247 StylePropertyMap* styleMap();
246 248
247 const QualifiedName& tagQName() const { return m_tagName; } 249 const QualifiedName& tagQName() const { return m_tagName; }
248 String tagName() const { return nodeName(); } 250 String tagName() const { return nodeName(); }
249 251
250 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match es(tagName); } 252 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match es(tagName); }
251 bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNo de::hasTagName(tagName); } 253 bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNo de::hasTagName(tagName); }
252 bool hasTagName(const SVGQualifiedName& tagName) const { return ContainerNod e::hasTagName(tagName); } 254 bool hasTagName(const SVGQualifiedName& tagName) const { return ContainerNod e::hasTagName(tagName); }
253 255
254 // Should be called only by Document::createElementNS to fix up m_tagName im mediately after construction. 256 // Should be called only by Document::createElementNS to fix up m_tagName im mediately after construction.
255 void setTagNameForCreateElementNS(const QualifiedName&); 257 void setTagNameForCreateElementNS(const QualifiedName&);
(...skipping 15 matching lines...) Expand all
271 273
272 void scheduleSVGFilterLayerUpdateHack(); 274 void scheduleSVGFilterLayerUpdateHack();
273 275
274 void setBooleanAttribute(const QualifiedName&, bool); 276 void setBooleanAttribute(const QualifiedName&, bool);
275 277
276 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; } 278 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; }
277 void invalidateStyleAttribute(); 279 void invalidateStyleAttribute();
278 280
279 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; } 281 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; }
280 282
281 bool setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false); 283 void setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false);
282 bool setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false); 284 void setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false);
285 void setInlineStyleProperty(CSSPropertyID, CSSValue*, bool important = false );
283 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false); 286 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false);
287
284 bool removeInlineStyleProperty(CSSPropertyID); 288 bool removeInlineStyleProperty(CSSPropertyID);
285 void removeAllInlineStyleProperties(); 289 void removeAllInlineStyleProperties();
286 290
287 void synchronizeStyleAttributeInternal() const; 291 void synchronizeStyleAttributeInternal() const;
288 292
289 const StylePropertySet* presentationAttributeStyle(); 293 const StylePropertySet* presentationAttributeStyle();
290 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; } 294 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; }
291 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) { } 295 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) { }
292 296
293 // For exposing to DOM only. 297 // For exposing to DOM only.
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 static RawPtr<T> create(const QualifiedName&, Document&) 956 static RawPtr<T> create(const QualifiedName&, Document&)
953 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 957 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
954 RawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 958 RawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
955 { \ 959 { \
956 return new T(tagName, document); \ 960 return new T(tagName, document); \
957 } 961 }
958 962
959 } // namespace blink 963 } // namespace blink
960 964
961 #endif // Element_h 965 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698