WebKit Bugzilla
Attachment 340606 Details for
Bug 185735
: [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185735-20180517110733.patch (text/plain), 5.88 KB, created by
Wenson Hsieh
on 2018-05-17 11:07:33 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-05-17 11:07:33 PDT
Size:
5.88 KB
patch
obsolete
>Subversion Revision: 231844 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2af26a5e76a0228b39de4d08a3cded519e14d811..73c4c54187a025c59c76721c842506c7159f2719 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-05-17 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation >+ https://bugs.webkit.org/show_bug.cgi?id=185735 >+ <rdar://problem/40335311> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When performing mainframe navigation, we currently don't update the Page's ViewportConfiguration's disabled >+ adaptations. This causes disabled adaptations from the previous main document to persist. To fix this, propagate >+ the new document's disabled adaptations to the client when it becomes the main document in the page. >+ >+ Test: fast/viewport/extrazoom/viewport-adaptations-after-navigation.html >+ >+ * dom/Document.cpp: >+ (WebCore::Document::didBecomeCurrentDocumentInFrame): >+ (WebCore::Document::processDisabledAdaptations): >+ (WebCore::Document::dispatchDisabledAdaptationsDidChangeForMainFrame): >+ * dom/Document.h: >+ > 2018-05-16 Antoine Quint <graouts@apple.com> > > REGRESSION (r230574): Interrupted hardware transitions don't behave correctly >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 750cf063a323649845236ac9db0f377888726b7c..ec821e488ee4b1de6df130d7c8c1c5dd2a8015c4 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -2228,6 +2228,7 @@ void Document::didBecomeCurrentDocumentInFrame() > if (!hasLivingRenderTree()) > createRenderTree(); > >+ dispatchDisabledAdaptationsDidChangeForMainFrame(); > updateViewportArguments(); > > // FIXME: Doing this only for the main frame is insufficient. >@@ -3406,9 +3407,18 @@ void Document::processDisabledAdaptations(const String& disabledAdaptationsStrin > return; > > m_disabledAdaptations = disabledAdaptations; >+ dispatchDisabledAdaptationsDidChangeForMainFrame(); >+} >+ >+void Document::dispatchDisabledAdaptationsDidChangeForMainFrame() >+{ >+ if (!frame()->isMainFrame()) >+ return; >+ >+ if (!page()) >+ return; > >- if (page() && frame()->isMainFrame()) >- page()->chrome().dispatchDisabledAdaptationsDidChange(m_disabledAdaptations); >+ page()->chrome().dispatchDisabledAdaptationsDidChange(m_disabledAdaptations); > } > > void Document::processViewport(const String& features, ViewportArguments::Type origin) >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 3a409090bb3574ac942e376ed85da8035d120f3c..0616392b38d4f313dce1e9e4de7bccdda61ee205 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -1508,6 +1508,8 @@ private: > void addDocumentToFullScreenChangeEventQueue(Document*); > #endif > >+ void dispatchDisabledAdaptationsDidChangeForMainFrame(); >+ > #if ENABLE(TELEPHONE_NUMBER_DETECTION) > friend void setParserFeature(const String& key, const String& value, Document*, void* userData); > void setIsTelephoneNumberParsingAllowed(bool); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0f63a4c418686b692b04cb30644164c67f533814..d92f531b88b7cd10f290014ab3d53b7b1eee1e31 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-05-17 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation >+ https://bugs.webkit.org/show_bug.cgi?id=185735 >+ <rdar://problem/40335311> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds a new layout test that disables extra zoom mode adaptations, navigates to a new document, and checks that >+ the innerWidth and innerHeight are reset to their expected (default) values. >+ >+ * fast/viewport/extrazoom/viewport-adaptations-after-navigation.html: Added. >+ > 2018-05-16 Per Arne Vollan <pvollan@apple.com> > > Mark animations/keyframes-dynamic.html and related tests as failing on Windows. >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html b/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5845eba03ab2f2c69ed65308bedfb23ebf486fae >--- /dev/null >+++ b/LayoutTests/fast/viewport/extrazoom/viewport-adaptations-after-navigation.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+<head> >+ <script src="../../../resources/ui-helper.js"></script> >+ <style> >+ body, html { >+ margin: 0; >+ width: 100%; >+ height: 100%; >+ } >+ </style> >+ <script> >+ async function runTest() { >+ if (!window.testRunner) { >+ description("Please use WebKitTestRunner to run this test."); >+ return; >+ } >+ >+ const matches = location.search.match(/previousSize=([0-9]+),([0-9]+)/); >+ if (matches) { >+ document.write(`previous size: (${parseInt(matches[1])}, ${parseInt(matches[2])}); current size: (${innerWidth}, ${innerHeight})`); >+ testRunner.notifyDone(); >+ return; >+ } >+ >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ >+ const meta = document.createElement("meta"); >+ meta.setAttribute("name", "disabled-adaptations"); >+ meta.setAttribute("content", internals.extraZoomModeAdaptationName()); >+ document.head.appendChild(meta); >+ await UIHelper.ensureVisibleContentRectUpdate(); >+ >+ location.href += `?previousSize=${innerWidth},${innerHeight}`; >+ } >+ </script> >+</head> >+<body onload="runTest()"></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 185735
: 340606