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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2731393004: Use EphemeralRange to construct StaticRange (Closed)
Patch Set: yosin's review: Fix nits Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index c4fd9c04fa9072c1e1cc67fcd884951b81944d23..683cb44d114b4ec48ce759fc0f46c5e90824bb14 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2087,14 +2087,17 @@ bool isTextSecurityNode(const Node* node) {
}
const StaticRangeVector* targetRangesForInputEvent(const Node& node) {
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. see http://crbug.com/590369 for more details.
+ node.document().updateStyleAndLayoutIgnorePendingStylesheets();
if (!hasRichlyEditableStyle(node))
return nullptr;
- Range* range = createRange(
+ const EphemeralRange& range =
firstEphemeralRangeOf(node.document()
.frame()
->selection()
- .computeVisibleSelectionInDOMTreeDeprecated()));
- if (!range)
+ .computeVisibleSelectionInDOMTreeDeprecated());
+ if (range.isNull())
return nullptr;
return new StaticRangeVector(1, StaticRange::create(range));
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/StaticRange.h ('k') | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698