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

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

Issue 2952563002: Make PreviousRootInlineBoxCandidatePosition() to ignore nodes without layout object (Closed)
Patch Set: 2017-06-20T18:32:03 Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6b2f9149f8df5f2a57b0a5ebff194ce4bdec4445..88e68409e6e56889712a88e9de3c724ed6fd915d 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
@@ -1909,4 +1909,20 @@ TEST_F(VisibleUnitsTest,
EXPECT_EQ(Position(text, 2), start);
}
+TEST_F(VisibleUnitsTest,
+ PreviousRootInlineBoxCandidatePositionWithDisplayNone) {
+ SetBodyContent(
+ "<div contenteditable>"
+ "<div id=one>one abc</div>"
+ "<div id=two>two <b id=none style=display:none>def</b> ghi</div>"
+ "</div>");
+ Element* const one = GetDocument().getElementById("one");
+ Element* const two = GetDocument().getElementById("two");
+ const VisiblePosition& visible_position =
+ CreateVisiblePosition(Position::LastPositionInNode(two));
+ EXPECT_EQ(Position(one->firstChild(), 7),
+ PreviousRootInlineBoxCandidatePosition(
+ two->lastChild(), visible_position, kContentIsEditable));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698