Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport for CSS :active selector #8719
Closed
Labels
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. |
bors-servo
added a commit
that referenced
this issue
Jul 3, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Jul 8, 2016
…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 -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://html.spec.whatwg.org/multipage/#concept-selector-active
https://drafts.csswg.org/selectors/#the-active-pseudo