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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/DeprecatedPaintLayerPainter.h" | 6 #include "core/paint/DeprecatedPaintLayerPainter.h" |
7 | 7 |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; | 483 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; |
484 break; | 484 break; |
485 default: | 485 default: |
486 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; | 486 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; |
487 break; | 487 break; |
488 } | 488 } |
489 | 489 |
490 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c
lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule); | 490 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c
lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule); |
491 } | 491 } |
492 | 492 |
493 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa
intingInfo.globalPaintFlags(), paintFlags, paintingRootForLayoutObject, 0, paint
ingInfo.rootLayer->layoutObject()); | 493 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa
intingInfo.globalPaintFlags(), paintFlags, paintingRootForLayoutObject, painting
Info.rootLayer->layoutObject()); |
494 Optional<ScrollRecorder> scrollRecorder; | 494 Optional<ScrollRecorder> scrollRecorder; |
495 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL
ayer.layoutBoxLocation()); | 495 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL
ayer.layoutBoxLocation()); |
496 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { | 496 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { |
497 // As a descendant of the root layer, m_paintLayer's painting is not con
trolled by the ScrollRecorders | 497 // As a descendant of the root layer, m_paintLayer's painting is not con
trolled by the ScrollRecorders |
498 // created by BlockPainter of the ancestor layers up to the root layer,
so we need to issue ScrollRecorder | 498 // created by BlockPainter of the ancestor layers up to the root layer,
so we need to issue ScrollRecorder |
499 // for this layer seperately, with the scroll offset accumulated from th
e root layer to the parent of this | 499 // for this layer seperately, with the scroll offset accumulated from th
e root layer to the parent of this |
500 // layer, to get the same result as ScrollRecorder in BlockPainter. | 500 // layer, to get the same result as ScrollRecorder in BlockPainter. |
501 paintOffset += paintingInfo.scrollOffsetAccumulation; | 501 paintOffset += paintingInfo.scrollOffsetAccumulation; |
502 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation); | 502 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation); |
503 scrollRecorder.emplace(*paintInfo.context, *m_paintLayer.layoutObject(),
paintInfo.phase, paintingInfo.scrollOffsetAccumulation); | 503 scrollRecorder.emplace(*paintInfo.context, *m_paintLayer.layoutObject(),
paintInfo.phase, paintingInfo.scrollOffsetAccumulation); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 600 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
601 return; | 601 return; |
602 | 602 |
603 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 603 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
604 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 604 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
605 | 605 |
606 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 606 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
607 } | 607 } |
608 | 608 |
609 } // namespace blink | 609 } // namespace blink |
OLD | NEW |