Releasing the mouse on the AutoFill button activates it regardless of whether the button was pressed. Moreover, we always dispatch a DOM click event at the node n where the cursor was released regardless of whether n was pressed so long as n is a shadow tree node.
<rdar://problem/21069245>
Created attachment 254517 [details] Patch and layout test
Comment on attachment 254517 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=254517&action=review > Source/WebCore/page/EventHandler.cpp:2053 > + Element* mouseReleaseShadowHost = mouseReleaseNode->shadowHost(); > + if (mouseReleaseShadowHost && mouseReleaseShadowHost == mousePressNode->shadowHost()) { > + // We want to dispatch the click to the shadow tree host element to give listeners the illusion that the > + // shadom tree is a single element. For example, we want to give the illusion that <input type="range"> > + // is a single element even though it is a composition of multiple shadom tree elements. > + return mouseReleaseShadowHost; We do use shadow DOM in summary element implementation so I think this needs to be changed to only do this for ShadowRoot::UserAgentShadowRoot The check you just removed above was quite relevant.
(In reply to comment #3) > Comment on attachment 254517 [details] > Patch and layout test > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254517&action=review > > > Source/WebCore/page/EventHandler.cpp:2053 > > + Element* mouseReleaseShadowHost = mouseReleaseNode->shadowHost(); > > + if (mouseReleaseShadowHost && mouseReleaseShadowHost == mousePressNode->shadowHost()) { > > + // We want to dispatch the click to the shadow tree host element to give listeners the illusion that the > > + // shadom tree is a single element. For example, we want to give the illusion that <input type="range"> > > + // is a single element even though it is a composition of multiple shadom tree elements. > > + return mouseReleaseShadowHost; > > We do use shadow DOM in summary element implementation so I think this needs > to be changed to only do this for ShadowRoot::UserAgentShadowRoot > The check you just removed above was quite relevant. On my second thought, this is irreleavnt.
Committed r185341: <http://trac.webkit.org/changeset/185341>