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

Implement the :focus pseudo-class selector and element.focus/blur #5461

Merged
merged 2 commits into from Apr 5, 2015

Conversation

@mbrubeck
Copy link
Contributor

mbrubeck commented Mar 30, 2015

Fixes #5460. This supports for simple focusable elements that are their own DOM anchors, like text input fields.

Requires servo/rust-selectors#20. r? @SimonSapin

Review on Reviewable

@highfive
Copy link

highfive commented Mar 30, 2015

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Mar 30, 2015

Note: no reftest yet because elem.focus() is not yet implemented in Servo (#5462).

@mbrubeck
Copy link
Contributor Author

mbrubeck commented Mar 30, 2015

Added a basic element.focus() and .blur() implementation, and a reftest that uses it. r? @jdm for the DOM parts. If this lands I can file follow-up issues for the missing pieces.

@mbrubeck mbrubeck changed the title Implement the :focus pseudo-class selector Implement the :focus pseudo-class selector and element.focus/blur Mar 31, 2015
@mbrubeck mbrubeck closed this Mar 31, 2015
@mbrubeck mbrubeck reopened this Mar 31, 2015
@hoppipolla-critic-bot
Copy link

hoppipolla-critic-bot commented Mar 31, 2015

Critic review: https://critic.hoppipolla.co.uk/r/4455

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@metajack
Copy link
Contributor

metajack commented Mar 31, 2015

Assigned @SimonSapin because he was pinged.

@Manishearth
Copy link
Member

Manishearth commented Apr 4, 2015

Rolled up into #5519 because of CI brokenness

bors-servo pushed a commit that referenced this pull request Apr 4, 2015
Fixes #5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.

Requires servo/rust-selectors#20.  r? @SimonSapin
@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 4, 2015

http://build.servo.org/builders/linux2/builds/1284

/html/dom/interfaces.html
-------------------------
PASS expected FAIL HTMLElement interface: operation focus()
PASS expected FAIL HTMLElement interface: operation blur()
PASS expected FAIL HTMLElement interface: document.createElement("noscript") must inherit property "focus" with the proper type (15)
PASS expected FAIL HTMLElement interface: document.createElement("noscript") must inherit property "blur" with the proper type (16)
@mbrubeck mbrubeck force-pushed the mbrubeck:focus branch 2 times, most recently from 7ff8d64 to 791fa37 Apr 4, 2015
@mbrubeck

This comment has been minimized.

Copy link
Owner Author

mbrubeck commented on 791fa37 Apr 4, 2015

r=jdm

This comment has been minimized.

Copy link

larsbergstrom replied Apr 5, 2015

@bors: retry

mbrubeck added 2 commits Mar 30, 2015
Fixes #5460. This supports for simple focusable elements that are their own
DOM anchors, like text `input` fields.
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented on 791fa37 Apr 4, 2015

saw approval from jdm
at mbrubeck@791fa37

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 4, 2015

merging mbrubeck/servo/focus = 791fa37 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 4, 2015

merging mbrubeck/servo/focus = 791fa37 into auto failed

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

saw approval from jdm
at mbrubeck@791fa37

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

merging mbrubeck/servo/focus = 791fa37 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

saw approval from jdm
at mbrubeck@791fa37

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

merging mbrubeck/servo/focus = 791fa37 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

mbrubeck/servo/focus = 791fa37 merged ok, testing candidate = b63fb0c

This comment has been minimized.

Copy link
Contributor

bors-servo replied Apr 5, 2015

fast-forwarding master to auto = b63fb0c

bors-servo pushed a commit that referenced this pull request Apr 5, 2015
Fixes #5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.

Requires servo/rust-selectors#20.  r? @SimonSapin
bors-servo pushed a commit that referenced this pull request Apr 5, 2015
Fixes #5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.

Requires servo/rust-selectors#20.  r? @SimonSapin
@bors-servo bors-servo closed this Apr 5, 2015
@bors-servo bors-servo merged commit 791fa37 into servo:master Apr 5, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default all tests passed
@mbrubeck mbrubeck deleted the mbrubeck:focus branch May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

10 participants
You can’t perform that action at this time.