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

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

Issue 800633004: ShadowRoot's getSelection().getRangeAt(0) returns an incorrect Range object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Microsoft Selection Object API 96 // Microsoft Selection Object API
97 void empty(); 97 void empty();
98 98
99 virtual void trace(Visitor*) override; 99 virtual void trace(Visitor*) override;
100 100
101 private: 101 private:
102 explicit DOMSelection(const TreeScope*); 102 explicit DOMSelection(const TreeScope*);
103 103
104 // Convenience method for accessors, does not check m_frame present. 104 // Convenience method for accessors, does not check m_frame present.
105 const VisibleSelection& visibleSelection() const; 105 const VisibleSelection& visibleSelection() const;
106 bool isInShadowTree() const;
106 107
108 Position shadowAdjustedPosition(const Position&) const;
107 Node* shadowAdjustedNode(const Position&) const; 109 Node* shadowAdjustedNode(const Position&) const;
108 int shadowAdjustedOffset(const Position&) const; 110 int shadowAdjustedOffset(const Position&) const;
109 111
110 bool isValidForPosition(Node*) const; 112 bool isValidForPosition(Node*) const;
111 113
112 void addConsoleError(const String& message); 114 void addConsoleError(const String& message);
113 115
114 RawPtrWillBeMember<const TreeScope> m_treeScope; 116 RawPtrWillBeMember<const TreeScope> m_treeScope;
115 }; 117 };
116 118
117 } // namespace blink 119 } // namespace blink
118 120
119 #endif // DOMSelection_h 121 #endif // DOMSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698