Remove unused VisibleContentRectUpdateInfo update ID
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2014 00:14:27 +0000 (00:14 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2014 00:14:27 +0000 (00:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133777

Reviewed by Benjamin Poulain.

Remove some unused code.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
(WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
(WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::willCommitLayerTree):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp
Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/WKContentView.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

index 3445721..68d377d 100644 (file)
@@ -1,3 +1,37 @@
+2014-06-11  Timothy Horton  <timothy_horton@apple.com>
+
+        Remove unused VisibleContentRectUpdateInfo update ID
+        https://bugs.webkit.org/show_bug.cgi?id=133777
+
+        Reviewed by Benjamin Poulain.
+
+        Remove some unused code.
+
+        * Shared/VisibleContentRectUpdateInfo.cpp:
+        (WebKit::VisibleContentRectUpdateInfo::encode):
+        (WebKit::VisibleContentRectUpdateInfo::decode):
+        * Shared/VisibleContentRectUpdateInfo.h:
+        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+        (WebKit::operator==):
+        (WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
+        * Shared/mac/RemoteLayerTreeTransaction.h:
+        (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
+        (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
+        * Shared/mac/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::encode):
+        (WebKit::RemoteLayerTreeTransaction::decode):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
+        (WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::willCommitLayerTree):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects):
+
 2014-06-11  Dan Bernstein  <mitz@apple.com>
 
         [Cocoa] Move CompletionHandlerCallChecker into a separate file
index 62f2cb7..72362b2 100644 (file)
@@ -37,7 +37,6 @@ void VisibleContentRectUpdateInfo::encode(IPC::ArgumentEncoder& encoder) const
     encoder << m_unobscuredRectInScrollViewCoordinates;
     encoder << m_customFixedPositionRect;
     encoder << m_scale;
-    encoder << m_updateID;
     encoder << m_inStableState;
     encoder << m_isChangingObscuredInsetsInteractively;
     encoder << m_timestamp;
@@ -58,8 +57,6 @@ bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder& decoder, Visible
         return false;
     if (!decoder.decode(result.m_scale))
         return false;
-    if (!decoder.decode(result.m_updateID))
-        return false;
     if (!decoder.decode(result.m_inStableState))
         return false;
     if (!decoder.decode(result.m_isChangingObscuredInsetsInteractively))
index ec6bb17..74a4f57 100644 (file)
@@ -39,19 +39,17 @@ class VisibleContentRectUpdateInfo {
 public:
     VisibleContentRectUpdateInfo()
         : m_scale(-1)
-        , m_updateID(0)
         , m_inStableState(false)
         , m_isChangingObscuredInsetsInteractively(false)
     {
     }
 
-    VisibleContentRectUpdateInfo(uint64_t updateID, const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
+    VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
         : m_exposedRect(exposedRect)
         , m_unobscuredRect(unobscuredRect)
         , m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
         , m_customFixedPositionRect(customFixedPositionRect)
         , m_scale(scale)
-        , m_updateID(updateID)
         , m_inStableState(inStableState)
         , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
         , m_timestamp(timestamp)
@@ -66,7 +64,6 @@ public:
     const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates() const { return m_unobscuredRectInScrollViewCoordinates; }
     const WebCore::FloatRect& customFixedPositionRect() const { return m_customFixedPositionRect; }
     double scale() const { return m_scale; }
-    uint64_t updateID() const { return m_updateID; }
     bool inStableState() const { return m_inStableState; }
     bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; }
 
@@ -84,7 +81,6 @@ private:
     WebCore::FloatRect m_unobscuredRectInScrollViewCoordinates;
     WebCore::FloatRect m_customFixedPositionRect;
     double m_scale;
-    uint64_t m_updateID;
     bool m_inStableState;
     bool m_isChangingObscuredInsetsInteractively;
     double m_timestamp;
@@ -95,8 +91,7 @@ private:
 
 inline bool operator==(const VisibleContentRectUpdateInfo& a, const VisibleContentRectUpdateInfo& b)
 {
-    // Note: the comparison doesn't include updateID since we care about equality based on the other data.
-    // The timestamp and velocity are also irrelevant for comparing updates.
+    // Note: the comparison doesn't include timestamp and velocity since we care about equality based on the other data.
     return a.scale() == b.scale()
         && a.exposedRect() == b.exposedRect()
         && a.unobscuredRect() == b.unobscuredRect()
index 908dcdc..ee0fca8 100644 (file)
@@ -189,9 +189,6 @@ public:
 
     double pageScaleFactor() const { return m_pageScaleFactor; }
     void setPageScaleFactor(double pageScaleFactor) { m_pageScaleFactor = pageScaleFactor; }
-    
-    void setLastVisibleContentRectUpdateID(uint64_t lastVisibleContentRectUpdateID) { m_lastVisibleContentRectUpdateID = lastVisibleContentRectUpdateID; }
-    uint64_t lastVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdateID; }
 
     bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
     void setScaleWasSetByUIProcess(bool scaleWasSetByUIProcess) { m_scaleWasSetByUIProcess = scaleWasSetByUIProcess; }
@@ -223,7 +220,6 @@ private:
     double m_pageScaleFactor;
     double m_minimumScaleFactor;
     double m_maximumScaleFactor;
-    uint64_t m_lastVisibleContentRectUpdateID;
     uint64_t m_renderTreeSize;
     bool m_scaleWasSetByUIProcess;
     bool m_allowsUserScaling;
index 685371d..95c68ad 100644 (file)
@@ -460,7 +460,6 @@ void RemoteLayerTreeTransaction::encode(IPC::ArgumentEncoder& encoder) const
     encoder << m_minimumScaleFactor;
     encoder << m_maximumScaleFactor;
 
-    encoder << m_lastVisibleContentRectUpdateID;
     encoder << m_renderTreeSize;
 
     encoder << m_scaleWasSetByUIProcess;
@@ -527,9 +526,6 @@ bool RemoteLayerTreeTransaction::decode(IPC::ArgumentDecoder& decoder, RemoteLay
     if (!decoder.decode(result.m_maximumScaleFactor))
         return false;
 
-    if (!decoder.decode(result.m_lastVisibleContentRectUpdateID))
-        return false;
-
     if (!decoder.decode(result.m_renderTreeSize))
         return false;
 
index 4cfa36a..aa6ef8d 100644 (file)
@@ -592,8 +592,6 @@ public:
     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
 
     bool updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
-    uint64_t nextVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID() + 1; }
-    uint64_t lastVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID(); }
 
     enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
     WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
index b6fd761..355180c 100644 (file)
@@ -302,7 +302,7 @@ private:
         _historicalKinematicData.clear();
 
     FloatRect fixedPositionRectForLayout = _page->computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect);
-    _page->updateVisibleContentRects(VisibleContentRectUpdateInfo(_page->nextVisibleContentRectUpdateID(), visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout,
+    _page->updateVisibleContentRects(VisibleContentRectUpdateInfo(visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout,
         zoomScale, isStableState, isChangingObscuredInsetsInteractively, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate));
 
     RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy();
index b041331..bf244ee 100644 (file)
@@ -292,7 +292,6 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     , m_isShowingContextMenu(false)
 #endif
 #if PLATFORM(IOS)
-    , m_lastVisibleContentRectUpdateID(0)
     , m_obscuredTopInset(0)
     , m_hasReceivedVisibleContentRectsAfterDidCommitLoad(false)
     , m_scaleWasSetByUIProcess(false)
@@ -2787,7 +2786,6 @@ void WebPage::willCommitLayerTree(RemoteLayerTreeTransaction& layerTransaction)
     layerTransaction.setRenderTreeSize(corePage()->renderTreeSize());
     layerTransaction.setPageExtendedBackgroundColor(corePage()->pageExtendedBackgroundColor());
 #if PLATFORM(IOS)
-    layerTransaction.setLastVisibleContentRectUpdateID(m_lastVisibleContentRectUpdateID);
     layerTransaction.setScaleWasSetByUIProcess(scaleWasSetByUIProcess());
     layerTransaction.setMinimumScaleFactor(minimumPageScaleFactor());
     layerTransaction.setMaximumScaleFactor(maximumPageScaleFactor());
index fad752d..67f11ec 100644 (file)
@@ -1214,7 +1214,6 @@ private:
     WebCore::FloatPoint m_potentialTapLocation;
 
     WebCore::ViewportConfiguration m_viewportConfiguration;
-    uint64_t m_lastVisibleContentRectUpdateID;
     float m_obscuredTopInset;
     bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad;
     bool m_scaleWasSetByUIProcess;
index 7086e74..8d00485 100644 (file)
@@ -2295,7 +2295,6 @@ static inline void adjustVelocityDataForBoundedScale(double& horizontalVelocity,
 void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo)
 {
     m_hasReceivedVisibleContentRectsAfterDidCommitLoad = true;
-    m_lastVisibleContentRectUpdateID = visibleContentRectUpdateInfo.updateID();
     m_obscuredTopInset = (visibleContentRectUpdateInfo.unobscuredRect().y() - visibleContentRectUpdateInfo.exposedRect().y()) * visibleContentRectUpdateInfo.scale();
 
     double scaleNoiseThreshold = 0.005;