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

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

Issue 129633003: Add a first pass of a class descendant invalidator, and a containing RuleSetAnalyzer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Implement tree walk for descendant class invalidation. Created 6 years, 11 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Element.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, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 303 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
304 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 304 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
305 virtual RenderObject* createRenderer(RenderStyle*); 305 virtual RenderObject* createRenderer(RenderStyle*);
306 virtual bool rendererIsNeeded(const RenderStyle&); 306 virtual bool rendererIsNeeded(const RenderStyle&);
307 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); 307 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0);
308 void didAffectSelector(AffectedSelectorMask); 308 void didAffectSelector(AffectedSelectorMask);
309 void setAnimationStyleChange(bool); 309 void setAnimationStyleChange(bool);
310 void setNeedsAnimationStyleRecalc(); 310 void setNeedsAnimationStyleRecalc();
311 311
312 bool needsInvalidation() const;
313
312 bool supportsStyleSharing() const; 314 bool supportsStyleSharing() const;
313 315
314 ElementShadow* shadow() const; 316 ElementShadow* shadow() const;
315 ElementShadow& ensureShadow(); 317 ElementShadow& ensureShadow();
316 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&); 318 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&);
317 ShadowRoot* shadowRoot() const; 319 ShadowRoot* shadowRoot() const;
318 ShadowRoot* youngestShadowRoot() const; 320 ShadowRoot* youngestShadowRoot() const;
319 321
320 bool hasAuthorShadowRoot() const { return shadowRoot(); } 322 bool hasAuthorShadowRoot() const { return shadowRoot(); }
321 virtual void didAddShadowRoot(ShadowRoot&); 323 virtual void didAddShadowRoot(ShadowRoot&);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 protected: 541 protected:
540 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype) 542 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype)
541 : ContainerNode(document, type) 543 : ContainerNode(document, type)
542 , m_tagName(tagName) 544 , m_tagName(tagName)
543 { 545 {
544 ScriptWrappable::init(this); 546 ScriptWrappable::init(this);
545 // FIXME: This RELEASE_ASSERT is temporary; the hope is to track down th e cause of http://crbug.com/312410 547 // FIXME: This RELEASE_ASSERT is temporary; the hope is to track down th e cause of http://crbug.com/312410
546 RELEASE_ASSERT(document); 548 RELEASE_ASSERT(document);
547 } 549 }
548 550
551 template<typename Checker>
552 bool checkSelectorForClassChange(const SpaceSplitString& changedClasses, con st Checker&);
553
554 template<typename Checker>
555 bool checkSelectorForClassChange(const SpaceSplitString& oldClasses, const S paceSplitString& newClasses, const Checker&);
556
557
549 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); 558 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier);
550 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitTypes); 559 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitTypes);
551 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); 560 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value);
552 561
553 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 562 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
554 virtual void removedFrom(ContainerNode*) OVERRIDE; 563 virtual void removedFrom(ContainerNode*) OVERRIDE;
555 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; 564 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
556 virtual void removeAllEventListeners() OVERRIDE; 565 virtual void removeAllEventListeners() OVERRIDE;
557 566
558 virtual void willRecalcStyle(StyleRecalcChange); 567 virtual void willRecalcStyle(StyleRecalcChange);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 } 905 }
897 906
898 inline bool isShadowHost(const Element* element) 907 inline bool isShadowHost(const Element* element)
899 { 908 {
900 return element && element->shadow(); 909 return element && element->shadow();
901 } 910 }
902 911
903 } // namespace 912 } // namespace
904 913
905 #endif 914 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698