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

Side by Side Diff: Source/core/dom/shadow/InsertionPoint.h

Issue 202853003: A follow-up cleanup for removing resetStyleInheritance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/core/dom/shadow/InsertionPoint.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool isActive() const; 49 bool isActive() const;
50 bool canBeActive() const; 50 bool canBeActive() const;
51 51
52 bool isShadowInsertionPoint() const; 52 bool isShadowInsertionPoint() const;
53 bool isContentInsertionPoint() const; 53 bool isContentInsertionPoint() const;
54 54
55 PassRefPtr<NodeList> getDistributedNodes(); 55 PassRefPtr<NodeList> getDistributedNodes();
56 56
57 virtual bool canAffectSelector() const { return false; } 57 virtual bool canAffectSelector() const { return false; }
58 58
59 bool resetStyleInheritance() const;
60 void setResetStyleInheritance(bool);
61
62 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 59 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
63 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 60 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
64 61
65 bool shouldUseFallbackElements() const; 62 bool shouldUseFallbackElements() const;
66 63
67 size_t size() const { return m_distribution.size(); } 64 size_t size() const { return m_distribution.size(); }
68 Node* at(size_t index) const { return m_distribution.at(index).get(); } 65 Node* at(size_t index) const { return m_distribution.at(index).get(); }
69 Node* first() const { return m_distribution.isEmpty() ? 0 : m_distribution.f irst().get(); } 66 Node* first() const { return m_distribution.isEmpty() ? 0 : m_distribution.f irst().get(); }
70 Node* last() const { return m_distribution.isEmpty() ? 0 : m_distribution.la st().get(); } 67 Node* last() const { return m_distribution.isEmpty() ? 0 : m_distribution.la st().get(); }
71 Node* nextTo(const Node* node) const { return m_distribution.nextTo(node); } 68 Node* nextTo(const Node* node) const { return m_distribution.nextTo(node); }
72 Node* previousTo(const Node* node) const { return m_distribution.previousTo( node); } 69 Node* previousTo(const Node* node) const { return m_distribution.previousTo( node); }
73 70
74 protected: 71 protected:
75 InsertionPoint(const QualifiedName&, Document&); 72 InsertionPoint(const QualifiedName&, Document&);
76 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 73 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
77 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE; 74 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
78 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 75 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
79 virtual void removedFrom(ContainerNode*) OVERRIDE; 76 virtual void removedFrom(ContainerNode*) OVERRIDE;
80 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
81 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 77 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
82 78
83 private: 79 private:
84 ContentDistribution m_distribution; 80 ContentDistribution m_distribution;
85 bool m_registeredWithShadowRoot; 81 bool m_registeredWithShadowRoot;
86 }; 82 };
87 83
88 typedef Vector<RefPtr<InsertionPoint> > DestinationInsertionPoints; 84 typedef Vector<RefPtr<InsertionPoint> > DestinationInsertionPoints;
89 85
90 DEFINE_ELEMENT_TYPE_CASTS(InsertionPoint, isInsertionPoint()); 86 DEFINE_ELEMENT_TYPE_CASTS(InsertionPoint, isInsertionPoint());
(...skipping 22 matching lines...) Expand all
113 return 0; 109 return 0;
114 } 110 }
115 111
116 const InsertionPoint* resolveReprojection(const Node*); 112 const InsertionPoint* resolveReprojection(const Node*);
117 113
118 void collectDestinationInsertionPoints(const Node&, Vector<InsertionPoint*, 8>& results); 114 void collectDestinationInsertionPoints(const Node&, Vector<InsertionPoint*, 8>& results);
119 115
120 } // namespace WebCore 116 } // namespace WebCore
121 117
122 #endif // InsertionPoint_h 118 #endif // InsertionPoint_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/shadow/InsertionPoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698