WebKit Bugzilla
Attachment 373192 Details for
Bug 199349
: Tapping on the bottom part of youtube video behaves as if controls were visible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199349-20190630101351.patch (text/plain), 7.08 KB, created by
zalan
on 2019-06-30 10:13:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-30 10:13:52 PDT
Size:
7.08 KB
patch
obsolete
>Subversion Revision: 246791 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 704f598299e11482f5d1b3128e2bceebc42ab192..cee7ed849276a773d792ba865df0efeb6d8a21a6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-06-30 Zalan Bujtas <zalan@apple.com> >+ >+ Tapping on the bottom part of youtube video behaves as if controls were visible >+ https://bugs.webkit.org/show_bug.cgi?id=199349 >+ <rdar://problem/51955744> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WIP. >+ >+ * page/ios/ContentChangeObserver.cpp: >+ (WebCore::ContentChangeObserver::isConsideredHidden): >+ (WebCore::ContentChangeObserver::didAddTransition): >+ (WebCore::ContentChangeObserver::didFinishTransition): >+ (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope): >+ (WebCore::isConsideredHidden): Deleted. >+ * page/ios/ContentChangeObserver.h: >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Add user agent quirk for bankofamerica.com >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4c8fee3fbb9c0ddae2517a9f5609ec77df1a8451..7df4d2e1a71ee917b000f9a9be3173d2a6b72c9f 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-06-30 Zalan Bujtas <zalan@apple.com> >+ >+ Tapping on the bottom part of youtube video behaves as if controls were visible >+ https://bugs.webkit.org/show_bug.cgi?id=199349 >+ <rdar://problem/51955744> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::handleTouchEvent): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::handleSyntheticClick): >+ (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver): >+ (WebKit::WebPage::completeSyntheticClick): >+ (WebKit::WebPage::potentialTapAtPosition): >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Fully rename WebKitGTK+ -> WebKitGTK everywhere >diff --git a/Source/WebCore/page/ios/ContentChangeObserver.cpp b/Source/WebCore/page/ios/ContentChangeObserver.cpp >index 803c4599fd688febaae409ba421ef2a53a6ea0c2..780856461ab4029fd3d49cbdfc40705df292a1e4 100644 >--- a/Source/WebCore/page/ios/ContentChangeObserver.cpp >+++ b/Source/WebCore/page/ios/ContentChangeObserver.cpp >@@ -43,12 +43,12 @@ namespace WebCore { > static const Seconds maximumDelayForTimers { 400_ms }; > static const Seconds maximumDelayForTransitions { 300_ms }; > >-static bool isConsideredHidden(const Element& element) >+bool ContentChangeObserver::isConsideredHidden(const Node& node) > { >- if (!element.renderStyle()) >+ if (!node.renderStyle()) > return true; > >- auto& style = *element.renderStyle(); >+ auto& style = *node.renderStyle(); > if (style.display() == DisplayType::None) > return true; > >@@ -80,6 +80,35 @@ static bool isConsideredHidden(const Element& element) > if (maxHeight.isFixed() && !maxHeight.value()) > return true; > >+ unsigned i = 0; >+ for (auto* parent = node.parentNode(); parent && i < 3; parent = parent->parentNode(), ++i) { >+ if (!parent->renderStyle()) >+ return true; >+ auto& style = *parent->renderStyle(); >+ if (style.opacity() == 1) >+ continue; >+ // Parent is hidden. >+ if (!style.opacity()) >+ return true; >+ // Checking playing animations to see if parent is getting visible. >+ auto isAnimatingOpacity = [&](auto& animation) { >+ return animation.property() == CSSPropertyOpacity || animation.playState() == AnimationPlayState::Playing; >+ }; >+ // Animations. >+ if (auto* animations = style.animations()) { >+ for (unsigned i = 0; i < animations->size(); ++i) { >+ if (isAnimatingOpacity(animations->animation(i))) >+ return true; >+ } >+ } >+ // Transitions. >+ if (auto* transitions = style.transitions()) { >+ for (unsigned i = 0; i < transitions->size(); ++i) { >+ if (isAnimatingOpacity(transitions->animation(i))) >+ return true; >+ } >+ } >+ } > return false; > } > >diff --git a/Source/WebCore/page/ios/ContentChangeObserver.h b/Source/WebCore/page/ios/ContentChangeObserver.h >index 1ef64c2b343e89ae76819a0e2d6905d7918f8461..6eb6740df6723de8c053449071a43cc5a8a4ad50 100644 >--- a/Source/WebCore/page/ios/ContentChangeObserver.h >+++ b/Source/WebCore/page/ios/ContentChangeObserver.h >@@ -48,6 +48,7 @@ public: > > WEBCORE_EXPORT void startContentObservationForDuration(Seconds duration); > WKContentChange observedContentChange() const { return m_observedContentState; } >+ WEBCORE_EXPORT static bool isConsideredHidden(const Node&); > > void didInstallDOMTimer(const DOMTimer&, Seconds timeout, bool singleShot); > void didRemoveDOMTimer(const DOMTimer&); >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index d5423bbb3c5fdf832a658c28690b4a6399c9f315..9ce043ca760ee63d256030cead461a9bdfe609b7 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1821,6 +1821,7 @@ private: > SelectionAnchor m_selectionAnchor { Start }; > > RefPtr<WebCore::Node> m_potentialTapNode; >+ bool m_potentialTapNodeIsConsideredHidden { false }; > WebCore::FloatPoint m_potentialTapLocation; > RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin; > >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 044e11f017876901c81d39124bf68fde38e1cfa0..65228446cee43be66cbb7335a798ff10c49882fb 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -675,6 +675,11 @@ void WebPage::handleSyntheticClick(Node& nodeRespondingToClick, const WebCore::F > if (m_isClosed) > return; > >+ if (&nodeRespondingToClick == m_potentialTapNode.get() && m_potentialTapNodeIsConsideredHidden) { >+ LOG(ContentObservation, "handleSyntheticClick: target node is considered hidden -> hover."); >+ return; >+ } >+ > auto& contentChangeObserver = respondingDocument.contentChangeObserver(); > auto observedContentChange = contentChangeObserver.observedContentChange(); > auto targetNodeTriggersClick = nodeAlwaysTriggersClick(nodeRespondingToClick); >@@ -1030,6 +1035,7 @@ void WebPage::handleStylusSingleTapAtPoint(const WebCore::IntPoint& point, uint6 > void WebPage::potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint& position, bool shouldRequestMagnificationInformation) > { > m_potentialTapNode = m_page->mainFrame().nodeRespondingToClickEvents(position, m_potentialTapLocation, m_potentialTapSecurityOrigin.get()); >+ m_potentialTapNodeIsConsideredHidden = !m_potentialTapNode || ContentChangeObserver::isConsideredHidden(*m_potentialTapNode); > > if (shouldRequestMagnificationInformation && m_potentialTapNode && m_viewGestureGeometryCollector) { > // FIXME: Could this be combined into tap highlight?
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 199349
:
373192
|
373202
|
373207
|
373208
|
373247