Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "platform/animation/CompositorAnimationTimeline.h" 48 #include "platform/animation/CompositorAnimationTimeline.h"
49 #include "platform/exported/WebScrollbarImpl.h" 49 #include "platform/exported/WebScrollbarImpl.h"
50 #include "platform/exported/WebScrollbarThemeGeometryNative.h" 50 #include "platform/exported/WebScrollbarThemeGeometryNative.h"
51 #include "platform/geometry/Region.h" 51 #include "platform/geometry/Region.h"
52 #include "platform/geometry/TransformState.h" 52 #include "platform/geometry/TransformState.h"
53 #include "platform/graphics/GraphicsLayer.h" 53 #include "platform/graphics/GraphicsLayer.h"
54 #include "platform/instrumentation/tracing/TraceEvent.h" 54 #include "platform/instrumentation/tracing/TraceEvent.h"
55 #if OS(MACOSX) 55 #if OS(MACOSX)
56 #include "platform/mac/ScrollAnimatorMac.h" 56 #include "platform/mac/ScrollAnimatorMac.h"
57 #endif 57 #endif
58 #include <memory>
59 #include <utility>
58 #include "platform/scroll/MainThreadScrollingReason.h" 60 #include "platform/scroll/MainThreadScrollingReason.h"
59 #include "platform/scroll/ScrollAnimatorBase.h" 61 #include "platform/scroll/ScrollAnimatorBase.h"
60 #include "platform/scroll/ScrollbarTheme.h" 62 #include "platform/scroll/ScrollbarTheme.h"
61 #include "public/platform/Platform.h" 63 #include "public/platform/Platform.h"
62 #include "public/platform/WebCompositorSupport.h" 64 #include "public/platform/WebCompositorSupport.h"
63 #include "public/platform/WebLayerPositionConstraint.h" 65 #include "public/platform/WebLayerPositionConstraint.h"
64 #include "public/platform/WebLayerTreeView.h" 66 #include "public/platform/WebLayerTreeView.h"
65 #include "public/platform/WebScrollbarLayer.h" 67 #include "public/platform/WebScrollbarLayer.h"
66 #include "public/platform/WebScrollbarThemeGeometry.h" 68 #include "public/platform/WebScrollbarThemeGeometry.h"
67 #include "public/platform/WebScrollbarThemePainter.h" 69 #include "public/platform/WebScrollbarThemePainter.h"
68 #include "wtf/text/StringBuilder.h" 70 #include "wtf/text/StringBuilder.h"
69 #include <memory>
70 #include <utility>
71 71
72 using blink::WebLayer; 72 using blink::WebLayer;
73 using blink::WebLayerPositionConstraint; 73 using blink::WebLayerPositionConstraint;
74 using blink::WebRect; 74 using blink::WebRect;
75 using blink::WebScrollbarLayer; 75 using blink::WebScrollbarLayer;
76 using blink::WebVector; 76 using blink::WebVector;
77 77
78 namespace { 78 namespace {
79 79
80 WebLayer* toWebLayer(blink::GraphicsLayer* layer) { 80 WebLayer* toWebLayer(blink::GraphicsLayer* layer) {
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 for (const auto& layerRect : layerRects) { 759 for (const auto& layerRect : layerRects) {
760 if (!layerRect.value.isEmpty()) { 760 if (!layerRect.value.isEmpty()) {
761 const PaintLayer* compositedLayer = 761 const PaintLayer* compositedLayer =
762 layerRect.key 762 layerRect.key
763 ->enclosingLayerForPaintInvalidationCrossingFrameBoundaries(); 763 ->enclosingLayerForPaintInvalidationCrossingFrameBoundaries();
764 DCHECK(compositedLayer); 764 DCHECK(compositedLayer);
765 m_layersWithTouchRects.insert(compositedLayer); 765 m_layersWithTouchRects.insert(compositedLayer);
766 } 766 }
767 } 767 }
768 768
769
770 projectRectsToGraphicsLayerSpace(m_page->deprecatedLocalMainFrame(), 769 projectRectsToGraphicsLayerSpace(m_page->deprecatedLocalMainFrame(),
771 layerRects, graphicsLayerRects); 770 layerRects, graphicsLayerRects);
772 771
773 for (const auto& layerRect : graphicsLayerRects) { 772 for (const auto& layerRect : graphicsLayerRects) {
774 const GraphicsLayer* graphicsLayer = layerRect.key; 773 const GraphicsLayer* graphicsLayer = layerRect.key;
775 WebVector<WebRect> webRects(layerRect.value.size()); 774 WebVector<WebRect> webRects(layerRect.value.size());
776 for (size_t i = 0; i < layerRect.value.size(); ++i) 775 for (size_t i = 0; i < layerRect.value.size(); ++i)
777 webRects[i] = enclosingIntRect(layerRect.value[i]); 776 webRects[i] = enclosingIntRect(layerRect.value[i]);
778 graphicsLayer->platformLayer()->setTouchEventHandlerRegion(webRects); 777 graphicsLayer->platformLayer()->setTouchEventHandlerRegion(webRects);
779 } 778 }
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 frameView ? toWebLayer(frameView->layoutViewportScrollableArea() 1187 frameView ? toWebLayer(frameView->layoutViewportScrollableArea()
1189 ->layerForScrolling()) 1188 ->layerForScrolling())
1190 : nullptr) { 1189 : nullptr) {
1191 return WebSize(frameView->layoutViewportScrollableArea()->contentsSize()) != 1190 return WebSize(frameView->layoutViewportScrollableArea()->contentsSize()) !=
1192 scrollLayer->bounds(); 1191 scrollLayer->bounds();
1193 } 1192 }
1194 return false; 1193 return false;
1195 } 1194 }
1196 1195
1197 } // namespace blink 1196 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698