Changeset 145207 in webkit


Ignore:
Timestamp:
Mar 8, 2013 3:25:47 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
https://bugs.webkit.org/show_bug.cgi?id=111829

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Noam Rosenthal.

Currently, flagsChanged deals with all boolean flags. It introduces this bug
because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
to false. So this patch updates all flags when at least one flag is changed.

In addition, this patch amends isScrollable code to match other flags.

This patch can only be tested manually since there is no automated
testing facilities for in-motion touch.
Test: ManualTests/fixed-position.html

ManualTests/nested-fixed-position.html

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setScrollableArea):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:

(WebCore::CoordinatedGraphicsScene::setLayerState):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145197 r145207  
     12013-03-08  Huang Dongsung  <luxtella@company100.net>
     2
     3        [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
     4        https://bugs.webkit.org/show_bug.cgi?id=111829
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        Currently, flagsChanged deals with all boolean flags. It introduces this bug
     9        because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
     10        to false. So this patch updates all flags when at least one flag is changed.
     11
     12        In addition, this patch amends isScrollable code to match other flags.
     13
     14        This patch can only be tested manually since there is no automated
     15        testing facilities for in-motion touch.
     16        Test: ManualTests/fixed-position.html
     17              ManualTests/nested-fixed-position.html
     18
     19        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
     20        (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
     21        (WebCore::CoordinatedGraphicsLayer::syncLayerState):
     22        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
     23        (WebCore::CoordinatedGraphicsScene::setLayerState):
     24        * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
     25        (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
     26
    1272013-03-07  Dean Jackson  <dino@apple.com>
    228
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

    r144907 r145207  
    525525
    526526    m_layerState.isScrollable = isScrollable();
    527     m_layerState.isScrollableChanged = true;
     527    m_layerState.flagsChanged = true;
    528528    didChangeLayerState();
    529529}
     
    645645    m_layerState.pos = m_adjustedPosition;
    646646    m_layerState.size = m_adjustedSize;
     647
     648    if (m_layerState.flagsChanged) {
     649        m_layerState.drawsContent = drawsContent();
     650        m_layerState.contentsVisible = contentsAreVisible();
     651        m_layerState.backfaceVisible = backfaceVisibility();
     652        m_layerState.masksToBounds = masksToBounds();
     653        m_layerState.preserves3D = preserves3D();
     654        m_layerState.fixedToViewport = fixedToViewport();
     655        m_layerState.showDebugBorders = isShowingDebugBorder();
     656        m_layerState.showRepaintCounter = isShowingRepaintCounter();
     657        m_layerState.isScrollable = isScrollable();
     658    }
    647659
    648660    if (m_layerState.showDebugBorders)
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp

    r144907 r145207  
    356356        layer->setPreserves3D(layerState.preserves3D);
    357357
     358        bool fixedToViewportChanged = toGraphicsLayerTextureMapper(layer)->fixedToViewport() != layerState.fixedToViewport;
    358359        toGraphicsLayerTextureMapper(layer)->setFixedToViewport(layerState.fixedToViewport);
     360        if (fixedToViewportChanged) {
     361            if (layerState.fixedToViewport)
     362                m_fixedLayers.add(id, layer);
     363            else
     364                m_fixedLayers.remove(id);
     365        }
     366
    359367        layer->setShowDebugBorder(layerState.showDebugBorders);
    360368        layer->setShowRepaintCounter(layerState.showRepaintCounter);
    361     }
    362 
    363     if (layerState.isScrollableChanged)
     369
    364370        toGraphicsLayerTextureMapper(layer)->setIsScrollable(layerState.isScrollable);
     371    }
    365372
    366373    if (layerState.committedScrollOffsetChanged)
    367374        toGraphicsLayerTextureMapper(layer)->didCommitScrollOffset(layerState.committedScrollOffset);
    368 
    369     if (layerState.fixedToViewport)
    370         m_fixedLayers.add(id, layer);
    371     else
    372         m_fixedLayers.remove(id);
    373375
    374376    prepareContentBackingStore(layer);
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h

    r144907 r145207  
    125125        , showDebugBorders(false)
    126126        , showRepaintCounter(false)
     127        , isScrollable(false)
    127128        , opacity(0)
    128129        , debugBorderWidth(0)
Note: See TracChangeset for help on using the changeset viewer.