New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734399 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug

Blocking:
issue 657748



Sign in to add a comment

CSS display:contents removes text from seach

Reported by acmesqua...@gmail.com, Jun 18 2017

Issue description

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

Steps to reproduce the problem:
Search for text in a page, where element is wrapped by another using display:contents

What is the expected behavior?
Text should be highlighted, and counted in the found results.

What went wrong?
Text is ignored, as if display:none had been used.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 61.0.3128.3  Channel: dev
OS Version: 
Flash Version:
 
display_contents.html
395 bytes View Download
Labels: Needs-Triage-M61

Comment 2 by shans@chromium.org, Jun 19 2017

Labels: Needs-Feedback
Can't repro on 61.0.3135.0 (Windows). Further, display: contents is not an enabled feature on ToT.

@1: do you have some runtime flags enabled (chrome://flags)? Please indicate which if so, to help with repro.
Experimental Web Platform features
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 19 2017

Cc: shans@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "shans@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by ajha@chromium.org, Jun 20 2017

Cc: ajha@chromium.org
Labels: -Type-Bug -Pri-2 -Needs-Triage-M61 M-61 OS-Mac OS-Windows Pri-1 Type-Bug-Regression
Owner: eco...@igalia.com
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on the latest canary(61.0.3136.0) on Windows-10, Mac OS 10.12.5 and Linux Ubuntu 14.04 on enabling Experimental Web Platform features flag.

Regressed in M-56.

Last good build: 56.0.2900.0
First bad build: 56.0.2901.0(nothing displayed under display: contents on enabling 'Experimental Web Platform features' flag)

Changelog:
==========
https://chromium.googlesource.com/chromium/src/+log/c0148879eff4f35f89c2882dae706a3b097c2c4a..310aa236042e11fc39958ab02e9ff55b393fced

ecobos@: Could you please take a look at this.

Thank you!



 
I don't think this is a regression as  issue 657748  hasn't shipped yet.

Right now, if you hit ctrl+f and search for a substring, text under display:contents is excluded from the result.

Comment 7 by eco...@igalia.com, Jun 20 2017

Blocking: 657748
Labels: -Pri-1 -Type-Bug-Regression Pri-3 Type-Bug
Yes, I don't think it's pri-1 since display: contents is not shipped, and it's quite blocked on different spec discussion... But I can take a look, this should be a straight-forward fix.

Comment 8 by eco...@igalia.com, Jun 20 2017

Oh, and thanks for the report! :)

Comment 9 by eco...@igalia.com, Jun 20 2017

> But I can take a look, this should be a straight-forward fix.

(That being said, I'm not familiar on how the search bar is implemented, I expected it to be reproducible from some other platform API like innerText/textContent but that doesn't seem to be the case, so I'll need a bit of time to investigate :P)

Comment 10 by shend@chromium.org, Jun 20 2017

Labels: Update-Quarterly
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 21 2017

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

commit 240efbe686c1a0ff29dd3453ba5d048a979266c5
Author: Emilio Cobos Álvarez <ecobos@igalia.com>
Date: Wed Jun 21 08:04:09 2017

Don't skip display: contents nodes in TextIterator.

Elements with display: contents may have rendered descendants and, as such,
TextIterator should be able to find it.

BUG= 734399 

Change-Id: I6196c858cbc4338c65eac47bbe552c3fa96c8f0e
Reviewed-on: https://chromium-review.googlesource.com/541308
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Emilio Cobos Álvarez <ecobos@igalia.com>
Cr-Commit-Position: refs/heads/master@{#481137}
[modify] https://crrev.com/240efbe686c1a0ff29dd3453ba5d048a979266c5/third_party/WebKit/LayoutTests/external/wpt/innerText/getter-expected.txt
[modify] https://crrev.com/240efbe686c1a0ff29dd3453ba5d048a979266c5/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
[modify] https://crrev.com/240efbe686c1a0ff29dd3453ba5d048a979266c5/third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp

Comment 12 by eco...@igalia.com, Jun 21 2017

Status: Fixed (was: Assigned)
Should be fixed now :)

Sign in to add a comment