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

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

Issue 2233333002: Made StylePropertySet::setProperty take a const CSSValue& instead of ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 void setBooleanAttribute(const QualifiedName&, bool); 284 void setBooleanAttribute(const QualifiedName&, bool);
285 285
286 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; } 286 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; }
287 void invalidateStyleAttribute(); 287 void invalidateStyleAttribute();
288 288
289 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; } 289 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; }
290 290
291 void setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false); 291 void setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false);
292 void setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false); 292 void setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false);
293 // TODO(sashab): Make this take a const CSSValue&.
293 void setInlineStyleProperty(CSSPropertyID, const CSSValue*, bool important = false); 294 void setInlineStyleProperty(CSSPropertyID, const CSSValue*, bool important = false);
294 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false); 295 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false);
295 296
296 bool removeInlineStyleProperty(CSSPropertyID); 297 bool removeInlineStyleProperty(CSSPropertyID);
297 void removeAllInlineStyleProperties(); 298 void removeAllInlineStyleProperties();
298 299
299 void synchronizeStyleAttributeInternal() const; 300 void synchronizeStyleAttributeInternal() const;
300 301
301 const StylePropertySet* presentationAttributeStyle(); 302 const StylePropertySet* presentationAttributeStyle();
302 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; } 303 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa lse; }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 595
595 protected: 596 protected:
596 Element(const QualifiedName& tagName, Document*, ConstructionType); 597 Element(const QualifiedName& tagName, Document*, ConstructionType);
597 598
598 const ElementData* elementData() const { return m_elementData.get(); } 599 const ElementData* elementData() const { return m_elementData.get(); }
599 UniqueElementData& ensureUniqueElementData(); 600 UniqueElementData& ensureUniqueElementData();
600 601
601 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); 602 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier);
602 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType); 603 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType);
603 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); 604 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value);
605 // TODO(sashab): Make this take a const CSSValue&.
604 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const CSSValue*); 606 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const CSSValue*);
605 607
606 InsertionNotificationRequest insertedInto(ContainerNode*) override; 608 InsertionNotificationRequest insertedInto(ContainerNode*) override;
607 void removedFrom(ContainerNode*) override; 609 void removedFrom(ContainerNode*) override;
608 void childrenChanged(const ChildrenChange&) override; 610 void childrenChanged(const ChildrenChange&) override;
609 611
610 virtual void willRecalcStyle(StyleRecalcChange); 612 virtual void willRecalcStyle(StyleRecalcChange);
611 virtual void didRecalcStyle(StyleRecalcChange); 613 virtual void didRecalcStyle(StyleRecalcChange);
612 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject(); 614 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject();
613 615
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 static T* create(const QualifiedName&, Document&) 983 static T* create(const QualifiedName&, Document&)
982 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 984 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
983 T* T::create(const QualifiedName& tagName, Document& document) \ 985 T* T::create(const QualifiedName& tagName, Document& document) \
984 { \ 986 { \
985 return new T(tagName, document); \ 987 return new T(tagName, document); \
986 } 988 }
987 989
988 } // namespace blink 990 } // namespace blink
989 991
990 #endif // Element_h 992 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StylePropertySet.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698