Changeset 240912 in webkit


Ignore:
Timestamp:
Feb 3, 2019 5:48:13 PM (5 years ago)
Author:
Simon Fraser
Message:

Make setNeedsLayout on the root more explicitly about triggering its side-effects
https://bugs.webkit.org/show_bug.cgi?id=194198

Reviewed by Antti Koivisto.

Source/WebCore:

Calling setNeedsLayout() on the FrameView or RenderView is an odd concept; the render tree
generally manages its own dirty state.

Most callers of setNeedsLayout() on the root are really trying to trigger the side-effects
of layout, like compositing updates, which are required when view configuration state, like
headers, footers and transparency, change. These dependencies are currently implicit and
poorly defined.

Renaming "setNeedsLayout" on FrameView is a step towards being more explicit about pure
rendering updates, vs updates of downstream data strutures like compositing. It's now called
setNeedsLayoutAfterViewConfigurationChange(). In addition, expose
setNeedsCompositingConfigurationUpdate() and setNeedsCompositingGeometryUpdate() so callers
can trigger the appropriate types of compositing updates on the root layer.

In addition, FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange() schedules a
layout. Withtout this, some callers would dirty the RenderView's layout but rely on some
other trigger to make the layout happen.

This cleanup was prompted by noticing that FrameView::setHeaderHeight() dirtied layout
but never scheduled it, making banner insertion in MiniBrowser unreliable.

This patch also removes the aliasing of headerHeight/footerHeight between Page and
FrameView. Banners are a property of Page, so FrameView fetches the banner heights
from Page.

  • page/FrameView.cpp:

(WebCore::FrameView::headerHeight const):
(WebCore::FrameView::footerHeight const):
(WebCore::FrameView::availableContentSizeChanged):
(WebCore::FrameView::setNeedsLayoutAfterViewConfigurationChange):
(WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
(WebCore::FrameView::setNeedsCompositingGeometryUpdate):
(WebCore::FrameView::scheduleSelectionUpdate):
(WebCore::FrameView::setTransparent):
(WebCore::FrameView::setBaseBackgroundColor):
(WebCore::FrameView::setAutoSizeFixedMinimumHeight):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::setHeaderHeight): Deleted.
(WebCore::FrameView::setFooterHeight): Deleted.
(WebCore::FrameView::setNeedsLayout): Deleted.

  • page/FrameView.h:
  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange):
(WebCore::FrameViewLayoutContext::setNeedsLayout): Deleted.

  • page/FrameViewLayoutContext.h:
  • page/Page.cpp:

(WebCore::Page::setPageScaleFactor):
(WebCore::Page::setHeaderHeight):
(WebCore::Page::setFooterHeight):
(WebCore::Page::addHeaderWithHeight): Deleted.
(WebCore::Page::addFooterWithHeight): Deleted.

  • page/Page.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateBacking):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setHeaderHeight):
(WebCore::Internals::setFooterHeight):

Source/WebKit:

Call the newly named functions.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::updateScrollbars):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::didInitializePlugin):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setHeaderBannerHeightForTesting):
(WebKit::WebPage::setFooterBannerHeightForTesting):

  • WebProcess/WebPage/mac/PageBannerMac.mm:

(WebKit::PageBanner::addToPage):
(WebKit::PageBanner::detachFromPage):
(WebKit::PageBanner::hide):

Source/WebKitLegacy/mac:

Call the newly named functions.

  • WebView/WebFrame.mm:

(-[WebFrame setNeedsLayout]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView setNeedsLayout:]):

Tools:

No need to set the banner heights on navigation now, since Page stores them.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController webView:didFinishNavigation:]):

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r240911 r240912  
     12019-02-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make setNeedsLayout on the root more explicitly about triggering its side-effects
     4        https://bugs.webkit.org/show_bug.cgi?id=194198
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Calling setNeedsLayout() on the FrameView or RenderView is an odd concept; the render tree
     9        generally manages its own dirty state.
     10
     11        Most callers of setNeedsLayout() on the root are really trying to trigger the side-effects
     12        of layout, like compositing updates, which are required when view configuration state, like
     13        headers, footers and transparency, change. These dependencies are currently implicit and
     14        poorly defined.
     15
     16        Renaming "setNeedsLayout" on FrameView is a step towards being more explicit about pure
     17        rendering updates, vs updates of downstream data strutures like compositing. It's now called
     18        setNeedsLayoutAfterViewConfigurationChange(). In addition, expose
     19        setNeedsCompositingConfigurationUpdate() and setNeedsCompositingGeometryUpdate() so callers
     20        can trigger the appropriate types of compositing updates on the root layer.
     21
     22        In addition, FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange() schedules a
     23        layout. Withtout this, some callers would dirty the RenderView's layout but rely on some
     24        other trigger to make the layout happen.
     25
     26        This cleanup was prompted by noticing that FrameView::setHeaderHeight() dirtied layout
     27        but never scheduled it, making banner insertion in MiniBrowser unreliable.
     28
     29        This patch also removes the aliasing of headerHeight/footerHeight between Page and
     30        FrameView. Banners are a property of Page, so FrameView fetches the banner heights
     31        from Page.
     32
     33        * page/FrameView.cpp:
     34        (WebCore::FrameView::headerHeight const):
     35        (WebCore::FrameView::footerHeight const):
     36        (WebCore::FrameView::availableContentSizeChanged):
     37        (WebCore::FrameView::setNeedsLayoutAfterViewConfigurationChange):
     38        (WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
     39        (WebCore::FrameView::setNeedsCompositingGeometryUpdate):
     40        (WebCore::FrameView::scheduleSelectionUpdate):
     41        (WebCore::FrameView::setTransparent):
     42        (WebCore::FrameView::setBaseBackgroundColor):
     43        (WebCore::FrameView::setAutoSizeFixedMinimumHeight):
     44        (WebCore::FrameView::enableAutoSizeMode):
     45        (WebCore::FrameView::setHeaderHeight): Deleted.
     46        (WebCore::FrameView::setFooterHeight): Deleted.
     47        (WebCore::FrameView::setNeedsLayout): Deleted.
     48        * page/FrameView.h:
     49        * page/FrameViewLayoutContext.cpp:
     50        (WebCore::FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange):
     51        (WebCore::FrameViewLayoutContext::setNeedsLayout): Deleted.
     52        * page/FrameViewLayoutContext.h:
     53        * page/Page.cpp:
     54        (WebCore::Page::setPageScaleFactor):
     55        (WebCore::Page::setHeaderHeight):
     56        (WebCore::Page::setFooterHeight):
     57        (WebCore::Page::addHeaderWithHeight): Deleted.
     58        (WebCore::Page::addFooterWithHeight): Deleted.
     59        * page/Page.h:
     60        * rendering/RenderLayerCompositor.cpp:
     61        (WebCore::RenderLayerCompositor::updateBacking):
     62        * testing/Internals.cpp:
     63        (WebCore::Internals::resetToConsistentState):
     64        (WebCore::Internals::setHeaderHeight):
     65        (WebCore::Internals::setFooterHeight):
     66
    1672019-02-03  John Wilander  <wilander@apple.com>
    268
  • trunk/Source/WebCore/page/FrameView.cpp

    r240904 r240912  
    10481048}
    10491049
    1050 void FrameView::setHeaderHeight(int headerHeight)
    1051 {
    1052     if (frame().page())
    1053         ASSERT(frame().isMainFrame());
    1054     m_headerHeight = headerHeight;
    1055 
    1056     if (RenderView* renderView = this->renderView())
    1057         renderView->setNeedsLayout();
    1058 }
    1059 
    1060 void FrameView::setFooterHeight(int footerHeight)
    1061 {
    1062     if (frame().page())
    1063         ASSERT(frame().isMainFrame());
    1064     m_footerHeight = footerHeight;
    1065 
    1066     if (RenderView* renderView = this->renderView())
    1067         renderView->setNeedsLayout();
     1050int FrameView::headerHeight() const
     1051{
     1052    if (!frame().isMainFrame())
     1053        return 0;
     1054    Page* page = frame().page();
     1055    return page ? page->headerHeight() : 0;
     1056}
     1057
     1058int FrameView::footerHeight() const
     1059{
     1060    if (!frame().isMainFrame())
     1061        return 0;
     1062    Page* page = frame().page();
     1063    return page ? page->footerHeight() : 0;
    10681064}
    10691065
     
    26742670
    26752671    updateLayoutViewport();
    2676     setNeedsLayout();
     2672    setNeedsLayoutAfterViewConfigurationChange();
    26772673    ScrollView::availableContentSizeChanged(reason);
    26782674}
     
    29192915}
    29202916
    2921 void FrameView::setNeedsLayout()
    2922 {
    2923     layoutContext().setNeedsLayout();
     2917void FrameView::setNeedsLayoutAfterViewConfigurationChange()
     2918{
     2919    layoutContext().setNeedsLayoutAfterViewConfigurationChange();
     2920}
     2921
     2922void FrameView::setNeedsCompositingConfigurationUpdate()
     2923{
     2924    RenderView* renderView = this->renderView();
     2925    if (renderView->usesCompositing()) {
     2926        if (auto* rootLayer = renderView->layer())
     2927            renderView->layer()->setNeedsCompositingConfigurationUpdate();
     2928    }
     2929}
     2930
     2931void FrameView::setNeedsCompositingGeometryUpdate()
     2932{
     2933    RenderView* renderView = this->renderView();
     2934    if (renderView->usesCompositing()) {
     2935        if (auto* rootLayer = renderView->layer())
     2936            renderView->layer()->setNeedsCompositingGeometryUpdate();
     2937    }
    29242938}
    29252939
     
    29302944    // FIXME: We should not need to go through the layout process since selection update does not change dimension/geometry.
    29312945    // However we can't tell at this point if the tree is stable yet, so let's just schedule a root only layout for now.
    2932     setNeedsLayout();
    2933     layoutContext().scheduleLayout();
     2946    setNeedsLayoutAfterViewConfigurationChange();
    29342947}
    29352948
     
    29532966        return;
    29542967
    2955     renderView()->compositor().rootBackgroundColorOrTransparencyChanged();
    2956     setNeedsLayout();
     2968    setNeedsLayoutAfterViewConfigurationChange();
     2969    setNeedsCompositingConfigurationUpdate();
    29572970}
    29582971
     
    29752988
    29762989    recalculateScrollbarOverlayStyle();
    2977     setNeedsLayout();
    2978 
    2979     renderView()->compositor().rootBackgroundColorOrTransparencyChanged();
     2990    setNeedsLayoutAfterViewConfigurationChange();
     2991    setNeedsCompositingConfigurationUpdate();
    29802992}
    29812993
     
    35173529    m_autoSizeFixedMinimumHeight = fixedMinimumHeight;
    35183530
    3519     setNeedsLayout();
     3531    setNeedsLayoutAfterViewConfigurationChange();
    35203532}
    35213533
     
    45174529    m_didRunAutosize = false;
    45184530
    4519     setNeedsLayout();
     4531    setNeedsLayoutAfterViewConfigurationChange();
    45204532    layoutContext().scheduleLayout();
    45214533    if (m_shouldAutoSize) {
  • trunk/Source/WebCore/page/FrameView.h

    r240904 r240912  
    118118
    119119    WEBCORE_EXPORT bool needsLayout() const;
    120     WEBCORE_EXPORT void setNeedsLayout();
     120    WEBCORE_EXPORT void setNeedsLayoutAfterViewConfigurationChange();
     121
     122    void setNeedsCompositingConfigurationUpdate();
     123    void setNeedsCompositingGeometryUpdate();
     124
    121125    void setViewportConstrainedObjectsNeedLayout();
    122126
     
    574578    LayoutPoint scrollPositionRespectingCustomFixedPosition() const;
    575579
    576     int headerHeight() const final { return m_headerHeight; }
    577     WEBCORE_EXPORT void setHeaderHeight(int);
    578     int footerHeight() const final { return m_footerHeight; }
    579     WEBCORE_EXPORT void setFooterHeight(int);
     580    WEBCORE_EXPORT int headerHeight() const final;
     581    WEBCORE_EXPORT int footerHeight() const final;
    580582
    581583    WEBCORE_EXPORT float topContentInset(TopContentInsetType = TopContentInsetType::WebCoreContentInset) const final;
  • trunk/Source/WebCore/page/FrameViewLayoutContext.cpp

    r240895 r240912  
    314314}
    315315
    316 void FrameViewLayoutContext::setNeedsLayout()
     316void FrameViewLayoutContext::setNeedsLayoutAfterViewConfigurationChange()
    317317{
    318318    if (m_disableSetNeedsLayoutCount) {
     
    324324        ASSERT(!renderView->inHitTesting());
    325325        renderView->setNeedsLayout();
     326        scheduleLayout();
    326327    }
    327328}
  • trunk/Source/WebCore/page/FrameViewLayoutContext.h

    r240901 r240912  
    5151
    5252    void layout();
     53    bool needsLayout() const;
    5354
    54     void setNeedsLayout();
    55     bool needsLayout() const;
     55    // We rely on the side-effects of layout, like compositing updates, to update state in various subsystems
     56    // whose dependencies are poorly defined. This call triggers such updates.
     57    void setNeedsLayoutAfterViewConfigurationChange();
    5658
    5759    void scheduleLayout();
  • trunk/Source/WebCore/page/Page.cpp

    r240875 r240912  
    10061006
    10071007    if (!m_settings->delegatesPageScaling()) {
    1008         if (auto* renderView = document->renderView()) {
    1009             renderView->setNeedsLayout();
    1010             if (renderView->hasLayer() && renderView->layer()->isComposited())
    1011                 renderView->layer()->setNeedsCompositingGeometryUpdate();
    1012         }
     1008        view->setNeedsLayoutAfterViewConfigurationChange();
     1009        view->setNeedsCompositingGeometryUpdate();
    10131010
    10141011        document->resolveStyle(Document::ResolveStyleType::Rebuild);
     
    19691966}
    19701967
    1971 #if ENABLE(RUBBER_BANDING)
    1972 void Page::addHeaderWithHeight(int headerHeight)
    1973 {
     1968void Page::setHeaderHeight(int headerHeight)
     1969{
     1970    if (headerHeight == m_headerHeight)
     1971        return;
     1972
    19741973    m_headerHeight = headerHeight;
    19751974
     
    19821981        return;
    19831982
    1984     frameView->setHeaderHeight(m_headerHeight);
    1985     renderView->compositor().updateLayerForHeader(m_headerHeight);
    1986 }
    1987 
    1988 void Page::addFooterWithHeight(int footerHeight)
    1989 {
     1983    frameView->setNeedsLayoutAfterViewConfigurationChange();
     1984    frameView->setNeedsCompositingGeometryUpdate();
     1985}
     1986
     1987void Page::setFooterHeight(int footerHeight)
     1988{
     1989    if (footerHeight == m_footerHeight)
     1990        return;
     1991
    19901992    m_footerHeight = footerHeight;
    19911993
     
    19982000        return;
    19992001
    2000     frameView->setFooterHeight(m_footerHeight);
    2001     renderView->compositor().updateLayerForFooter(m_footerHeight);
    2002 }
    2003 #endif
     2002    frameView->setNeedsLayoutAfterViewConfigurationChange();
     2003    frameView->setNeedsCompositingGeometryUpdate();
     2004}
    20042005
    20052006void Page::incrementNestedRunLoopCount()
  • trunk/Source/WebCore/page/Page.h

    r240634 r240912  
    520520    OptionSet<LayoutMilestone> requestedLayoutMilestones() const { return m_requestedLayoutMilestones; }
    521521
    522 #if ENABLE(RUBBER_BANDING)
    523     WEBCORE_EXPORT void addHeaderWithHeight(int);
    524     WEBCORE_EXPORT void addFooterWithHeight(int);
    525 #endif
     522    WEBCORE_EXPORT void setHeaderHeight(int);
     523    WEBCORE_EXPORT void setFooterHeight(int);
    526524
    527525    int headerHeight() const { return m_headerHeight; }
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r240899 r240912  
    15441544
    15451545            if (layer.isRenderViewLayer() && useCoordinatedScrollingForLayer(layer)) {
     1546                auto& frameView = m_renderView.frameView();
    15461547                if (auto* scrollingCoordinator = this->scrollingCoordinator())
    1547                     scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
     1548                    scrollingCoordinator->frameViewRootLayerDidChange(frameView);
    15481549#if ENABLE(RUBBER_BANDING)
    1549                 updateLayerForHeader(page().headerHeight());
    1550                 updateLayerForFooter(page().footerHeight());
     1550                updateLayerForHeader(frameView.headerHeight());
     1551                updateLayerForFooter(frameView.footerHeight());
    15511552#endif
    15521553                updateRootContentLayerClipping();
    15531554
    15541555                if (auto* tiledBacking = layer.backing()->tiledBacking())
    1555                     tiledBacking->setTopContentInset(m_renderView.frameView().topContentInset());
     1556                    tiledBacking->setTopContentInset(frameView.topContentInset());
    15561557            }
    15571558
  • trunk/Source/WebCore/testing/Internals.cpp

    r240644 r240912  
    450450    FrameView* mainFrameView = page.mainFrame().view();
    451451    if (mainFrameView) {
    452         mainFrameView->setHeaderHeight(0);
    453         mainFrameView->setFooterHeight(0);
     452        page.setHeaderHeight(0);
     453        page.setFooterHeight(0);
    454454        page.setTopContentInset(0);
    455455        mainFrameView->setUseFixedLayout(false);
     
    29042904        return;
    29052905
    2906     document->view()->setHeaderHeight(height);
     2906    document->page()->setHeaderHeight(height);
    29072907}
    29082908
     
    29132913        return;
    29142914
    2915     document->view()->setFooterHeight(height);
     2915    document->page()->setFooterHeight(height);
    29162916}
    29172917
  • trunk/Source/WebKit/ChangeLog

    r240909 r240912  
     12019-02-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make setNeedsLayout on the root more explicitly about triggering its side-effects
     4        https://bugs.webkit.org/show_bug.cgi?id=194198
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Call the newly named functions.
     9
     10        * WebProcess/Plugins/PDF/PDFPlugin.mm:
     11        (WebKit::PDFPlugin::updateScrollbars):
     12        * WebProcess/Plugins/PluginView.cpp:
     13        (WebKit::PluginView::didInitializePlugin):
     14        * WebProcess/WebPage/WebPage.cpp:
     15        (WebKit::WebPage::setHeaderBannerHeightForTesting):
     16        (WebKit::WebPage::setFooterBannerHeightForTesting):
     17        * WebProcess/WebPage/mac/PageBannerMac.mm:
     18        (WebKit::PageBanner::addToPage):
     19        (WebKit::PageBanner::detachFromPage):
     20        (WebKit::PageBanner::hide):
     21
    1222019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
    223
  • trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm

    r240211 r240912  
    736736            frameView->removeScrollableArea(this);
    737737
    738         frameView->setNeedsLayout();
     738        frameView->setNeedsLayoutAfterViewConfigurationChange();
    739739    }
    740740   
  • trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp

    r240292 r240912  
    664664        if (Frame* frame = m_pluginElement->document().frame()) {
    665665            if (FrameView* frameView = frame->view())
    666                 frameView->setNeedsLayout();
     666                frameView->setNeedsLayoutAfterViewConfigurationChange();
    667667        }
    668668    }
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r240909 r240912  
    21292129void WebPage::setHeaderBannerHeightForTesting(int height)
    21302130{
    2131 #if ENABLE(RUBBER_BANDING)
    2132     corePage()->addHeaderWithHeight(height);
    2133 #endif
     2131    corePage()->setHeaderHeight(height);
    21342132}
    21352133
    21362134void WebPage::setFooterBannerHeightForTesting(int height)
    21372135{
    2138 #if ENABLE(RUBBER_BANDING)
    2139     corePage()->addFooterWithHeight(height);
    2140 #endif
     2136    corePage()->setFooterHeight(height);
    21412137}
    21422138
  • trunk/Source/WebKit/WebProcess/WebPage/mac/PageBannerMac.mm

    r235205 r240912  
    5858    switch (m_type) {
    5959    case Header:
    60         m_webPage->corePage()->addHeaderWithHeight(m_height);
     60        m_webPage->corePage()->setHeaderHeight(m_height);
    6161        break;
    6262    case Footer:
    63         m_webPage->corePage()->addFooterWithHeight(m_height);
     63        m_webPage->corePage()->setFooterHeight(m_height);
    6464        break;
    6565    case NotSet:
     
    8787        // We can hide the banner by removing the parent layer that hosts it.
    8888        if (m_type == Header)
    89             m_webPage->corePage()->addHeaderWithHeight(0);
     89            m_webPage->corePage()->setHeaderHeight(0);
    9090        else if (m_type == Footer)
    91             m_webPage->corePage()->addFooterWithHeight(0);
     91            m_webPage->corePage()->setFooterHeight(0);
    9292    }
    9393
     
    100100    // We can hide the banner by removing the parent layer that hosts it.
    101101    if (m_type == Header)
    102         m_webPage->corePage()->addHeaderWithHeight(0);
     102        m_webPage->corePage()->setHeaderHeight(0);
    103103    else if (m_type == Footer)
    104         m_webPage->corePage()->addFooterWithHeight(0);
     104        m_webPage->corePage()->setFooterHeight(0);
    105105
    106106    m_isHidden = true;
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r240909 r240912  
     12019-02-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make setNeedsLayout on the root more explicitly about triggering its side-effects
     4        https://bugs.webkit.org/show_bug.cgi?id=194198
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Call the newly named functions.
     9
     10        * WebView/WebFrame.mm:
     11        (-[WebFrame setNeedsLayout]):
     12        * WebView/WebHTMLView.mm:
     13        (-[WebHTMLView setNeedsLayout:]):
     14
    1152019-02-03  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm

    r240355 r240912  
    13111311    WebCore::Frame *frame = core(self);
    13121312    if (frame->view())
    1313         frame->view()->setNeedsLayout();
     1313        frame->view()->setNeedsLayoutAfterViewConfigurationChange();
    13141314}
    13151315
  • trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm

    r240355 r240912  
    38703870            return;
    38713871        if (FrameView* view = frame->view())
    3872             view->setNeedsLayout();
     3872            view->setNeedsLayoutAfterViewConfigurationChange();
    38733873    }
    38743874}
  • trunk/Tools/ChangeLog

    r240911 r240912  
     12019-02-03  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make setNeedsLayout on the root more explicitly about triggering its side-effects
     4        https://bugs.webkit.org/show_bug.cgi?id=194198
     5
     6        Reviewed by Antti Koivisto.
     7
     8        No need to set the banner heights on navigation now, since Page stores them.
     9
     10        * MiniBrowser/mac/WK2BrowserWindowController.m:
     11        (-[WK2BrowserWindowController webView:didFinishNavigation:]):
     12
    1132019-02-03  John Wilander  <wilander@apple.com>
    214
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r240100 r240912  
    675675{
    676676    LOG(@"didFinishNavigation: %@", navigation);
    677    
    678     // Banner heights don't persist across page loads (oddly, since Page stores them), so reset on every page load.
    679     if ([[SettingsController shared] isSpaceReservedForBanners]) {
    680         [_webView _setHeaderBannerHeight:testHeaderBannerHeight];
    681         [_webView _setFooterBannerHeight:testFooterBannerHeight];
    682     }
    683677}
    684678
Note: See TracChangeset for help on using the changeset viewer.