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

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

Issue 2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T16:27:43 rebase to resolve conflict with DOMSelection in r452402 Created 3 years, 10 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/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index 09d6169c80837f812bbf427b7762cc6b2abc8c9c..e284266ef6b8c6fe0569917257f2e7352d0ef05a 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -63,7 +63,8 @@ TEST_F(FrameSelectionTest, SetValidSelection) {
SelectionInDOMTree::Builder()
.setBaseAndExtent(Position(text, 0), Position(text, 5))
.build());
- EXPECT_FALSE(selection().isNone());
+ EXPECT_FALSE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isNone());
}
TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout) {
@@ -208,9 +209,10 @@ TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot) {
Element* select = document().createElement("select");
document().replaceChild(select, document().documentElement());
selection().selectAll();
- EXPECT_TRUE(selection().isNone()) << "Nothing should be selected if the "
- "content of the documentElement is not "
- "selctable.";
+ EXPECT_TRUE(selection().computeVisibleSelectionInDOMTreeDeprecated().isNone())
+ << "Nothing should be selected if the "
+ "content of the documentElement is not "
+ "selctable.";
}
TEST_F(FrameSelectionTest, SelectAllPreservesHandle) {

Powered by Google App Engine
This is Rietveld 408576698