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
Support for CSS :active selector #8719
Comments
This is referenced in PR #11726, the selector state already exists and is just missing the code to set it. So either the element itself or perhaps the "Activatable" trait could be extended to deal with the "formal activation state" and call element.set_active_state. In document.handle_mouse_event; I could hook mousedown and mouseup (as done for a click, which hooks to element.authentic_click_activation) to trigger this. Does this sound about right? I'm not sure whether it's correct to consider activation as synonymous with mousedown. |
cc @Manishearth for the previous comment. |
Issue 8719: Add basic support for :active selector <!-- Please describe your changes on the following line: --> Added toggling of active state for element and parents on mousedown/mouseup. Active state is removed when mouseout. (hover) - As with my other PR i'm struggling a bit with the automated testing. I've added a manual test case and found quirks-mode/active-and-hover-manual.html which - aside from also being a manual test, is functional in Firefox but does not render correctly in Servo. - Not implemented: In Firefox, behaviour differs with a <!DOCTYPE HTML> and an anchor does not lose it's activation on mouseout; whereas a button does. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #8719 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11781) <!-- Reviewable:end -->
…arth Issue 8719: Add basic support for :active selector <!-- Please describe your changes on the following line: --> Added toggling of active state for element and parents on mousedown/mouseup. Active state is removed when mouseout. (hover) - As with my other PR i'm struggling a bit with the automated testing. I've added a manual test case and found quirks-mode/active-and-hover-manual.html which - aside from also being a manual test, is functional in Firefox but does not render correctly in Servo. - Not implemented: In Firefox, behaviour differs with a <!DOCTYPE HTML> and an anchor does not lose it's activation on mouseout; whereas a button does. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #8719 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11781) <!-- Reviewable:end -->
https://html.spec.whatwg.org/multipage/#concept-selector-active
https://drafts.csswg.org/selectors/#the-active-pseudo
The text was updated successfully, but these errors were encountered: