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

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

Issue 2760533004: CANCELLED Non-laid-out node should not be considered as user-select:contain (Closed)
Patch Set: 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/VisibleUnitsTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
index eef817703aad94da2366eb80bb9ba0f3301ebe54..f1c28a5b797070a55922a09a91e4f14a767d2ace 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
@@ -2037,4 +2037,14 @@ TEST_F(VisibleUnitsTest,
EXPECT_EQ(Position(text, 2), start);
}
+// Regression test for crbug.com/702756
+TEST_F(VisibleUnitsTest, canonicalizeSelectOutOfFlatTree) {
+ setBodyContent("<div id=host><select></select></div>");
+ setShadowContent("foo", "host");
+
+ Element* select = document().querySelector("select");
+ EXPECT_EQ(PositionInFlatTree(),
+ canonicalPositionOf(PositionInFlatTree::afterNode(select)));
yoichio 2017/03/21 06:48:43 Getting an node which is after of the node that do
yosin_UTC9 2017/03/21 08:48:51 Agree, we should not accept position not in flat t
Xiaocheng 2017/03/21 20:27:48 It's found when trying to remove layout update fro
yosin_UTC9 2017/03/22 03:19:28 Yes, this is valid for SelectionInDOMTree. But, no
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698