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

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

Issue 1350973003: Invalidate line break selection rects when selected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Preserve prior LayoutBR selection rect behavior when REF is off. Created 5 years, 3 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 selectRange(startElement, startIndex, endElement, endIndex) { 1 function selectRangeAfterLayoutAndPaint(startElement, startIndex, endElement, en dIndex) {
2 runAfterLayoutAndPaint(function() { 2 runAfterLayoutAndPaint(function() {
3 if (window.internals) 3 selectRange(startElement, startIndex, endElement, endIndex);
4 window.internals.setSelectionPaintingWithoutSelectionGapsEnabled(tru e);
5 var range = document.createRange();
6 range.setStart(startElement, startIndex);
7 range.setEnd(endElement, endIndex);
8 window.getSelection().addRange(range);
9 }, true); 4 }, true);
10 } 5 }
6
7 function selectRange(startElement, startIndex, endElement, endIndex) {
8 if (window.internals)
9 window.internals.setSelectionPaintingWithoutSelectionGapsEnabled(true);
10 var range = document.createRange();
11 range.setStart(startElement, startIndex);
12 range.setEnd(endElement, endIndex);
13 window.getSelection().addRange(range);
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698