WebKit Bugzilla
Attachment 372052 Details for
Bug 198559
: "display: contents" Content click does not trigger
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198559-20190613162149.patch (text/plain), 5.77 KB, created by
Antoine Quint
on 2019-06-13 07:21:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-06-13 07:21:50 PDT
Size:
5.77 KB
patch
obsolete
>Subversion Revision: 246397 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index da8ea140b1066f8d346554e4841072ffe34e899f..a6b24d1c9f5423b1ed09d28c66750ecf33450c0b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-13 Antoine Quint <graouts@apple.com> >+ >+ "display: contents" Content click does not trigger >+ https://bugs.webkit.org/show_bug.cgi?id=198559 >+ <rdar://problem/51488524> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: fast/events/ios/click-event-and-display-contents.html >+ >+ * dom/Element.h: >+ > 2019-06-12 Antoine Quint <graouts@apple.com> > > [WHLSL] Hook up compute >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 0d99009f46444ce0945cd803b716d6aa1b115639..75bb1ac947628c6b829bc57c657b40371b318efd 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-13 Antoine Quint <graouts@apple.com> >+ >+ "display: contents" Content click does not trigger >+ https://bugs.webkit.org/show_bug.cgi?id=198559 >+ <rdar://problem/51488524> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::commitPotentialTap): >+ > 2019-06-12 Antoine Quint <graouts@apple.com> > > Show the web page URL when sharing an AR model >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index 8ded545027fd5e88fe1f0fa3f3270b0469127bf5..784e3cdb5ab673f0667effe0198c1b4c50adc505 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -540,7 +540,7 @@ public: > LayoutRect absoluteEventHandlerBounds(bool& includesFixedPositionElements) override; > > const RenderStyle* existingComputedStyle() const; >- const RenderStyle* renderOrDisplayContentsStyle() const; >+ WEBCORE_EXPORT const RenderStyle* renderOrDisplayContentsStyle() const; > > void setBeforePseudoElement(Ref<PseudoElement>&&); > void setAfterPseudoElement(Ref<PseudoElement>&&); >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 0887027410c6ffd4534fbbda7ddc96315150ecd7..075a86aa68e75195c0329011c079dc596ca53a6a 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -1058,7 +1058,13 @@ void WebPage::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, uint64 > m_lastCommittedTapLocation = currentPotentialTapLocation; > }; > >- auto invalidTargetForSingleClick = !m_potentialTapNode || (!m_potentialTapNode->renderer() && !is<HTMLAreaElement>(m_potentialTapNode.get())); >+ auto invalidTargetForSingleClick = !m_potentialTapNode; >+ if (!invalidTargetForSingleClick) { >+ bool targetRenders = m_potentialTapNode->renderer(); >+ if (!targetRenders && is<Element>(m_potentialTapNode.get())) >+ targetRenders = downcast<Element>(*m_potentialTapNode).renderOrDisplayContentsStyle(); >+ invalidTargetForSingleClick = !targetRenders && !is<HTMLAreaElement>(m_potentialTapNode.get()); >+ } > if (invalidTargetForSingleClick) { > // When the node has no click eventlistener, but it may have a dblclick one. > handlePotentialDoubleTapForDoubleClickAtPoint(modifiers, lastLayerTreeTransactionId); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7abeb707a7aec72146cd367c67383b5598bbb934..6e429b0f11ddab6d941370c98bd8fd7c76405c2b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-13 Antoine Quint <graouts@apple.com> >+ >+ "display: contents" Content click does not trigger >+ https://bugs.webkit.org/show_bug.cgi?id=198559 >+ <rdar://problem/51488524> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a new test that checks that tapping on an element with "display: contents" correctly gets a "click" event. >+ >+ * fast/events/ios/click-event-and-display-contents-expected.txt: Added. >+ * fast/events/ios/click-event-and-display-contents.html: Added. >+ > 2019-06-12 Myles C. Maxfield <mmaxfield@apple.com> > > [WHLSL] Hook up compute >diff --git a/LayoutTests/fast/events/ios/click-event-and-display-contents-expected.txt b/LayoutTests/fast/events/ios/click-event-and-display-contents-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..69cfc5a98db74fbe32ac9b678a6134af9736dd59 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/click-event-and-display-contents-expected.txt >@@ -0,0 +1,2 @@ >+PASS >+ >diff --git a/LayoutTests/fast/events/ios/click-event-and-display-contents.html b/LayoutTests/fast/events/ios/click-event-and-display-contents.html >new file mode 100644 >index 0000000000000000000000000000000000000000..73bd2dd36bdc610e8d132b4fae85f226fcd8cd87 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/click-event-and-display-contents.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>This tests that a tap on an element with display: contents dispatches a "click" event.</title> >+<script src="../../../resources/basic-gestures.js"></script> >+<style> >+#target { >+ width: 100px; >+ height: 100px; >+ background-color: black; >+ display: contents; >+} >+</style> >+</head> >+<body> >+<div id="target">FAIL</div> >+<script> >+ >+(function() { >+ if (!window.testRunner || !testRunner.runUIScript) >+ return; >+ >+ testRunner.waitUntilDone(); >+ testRunner.dumpAsText(); >+ >+ const target = document.getElementById("target"); >+ >+ target.addEventListener("click", event => { >+ document.getElementById("target").innerText = "PASS"; >+ testRunner.notifyDone(); >+ }); >+ >+ const bounds = target.getBoundingClientRect(); >+ const x = bounds.left + bounds.width / 2; >+ const y = bounds.top + bounds.height / 2; >+ tapAtPoint(x, y); >+})(); >+ >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198559
: 372052