Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <style>'s disabled IDL attribute #7779

Merged
merged 6 commits into from
Apr 11, 2022
Merged

Conversation

domfarolino
Copy link
Member

@domfarolino domfarolino commented Apr 4, 2022

This PR adds back the HTMLStyleElement's disabled IDL attribute. All browsers implement this, however unlike HTMLLinkElement, no browsers implement a disabled content attribute.

Note that this was originally tracked by #1081. That issue was closed #4519, though it did not spec anything <style> related.


/infrastructure.html ( diff )
/links.html ( diff )
/semantics.html ( diff )

source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@domfarolino domfarolino requested a review from domenic April 4, 2022 03:20
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@domfarolino
Copy link
Member Author

I think this should be ready for another look spec-wise. I will confirm tomorrow whether or not the existing tests cover the case I outline in the example, and if not I will add one.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emilio want to quickly double check this?

source Show resolved Hide resolved
source Show resolved Hide resolved
@domfarolino
Copy link
Member Author

The case where we set disabled = true before <style> has an associated sheet is not tested via WPT. To try this, I implemented HTMLStyleElement in Blink in a way that would allow disabled mutations before an associated sheet is created. This way disabled would actually return true before the underlying sheet exists, and upon insertion the style would start out disabled. I found that an old (I think) WebKit test that Blink has inherited does test part of this 1. I'll port it over to WPT sometime over the next couple of days (I am out Friday).

@domfarolino
Copy link
Member Author

I've uploaded https://crrev.com/c/3577899 to introduce a WPT that tests disabled setter before CSSStyleSheet creation.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 8, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 9, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 9, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 9, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 9, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}
@domfarolino
Copy link
Member Author

The tests have been merged, and I uploaded w3c/svgwg#879 for SVGStyleElement.

@domenic domenic added addition/proposal New features or enhancements topic: style labels Apr 11, 2022
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great retro-specification work; thanks for taking care of this years-old gap!

@domenic domenic merged commit 3b5c55f into main Apr 11, 2022
@domenic domenic deleted the domfarolino/style-disabled branch April 11, 2022 15:20
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 14, 2022
…bled setter, a=testonly

Automatic update from web-platform-tests
Blink: Add WPT for HTMLStyleElement#disabled setter

This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}

--

wpt-commits: 0d6ebf3f44c68879fe2459c8a313005fae078639
wpt-pr: 33569
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Apr 15, 2022
…bled setter, a=testonly

Automatic update from web-platform-tests
Blink: Add WPT for HTMLStyleElement#disabled setter

This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}

--

wpt-commits: 0d6ebf3f44c68879fe2459c8a313005fae078639
wpt-pr: 33569
saschanaz added a commit to saschanaz/types-web that referenced this pull request Apr 25, 2022
DanielRyanSmith pushed a commit to DanielRyanSmith/wpt that referenced this pull request Apr 27, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This is all the work required to land
whatwg/html#7779 and close
https://crbug.com/695984.

R=masonf@chromium.org

Bug: 695984
Change-Id: I43b56a50c3dc8bf00e2b0f7e030a5a1b5095b2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577899
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990764}
NOKEYCHECK=True
GitOrigin-RevId: 9be30b412651759d43b0e5dee12848a0d521dc06
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 13, 2023
This CL is a follow-up to whatwg/html#7779
which largely fixed crbug.com/695984 when we decided to standardize
HTMLStyleElement#disabled. There is a lingering comment about removing
the IDL attribute that this CL deletes.

Bug: 695984
Change-Id: I0c63496063b4e71922d6fdc528d8e1f885a9b4b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4335038
Auto-Submit: Dominic Farolino <dom@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1116466}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: style
Development

Successfully merging this pull request may close these issues.

None yet

4 participants