Title: [248572] branches/safari-608-branch/Source/WebCore
- Revision
- 248572
- Author
- [email protected]
- Date
- 2019-08-12 16:42:27 -0700 (Mon, 12 Aug 2019)
Log Message
Cherry-pick r248463. rdar://problem/54139782
REGRESSION (iOS 13): united.com web forms do not respond to taps
https://bugs.webkit.org/show_bug.cgi?id=200531
Reviewed by Antti Koivisto and Wenson Hsieh.
The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
Ignore this constant content change in ContentChangeObserver as a site specific quirk.
In the future, we should make ContentChangeObserver observe the final location of each element
being observed so that we can ignore content that like this which is placed outside the viewport,
and/or far away from where the user tapped.
* page/Quirks.cpp:
(WebCore::Quirks::shouldIgnoreContentChange const): Added.
* page/Quirks.h:
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (248571 => 248572)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-08-12 23:42:25 UTC (rev 248571)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-08-12 23:42:27 UTC (rev 248572)
@@ -1,5 +1,58 @@
2019-08-12 Alan Coon <[email protected]>
+ Cherry-pick r248463. rdar://problem/54139782
+
+ REGRESSION (iOS 13): united.com web forms do not respond to taps
+ https://bugs.webkit.org/show_bug.cgi?id=200531
+
+ Reviewed by Antti Koivisto and Wenson Hsieh.
+
+ The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
+ the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
+ in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
+ Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
+
+ Ignore this constant content change in ContentChangeObserver as a site specific quirk.
+
+ In the future, we should make ContentChangeObserver observe the final location of each element
+ being observed so that we can ignore content that like this which is placed outside the viewport,
+ and/or far away from where the user tapped.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldIgnoreContentChange const): Added.
+ * page/Quirks.h:
+ * page/ios/ContentChangeObserver.cpp:
+ (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-08-09 Ryosuke Niwa <[email protected]>
+
+ REGRESSION (iOS 13): united.com web forms do not respond to taps
+ https://bugs.webkit.org/show_bug.cgi?id=200531
+
+ Reviewed by Antti Koivisto and Wenson Hsieh.
+
+ The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
+ the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
+ in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
+ Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
+
+ Ignore this constant content change in ContentChangeObserver as a site specific quirk.
+
+ In the future, we should make ContentChangeObserver observe the final location of each element
+ being observed so that we can ignore content that like this which is placed outside the viewport,
+ and/or far away from where the user tapped.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldIgnoreContentChange const): Added.
+ * page/Quirks.h:
+ * page/ios/ContentChangeObserver.cpp:
+ (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
+
+2019-08-12 Alan Coon <[email protected]>
+
Cherry-pick r248438. rdar://problem/54093220
[iOS] Position image information should respect the image orientation
Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.cpp (248571 => 248572)
--- branches/safari-608-branch/Source/WebCore/page/Quirks.cpp 2019-08-12 23:42:25 UTC (rev 248571)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.cpp 2019-08-12 23:42:27 UTC (rev 248572)
@@ -399,6 +399,30 @@
#endif
}
+bool Quirks::shouldIgnoreContentChange(const Element& element) const
+{
+#if PLATFORM(IOS_FAMILY)
+ if (!needsQuirks())
+ return false;
+
+ auto* parentElement = element.parentElement();
+ if (!parentElement || !parentElement->hasClass())
+ return false;
+
+ DOMTokenList& classList = parentElement->classList();
+ if (!classList.contains("feedback") || !classList.contains("feedback-mid"))
+ return false;
+
+ if (!equalLettersIgnoringASCIICase(topPrivatelyControlledDomain(m_document->url().host().toString()), "united.com"))
+ return false;
+
+ return true;
+#else
+ UNUSED_PARAM(element);
+ return false;
+#endif
+}
+
// FIXME(<rdar://problem/50394969>): Remove after desmos.com adopts inputmode="none".
bool Quirks::needsInputModeNoneImplicitly(const HTMLElement& element) const
{
Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.h (248571 => 248572)
--- branches/safari-608-branch/Source/WebCore/page/Quirks.h 2019-08-12 23:42:25 UTC (rev 248571)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.h 2019-08-12 23:42:27 UTC (rev 248572)
@@ -31,6 +31,7 @@
namespace WebCore {
class Document;
+class Element;
class EventTarget;
class HTMLElement;
class LayoutUnit;
@@ -55,6 +56,7 @@
Optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const;
#endif
bool shouldDisablePointerEventsQuirk() const;
+ bool shouldIgnoreContentChange(const Element&) const;
bool needsInputModeNoneImplicitly(const HTMLElement&) const;
bool needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const;
bool shouldLightenJapaneseBoldSansSerif() const;
Modified: branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp (248571 => 248572)
--- branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-08-12 23:42:25 UTC (rev 248571)
+++ branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-08-12 23:42:27 UTC (rev 248572)
@@ -36,6 +36,7 @@
#include "Logging.h"
#include "NodeRenderStyle.h"
#include "Page.h"
+#include "Quirks.h"
#include "RenderDescendantIterator.h"
#include "Settings.h"
@@ -596,7 +597,7 @@
bool ContentChangeObserver::shouldObserveVisibilityChangeForElement(const Element& element)
{
- return isObservingContentChanges() && !hasVisibleChangeState() && !visibleRendererWasDestroyed(element);
+ return isObservingContentChanges() && !hasVisibleChangeState() && !visibleRendererWasDestroyed(element) && !element.document().quirks().shouldIgnoreContentChange(element);
}
ContentChangeObserver::StyleChangeScope::StyleChangeScope(Document& document, const Element& element)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes