| 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/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 properties->clearCssClip(); | 381 properties->clearCssClip(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( | 384 void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( |
| 385 const LayoutObject& object, | 385 const LayoutObject& object, |
| 386 PaintPropertyTreeBuilderContext& context) { | 386 PaintPropertyTreeBuilderContext& context) { |
| 387 // Avoid adding an ObjectPaintProperties for non-boxes to save memory, since w
e don't need them at the moment. | 387 // Avoid adding an ObjectPaintProperties for non-boxes to save memory, since w
e don't need them at the moment. |
| 388 if (!object.isBox() && !object.hasLayer()) | 388 if (!object.isBox() && !object.hasLayer()) |
| 389 return; | 389 return; |
| 390 | 390 |
| 391 std::unique_ptr<ObjectPaintProperties::LocalBorderBoxProperties> | 391 std::unique_ptr<ObjectPaintProperties::PropertyTreeStateWithOffset> |
| 392 borderBoxContext = | 392 borderBoxContext = |
| 393 wrapUnique(new ObjectPaintProperties::LocalBorderBoxProperties); | 393 wrapUnique(new ObjectPaintProperties::PropertyTreeStateWithOffset( |
| 394 borderBoxContext->paintOffset = context.current.paintOffset; | 394 context.current.paintOffset, |
| 395 borderBoxContext->geometryPropertyTreeState = GeometryPropertyTreeState( | 395 PropertyTreeState(context.current.transform, context.current.clip, |
| 396 context.current.transform, context.current.clip, context.currentEffect); | 396 context.currentEffect, |
| 397 borderBoxContext->scroll = context.current.scroll; | 397 context.current.scroll))); |
| 398 | |
| 399 object.getMutableForPainting() | 398 object.getMutableForPainting() |
| 400 .ensureObjectPaintProperties() | 399 .ensureObjectPaintProperties() |
| 401 .setLocalBorderBoxProperties(std::move(borderBoxContext)); | 400 .setLocalBorderBoxProperties(std::move(borderBoxContext)); |
| 402 } | 401 } |
| 403 | 402 |
| 404 // TODO(trchen): Remove this once we bake the paint offset into frameRect. | 403 // TODO(trchen): Remove this once we bake the paint offset into frameRect. |
| 405 void PaintPropertyTreeBuilder::updateScrollbarPaintOffset( | 404 void PaintPropertyTreeBuilder::updateScrollbarPaintOffset( |
| 406 const LayoutObject& object, | 405 const LayoutObject& object, |
| 407 const PaintPropertyTreeBuilderContext& context) { | 406 const PaintPropertyTreeBuilderContext& context) { |
| 408 IntPoint roundedPaintOffset = roundedIntPoint(context.current.paintOffset); | 407 IntPoint roundedPaintOffset = roundedIntPoint(context.current.paintOffset); |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 return; | 742 return; |
| 744 | 743 |
| 745 updateOverflowClip(object, context); | 744 updateOverflowClip(object, context); |
| 746 updatePerspective(object, context); | 745 updatePerspective(object, context); |
| 747 updateSvgLocalToBorderBoxTransform(object, context); | 746 updateSvgLocalToBorderBoxTransform(object, context); |
| 748 updateScrollAndScrollTranslation(object, context); | 747 updateScrollAndScrollTranslation(object, context); |
| 749 updateOutOfFlowContext(object, context); | 748 updateOutOfFlowContext(object, context); |
| 750 } | 749 } |
| 751 | 750 |
| 752 } // namespace blink | 751 } // namespace blink |
| OLD | NEW |