<attachment> should be selected immediately upon click, and be drag/copyable upon...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Feb 2015 00:09:09 +0000 (00:09 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Feb 2015 00:09:09 +0000 (00:09 +0000)
commit4041f145fa13dae15488c34a8fbbfa84ecc48a41
tree3b2c88ffe615580671d7c404155946882dbc5311
parentaa20783e45aca5bbecc0ac5c8d255d338384aaee
<attachment> should be selected immediately upon click, and be drag/copyable upon click
https://bugs.webkit.org/show_bug.cgi?id=142114
<rdar://problem/19982520>

Reviewed by Enrica Casucci.

* css/html.css:
(attachment):
Make attachment use 'user-select: all' to act as a single click-to-select unit.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFocus): Deleted.
* html/HTMLAttachmentElement.h:
* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::isFocused): Deleted.
(WebCore::RenderAttachment::focusChanged): Deleted.
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintAttachment):
Remove focus-related code; instead of focusing the element upon click,
we get a selection including just the <attachment>, and everything
behaves much more consistently (copy works, drag works, etc.).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180794 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
Source/WebCore/rendering/RenderThemeMac.mm