Changeset 176334 in webkit
- Timestamp:
- Nov 19, 2014, 1:31:11 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r176316 r176334 1 2014-11-19 Simon Fraser <simon.fraser@apple.com> 2 3 [WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator 4 https://bugs.webkit.org/show_bug.cgi?id=138876 5 6 Reviewed by Beth Dakin. 7 8 Fix the position of the tiled scrolling indicator in MiniBrowser by taking top 9 content offset into account. 10 11 On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction 12 so that we can use it to show the correctly scroll offset in the indicator. This is temporary until 13 Mac does UI-side scrolling. 14 15 * Shared/mac/RemoteLayerTreeTransaction.h: 16 (WebKit::RemoteLayerTreeTransaction::scrollPosition): 17 (WebKit::RemoteLayerTreeTransaction::setScrollPosition): 18 * Shared/mac/RemoteLayerTreeTransaction.mm: 19 (WebKit::RemoteLayerTreeTransaction::encode): 20 (WebKit::RemoteLayerTreeTransaction::decode): 21 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: 22 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: 23 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): 24 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation): 25 (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator): 26 * WebProcess/WebPage/WebPage.cpp: 27 (WebKit::WebPage::willCommitLayerTree): 28 1 29 2014-11-19 Michael Catanzaro <mcatanzaro@igalia.com> 2 30 -
TabularUnified trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h ¶
r175794 r176334 196 196 void setPageExtendedBackgroundColor(WebCore::Color color) { m_pageExtendedBackgroundColor = color; } 197 197 198 #if PLATFORM(MAC) 199 WebCore::IntPoint scrollPosition() const { return m_scrollPosition; } 200 void setScrollPosition(WebCore::IntPoint p) { m_scrollPosition = p; } 201 #endif 202 198 203 double pageScaleFactor() const { return m_pageScaleFactor; } 199 204 void setPageScaleFactor(double pageScaleFactor) { m_pageScaleFactor = pageScaleFactor; } … … 234 239 235 240 WebCore::IntSize m_contentsSize; 241 #if PLATFORM(MAC) 242 WebCore::IntPoint m_scrollPosition; 243 #endif 236 244 WebCore::Color m_pageExtendedBackgroundColor; 237 245 double m_pageScaleFactor; -
TabularUnified trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm ¶
r175794 r176334 488 488 489 489 encoder << m_contentsSize; 490 #if PLATFORM(MAC) 491 encoder << m_scrollPosition; 492 #endif 490 493 encoder << m_pageExtendedBackgroundColor; 491 494 encoder << m_pageScaleFactor; … … 549 552 if (!decoder.decode(result.m_contentsSize)) 550 553 return false; 554 555 #if PLATFORM(MAC) 556 if (!decoder.decode(result.m_scrollPosition)) 557 return false; 558 #endif 551 559 552 560 if (!decoder.decode(result.m_pageExtendedBackgroundColor)) -
TabularUnified trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h ¶
r174400 r176334 72 72 float indicatorScale(WebCore::IntSize contentsSize) const; 73 73 virtual void updateDebugIndicator() override; 74 void updateDebugIndicator(WebCore::IntSize contentsSize, bool rootLayerChanged, float scale );74 void updateDebugIndicator(WebCore::IntSize contentsSize, bool rootLayerChanged, float scale, const WebCore::IntPoint& scrollPosition); 75 75 void updateDebugIndicatorPosition(); 76 76 void initializeDebugIndicator(); -
TabularUnified trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm ¶
r173163 r176334 226 226 float scale = indicatorScale(layerTreeTransaction.contentsSize()); 227 227 bool rootLayerChanged = m_debugIndicatorLayerTreeHost->updateLayerTree(layerTreeTransaction, scale); 228 updateDebugIndicator(layerTreeTransaction.contentsSize(), rootLayerChanged, scale); 228 IntPoint scrollPosition; 229 #if PLATFORM(MAC) 230 scrollPosition = layerTreeTransaction.scrollPosition(); 231 #endif 232 updateDebugIndicator(layerTreeTransaction.contentsSize(), rootLayerChanged, scale, scrollPosition); 229 233 asLayer(m_debugIndicatorLayerTreeHost->rootLayer()).name = @"Indicator host root"; 230 234 } … … 273 277 } 274 278 275 return FloatPoint(indicatorInset, indicatorInset );279 return FloatPoint(indicatorInset, indicatorInset + m_webPageProxy.topContentInset()); 276 280 } 277 281 … … 304 308 } 305 309 306 void RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator(IntSize contentsSize, bool rootLayerChanged, float scale )310 void RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator(IntSize contentsSize, bool rootLayerChanged, float scale, const IntPoint& scrollPosition) 307 311 { 308 312 // Make sure we're the last sublayer. … … 334 338 [m_exposedRectIndicatorLayer setBounds:FloatRect(FloatPoint(), scaledExposedRect.size())]; 335 339 } else { 336 // FIXME: Get the correct scroll position.340 [m_exposedRectIndicatorLayer setPosition:scrollPosition]; 337 341 [m_exposedRectIndicatorLayer setBounds:FloatRect(FloatPoint(), viewSize)]; 338 342 } -
TabularUnified trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp ¶
r176297 r176334 2876 2876 layerTransaction.setAllowsUserScaling(allowsUserScaling()); 2877 2877 #endif 2878 #if PLATFORM(MAC) 2879 layerTransaction.setScrollPosition(corePage()->mainFrame().view()->scrollPosition()); 2880 #endif 2878 2881 } 2879 2882
Note:
See TracChangeset
for help on using the changeset viewer.