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

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

Issue 59113007: Utilize PassRefPtr and C++ refs in more places in ShadowRoot code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make win build happier Created 7 years, 1 month 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 | « no previous file | Source/core/dom/Element.cpp » ('j') | Source/core/dom/Element.cpp » ('J')
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 bool supportsStyleSharing() const; 305 bool supportsStyleSharing() const;
306 306
307 ElementShadow* shadow() const; 307 ElementShadow* shadow() const;
308 ElementShadow& ensureShadow(); 308 ElementShadow& ensureShadow();
309 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&); 309 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&);
310 ShadowRoot* shadowRoot() const; 310 ShadowRoot* shadowRoot() const;
311 311
312 bool hasAuthorShadowRoot() const { return shadowRoot(); } 312 bool hasAuthorShadowRoot() const { return shadowRoot(); }
313 virtual void didAddShadowRoot(ShadowRoot&); 313 virtual void didAddShadowRoot(ShadowRoot&);
314 ShadowRoot* userAgentShadowRoot() const; 314 ShadowRoot* userAgentShadowRoot() const;
315 ShadowRoot* ensureUserAgentShadowRoot(); 315 ShadowRoot& ensureUserAgentShadowRoot();
316 const AtomicString& shadowPseudoId() const; 316 const AtomicString& shadowPseudoId() const;
317 317
318 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 318 RenderStyle* computedStyle(PseudoId = NOPSEUDO);
319 319
320 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.) 320 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.)
321 bool styleAffectedByEmpty() const { return hasRareData() && rareDataStyleAff ectedByEmpty(); } 321 bool styleAffectedByEmpty() const { return hasRareData() && rareDataStyleAff ectedByEmpty(); }
322 bool childrenAffectedByHover() const { return hasRareData() && rareDataChild renAffectedByHover(); } 322 bool childrenAffectedByHover() const { return hasRareData() && rareDataChild renAffectedByHover(); }
323 bool childrenAffectedByActive() const { return hasRareData() && rareDataChil drenAffectedByActive(); } 323 bool childrenAffectedByActive() const { return hasRareData() && rareDataChil drenAffectedByActive(); }
324 bool childrenAffectedByDrag() const { return hasRareData() && rareDataChildr enAffectedByDrag(); } 324 bool childrenAffectedByDrag() const { return hasRareData() && rareDataChildr enAffectedByDrag(); }
325 bool childrenAffectedByPositionalRules() const { return hasRareData() && (ra reDataChildrenAffectedByForwardPositionalRules() || rareDataChildrenAffectedByBa ckwardPositionalRules()); } 325 bool childrenAffectedByPositionalRules() const { return hasRareData() && (ra reDataChildrenAffectedByForwardPositionalRules() || rareDataChildrenAffectedByBa ckwardPositionalRules()); }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 void checkForChildrenAdjacentRuleChanges(); 568 void checkForChildrenAdjacentRuleChanges();
569 569
570 void updatePseudoElement(PseudoId, StyleRecalcChange); 570 void updatePseudoElement(PseudoId, StyleRecalcChange);
571 571
572 inline void createPseudoElementIfNeeded(PseudoId); 572 inline void createPseudoElementIfNeeded(PseudoId);
573 inline bool needsPseudoElement(PseudoId) const; 573 inline bool needsPseudoElement(PseudoId) const;
574 void createPseudoElement(PseudoId); 574 void createPseudoElement(PseudoId);
575 575
576 // FIXME: Everyone should allow author shadows. 576 // FIXME: Everyone should allow author shadows.
577 virtual bool areAuthorShadowsAllowed() const { return true; } 577 virtual bool areAuthorShadowsAllowed() const { return true; }
578 virtual void didAddUserAgentShadowRoot(ShadowRoot*) { } 578 virtual void didAddUserAgentShadowRoot(ShadowRoot&) { }
579 virtual bool alwaysCreateUserAgentShadowRoot() const { return false; } 579 virtual bool alwaysCreateUserAgentShadowRoot() const { return false; }
580 580
581 // FIXME: Remove the need for Attr to call willModifyAttribute/didModifyAttr ibute. 581 // FIXME: Remove the need for Attr to call willModifyAttribute/didModifyAttr ibute.
582 friend class Attr; 582 friend class Attr;
583 583
584 enum SynchronizationOfLazyAttribute { NotInSynchronizationOfLazyAttribute = 0, InSynchronizationOfLazyAttribute }; 584 enum SynchronizationOfLazyAttribute { NotInSynchronizationOfLazyAttribute = 0, InSynchronizationOfLazyAttribute };
585 585
586 void didAddAttribute(const QualifiedName&, const AtomicString&); 586 void didAddAttribute(const QualifiedName&, const AtomicString&);
587 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue); 587 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
588 void didModifyAttribute(const QualifiedName&, const AtomicString&); 588 void didModifyAttribute(const QualifiedName&, const AtomicString&);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 863 }
864 864
865 inline bool isShadowHost(const Element* element) 865 inline bool isShadowHost(const Element* element)
866 { 866 {
867 return element && element->shadow(); 867 return element && element->shadow();
868 } 868 }
869 869
870 } // namespace 870 } // namespace
871 871
872 #endif 872 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698