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

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

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

Powered by Google App Engine
This is Rietveld 408576698