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

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

Issue 467503002: Move DOMSelection.[cpp/h] from core/page to core/editing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/editing/DOMSelection.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) 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 class DOMSelection FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOMS election>, public ScriptWrappable, public DOMWindowProperty { 51 class DOMSelection FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOMS election>, public ScriptWrappable, public DOMWindowProperty {
52 public: 52 public:
53 static PassRefPtrWillBeRawPtr<DOMSelection> create(const TreeScope* treeScop e) 53 static PassRefPtrWillBeRawPtr<DOMSelection> create(const TreeScope* treeScop e)
54 { 54 {
55 return adoptRefWillBeNoop(new DOMSelection(treeScope)); 55 return adoptRefWillBeNoop(new DOMSelection(treeScope));
56 } 56 }
57 57
58 void clearTreeScope(); 58 void clearTreeScope();
59 59
60 // FIXME: Reorder API functions according to Selection.idl.
61 // Safari Selection Object API 60 // Safari Selection Object API
62 // These methods return the valid equivalents of internal editing positions. 61 // These methods return the valid equivalents of internal editing positions.
63 Node* baseNode() const; 62 Node* baseNode() const;
63 int baseOffset() const;
64 Node* extentNode() const; 64 Node* extentNode() const;
65 int baseOffset() const;
66 int extentOffset() const; 65 int extentOffset() const;
67 String type() const; 66 String type() const;
68 void setBaseAndExtent(Node* baseNode, int baseOffset, Node* extentNode, int extentOffset, ExceptionState&); 67 void setBaseAndExtent(Node* baseNode, int baseOffset, Node* extentNode, int extentOffset, ExceptionState&);
69 void modify(const String& alter, const String& direction, const String& gran ularity); 68 void modify(const String& alter, const String& direction, const String& gran ularity);
70 69
71 // Mozilla Selection Object API 70 // Mozilla Selection Object API
72 // In Firefox, anchor/focus are the equal to the start/end of the selection, 71 // In Firefox, anchor/focus are the equal to the start/end of the selection,
73 // but reflect the direction in which the selection was made by the user. Th at does 72 // but reflect the direction in which the selection was made by the user. Th at does
74 // not mean that they are base/extent, since the base/extent don't reflect 73 // not mean that they are base/extent, since the base/extent don't reflect
75 // expansion. 74 // expansion.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool isValidForPosition(Node*) const; 111 bool isValidForPosition(Node*) const;
113 112
114 void addConsoleError(const String& message); 113 void addConsoleError(const String& message);
115 114
116 RawPtrWillBeMember<const TreeScope> m_treeScope; 115 RawPtrWillBeMember<const TreeScope> m_treeScope;
117 }; 116 };
118 117
119 } // namespace blink 118 } // namespace blink
120 119
121 #endif // DOMSelection_h 120 #endif // DOMSelection_h
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/editing/DOMSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698