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

Side by Side Diff: Source/core/editing/DOMSelection.h

Issue 552733003: Oilpan: make DOMWindowProperty a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pacify GC plugin wrt LocalDOMWindow::trace() Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 30 matching lines...) Expand all
41 namespace blink { 41 namespace blink {
42 42
43 class ExceptionState; 43 class ExceptionState;
44 class LocalFrame; 44 class LocalFrame;
45 class Node; 45 class Node;
46 class Position; 46 class Position;
47 class Range; 47 class Range;
48 class TreeScope; 48 class TreeScope;
49 class VisibleSelection; 49 class VisibleSelection;
50 50
51 class DOMSelection FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOMS election>, public ScriptWrappable, public DOMWindowProperty { 51 class DOMSelection FINAL : public RefCountedWillBeGarbageCollected<DOMSelection> , public ScriptWrappable, public DOMWindowProperty {
52 DEFINE_WRAPPERTYPEINFO(); 52 DEFINE_WRAPPERTYPEINFO();
53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMSelection);
53 public: 54 public:
54 static PassRefPtrWillBeRawPtr<DOMSelection> create(const TreeScope* treeScop e) 55 static PassRefPtrWillBeRawPtr<DOMSelection> create(const TreeScope* treeScop e)
55 { 56 {
56 return adoptRefWillBeNoop(new DOMSelection(treeScope)); 57 return adoptRefWillBeNoop(new DOMSelection(treeScope));
57 } 58 }
58 59
59 void clearTreeScope(); 60 void clearTreeScope();
60 61
61 // Safari Selection Object API 62 // Safari Selection Object API
62 // These methods return the valid equivalents of internal editing positions. 63 // These methods return the valid equivalents of internal editing positions.
(...skipping 26 matching lines...) Expand all
89 void addRange(Range*); 90 void addRange(Range*);
90 void deleteFromDocument(); 91 void deleteFromDocument();
91 bool containsNode(const Node*, bool partlyContained) const; 92 bool containsNode(const Node*, bool partlyContained) const;
92 void selectAllChildren(Node*, ExceptionState&); 93 void selectAllChildren(Node*, ExceptionState&);
93 94
94 String toString(); 95 String toString();
95 96
96 // Microsoft Selection Object API 97 // Microsoft Selection Object API
97 void empty(); 98 void empty();
98 99
99 void trace(Visitor* visitor) { visitor->trace(m_treeScope); } 100 virtual void trace(Visitor*) OVERRIDE;
100 101
101 private: 102 private:
102 explicit DOMSelection(const TreeScope*); 103 explicit DOMSelection(const TreeScope*);
103 104
104 // Convenience method for accessors, does not check m_frame present. 105 // Convenience method for accessors, does not check m_frame present.
105 const VisibleSelection& visibleSelection() const; 106 const VisibleSelection& visibleSelection() const;
106 107
107 Node* shadowAdjustedNode(const Position&) const; 108 Node* shadowAdjustedNode(const Position&) const;
108 int shadowAdjustedOffset(const Position&) const; 109 int shadowAdjustedOffset(const Position&) const;
109 110
110 bool isValidForPosition(Node*) const; 111 bool isValidForPosition(Node*) const;
111 112
112 void addConsoleError(const String& message); 113 void addConsoleError(const String& message);
113 114
114 RawPtrWillBeMember<const TreeScope> m_treeScope; 115 RawPtrWillBeMember<const TreeScope> m_treeScope;
115 }; 116 };
116 117
117 } // namespace blink 118 } // namespace blink
118 119
119 #endif // DOMSelection_h 120 #endif // DOMSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698