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

Unified Diff: third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html

Issue 1394833002: Find In Page doesn't correctly highlight wrapped text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/LayoutTests/fast/repaint/text-match-pre-wrapped-text-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html b/third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html
new file mode 100644
index 0000000000000000000000000000000000000000..c1dbf4b8862d6ff9ac7bc6da65bc6f79d05014af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/ahem.js"></script>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<pre id="demo" style="font-family: Ahem; width: 2em; white-space: pre-wrap">a b </pre>
+<p>Test for crbug.com/521047. Passes if find-in-page marker highlight is visible in both lines above.
+<script>
+function highlightRange(id, start, end, active) {
+ var range = document.createRange();
+ var elem = document.getElementById(id).firstChild;
+ range.setStart(elem, start);
+ range.setEnd(elem, end);
+ if (window.internals) {
+ window.internals.addTextMatchMarker(range, active);
+ window.internals.setMarkedTextMatchesAreHighlighted(document, true);
+ }
+}
+
+runAfterLayoutAndPaint(function() {
+ highlightRange('demo', 0, 4, true);
+}, true);
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698