Outline with auto style leaves bits behind when the the box is moved.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2015 06:03:51 +0000 (06:03 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2015 06:03:51 +0000 (06:03 +0000)
commit4f189b8094815fc620761df5cb39815c8a5d2245
tree44f4b175fffdfc5b3d1ba1f579450e9e28d5e330
parent1461647dd3adf273574392bd865d24b969cd01a6
Outline with auto style leaves bits behind when the the box is moved.
https://bugs.webkit.org/show_bug.cgi?id=148100

Reviewed by Simon Fraser.

Source/WebCore:

We paint the focus ring when 'outline-style: auto' is present, however
we don't take the focus ring width into account when the repaint rect
is computed.

Tests: fast/repaint/outline-with1px-auto-repaint-rect.html
       fast/repaint/outline-with2px-auto-repaint-rect.html
       fast/repaint/outline-with3px-auto-repaint-rect.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustRectForOutlineAndShadow):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. : 0 as focus ring width is incorrect.
The reason why r169699 fixed the failing cases was because they all had outline width < 3 (but no auto outline style).
The correct fix is to check if the style requires focus ring painting and use the RenderTheme::platformFocusRingMaxWidth
accordingly.

LayoutTests:

Due to RenderView::maximalOutlineSize() each outline width need to be tested separately.

* fast/repaint/outline-with1px-auto-repaint-rect-expected.txt: Added.
* fast/repaint/outline-with1px-auto-repaint-rect.html: Added.
* fast/repaint/outline-with2px-auto-repaint-rect-expected.txt: Added.
* fast/repaint/outline-with2px-auto-repaint-rect.html: Added.
* fast/repaint/outline-with3px-auto-repaint-rect-expected.txt: Added.
* fast/repaint/outline-with3px-auto-repaint-rect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/repaint/outline-with1px-auto-repaint-rect-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/outline-with1px-auto-repaint-rect.html [new file with mode: 0644]
LayoutTests/fast/repaint/outline-with2px-auto-repaint-rect-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/outline-with2px-auto-repaint-rect.html [new file with mode: 0644]
LayoutTests/fast/repaint/outline-with3px-auto-repaint-rect-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/outline-with3px-auto-repaint-rect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm