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

Unified Diff: LayoutTests/fast/repaint/text-match-document-change.html

Issue 1053123007: Invalidate paint of tickmarks on document change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/repaint/text-match-document-change-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/repaint/text-match-document-change.html
diff --git a/LayoutTests/fast/repaint/text-match-document-change.html b/LayoutTests/fast/repaint/text-match-document-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..7f83978c15553437f90fd66fa7ef8c47cf963061
--- /dev/null
+++ b/LayoutTests/fast/repaint/text-match-document-change.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<script src="resources/text-based-repaint.js"></script>
+<script>
+function highlightRange(id, start, end) {
+ var frameWindow = document.getElementById('iframe').contentWindow;
+ var range = frameWindow.document.createRange();
+ var elem = frameWindow.document.getElementById(id).firstChild;
+ range.setStart(elem, start);
+ range.setEnd(elem, end);
+ frameWindow.internals.addTextMatchMarker(range, false);
+}
+
+function repaintTest() {
+ document.getElementById('iframe').contentDocument.getElementById('to-be-changed').textContent = 'After change';
+}
+
+if (window.internals) {
+ onload = function() {
+ highlightRange('unchanged', 11, 17);
+ highlightRange('to-be-changed', 15, 21);
+ runRepaintTest();
+ };
+}
+</script>
+Tests paint invalidation of the scrollbar (to repaint tickmarks) on document change when there are text match markers.
+Passes if the tickmarks are updated on document change.<br>
+<!-- Currently paint invalidation of main frame scrollbar is not tracked,
+ so use a frame to show the invalidation of tickmarks. -->
+<iframe id="iframe" style="position: absolute; top: 100px; height: 400px" srcdoc="
+ <div id='unchanged'>
+ Unchanged: findme
+ </div>
+ <div id='to-be-changed' onclick='this.textContent=&amp;quot;After change&amp;quot;'>
+ To be changed: findme (Manual testing: Find-in-page 'findme', then click here)
+ </div>
+ <div style='height: 1000px'><!-- To show the scrollbar --></div>">
+</iframe>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/repaint/text-match-document-change-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698