RESOLVED FIXED 89033
[Chromium] Sub-pixel text rendering is incorrectly used for WebView with transparent background.
https://bugs.webkit.org/show_bug.cgi?id=89033
Summary [Chromium] Sub-pixel text rendering is incorrectly used for WebView with tran...
David Reveman
Reported 2012-06-13 13:35:15 PDT
This is only a problem when software rendering is used. The compositor already handles this properly.
Attachments
Patch (4.44 KB, patch)
2012-06-13 13:43 PDT, David Reveman
no flags
Patch (4.40 KB, patch)
2012-06-14 12:08 PDT, David Reveman
no flags
Patch (4.63 KB, patch)
2012-06-14 14:07 PDT, David Reveman
no flags
David Reveman
Comment 1 2012-06-13 13:43:49 PDT
Created attachment 147402 [details] Patch Possible fix. Not sure if this is how we want solve this.
James Robinson
Comment 2 2012-06-13 14:05:26 PDT
James Robinson
Comment 3 2012-06-13 14:06:07 PDT
Comment on attachment 147402 [details] Patch I think you'd be better off calling setDrawingToImageBuffer() in NonCompositedContentHost, or just waiting for https://bugs.webkit.org/show_bug.cgi?id=89031
David Reveman
Comment 4 2012-06-14 08:35:23 PDT
(In reply to comment #2) > https://bugs.webkit.org/show_bug.cgi?id=89031 happens to solve this. (In reply to comment #3) > (From update of attachment 147402 [details]) > I think you'd be better off calling setDrawingToImageBuffer() in NonCompositedContentHost, or just waiting for https://bugs.webkit.org/show_bug.cgi?id=89031 I'm confused. This patch is to avoid sub-pixel rendering in software mode. Not when the compositor is used which is already handled correctly. So changes to NonCompositedContentHost isn't going to help here afaik. Tried the patch attached to https://bugs.webkit.org/show_bug.cgi?id=89031 and it doesn't fix the problem.
James Robinson
Comment 5 2012-06-14 10:02:44 PDT
Comment on attachment 147402 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147402&action=review > Source/WebKit/chromium/src/WebPagePopupImpl.cpp:240 > + PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, !m_webView->isTransparent()); this isn't obvious to me - if a web view is transparent, does that really mean that popups associated with that view are also transparent? how is the background color of a popup determined?
James Robinson
Comment 6 2012-06-14 10:02:51 PDT
Ah sorry, I didn't realize this was for software mode.
David Reveman
Comment 7 2012-06-14 12:06:33 PDT
(In reply to comment #5) > (From update of attachment 147402 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=147402&action=review > > > Source/WebKit/chromium/src/WebPagePopupImpl.cpp:240 > > + PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, !m_webView->isTransparent()); > > this isn't obvious to me - if a web view is transparent, does that really mean that popups associated with that view are also transparent? how is the background color of a popup determined? yea, that's wrong. popups are always opaque afaik. WebPagePopupImpl::initPage() calls frame->view()->setTransparent(false). btw, not sure how to test this other than the manual testing I'm doing on chromeos right now. any ideas?
David Reveman
Comment 8 2012-06-14 12:08:44 PDT
Created attachment 147626 [details] Patch Popups are always opaque
James Robinson
Comment 9 2012-06-14 12:23:00 PDT
(In reply to comment #7) > (In reply to comment #5) > > (From update of attachment 147402 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=147402&action=review > > > > > Source/WebKit/chromium/src/WebPagePopupImpl.cpp:240 > > > + PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, !m_webView->isTransparent()); > > > > this isn't obvious to me - if a web view is transparent, does that really mean that popups associated with that view are also transparent? how is the background color of a popup determined? > > yea, that's wrong. popups are always opaque afaik. WebPagePopupImpl::initPage() calls frame->view()->setTransparent(false). > > btw, not sure how to test this other than the manual testing I'm doing on chromeos right now. any ideas? So sadly we force grayscale all the time with layout tests, so there's no way that I know of in WebKit to check this automatically :(
James Robinson
Comment 10 2012-06-14 12:29:25 PDT
Comment on attachment 147626 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147626&action=review R=me but consider 2-state enum instead of bool for the paint parameter > Source/WebKit/chromium/src/WebPagePopupImpl.cpp:240 > + PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, true); this is a good sign that we want a two-state enum here instead of a bool - it's really hard to guess what "true" means in this context.
David Reveman
Comment 11 2012-06-14 14:07:04 PDT
Created attachment 147650 [details] Patch Add two-state enum
WebKit Review Bot
Comment 12 2012-06-14 17:43:23 PDT
Comment on attachment 147650 [details] Patch Clearing flags on attachment: 147650 Committed r120381: <http://trac.webkit.org/changeset/120381>
WebKit Review Bot
Comment 13 2012-06-14 17:43:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.