diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-03 22:55:35 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-03 22:55:35 +0530 |
commit | 056a7cf1a2284063e5d32c6627b86f6931957a74 (patch) | |
tree | 5c3c2591a6020cf2e23a70826eab5a753357f22c /components/style/parser.rs | |
parent | 46256b33efeb84b35cc90ae2dee03890ba7f38c7 (diff) | |
parent | 3662491d8f8c135eba360d0d6bae771c42e09a26 (diff) | |
download | servo-056a7cf1a2284063e5d32c6627b86f6931957a74.tar.gz servo-056a7cf1a2284063e5d32c6627b86f6931957a74.zip |
Auto merge of #9715 - ecoal95:mousemove, r=mbrubeck
script: Fix MouseOver handling
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.
This fixes things like #9705, where the hover state was applied only to
the children.
This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.
For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.
```html
<style>
div {
padding: 10px;
margin: 10px;
height: 15px;
background: blue;
}
div:hover {
background: red;
}
</style>
<div>
<div></div>
</div>
```
Fixes #9705
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9715)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/parser.rs')
0 files changed, 0 insertions, 0 deletions