[iOS WK2] Missing content inside long overflow-scrolling:touch
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 05:16:45 +0000 (05:16 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 05:16:45 +0000 (05:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132105

Reviewed by Tim Horton.

PlatformCALayerRemote needs to track bounds origin as well as size,
since iOS uses bounds origin for overflow scrolling.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
(WebKit::PlatformCALayerRemote::bounds):
(WebKit::PlatformCALayerRemote::setBounds):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp

index 3caf563..5a27c50 100644 (file)
@@ -1,3 +1,26 @@
+2014-04-23  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Missing content inside long overflow-scrolling:touch 
+        https://bugs.webkit.org/show_bug.cgi?id=132105
+
+        Reviewed by Tim Horton.
+        
+        PlatformCALayerRemote needs to track bounds origin as well as size,
+        since iOS uses bounds origin for overflow scrolling.
+
+        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
+        (WebKit::applyPropertiesToLayer):
+        * Shared/mac/RemoteLayerTreeTransaction.h:
+        * Shared/mac/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
+        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
+        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
+        (WebKit::dumpChangedLayers):
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+        (WebKit::PlatformCALayerRemote::updateBackingStore):
+        (WebKit::PlatformCALayerRemote::bounds):
+        (WebKit::PlatformCALayerRemote::setBounds):
+
 2014-04-23  Andreas Kling  <akling@apple.com>
 
         Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
index 9c3b524..7580021 100644 (file)
@@ -128,8 +128,8 @@ static void applyPropertiesToLayer(CALayer *layer, RemoteLayerTreeHost* layerTre
         layer.anchorPointZ = properties.anchorPoint.z();
     }
 
-    if (properties.changedProperties & RemoteLayerTreeTransaction::SizeChanged)
-        layer.bounds = FloatRect(FloatPoint(), properties.size);
+    if (properties.changedProperties & RemoteLayerTreeTransaction::BoundsChanged)
+        layer.bounds = properties.bounds;
     
     if (properties.changedProperties & RemoteLayerTreeTransaction::BackgroundColorChanged)
         layer.backgroundColor = cgColorFromColor(properties.backgroundColor).get();
index f5d942b..2df5581 100644 (file)
@@ -54,7 +54,7 @@ public:
         NameChanged = 1 << 1,
         ChildrenChanged = 1 << 2,
         PositionChanged = 1 << 3,
-        SizeChanged = 1 << 4,
+        BoundsChanged = 1 << 4,
         BackgroundColorChanged = 1 << 5,
         AnchorPointChanged = 1 << 6,
         BorderWidthChanged = 1 << 7,
@@ -127,7 +127,7 @@ public:
 
         WebCore::FloatPoint3D position;
         WebCore::FloatPoint3D anchorPoint;
-        WebCore::FloatSize size;
+        WebCore::FloatRect bounds;
         WebCore::FloatRect contentsRect;
         std::unique_ptr<RemoteLayerBackingStore> backingStore;
         std::unique_ptr<WebCore::FilterOperations> filters;
index 369dca3..8da6a60 100644 (file)
@@ -111,7 +111,7 @@ RemoteLayerTreeTransaction::LayerProperties::LayerProperties(const LayerProperti
     , keyPathsOfAnimationsToRemove(other.keyPathsOfAnimationsToRemove)
     , position(other.position)
     , anchorPoint(other.anchorPoint)
-    , size(other.size)
+    , bounds(other.bounds)
     , contentsRect(other.contentsRect)
     , maskLayerID(other.maskLayerID)
     , timeOffset(other.timeOffset)
@@ -164,8 +164,8 @@ void RemoteLayerTreeTransaction::LayerProperties::encode(IPC::ArgumentEncoder& e
     if (changedProperties & PositionChanged)
         encoder << position;
 
-    if (changedProperties & SizeChanged)
-        encoder << size;
+    if (changedProperties & BoundsChanged)
+        encoder << bounds;
 
     if (changedProperties & BackgroundColorChanged)
         encoder << backgroundColor;
@@ -280,8 +280,8 @@ bool RemoteLayerTreeTransaction::LayerProperties::decode(IPC::ArgumentDecoder& d
             return false;
     }
 
-    if (result.changedProperties & SizeChanged) {
-        if (!decoder.decode(result.size))
+    if (result.changedProperties & BoundsChanged) {
+        if (!decoder.decode(result.bounds))
             return false;
     }
 
@@ -999,8 +999,8 @@ static void dumpChangedLayers(RemoteLayerTreeTextStream& ts, const RemoteLayerTr
         if (layerProperties.changedProperties & RemoteLayerTreeTransaction::PositionChanged)
             dumpProperty(ts, "position", layerProperties.position);
 
-        if (layerProperties.changedProperties & RemoteLayerTreeTransaction::SizeChanged)
-            dumpProperty(ts, "size", layerProperties.size);
+        if (layerProperties.changedProperties & RemoteLayerTreeTransaction::BoundsChanged)
+            dumpProperty(ts, "bounds", layerProperties.bounds);
 
         if (layerProperties.changedProperties & RemoteLayerTreeTransaction::AnchorPointChanged)
             dumpProperty(ts, "anchorPoint", layerProperties.anchorPoint);
index 5b4df23..7b90811 100644 (file)
@@ -169,7 +169,7 @@ void PlatformCALayerRemote::updateBackingStore()
     if (!m_properties.backingStore)
         return;
 
-    m_properties.backingStore->ensureBackingStore(this, expandedIntSize(m_properties.size), m_properties.contentsScale, m_acceleratesDrawing, m_properties.opaque);
+    m_properties.backingStore->ensureBackingStore(this, expandedIntSize(m_properties.bounds.size()), m_properties.contentsScale, m_acceleratesDrawing, m_properties.opaque);
 }
 
 void PlatformCALayerRemote::setNeedsDisplay(const FloatRect* rect)
@@ -334,16 +334,16 @@ void PlatformCALayerRemote::setOpaque(bool value)
 
 FloatRect PlatformCALayerRemote::bounds() const
 {
-    return FloatRect(FloatPoint(), m_properties.size);
+    return m_properties.bounds;
 }
 
 void PlatformCALayerRemote::setBounds(const FloatRect& value)
 {
-    if (value.size() == m_properties.size)
+    if (value == m_properties.bounds)
         return;
 
-    m_properties.size = value.size();
-    m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SizeChanged);
+    m_properties.bounds = value;
+    m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BoundsChanged);
     
     if (requiresCustomAppearanceUpdateOnBoundsChange())
         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged);