Changeset 103419 in webkit


Ignore:
Timestamp:
Dec 21, 2011 11:28:55 AM (12 years ago)
Author:
andersca@apple.com
Message:

Don't recreate scrollbar layers whenever the frame view size changes
https://bugs.webkit.org/show_bug.cgi?id=75018

Reviewed by Darin Adler and Simon Fraser.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r103411 r103419  
     12011-12-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Don't recreate scrollbar layers whenever the frame view size changes
     4        https://bugs.webkit.org/show_bug.cgi?id=75018
     5
     6        Reviewed by Darin Adler and Simon Fraser.
     7
     8        * rendering/RenderLayerCompositor.cpp:
     9        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
     10
    1112011-12-20  Andrey Kosyakov  <caseq@chromium.org>
    212
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r103339 r103419  
    17031703
    17041704    if (requiresHorizontalScrollbarLayer()) {
    1705         m_layerForHorizontalScrollbar = GraphicsLayer::create(this);
    1706 #ifndef NDEBUG
    1707         m_layerForHorizontalScrollbar->setName("horizontal scrollbar");
    1708 #endif
    1709         m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get());
    1710         layersChanged = true;
     1705        if (!m_layerForHorizontalScrollbar) {
     1706            m_layerForHorizontalScrollbar = GraphicsLayer::create(this);
     1707    #ifndef NDEBUG
     1708            m_layerForHorizontalScrollbar->setName("horizontal scrollbar");
     1709    #endif
     1710            m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get());
     1711            layersChanged = true;
     1712        }
    17111713    } else if (m_layerForHorizontalScrollbar) {
    17121714        m_layerForHorizontalScrollbar->removeFromParent();
     
    17161718
    17171719    if (requiresVerticalScrollbarLayer()) {
    1718         m_layerForVerticalScrollbar = GraphicsLayer::create(this);
    1719 #ifndef NDEBUG
    1720         m_layerForVerticalScrollbar->setName("vertical scrollbar");
    1721 #endif
    1722         m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get());
    1723         layersChanged = true;
     1720        if (!m_layerForVerticalScrollbar) {
     1721            m_layerForVerticalScrollbar = GraphicsLayer::create(this);
     1722    #ifndef NDEBUG
     1723            m_layerForVerticalScrollbar->setName("vertical scrollbar");
     1724    #endif
     1725            m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get());
     1726            layersChanged = true;
     1727        }
    17241728    } else if (m_layerForVerticalScrollbar) {
    17251729        m_layerForVerticalScrollbar->removeFromParent();
     
    17291733
    17301734    if (requiresScrollCornerLayer()) {
    1731         m_layerForScrollCorner = GraphicsLayer::create(this);
    1732 #ifndef NDEBUG
    1733         m_layerForScrollCorner->setName("scroll corner");
    1734 #endif
    1735         m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get());
    1736         layersChanged = true;
     1735        if (!m_layerForScrollCorner) {
     1736            m_layerForScrollCorner = GraphicsLayer::create(this);
     1737    #ifndef NDEBUG
     1738            m_layerForScrollCorner->setName("scroll corner");
     1739    #endif
     1740            m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get());
     1741            layersChanged = true;
     1742        }
    17371743    } else if (m_layerForScrollCorner) {
    17381744        m_layerForScrollCorner->removeFromParent();
Note: See TracChangeset for help on using the changeset viewer.