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

Issue 22608004: Improve 'Selection' exception messages. (Closed)

Created:
7 years, 4 months ago by Mike West
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Visibility:
Public.

Description

Improve 'Selection' exception messages. Rather than throwing generic exceptions, we should give developers a bit of context around what failed and why. This patch addresses that concern for the Selection APIs. BUG=270033 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156131

Patch Set 1 #

Patch Set 2 : test. #

Patch Set 3 : rebaseline. #

Patch Set 4 : Rewording. #

Total comments: 7

Patch Set 5 : failedToExecute #

Patch Set 6 : ExceptionMessages. #

Patch Set 7 : ugh. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -32 lines) Patch
M LayoutTests/editing/selection/extend-expected.txt View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/text/selection-exceptions.html View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/fast/text/selection-exceptions-expected.txt View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M Source/bindings/bindings.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A + Source/bindings/v8/ExceptionMessages.h View 1 2 3 4 5 6 1 chunk +6 lines, -9 lines 0 comments Download
A + Source/bindings/v8/ExceptionMessages.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -5 lines 0 comments Download
M Source/core/page/DOMSelection.cpp View 1 2 3 4 5 8 chunks +20 lines, -10 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Mike West
Hi Erik! #3 of #?. -mike
7 years, 4 months ago (2013-08-09 13:51:45 UTC) #1
arv (Not doing code reviews)
Waiting on previous CL to resolve the naming guidelines.
7 years, 4 months ago (2013-08-09 15:22:48 UTC) #2
Mike West
Updated to "Failed to execute 'XXX' on a 'Selection' object:...", in line with the discussion ...
7 years, 4 months ago (2013-08-12 09:11:14 UTC) #3
arv (Not doing code reviews)
On 2013/08/12 09:11:14, Mike West wrote: > Updated to "Failed to execute 'XXX' on a ...
7 years, 4 months ago (2013-08-12 14:37:54 UTC) #4
arv (Not doing code reviews)
This raises another question... I'm starting to think that we should not include the method/accessor ...
7 years, 4 months ago (2013-08-12 14:40:10 UTC) #5
arv (Not doing code reviews)
This raises another question... I'm starting to think that we should not include the method/accessor ...
7 years, 4 months ago (2013-08-12 14:41:00 UTC) #6
Use mkwst_at_chromium.org plz.
On 2013/08/12 14:41:00, arv wrote: > This raises another question... I'm starting to think that ...
7 years, 4 months ago (2013-08-12 14:46:10 UTC) #7
do-not-use
On 2013/08/12 14:41:00, arv wrote: > This raises another question... I'm starting to think that ...
7 years, 4 months ago (2013-08-12 14:46:50 UTC) #8
Use mkwst_at_chromium.org plz.
On 2013/08/12 14:37:54, arv wrote: > On 2013/08/12 09:11:14, Mike West wrote: > > Updated ...
7 years, 4 months ago (2013-08-12 14:50:30 UTC) #9
arv (Not doing code reviews)
The error occurred in XXX, so you are right called is not correct either. Even ...
7 years, 4 months ago (2013-08-12 15:10:10 UTC) #10
Mike West
On 2013/08/12 15:10:10, arv wrote: > The error occurred in XXX, so you are right ...
7 years, 4 months ago (2013-08-13 10:31:57 UTC) #11
arv (Not doing code reviews)
OK. Let's continue down this path then. We can always change this later. On Tue, ...
7 years, 4 months ago (2013-08-13 13:49:01 UTC) #12
arv (Not doing code reviews)
https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js File LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js (right): https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js#newcode7 LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js:7: shouldThrow("sel.collapseToStart()"); Why don't you want to test the message ...
7 years, 4 months ago (2013-08-13 13:57:30 UTC) #13
Mike West
Thanks, I'll update the patch. https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js File LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js (right): https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js#newcode7 LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js:7: shouldThrow("sel.collapseToStart()"); On 2013/08/13 13:57:31, ...
7 years, 4 months ago (2013-08-13 14:00:16 UTC) #14
arv (Not doing code reviews)
https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js File LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js (right): https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js#newcode7 LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js:7: shouldThrow("sel.collapseToStart()"); On 2013/08/13 14:00:17, Mike West wrote: > On ...
7 years, 4 months ago (2013-08-13 14:07:48 UTC) #15
Mike West
https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js File LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js (right): https://codereview.chromium.org/22608004/diff/11001/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js#newcode7 LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js:7: shouldThrow("sel.collapseToStart()"); On 2013/08/13 14:07:49, arv wrote: > On 2013/08/13 ...
7 years, 4 months ago (2013-08-13 14:09:20 UTC) #16
Mike West
The latest patchset delazifies the tests, and adds 'ExceptionState::failedToExecute(...)', which seemed like a reasonable place ...
7 years, 4 months ago (2013-08-13 14:54:43 UTC) #17
arv (Not doing code reviews)
I don't think this belongs in ExceptionState. How about introducing a new file with a ...
7 years, 4 months ago (2013-08-13 17:57:33 UTC) #18
Use mkwst_at_chromium.org plz.
On 2013/08/13 17:57:33, arv wrote: > I don't think this belongs in ExceptionState. How about ...
7 years, 4 months ago (2013-08-13 21:01:05 UTC) #19
Mike West
On 2013/08/13 21:01:05, mkwst wrote: > On 2013/08/13 17:57:33, arv wrote: > > I don't ...
7 years, 4 months ago (2013-08-14 07:24:35 UTC) #20
arv (Not doing code reviews)
LGTM
7 years, 4 months ago (2013-08-14 16:19:37 UTC) #21
Mike West
On 2013/08/14 16:19:37, arv wrote: > LGTM Thanks for working through this with me.
7 years, 4 months ago (2013-08-14 16:28:30 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/22608004/37001
7 years, 4 months ago (2013-08-14 16:28:47 UTC) #23
commit-bot: I haz the power
7 years, 4 months ago (2013-08-15 03:38:15 UTC) #24
Message was sent while issue was closed.
Change committed as 156131

Powered by Google App Engine
This is Rietveld 408576698