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

Unified Diff: third_party/WebKit/Source/core/dom/RangeTest.cpp

Issue 2792953002: Fix unexpected erasing textQuad (Closed)
Patch Set: comment added. Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/RangeTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/RangeTest.cpp b/third_party/WebKit/Source/core/dom/RangeTest.cpp
index d321dcf26926c354f22fcca1513d3160b6928ac3..ddf5150870ac8d9b058de89ebf5fa4f47856fa92 100644
--- a/third_party/WebKit/Source/core/dom/RangeTest.cpp
+++ b/third_party/WebKit/Source/core/dom/RangeTest.cpp
@@ -239,4 +239,14 @@ TEST_F(RangeTest, ExpandNotCrash) {
range->expand("", ASSERT_NO_EXCEPTION);
}
+TEST_F(RangeTest, MultipleTextQuads) {
+ setBodyContent("<div><p id='one'>one</p><p id='two'>two</p></div>");
+ Position start(document().getElementById("one")->firstChild(), 0);
+ Position end(document().getElementById("two")->firstChild(), 3);
+ Range* range = Range::create(document(), start, end);
+ Vector<FloatQuad> quads;
+ range->textQuads(quads);
+ EXPECT_EQ(2u, quads.size());
+}
+
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698