-
Notifications
You must be signed in to change notification settings - Fork 35
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
Document rules should be limited to rendered links #246
Comments
@a4sriniv Is display locking (content-visibility) covered by the "rendered" concept, or does it need separate spec wording? |
I think it needs separate spec wording. From https://drafts.csswg.org/css-contain/#content-visibility, "The content-visibility property controls whether or not an element renders its contents at all". But I don't think rendered here corresponds to "being rendered". The rest of the Right now, the document rules implementation only omits links in the contents of a display-locked element if their style is not up-to-date, which isn't always the case for skipped contents (wording from spec, "to a large extent do not update their styles at all unless explicitly requested by script"). But we could update the implementation to just omit links inside skipped contents all the time, and the behaviour could then be described as: "document rules do not apply to links that are flat-tree descendants of elements with skipped contents". |
I would prefer that this work in a way that will apply to other implementations if possible, rather than being contingent on when Blink (or another particular engine) calculates style. While we could say it may not detect "skipped" links, it seems more consistent and predictable to specify that it always ignores them -- or alternatively, specify what the conditions actually are. |
… contents It's hard for the user to interact with these links, and the author may not even intend them to be part of the document's palpable content. In at least Chromium (and likely other implementations), these are also elements where the author is trying to skip work related to selector matching etc, which makes selector_matches applying to them particularly problematic. Better to ignore them altogether. Fixes WICG#246.
… contents It's hard for the user to interact with these links, and the author may not even intend them to be part of the document's palpable content. In at least Chromium (and likely other implementations), these are also elements where the author is trying to skip work related to selector matching etc, which makes selector_matches applying to them particularly problematic. Better to ignore them altogether. Fixes #246.
see also https://chromium-review.googlesource.com/c/chromium/src/+/4226934
Users aren't likely to click on such links, and for selectors, Chromium's style engine (and likely others) avoid computing style for unrendered subtrees (due to display:none or shadow roots). So we should probably only consider links which are being rendered.
cc @a4sriniv
The text was updated successfully, but these errors were encountered: