Changeset 231915 in webkit


Ignore:
Timestamp:
May 17, 2018 12:20:28 PM (6 years ago)
Author:
Wenson Hsieh
Message:

[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 Tim Horton.

Source/WebCore:

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:

LayoutTests:

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.
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r231911 r231915  
     12018-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
     4        https://bugs.webkit.org/show_bug.cgi?id=185735
     5        <rdar://problem/40335311>
     6
     7        Reviewed by Tim Horton.
     8
     9        Adds a new layout test that disables extra zoom mode adaptations, navigates to a new document, and checks that
     10        the innerWidth and innerHeight are reset to their expected (default) values.
     11
     12        * fast/viewport/extrazoom/viewport-adaptations-after-navigation.html: Added.
     13
    1142018-05-17  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r231913 r231915  
     12018-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
     4        https://bugs.webkit.org/show_bug.cgi?id=185735
     5        <rdar://problem/40335311>
     6
     7        Reviewed by Tim Horton.
     8
     9        When performing mainframe navigation, we currently don't update the Page's ViewportConfiguration's disabled
     10        adaptations. This causes disabled adaptations from the previous main document to persist. To fix this, propagate
     11        the new document's disabled adaptations to the client when it becomes the main document in the page.
     12
     13        Test: fast/viewport/extrazoom/viewport-adaptations-after-navigation.html
     14
     15        * dom/Document.cpp:
     16        (WebCore::Document::didBecomeCurrentDocumentInFrame):
     17        (WebCore::Document::processDisabledAdaptations):
     18        (WebCore::Document::dispatchDisabledAdaptationsDidChangeForMainFrame):
     19        * dom/Document.h:
     20
    1212018-05-17  Eric Carlson  <eric.carlson@apple.com>
    222
  • trunk/Source/WebCore/dom/Document.cpp

    r231911 r231915  
    22302230        createRenderTree();
    22312231
     2232    dispatchDisabledAdaptationsDidChangeForMainFrame();
    22322233    updateViewportArguments();
    22332234
     
    34183419
    34193420    m_disabledAdaptations = disabledAdaptations;
    3420 
    3421     if (page() && frame()->isMainFrame())
    3422         page()->chrome().dispatchDisabledAdaptationsDidChange(m_disabledAdaptations);
     3421    dispatchDisabledAdaptationsDidChangeForMainFrame();
     3422}
     3423
     3424void Document::dispatchDisabledAdaptationsDidChangeForMainFrame()
     3425{
     3426    if (!frame()->isMainFrame())
     3427        return;
     3428
     3429    if (!page())
     3430        return;
     3431
     3432    page()->chrome().dispatchDisabledAdaptationsDidChange(m_disabledAdaptations);
    34233433}
    34243434
  • trunk/Source/WebCore/dom/Document.h

    r231910 r231915  
    15071507#endif
    15081508
     1509    void dispatchDisabledAdaptationsDidChangeForMainFrame();
     1510
    15091511#if ENABLE(TELEPHONE_NUMBER_DETECTION)
    15101512    friend void setParserFeature(const String& key, const String& value, Document*, void* userData);
Note: See TracChangeset for help on using the changeset viewer.