WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
59312
[Windows, WinCairo] Missing Focus Ring in Transparent View
https://bugs.webkit.org/show_bug.cgi?id=59312
Summary
[Windows, WinCairo] Missing Focus Ring in Transparent View
Brent Fulgham
Reported
2011-04-24 22:21:18 PDT
If you make a WebView transparent, I am finding that the following display issues manifest themselves: 1. Focus rings are not drawn around focused input elements (such as text fields). 2. The editor caret (I-beam cursor) does not display inside the active text field. I will add some additional information to this bug on Monday when I am back in the office and can compare against multiple WebKit ports. At present, I can only confirm this problem on the WinCairo port.
Attachments
Mac Screenshot showing active focus ring.
(49.82 KB, image/png)
2011-04-25 17:44 PDT
,
Brent Fulgham
no flags
Details
Windows (CoreGraphics) screen capture showing missing focus ring.
(49.61 KB, image/png)
2011-04-25 17:46 PDT
,
Brent Fulgham
no flags
Details
Windows (CoreGraphics) screen capture showing valid focus ring
(56.57 KB, image/png)
2011-04-25 18:05 PDT
,
Brent Fulgham
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2011-04-24 22:26:15 PDT
The specific logic that seems to prevent drawing the focus ring is in RenderStyle.h: m_background->outline().style() == BNONE When run in non-transparent mode, the method "CSSStyleSelector::applyDeclarations" is processing CSS id 1091 (CSSPropertyOutlineStyle), which causes an appropriate update to the display style so that the outline().style() flag is set to something besides BNONE (depending on platform). In transparent mode, that method only seems to have one ID it processes, which is not 1091.
Brent Fulgham
Comment 2
2011-04-25 17:43:40 PDT
This does not happen on the Mac (see attached image.)
Brent Fulgham
Comment 3
2011-04-25 17:44:23 PDT
Created
attachment 91032
[details]
Mac Screenshot showing active focus ring.
Brent Fulgham
Comment 4
2011-04-25 17:46:46 PDT
Created
attachment 91033
[details]
Windows (CoreGraphics) screen capture showing missing focus ring.
Brent Fulgham
Comment 5
2011-04-25 18:05:05 PDT
Created
attachment 91037
[details]
Windows (CoreGraphics) screen capture showing valid focus ring In this case, Layered Windows are turned off, but the "setTransparent(TRUE)" call has been made to the WebView.
Brent Fulgham
Comment 6
2011-04-25 18:13:14 PDT
Summary: 1. The focus ring shows up in all cases for the Cocoa application. 2. The focus ring does NOT show up with either layered background or transparent background in the WinCairo build. 3. It DOES show up with transparent background in the CoreGraphics build, but it does NOT show up with a layered background. In the cases where it does not show up, the RenderStyle.h style() is set to BNONE for the outline type after setting the node to "hasFocus".
Brent Fulgham
Comment 7
2011-04-26 15:11:16 PDT
This was a red herring. The focus ring was not showing up (in some cases) because the background was black, and the default focus ring color is black. Apparently the painting logic is smart enough to not draw black content on top of a black background. Changing focus ring color caused the draw events to happen as expected. The second problem was in the handling of some window messages in the test application. These were preventing proper event propegation, which also prevented the focus ring to display. There's nothing to fix here.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug