Dispatch 'click' event even if a mousedown event target and a mouseup event target are different.

We dispatched 'click' event only if a mousedown event target and a mouseup event
target were identical. It's not practical because a click event was not
dispatched in the following case:

<button>Click me</button>
<style>
button {
    padding: 10px;
}
button:active {
    top: 5px;
    position: relative;
}
</style>
- Click on the top of an inner element.

<div id=outer><div id=inner>Click me</div></div>
- mousedown on the inner element, remove the inner element from
the tree, mouseup on the outer element.

The latest draft of DOM Events specification [1] says:
> should fire click and dblclick events on the nearest common ancestor when the
> event targets of the associated mousedown and mouseup events are different.

We follow it, and the new behavior matches to IE11.

[1] https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#events-mouseevents

BUG=163854, 310263

Review URL: https://codereview.chromium.org/71293002

git-svn-id: svn://svn.chromium.org/blink/trunk@162081 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't double clear rareData bits inside attach

Now that ::detach() marks the element with NeedsReattachStyleChange we
end up double clearing a bunch of state in the ElementRareData. We only
need to clear that state inside ::detach if we know we're not about to
call ::attach().

BUG=299011

Review URL: https://codereview.chromium.org/72633002

git-svn-id: svn://svn.chromium.org/blink/trunk@162082 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add casting helper functions for ClipPathOperation subclasses.

Also, simplify ReferenceClipPathOperation::operator== and
ShapeClipPathOperation::operator==.

BUG=309516

Review URL: https://codereview.chromium.org/73043003

git-svn-id: svn://svn.chromium.org/blink/trunk@162083 bbb929c8-8fbe-4397-9dbb-9b2b20218538