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

Issue 1498253002: Drop [LegacyInterfaceTypeChecking] for most of Selection (Closed)

Created:
5 years ago by philipj_slow
Modified:
5 years ago
Reviewers:
yoichio, haraken
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Drop [LegacyInterfaceTypeChecking] for most of Selection For both addRange() and collapse(), Firefox and IE11 already throw when the node argument is null: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3781 removeAllRanges() and empty() still provide the functionality of collapse(null). DOMSelection::collapse() is only called from bindings, so the ASSERT will hold. As for setPosition(), that isn't implemented by Firefox or IE, but it's an alias of collapse() and usage of setPosition() itself is very low: https://www.chromestatus.com/metrics/feature/timeline/popularity/327 Leave setBaseAndExtend() for now, as usage is slightly higher and it also requires making the arguments non-optional: https://www.chromestatus.com/metrics/feature/timeline/popularity/406 BUG=391673, 561338

Patch Set 1 #

Patch Set 2 : update tests #

Messages

Total messages: 17 (7 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1498253002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1498253002/20001
5 years ago (2015-12-08 11:33:37 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/89153)
5 years ago (2015-12-08 12:03:30 UTC) #4
philipj_slow
PTAL. The tree is a mess right now so the dry run is all red, ...
5 years ago (2015-12-08 12:30:08 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1498253002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1498253002/20001
5 years ago (2015-12-08 22:43:06 UTC) #8
yoichio
Once I changed collapse to throw exception, there were regression in the 3rd party library. ...
5 years ago (2015-12-08 23:55:48 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-09 00:20:45 UTC) #11
philipj_slow
haraken, can you PTAL? yoichi is OOO, it turns out.
5 years ago (2015-12-09 07:02:33 UTC) #13
haraken
LGTM
5 years ago (2015-12-09 07:26:21 UTC) #14
philipj_slow
On 2015/12/08 23:55:48, yoichio_ooo_until_Jun_5 wrote: > Once I changed collapse to throw exception, > there ...
5 years ago (2015-12-09 09:12:35 UTC) #15
philipj_slow
5 years ago (2015-12-09 12:55:16 UTC) #16
On 2015/12/09 09:12:35, philipj wrote:
> On 2015/12/08 23:55:48, yoichio_ooo_until_Jun_5 wrote:
> > Once I changed collapse to throw exception,
> >  there were regression in the 3rd party library.
> > https://codereview.chromium.org/546703003
> > https://code.google.com/p/chromium/issues/detail?id=395318
> > Did you consider that and also other Selection functions?
> 
> Oh, sorry, I didn't see this before I asked haraken to review just now. I was
> not aware of this problem. I have filed a spec bug
> <https://github.com/w3c/selection-api/issues/64> and will implement that
> behavior instead. By removing [LegacyInterfaceTypeChecking] but making the
node
> argument nullable, only trying to pass something other than null or a Node
(like
> a Range) will throw a TypeError.

I will close this in favor of two separate CLs to move this along:
https://codereview.chromium.org/1511913002/
https://codereview.chromium.org/1509353004/

Powered by Google App Engine
This is Rietveld 408576698