Bug 191286

Summary: Add a pseudoclass that matches img elements that are backed by an attachment
Product: WebKit Reporter: mitz
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, koivisto, simon.fraser, thorton, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
none
WIP
none
Introduce :has-attachment
dino: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews201 for win-future none

Description mitz 2018-11-05 15:36:13 PST
It would be useful to have a way to select img elements that are using an attachment as their data source.
Comment 1 mitz 2018-11-05 15:38:01 PST
<rdar://problem/45823554>
Comment 2 mitz 2018-11-05 17:53:34 PST
Created attachment 353935 [details]
WIP
Comment 3 mitz 2018-11-06 14:53:48 PST
Created attachment 354012 [details]
WIP
Comment 4 mitz 2018-11-06 16:23:37 PST
Created attachment 354024 [details]
Introduce :has-attachment

Some things that need review here:
- the name of the pseudoclass
- the way it’s made to not parse at runtime if the attachment element isn’t enabled
- the lack of an explicit mechanism to force style resolution when an img gains an attachment, because currently the DOM tree mutation just makes it work
Comment 5 EWS Watchlist 2018-11-06 19:51:06 PST
Comment on attachment 354024 [details]
Introduce :has-attachment

Attachment 354024 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/9887671

New failing tests:
fast/css/has-attachment.html
Comment 6 EWS Watchlist 2018-11-06 19:51:17 PST
Created attachment 354053 [details]
Archive of layout-test-results from ews201 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews201  Port: win-future  Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Comment 7 Simon Fraser (smfr) 2018-11-07 11:13:02 PST
If this is apple-internal only, should it have a -apple- prefix?
Comment 8 mitz 2018-11-07 11:34:13 PST
Committed <https://trac.webkit.org/r237932>.