Clean up the difference between painting focus rings and adding PDF annotations
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2014 02:58:39 +0000 (02:58 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2014 02:58:39 +0000 (02:58 +0000)
commit9f43da3c0f89cab074fbd55ffcce61f0bd763885
tree5f3829bee8744a7122f388f395042402d0617258
parent2652586d1e952e1e19cd0e641b9b07af3b8134d4
Clean up the difference between painting focus rings and adding PDF annotations
https://bugs.webkit.org/show_bug.cgi?id=132638

Reviewed by Simon Fraser.

The code to add a PDF annotation when printing was called from
drawFocusRing, which is quite confusing. With just little movement
of code, we can detect an annotation and call addPDFURLRect in the
paint phase, and drawFocusRing becomes something that only
draws focus rings.

* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline): Split calls to drawFocusRing
and addPDFURLRect.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintFocusRing): Get rid of call to PDF.
(WebCore::RenderObject::addPDFURLRect): Change the signature so it
can be called externally, and calculates the rectangle itself.
(WebCore::RenderObject::paintOutline): Split the calls.
* rendering/RenderObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h