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

Side by Side Diff: sky/engine/core/dom/TreeScope.h

Issue 796713002: Turn StyleSharing to 11. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 20 matching lines...) Expand all
31 #include "sky/engine/platform/heap/Handle.h" 31 #include "sky/engine/platform/heap/Handle.h"
32 #include "sky/engine/wtf/text/AtomicString.h" 32 #include "sky/engine/wtf/text/AtomicString.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class ContainerNode; 36 class ContainerNode;
37 class DOMSelection; 37 class DOMSelection;
38 class Document; 38 class Document;
39 class Element; 39 class Element;
40 class HitTestResult; 40 class HitTestResult;
41 class Node;
41 class ScopedStyleResolver; 42 class ScopedStyleResolver;
42 class Node;
43 43
44 // A class which inherits both Node and TreeScope must call clearRareData() in i ts destructor 44 // A class which inherits both Node and TreeScope must call clearRareData() in i ts destructor
45 // so that the Node destructor no longer does problematic NodeList cache manipul ation in 45 // so that the Node destructor no longer does problematic NodeList cache manipul ation in
46 // the destructor. 46 // the destructor.
47 class TreeScope { 47 class TreeScope {
48 public: 48 public:
49 TreeScope* parentTreeScope() const { return m_parentTreeScope; } 49 TreeScope* parentTreeScope() const { return m_parentTreeScope; }
50 50
51 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope& ) const; 51 bool isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(const TreeScope& ) const;
52 52
(...skipping 17 matching lines...) Expand all
70 70
71 DOMSelection* getSelection() const; 71 DOMSelection* getSelection() const;
72 72
73 bool applyAuthorStyles() const; 73 bool applyAuthorStyles() const;
74 74
75 // Used by the basic DOM mutation methods (e.g., appendChild()). 75 // Used by the basic DOM mutation methods (e.g., appendChild()).
76 void adoptIfNeeded(Node&); 76 void adoptIfNeeded(Node&);
77 77
78 ContainerNode& rootNode() const { return *m_rootNode; } 78 ContainerNode& rootNode() const { return *m_rootNode; }
79 79
80 bool hasSameStyles(TreeScope&);
80 81
81 #if !ENABLE(OILPAN) 82 #if !ENABLE(OILPAN)
82 // Nodes belonging to this scope hold guard references - 83 // Nodes belonging to this scope hold guard references -
83 // these are enough to keep the scope from being destroyed, but 84 // these are enough to keep the scope from being destroyed, but
84 // not enough to keep it from removing its children. This allows a 85 // not enough to keep it from removing its children. This allows a
85 // node that outlives its scope to still have a valid document 86 // node that outlives its scope to still have a valid document
86 // pointer without introducing reference cycles. 87 // pointer without introducing reference cycles.
87 void guardRef() 88 void guardRef()
88 { 89 {
89 ASSERT(!deletionHasBegun()); 90 ASSERT(!deletionHasBegun());
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 }; 170 };
170 171
171 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) 172 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
172 173
173 HitTestResult hitTestInDocument(const Document*, int x, int y); 174 HitTestResult hitTestInDocument(const Document*, int x, int y);
174 TreeScope* commonTreeScope(Node*, Node*); 175 TreeScope* commonTreeScope(Node*, Node*);
175 176
176 } // namespace blink 177 } // namespace blink
177 178
178 #endif // SKY_ENGINE_CORE_DOM_TREESCOPE_H_ 179 #endif // SKY_ENGINE_CORE_DOM_TREESCOPE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698