Bug 193630 - REGRESSION(r240174): Wrong preprocessor guards in RenderImage::paintAreaElementFocusRing
Summary: REGRESSION(r240174): Wrong preprocessor guards in RenderImage::paintAreaEleme...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P1 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2019-01-20 14:38 PST by Michael Catanzaro
Modified: 2019-02-07 01:47 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2019-01-20 17:58 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-01-20 14:38:48 PST
Layout test fast/images/image-map-outline-in-positioned-container.html is failing for GTK since r240174 "CSS auto focus-ring outlines don't render on iOS". The autofocus is no longer rendered:

https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r240208%20(9437)/fast/images/image-map-outline-in-positioned-container-diffs.html

I think the problem is in RenderImage::paintAreaElementFocusRing. Here some code that used to be cross-platform was changed to be Cocoa-specific by moving it inside the Cocoa-specific ENABLE(FULL_KEYBOARD_ACCESS) guard. I'm not sure what the right guard would be here, but perhaps !PLATFORM(IOS_FAMILY) || ENABLE(FULL_KEYBOARD_ACCESS) would do the trick.
Comment 1 Michael Catanzaro 2019-01-20 14:40:08 PST
Note: I'm adding a failure expectation for this test, which should be removed when fixed.
Comment 2 Daniel Bates 2019-01-20 15:39:43 PST
(In reply to Michael Catanzaro from comment #0)
> Layout test fast/images/image-map-outline-in-positioned-container.html is
> failing for GTK since r240174 "CSS auto focus-ring outlines don't render on
> iOS". The autofocus is no longer rendered:
> 
> https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/
> r240208%20(9437)/fast/images/image-map-outline-in-positioned-container-diffs.
> html
> 
> I think the problem is in RenderImage::paintAreaElementFocusRing. 

Yes, there is a problem here. Oops! Shouldn't have tried to do two things at once: inverting the if-else and get this code working for PLATFORM(IOS_FAMILY) && ENABLE(FULL_KEYBOARD_ACCESS).


> Here some
> code that used to be cross-platform was changed to be Cocoa-specific by
> moving it inside the Cocoa-specific ENABLE(FULL_KEYBOARD_ACCESS) guard. I'm
> not sure what the right guard would be here, but perhaps
> !PLATFORM(IOS_FAMILY) || ENABLE(FULL_KEYBOARD_ACCESS) would do the trick.

Yes, that would fix it! I am not near a computer with a checkout. If you can fix I would appreciate it.
Comment 3 Michael Catanzaro 2019-01-20 15:40:30 PST
OK!
Comment 4 Daniel Bates 2019-01-20 15:45:37 PST
(In reply to Michael Catanzaro from comment #3)
> OK!

Thank you, Michael!
Comment 5 Michael Catanzaro 2019-01-20 17:52:24 PST
(In reply to Michael Catanzaro from comment #1)
> Note: I'm adding a failure expectation for this test, which should be
> removed when fixed.

I didn't actually commit the expectation yet, so nevermind that.
Comment 6 Michael Catanzaro 2019-01-20 17:58:15 PST
Created attachment 359663 [details]
Patch
Comment 7 WebKit Commit Bot 2019-01-20 19:25:49 PST
Comment on attachment 359663 [details]
Patch

Clearing flags on attachment: 359663

Committed r240221: <https://trac.webkit.org/changeset/240221>
Comment 8 WebKit Commit Bot 2019-01-20 19:25:51 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2019-01-20 19:26:28 PST
<rdar://problem/47419540>
Comment 10 Miguel Gomez 2019-02-07 01:47:42 PST
This made fast/images/image-map-outline-in-positioned-container.html to properly pass, so updating expectation.