Commit 8228b77
[Origin API]
When extracting an origin from `<a>` and `<area>` elements without an
`href` attribute, we're currently returning an opaque `Origin`. We
should throw instead, as there's not an origin to extract from these
elements (see [1]). Thanks to @annevk for pointing this out in [2].
[1]: https://html.spec.whatwg.org/multipage/links.html#api-for-a-and-area-elements:extract-an-origin
[2]: whatwg/url#892 (comment)
Bug: 434131026
Change-Id: I136cc0ff24355e29418e060ab384938f3615a60e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7231346
Commit-Queue: Mike West <[email protected]>
Reviewed-by: Antonio Sartori <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1554582}.from() should throw on <a> and <area>.1 parent 6d4aeea commit 8228b77
File tree
2 files changed
+14
-1
lines changed- third_party/blink
- renderer/core/html
- web_tests/external/wpt/html/browsers/origin/api
2 files changed
+14
-1
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
4 | 14 | | |
5 | 15 | | |
6 | 16 | | |
| |||
0 commit comments