New issue
Advanced search Search tips

Issue 884131 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 644093
Owner: ----
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

:hover::before style doesn't work

Project Member Reported by foolip@chromium.org, Sep 14

Issue description

This issue was reported in https://github.com/webcompat/web-bugs/issues/17453.

In Edge, Firefox and Safari, hovering the red rectangle in https://codepen.io/Rik/pen/XYxNKN makes it go green. In Chrome this does not happen.

The style that doesn't apply is:
span:hover::before {
     background-color: green;
}

Hovering to the right of the rectangle does make it turn green, however. This seems like a bug?

Relevant specs:
https://drafts.csswg.org/css-pseudo-4/#selectordef-before
https://html.spec.whatwg.org/multipage/semantics-other.html#selector-hover
 
Components: -Blink>CSS Blink>HitTesting
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)
Yes, events don't trigger either, so this seems like hit-testing. Continuations might be the issue. Works with continuations without a pseudo element.


Status: Untriaged (was: Available)
Setting to untriaged so that Blink>HitTesting triagers come across this.
Status: Available (was: Untriaged)
Probably a duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=644093
Mergedinto: 644093
Status: Duplicate (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c

commit bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Sep 17 09:50:50 2018

Correct inner node for hit-testing of pseudo elements.

We incorrectly walked the layout tree for ::before/::after element
ancestors instead of just looking up the originating element. We still
need to traverse anonymous inclusive ancestors of the ::first-letter
text, though.

Bug:  884131 ,  644093 ,  92917 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie010535caea76f8c2676482aa38ece8dbcf6d3fb
Reviewed-on: https://chromium-review.googlesource.com/1226616
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591628}
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/dom/first_letter_pseudo_element.cc
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/dom/first_letter_pseudo_element.h
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/dom/pseudo_element.cc
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/dom/pseudo_element.h
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/layout/hit_test_result.cc
[modify] https://crrev.com/bbbce17933cfd44f7ef36d54d9a7d3746aa68c3c/third_party/blink/renderer/core/paint/paint_layer_test.cc

Sign in to add a comment