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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/selection/resources/selection.js

Issue 1817463004: Always apply parent clips to selection rects when painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 function selectRangeAfterLayoutAndPaint(startElement, startIndex, endElement, en dIndex) { 1 function selectRangeAfterLayoutAndPaint(startElement, startIndex, endElement, en dIndex) {
2 runAfterLayoutAndPaint(function() { 2 runAfterLayoutAndPaint(function() {
3 selectRange(startElement, startIndex, endElement, endIndex); 3 selectRange(startElement, startIndex, endElement, endIndex);
4 }, true); 4 }, true);
5 } 5 }
6 6
7 function selectRange(startElement, startIndex, endElement, endIndex) { 7 function selectRange(startElement, startIndex, endElement, endIndex) {
8 var range = document.createRange(); 8 var range = document.createRange();
9 range.setStart(startElement, startIndex); 9 range.setStart(startElement, startIndex);
10 range.setEnd(endElement, endIndex); 10 range.setEnd(endElement, endIndex);
11 window.getSelection().addRange(range); 11 window.getSelection().addRange(range);
12 } 12 }
13
14 function selectNode(element) {
15 var range = document.createRange();
16 range.selectNode(element);
17 window.getSelection().addRange(range);
18 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698