Allow <attachment> elements to be focused
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 22:23:53 +0000 (22:23 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 22:23:53 +0000 (22:23 +0000)
commitc559a08f4e2ff7d41e481523e2abd0dcbfc8db00
treebbe0e4166707fd40ea7df3cbbe9d00f0f766af55
parent5eb1803203ef5bc927eb21ee8a220cd15b01fcf9
Allow <attachment> elements to be focused
https://bugs.webkit.org/show_bug.cgi?id=141847

Reviewed by Enrica Casucci.

* css/html.css:
(attachment:focus):
Disable focus rings for <attachment>.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFocus):
* html/HTMLAttachmentElement.h:
Allow HTMLAttachmentElement to get editing focus.
Let RenderAttachment know when focus changes.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::paintReplaced):
Paint the background in cyan when we are inside the selection or have focus.
Otherwise, it will be gray.

(WebCore::RenderAttachment::focusChanged):
When focus changes, repaint.

* rendering/RenderAttachment.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/html.css
Source/WebCore/html/HTMLAttachmentElement.cpp
Source/WebCore/html/HTMLAttachmentElement.h
Source/WebCore/rendering/RenderAttachment.cpp
Source/WebCore/rendering/RenderAttachment.h