Support activation behavior of link element
https://bugs.webkit.org/show_bug.cgi?id=137597

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-12
Reviewed by Benjamin Poulain.

Source/WebCore:

Support activation behavior of link elements as defined in [1],
i.e. to follow the hyperlink created by the link element when it is fully active.

[1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element

Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
       fast/dom/html-link-element-activation-behavior-on-mouse-click.html
       fast/dom/html-link-element-activation-behavior-url-is-null.html

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::triggerActivationBehavior):
* dom/MouseEvent.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::isLinkClick): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::defaultEventHandler):
(WebCore::HTMLLinkElement::handleClick):
* html/HTMLLinkElement.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):

LayoutTests:

Add test cases for link element activation behavior.

* fast/dom/html-link-element-activation-behavior-on-element-click-expected.txt: Added.
* fast/dom/html-link-element-activation-behavior-on-element-click.html: Added.
* fast/dom/html-link-element-activation-behavior-on-mouse-click-expected.txt: Added.
* fast/dom/html-link-element-activation-behavior-on-mouse-click.html: Added.
* fast/dom/html-link-element-activation-behavior-url-is-null-expected.txt: Added.
* fast/dom/html-link-element-activation-behavior-url-is-null.html: Added.
* fast/dom/resources/html-link-element-activation-behavior-on-element-click-step1.html: Added.
* fast/dom/resources/html-link-element-activation-behavior-on-mouse-click-step1.html: Added.
* fast/dom/resources/html-link-element-activation-behavior-target.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174637 268f45cc-cd09-0410-ab3c-d52691b4dbfc