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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a crashers (everything is building!) Created 5 years, 10 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 | Annotate | Revision Log
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 // Clones all attribute-derived data, including subclass specifics (through copyNonAttributeProperties.) 304 // Clones all attribute-derived data, including subclass specifics (through copyNonAttributeProperties.)
305 void cloneDataFromElement(const Element&); 305 void cloneDataFromElement(const Element&);
306 306
307 bool hasEquivalentAttributes(const Element* other) const; 307 bool hasEquivalentAttributes(const Element* other) const;
308 308
309 virtual void copyNonAttributePropertiesFromElement(const Element&) { } 309 virtual void copyNonAttributePropertiesFromElement(const Element&) { }
310 310
311 virtual void attach(const AttachContext& = AttachContext()) override; 311 virtual void attach(const AttachContext& = AttachContext()) override;
312 virtual void detach(const AttachContext& = AttachContext()) override; 312 virtual void detach(const AttachContext& = AttachContext()) override;
313 virtual RenderObject* createRenderer(RenderStyle*); 313 virtual RenderObject* createRenderer(const RenderStyle*);
314 virtual bool rendererIsNeeded(const RenderStyle&); 314 virtual bool rendererIsNeeded(const RenderStyle&);
315 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); 315 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr);
316 void pseudoStateChanged(CSSSelector::PseudoType); 316 void pseudoStateChanged(CSSSelector::PseudoType);
317 void setAnimationStyleChange(bool); 317 void setAnimationStyleChange(bool);
318 void setNeedsAnimationStyleRecalc(); 318 void setNeedsAnimationStyleRecalc();
319 319
320 void setNeedsCompositingUpdate(); 320 void setNeedsCompositingUpdate();
321 321
322 bool supportsStyleSharing() const; 322 bool supportsStyleSharing() const;
323 323
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 #ifndef NDEBUG 606 #ifndef NDEBUG
607 virtual void formatForDebugger(char* buffer, unsigned length) const override ; 607 virtual void formatForDebugger(char* buffer, unsigned length) const override ;
608 #endif 608 #endif
609 609
610 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle); 610 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle);
611 611
612 void cancelFocusAppearanceUpdate(); 612 void cancelFocusAppearanceUpdate();
613 613
614 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) override { return computedStyle(pseudoElementSpecifier); } 614 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) override { return computedStyle(pseudoElementSpecifier); }
615 615
616 inline void updateCallbackSelectors(RenderStyle* oldStyle, RenderStyle* newS tyle); 616 inline void updateCallbackSelectors(const RenderStyle* oldStyle, const Rende rStyle* newStyle);
617 inline void removeCallbackSelectors(); 617 inline void removeCallbackSelectors();
618 inline void addCallbackSelectors(); 618 inline void addCallbackSelectors();
619 619
620 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren 620 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren
621 // are used instead. 621 // are used instead.
622 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override; 622 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override;
623 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil dren(); 623 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil dren();
624 624
625 QualifiedName m_tagName; 625 QualifiedName m_tagName;
626 626
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 878 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
879 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 879 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
880 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 880 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
881 { \ 881 { \
882 return adoptRefWillBeNoop(new T(tagName, document)); \ 882 return adoptRefWillBeNoop(new T(tagName, document)); \
883 } 883 }
884 884
885 } // namespace 885 } // namespace
886 886
887 #endif // Element_h 887 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698