New issue
Advanced search Search tips

Issue 793298 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

:visited restrictions not handled correctly in presence of nested links.

Project Member Reported by emilio@chromium.org, Dec 8 2017

Issue description

Chrome Version: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36

What steps will reproduce the problem?
(1) Open the attached test-case.

What is the expected result?

Should see no red (the second <span> should never match as if the outer link was visited).

What happens instead?

There's red.
 
t.xhtml
264 bytes View Download
Owner: emilio@chromium.org
Status: Assigned (was: Available)
Actually, this is a very simple overlook in SelectorChecker... I'll send a patch.

Comment 2 Deleted

Labels: Hotlist-Interop
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 12 2017

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

commit fde7c48196c1742951bce3df1b0262f9b164bb3e
Author: Emilio Cobos Álvarez <emilio@chromium.org>
Date: Tue Dec 12 22:08:37 2017

Fix :visited handling of nested links.

The style of an element should only depend on the closest self-including link
ancestor, but we're missing to check for that while walking the ancestors in
SelectorChecker.

BUG= 793298 

Change-Id: I0449a4d743f9ab1b747f69679c096e96681548ad
Reviewed-on: https://chromium-review.googlesource.com/817597
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Emilio Cobos Álvarez <emilio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523574}
[add] https://crrev.com/fde7c48196c1742951bce3df1b0262f9b164bb3e/third_party/WebKit/LayoutTests/fast/selectors/visited-nested-links-expected.xhtml
[add] https://crrev.com/fde7c48196c1742951bce3df1b0262f9b164bb3e/third_party/WebKit/LayoutTests/fast/selectors/visited-nested-links.xhtml
[modify] https://crrev.com/fde7c48196c1742951bce3df1b0262f9b164bb3e/third_party/WebKit/Source/core/css/SelectorChecker.cpp

Comment 5 by emilio@chromium.org, Dec 13 2017

Status: Fixed (was: Assigned)

Sign in to add a comment