| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/LayoutPart.h" | 8 #include "core/layout/LayoutPart.h" |
| 9 #include "core/layout/LayoutView.h" | 9 #include "core/layout/LayoutView.h" |
| 10 #include "core/paint/ObjectPaintProperties.h" | 10 #include "core/paint/ObjectPaintProperties.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 return newTransformNodeForPerspective.release(); | 263 return newTransformNodeForPerspective.release(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 static PassRefPtr<TransformPaintPropertyNode> createScrollTranslationIfNeeded(co
nst LayoutObject& object, PaintPropertyTreeBuilderContext& context) | 266 static PassRefPtr<TransformPaintPropertyNode> createScrollTranslationIfNeeded(co
nst LayoutObject& object, PaintPropertyTreeBuilderContext& context) |
| 267 { | 267 { |
| 268 if (!object.isBoxModelObject() || !object.hasOverflowClip()) | 268 if (!object.isBoxModelObject() || !object.hasOverflowClip()) |
| 269 return nullptr; | 269 return nullptr; |
| 270 | 270 |
| 271 PaintLayer* layer = toLayoutBoxModelObject(object).layer(); | 271 PaintLayer* layer = toLayoutBoxModelObject(object).layer(); |
| 272 ASSERT(layer); | 272 ASSERT(layer); |
| 273 DoubleSize scrollOffset = layer->scrollableArea()->scrollOffset(); | 273 DoubleSize scrollOffset = layer->getScrollableArea()->scrollOffset(); |
| 274 if (scrollOffset.isZero() && !layer->scrollsOverflow()) | 274 if (scrollOffset.isZero() && !layer->scrollsOverflow()) |
| 275 return nullptr; | 275 return nullptr; |
| 276 | 276 |
| 277 RefPtr<TransformPaintPropertyNode> newTransformNodeForScrollTranslation = Tr
ansformPaintPropertyNode::create( | 277 RefPtr<TransformPaintPropertyNode> newTransformNodeForScrollTranslation = Tr
ansformPaintPropertyNode::create( |
| 278 TransformationMatrix().translate(-scrollOffset.width(), -scrollOffset.he
ight()), | 278 TransformationMatrix().translate(-scrollOffset.width(), -scrollOffset.he
ight()), |
| 279 FloatPoint3D(), context.currentTransform); | 279 FloatPoint3D(), context.currentTransform); |
| 280 context.currentTransform = newTransformNodeForScrollTranslation.get(); | 280 context.currentTransform = newTransformNodeForScrollTranslation.get(); |
| 281 return newTransformNodeForScrollTranslation.release(); | 281 return newTransformNodeForScrollTranslation.release(); |
| 282 } | 282 } |
| 283 | 283 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 355 |
| 356 if (object.isLayoutPart()) { | 356 if (object.isLayoutPart()) { |
| 357 Widget* widget = toLayoutPart(object).widget(); | 357 Widget* widget = toLayoutPart(object).widget(); |
| 358 if (widget && widget->isFrameView()) | 358 if (widget && widget->isFrameView()) |
| 359 walk(*toFrameView(widget), localContext); | 359 walk(*toFrameView(widget), localContext); |
| 360 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 360 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace blink | 364 } // namespace blink |
| OLD | NEW |