Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/FramePainter.h" | 5 #include "core/paint/FramePainter.h" |
| 6 | 6 |
| 7 #include "core/editing/markers/DocumentMarkerController.h" | 7 #include "core/editing/markers/DocumentMarkerController.h" |
| 8 #include "core/fetch/MemoryCache.h" | 8 #include "core/fetch/MemoryCache.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/inspector/InspectorInstrumentation.h" | 10 #include "core/inspector/InspectorInstrumentation.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 87 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 88 IntRect scrollViewDirtyRect = rect.m_rect; | 88 IntRect scrollViewDirtyRect = rect.m_rect; |
| 89 IntRect visibleAreaWithScrollbars( | 89 IntRect visibleAreaWithScrollbars( |
| 90 frameView().location(), | 90 frameView().location(), |
| 91 frameView().visibleContentRect(IncludeScrollbars).size()); | 91 frameView().visibleContentRect(IncludeScrollbars).size()); |
| 92 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars); | 92 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars); |
| 93 scrollViewDirtyRect.moveBy(-frameView().location()); | 93 scrollViewDirtyRect.moveBy(-frameView().location()); |
| 94 | 94 |
| 95 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 95 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
| 96 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 96 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 97 if (TransformPaintPropertyNode* transform = | 97 if (const PropertyTreeState* contentsState = |
| 98 m_frameView->preTranslation()) { | 98 m_frameView->totalPropertyTreeStateForContents()) { |
| 99 // The scrollbar's property nodes are similar to the frame view's | |
| 100 // contents state but we want to exclude the content-specific. This | |
| 101 // prevents the scrollbars from scrolling, for example. | |
| 99 PaintChunkProperties properties( | 102 PaintChunkProperties properties( |
| 100 context.getPaintController().currentPaintChunkProperties()); | 103 context.getPaintController().currentPaintChunkProperties()); |
| 101 properties.transform = transform; | 104 properties.transform = m_frameView->preTranslation(); |
| 105 properties.clip = m_frameView->contentClip()->parent(); | |
| 106 properties.effect = contentsState->effect(); | |
| 107 auto* scrollBarScroll = contentsState->scroll(); | |
|
szager1
2016/11/14 05:34:04
As far as I can tell, contentsState->scroll() shou
| |
| 108 if (m_frameView->scroll()) | |
| 109 scrollBarScroll = m_frameView->scroll()->parent(); | |
| 110 properties.scroll = scrollBarScroll; | |
| 102 scopedPaintChunkProperties.emplace(context.getPaintController(), | 111 scopedPaintChunkProperties.emplace(context.getPaintController(), |
| 103 *frameView().layoutView(), | 112 *frameView().layoutView(), |
| 104 properties); | 113 properties); |
| 105 } | 114 } |
| 106 } | 115 } |
| 107 | 116 |
| 108 TransformRecorder transformRecorder( | 117 TransformRecorder transformRecorder( |
| 109 context, *frameView().layoutView(), | 118 context, *frameView().layoutView(), |
| 110 AffineTransform::translation(frameView().x(), frameView().y())); | 119 AffineTransform::translation(frameView().x(), frameView().y())); |
| 111 | 120 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 | 251 |
| 243 bar.paint(context, CullRect(rect)); | 252 bar.paint(context, CullRect(rect)); |
| 244 } | 253 } |
| 245 | 254 |
| 246 const FrameView& FramePainter::frameView() { | 255 const FrameView& FramePainter::frameView() { |
| 247 DCHECK(m_frameView); | 256 DCHECK(m_frameView); |
| 248 return *m_frameView; | 257 return *m_frameView; |
| 249 } | 258 } |
| 250 | 259 |
| 251 } // namespace blink | 260 } // namespace blink |
| OLD | NEW |