[Qt] Focus rings are ugly, rects should be united instead of drawn individually
authoryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Dec 2010 00:27:10 +0000 (00:27 +0000)
committeryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Dec 2010 00:27:10 +0000 (00:27 +0000)
commitf44e209c6baa70b4c257c6e2cf050fb15cb92916
tree13d4c4e17f6ab41ba4680d66655c150b7a718388
parent6509e7198431237285497627d88744568b37de85
[Qt] Focus rings are ugly, rects should be united instead of drawn individually
https://bugs.webkit.org/show_bug.cgi?id=49953

Reviewed by Andreas Kling.

WebCore:

Create a QPainterPath and add to it the focus rects, one at a time.
Combine the 2 drawFocusRing functions into one function drawFocusRingForPath.

Tests: fast/css/focus-ring-detached.html
       fast/css/focus-ring-multiline.html

* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::drawFocusRingForPath):
(WebCore::GraphicsContext::drawFocusRing):

LayoutTests:

* fast/css/focus-ring-detached.html: Added.
* fast/css/focus-ring-multiline.html: Added.
* platform/mac-snowleopard/fast/css/focus-ring-detached-expected.checksum: Added.
* platform/mac-snowleopard/fast/css/focus-ring-detached-expected.png: Added.
* platform/mac-snowleopard/fast/css/focus-ring-detached-expected.txt: Added.
* platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.checksum: Added.
* platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.png: Added.
* platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.txt: Added.
* platform/qt/fast/css/focus-ring-detached-expected.checksum: Added.
* platform/qt/fast/css/focus-ring-detached-expected.png: Added.
* platform/qt/fast/css/focus-ring-detached-expected.txt: Added.
* platform/qt/fast/css/focus-ring-multiline-expected.checksum: Added.
* platform/qt/fast/css/focus-ring-multiline-expected.png: Added.
* platform/qt/fast/css/focus-ring-multiline-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/focus-ring-detached.html [new file with mode: 0644]
LayoutTests/fast/css/focus-ring-multiline.html [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-detached-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-detached-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-detached-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-snowleopard/fast/css/focus-ring-multiline-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-detached-expected.checksum [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-detached-expected.png [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-detached-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-multiline-expected.checksum [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-multiline-expected.png [new file with mode: 0644]
LayoutTests/platform/qt/fast/css/focus-ring-multiline-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/qt/GraphicsContextQt.cpp