Changeset 128132 in webkit
- Timestamp:
- Sep 10, 2012 5:12:38 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128131 r128132 1 2012-09-10 James Robinson <jamesr@chromium.org> 2 3 Unreviewed, rolling out r127837. 4 http://trac.webkit.org/changeset/127837 5 https://bugs.webkit.org/show_bug.cgi?id=93898 6 7 Broke ScrollingCoordinator on chromium 8 9 * WebCore.xcodeproj/project.pbxproj: 10 * page/scrolling/ScrollingCoordinator.cpp: 11 (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange): 12 (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange): 13 (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): 14 (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects): 15 (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): 16 (WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates): 17 (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): 18 * page/scrolling/ScrollingCoordinator.h: 19 (ScrollingCoordinator): 20 * page/scrolling/ScrollingCoordinatorNone.cpp: 21 (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): 22 * page/scrolling/ScrollingTree.cpp: 23 (WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled): 24 * page/scrolling/ScrollingTree.h: 25 * page/scrolling/ScrollingTreeNode.cpp: 26 (WebCore::ScrollingTreeNode::ScrollingTreeNode): 27 (WebCore::ScrollingTreeNode::update): 28 * page/scrolling/ScrollingTreeNode.h: 29 (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread): 30 (ScrollingTreeNode): 31 * page/scrolling/ScrollingTreeState.cpp: 32 (WebCore::ScrollingTreeState::ScrollingTreeState): 33 (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread): 34 * page/scrolling/ScrollingTreeState.h: 35 (WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread): 36 (ScrollingTreeState): 37 * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: 38 (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): 39 * page/scrolling/mac/ScrollingTreeMac.mm: 40 (WebCore::ScrollingTree::updateDebugRootLayer): 41 * page/scrolling/mac/ScrollingTreeNodeMac.mm: 42 (WebCore::ScrollingTreeNodeMac::update): 43 (WebCore::ScrollingTreeNodeMac::scrollPosition): 44 (WebCore::ScrollingTreeNodeMac::setScrollPosition): 45 (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints): 46 (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition): 47 1 48 2012-09-10 Philip Rogers <pdr@google.com> 2 49 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r128114 r128132 512 512 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; }; 513 513 1AAADDBE14DC640700AF64B3 /* ScrollingTreeState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDBC14DC640600AF64B3 /* ScrollingTreeState.cpp */; }; 514 1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; settings = {ATTRIBUTES = (Private, ); };};514 1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; }; 515 515 1AAADDDA14DC74EC00AF64B3 /* ScrollingTreeStateMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDD814DC74EC00AF64B3 /* ScrollingTreeStateMac.mm */; }; 516 516 1AAADDE314DC8C8F00AF64B3 /* ScrollingTreeNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDE114DC8C8F00AF64B3 /* ScrollingTreeNode.cpp */; }; -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r127837 r128132 37 37 #include "RenderView.h" 38 38 #include "ScrollAnimator.h" 39 #include "ScrollingTreeState.h" 39 40 #include <wtf/MainThread.h> 40 41 … … 46 47 #include "ScrollingThread.h" 47 48 #include "ScrollingTree.h" 48 #include "ScrollingTreeState.h"49 49 #include <wtf/Functional.h> 50 50 #include <wtf/PassRefPtr.h> … … 193 193 return; 194 194 195 updateShouldUpdateScrollLayerPositionOnMainThread Reason();195 updateShouldUpdateScrollLayerPositionOnMainThread(); 196 196 } 197 197 … … 204 204 return; 205 205 206 updateShouldUpdateScrollLayerPositionOnMainThread Reason();206 updateShouldUpdateScrollLayerPositionOnMainThread(); 207 207 } 208 208 … … 233 233 frameViewLayoutUpdated(frameView); 234 234 recomputeWheelEventHandlerCount(); 235 updateShouldUpdateScrollLayerPositionOnMainThread Reason();235 updateShouldUpdateScrollLayerPositionOnMainThread(); 236 236 setScrollLayer(scrollLayerForFrameView(frameView)); 237 237 } … … 360 360 } 361 361 362 bool ScrollingCoordinator::hasNonLayer ViewportConstrainedObjects(FrameView* frameView)362 bool ScrollingCoordinator::hasNonLayerFixedObjects(FrameView* frameView) 363 363 { 364 364 const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects = frameView->viewportConstrainedObjects(); … … 381 381 } 382 382 383 void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThreadReason() 384 { 385 #if ENABLE(THREADED_SCROLLING) 383 void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread() 384 { 386 385 FrameView* frameView = m_page->mainFrame()->view(); 387 386 388 ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasonsForUpdatingScrollLayerPositionOnMainThread = (ReasonForUpdatingScrollLayerPositionOnMainThreadFlags)0; 389 390 if (m_forceMainThreadScrollLayerPositionUpdates) 391 reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::ForcedOnMainThread; 392 if (frameView->hasSlowRepaintObjects()) 393 reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasSlowRepaintObjects; 394 if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects()) 395 reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonCompositedViewportConstrainedObjects; 396 if (supportsFixedPositionLayers() && hasNonLayerViewportConstrainedObjects(frameView)) 397 reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonLayerViewportConstrainedObjects; 398 if (m_page->mainFrame()->document()->isImageDocument()) 399 reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::IsImageDocument; 400 401 setShouldUpdateScrollLayerPositionOnMainThreadReason(reasonsForUpdatingScrollLayerPositionOnMainThread); 402 #endif 387 setShouldUpdateScrollLayerPositionOnMainThread(m_forceMainThreadScrollLayerPositionUpdates 388 || frameView->hasSlowRepaintObjects() 389 || (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects()) 390 || (supportsFixedPositionLayers() && hasNonLayerFixedObjects(frameView)) 391 || m_page->mainFrame()->document()->isImageDocument()); 403 392 } 404 393 … … 409 398 410 399 m_forceMainThreadScrollLayerPositionUpdates = forceMainThreadScrollLayerPositionUpdates; 411 updateShouldUpdateScrollLayerPositionOnMainThread Reason();400 updateShouldUpdateScrollLayerPositionOnMainThread(); 412 401 } 413 402 … … 447 436 } 448 437 449 #if ENABLE(THREADED_SCROLLING) 450 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons) 438 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread) 451 439 { 452 440 // The FrameView's GraphicsLayer is likely to be out-of-synch with the PlatformLayer 453 441 // at this point. So we'll update it before we switch back to main thread scrolling 454 442 // in order to avoid layer positioning bugs. 455 if ( reasons)443 if (shouldUpdateScrollLayerPositionOnMainThread) 456 444 updateMainFrameScrollLayerPosition(); 457 m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread Reason(reasons);445 m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread(shouldUpdateScrollLayerPositionOnMainThread); 458 446 scheduleTreeStateCommit(); 459 447 } 460 #endif461 448 462 449 void ScrollingCoordinator::scheduleTreeStateCommit() -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r127837 r128132 35 35 36 36 #if ENABLE(THREADED_SCROLLING) 37 #include "ScrollingTreeState.h"38 37 #include <wtf/ThreadSafeRefCounted.h> 39 38 #include <wtf/Threading.h> … … 133 132 134 133 void recomputeWheelEventHandlerCount(); 135 bool hasNonLayer ViewportConstrainedObjects(FrameView*);136 void updateShouldUpdateScrollLayerPositionOnMainThread Reason();134 bool hasNonLayerFixedObjects(FrameView*); 135 void updateShouldUpdateScrollLayerPositionOnMainThread(); 137 136 138 137 void setScrollLayer(GraphicsLayer*); … … 157 156 void setScrollParameters(const ScrollParameters&); 158 157 void setWheelEventHandlerCount(unsigned); 159 #if ENABLE(THREADED_SCROLLING) 160 void setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags); 161 #endif 158 void setShouldUpdateScrollLayerPositionOnMainThread(bool); 162 159 163 160 void updateMainFrameScrollLayerPosition(); -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp
r127837 r128132 68 68 } 69 69 70 #if ENABLE(THREADED_SCROLLING) 71 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags) 70 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool) 72 71 { 73 72 } 74 #endif75 73 76 74 bool ScrollingCoordinator::supportsFixedPositionLayers() const -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r127837 r128132 225 225 } 226 226 227 bool ScrollingTree::scrollingPe rformanceLoggingEnabled()227 bool ScrollingTree::scrollingPeformanceLoggingEnabled() 228 228 { 229 229 return m_scrollingPerformanceLoggingEnabled; -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r127837 r128132 99 99 100 100 void setScrollingPerformanceLoggingEnabled(bool flag); 101 bool scrollingPe rformanceLoggingEnabled();101 bool scrollingPeformanceLoggingEnabled(); 102 102 103 103 private: -
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
r127837 r128132 35 35 ScrollingTreeNode::ScrollingTreeNode(ScrollingTree* scrollingTree) 36 36 : m_scrollingTree(scrollingTree) 37 , m_shouldUpdateScrollLayerPositionOnMainThread Reason(0)37 , m_shouldUpdateScrollLayerPositionOnMainThread(false) 38 38 , m_horizontalScrollElasticity(ScrollElasticityNone) 39 39 , m_verticalScrollElasticity(ScrollElasticityNone) … … 57 57 m_contentsSize = state->contentsSize(); 58 58 59 if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread Reason)60 m_shouldUpdateScrollLayerPositionOnMainThread Reason = state->shouldUpdateScrollLayerPositionOnMainThreadReason();59 if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) 60 m_shouldUpdateScrollLayerPositionOnMainThread = state->shouldUpdateScrollLayerPositionOnMainThread(); 61 61 62 62 if (state->changedProperties() & ScrollingTreeState::HorizontalScrollElasticity) -
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h
r127837 r128132 31 31 #include "IntRect.h" 32 32 #include "ScrollTypes.h" 33 #include "ScrollingTreeState.h"34 33 #include <wtf/PassOwnPtr.h> 35 34 … … 49 48 virtual void setScrollPosition(const IntPoint&) = 0; 50 49 51 ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }50 bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; } 52 51 53 52 protected: … … 76 75 IntPoint m_scrollOrigin; 77 76 78 ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;77 bool m_shouldUpdateScrollLayerPositionOnMainThread; 79 78 80 79 ScrollElasticity m_horizontalScrollElasticity; -
trunk/Source/WebCore/page/scrolling/ScrollingTreeState.cpp
r127837 r128132 39 39 : m_changedProperties(0) 40 40 , m_wheelEventHandlerCount(0) 41 , m_shouldUpdateScrollLayerPositionOnMainThread Reason(0)41 , m_shouldUpdateScrollLayerPositionOnMainThread(false) 42 42 , m_horizontalScrollElasticity(ScrollElasticityNone) 43 43 , m_verticalScrollElasticity(ScrollElasticityNone) … … 89 89 } 90 90 91 void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread Reason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)91 void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread) 92 92 { 93 if ( (bool)m_shouldUpdateScrollLayerPositionOnMainThreadReason == (bool)reasons)93 if (m_shouldUpdateScrollLayerPositionOnMainThread == shouldUpdateScrollLayerPositionOnMainThread) 94 94 return; 95 95 96 m_shouldUpdateScrollLayerPositionOnMainThread Reason = reasons;97 m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThread Reason;96 m_shouldUpdateScrollLayerPositionOnMainThread = shouldUpdateScrollLayerPositionOnMainThread; 97 m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThread; 98 98 } 99 99 -
trunk/Source/WebCore/page/scrolling/ScrollingTreeState.h
r127837 r128132 41 41 namespace WebCore { 42 42 43 typedef unsigned ReasonForUpdatingScrollLayerPositionOnMainThreadFlags;44 45 43 // The ScrollingTreeState object keeps track of the current state of scrolling related properties. 46 44 // Whenever any properties change, the scrolling coordinator will be informed and will update the state … … 57 55 NonFastScrollableRegion = 1 << 2, 58 56 WheelEventHandlerCount = 1 << 3, 59 ShouldUpdateScrollLayerPositionOnMainThread Reason= 1 << 4,57 ShouldUpdateScrollLayerPositionOnMainThread = 1 << 4, 60 58 HorizontalScrollElasticity = 1 << 5, 61 59 VerticalScrollElasticity = 1 << 6, … … 67 65 ScrollLayer = 1 << 12, 68 66 RequestedScrollPosition = 1 << 13, 69 };70 71 enum ReasonForUpdatingScrollLayerPositionOnMainThread {72 ForcedOnMainThread = 1 << 0,73 HasSlowRepaintObjects = 1 << 1,74 HasNonCompositedViewportConstrainedObjects = 1 << 2,75 HasNonLayerViewportConstrainedObjects = 1 << 3,76 IsImageDocument = 1 << 477 67 }; 78 68 … … 92 82 void setWheelEventHandlerCount(unsigned); 93 83 94 ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }95 void setShouldUpdateScrollLayerPositionOnMainThread Reason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags);84 bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; } 85 void setShouldUpdateScrollLayerPositionOnMainThread(bool); 96 86 97 87 ScrollElasticity horizontalScrollElasticity() const { return m_horizontalScrollElasticity; } … … 137 127 unsigned m_wheelEventHandlerCount; 138 128 139 ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;129 bool m_shouldUpdateScrollLayerPositionOnMainThread; 140 130 141 131 ScrollElasticity m_horizontalScrollElasticity; -
trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
r127952 r128132 224 224 } 225 225 226 #if ENABLE(THREADED_SCROLLING) 227 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons) 226 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool should) 228 227 { 229 228 // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves. 230 229 setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view())); 231 230 if (m_private->scrollLayer()) 232 m_private->scrollLayer()->setShouldScrollOnMainThread(reasons); 233 } 234 #endif 231 m_private->scrollLayer()->setShouldScrollOnMainThread(should); 232 } 235 233 236 234 bool ScrollingCoordinator::supportsFixedPositionLayers() const -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm
r127837 r128132 63 63 RetainPtr<CGColorRef> backgroundColor; 64 64 65 if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThread Reason())65 if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThread()) 66 66 backgroundColor = adoptCF(CGColorCreateGenericRGB(1, 0, 0, .7)); 67 67 -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
r127840 r128132 38 38 #include <wtf/CurrentTime.h> 39 39 #include <wtf/Deque.h> 40 #include <wtf/text/StringBuilder.h>41 #include <wtf/text/CString.h>42 40 43 41 namespace WebCore { 44 45 static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread);46 42 47 43 PassOwnPtr<ScrollingTreeNode> ScrollingTreeNode::create(ScrollingTree* scrollingTree) … … 75 71 updateMainFramePinState(scrollPosition()); 76 72 77 if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThreadReason)) { 78 unsigned reasonsForUpdatingScrollLayerPositionOnMainThread = this->shouldUpdateScrollLayerPositionOnMainThreadReason(); 79 80 if (reasonsForUpdatingScrollLayerPositionOnMainThread) { 81 // We're transitioning to the slow "update scroll layer position on the main thread" mode. 82 // Initialize the probable main thread scroll position with the current scroll layer position. 83 if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition) 84 m_probableMainThreadScrollPosition = state->requestedScrollPosition(); 85 else { 86 CGPoint scrollLayerPosition = m_scrollLayer.get().position; 87 m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y); 88 } 73 if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) && shouldUpdateScrollLayerPositionOnMainThread()) { 74 // We're transitioning to the slow "update scroll layer position on the main thread" mode. 75 // Initialize the probable main thread scroll position with the current scroll layer position. 76 if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition) 77 m_probableMainThreadScrollPosition = state->requestedScrollPosition(); 78 else { 79 CGPoint scrollLayerPosition = m_scrollLayer.get().position; 80 m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y); 89 81 } 90 91 if (scrollingTree()->scrollingPerformanceLoggingEnabled())92 logThreadedScrollingMode(reasonsForUpdatingScrollLayerPositionOnMainThread);93 82 } 94 83 } … … 237 226 IntPoint ScrollingTreeNodeMac::scrollPosition() const 238 227 { 239 if (shouldUpdateScrollLayerPositionOnMainThread Reason())228 if (shouldUpdateScrollLayerPositionOnMainThread()) 240 229 return m_probableMainThreadScrollPosition; 241 230 … … 252 241 setScrollPositionWithoutContentEdgeConstraints(newScrollPosition); 253 242 254 if (scrollingTree()->scrollingPe rformanceLoggingEnabled())243 if (scrollingTree()->scrollingPeformanceLoggingEnabled()) 255 244 logExposedUnfilledArea(); 256 245 } … … 260 249 updateMainFramePinState(scrollPosition); 261 250 262 if (shouldUpdateScrollLayerPositionOnMainThread Reason()) {251 if (shouldUpdateScrollLayerPositionOnMainThread()) { 263 252 m_probableMainThreadScrollPosition = scrollPosition; 264 253 scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition); … … 272 261 void ScrollingTreeNodeMac::setScrollLayerPosition(const IntPoint& position) 273 262 { 274 ASSERT(!shouldUpdateScrollLayerPositionOnMainThread Reason());263 ASSERT(!shouldUpdateScrollLayerPositionOnMainThread()); 275 264 m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y()); 276 265 } … … 342 331 } 343 332 344 static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread)345 {346 if (reasonsForUpdatingScrollLayerPositionOnMainThread) {347 StringBuilder reasonsDescription;348 349 if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::ForcedOnMainThread)350 reasonsDescription.append("forced,");351 if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasSlowRepaintObjects)352 reasonsDescription.append("slow-repaint objects,");353 if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonCompositedViewportConstrainedObjects)354 reasonsDescription.append("viewport-constrained objects,");355 if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonLayerViewportConstrainedObjects)356 reasonsDescription.append("non-layer viewport-constrained objects,");357 if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::IsImageDocument)358 reasonsDescription.append("image document,");359 360 // Strip the trailing comma.361 String reasonsDescriptionTrimmed = reasonsDescription.toString().left(reasonsDescription.length() - 1);362 363 WTFLogAlways("SCROLLING: Switching to main-thread scrolling mode. Time: %f Reason(s): %s\n", WTF::monotonicallyIncreasingTime(), reasonsDescriptionTrimmed.ascii().data());364 } else365 WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\n", WTF::monotonicallyIncreasingTime());366 }367 368 333 } // namespace WebCore 369 334 -
trunk/Source/WebKit2/ChangeLog
r128129 r128132 1 2012-09-10 James Robinson <jamesr@chromium.org> 2 3 Unreviewed, rolling out r127837. 4 http://trac.webkit.org/changeset/127837 5 https://bugs.webkit.org/show_bug.cgi?id=93898 6 7 Broke ScrollingCoordinator on chromium 8 9 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 10 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 11 1 12 2012-09-10 Jer Noble <jer.noble@apple.com> 2 13 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r127837 r128132 209 209 void TiledCoreAnimationDrawingArea::updatePreferences() 210 210 { 211 bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();212 ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));213 214 211 bool showDebugBorders = m_webPage->corePage()->settings()->showDebugBorders(); 215 212 … … 225 222 } 226 223 224 bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled(); 225 227 226 ScrollingThread::dispatch(bind(&ScrollingTree::setDebugRootLayer, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), m_debugInfoLayer)); 227 ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled)); 228 228 } 229 229
Note: See TracChangeset
for help on using the changeset viewer.