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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; | 491 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; |
492 break; | 492 break; |
493 default: | 493 default: |
494 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; | 494 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; |
495 break; | 495 break; |
496 } | 496 } |
497 | 497 |
498 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c
lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule); | 498 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c
lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule); |
499 } | 499 } |
500 | 500 |
| 501 if (paintingInfo.globalPaintFlags() & GlobalPaintPrinting) |
| 502 paintBehavior |= PaintBehaviorPrinting; |
| 503 |
501 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa
intBehavior, paintingRootForLayoutObject, 0, paintingInfo.rootLayer->layoutObjec
t()); | 504 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa
intBehavior, paintingRootForLayoutObject, 0, paintingInfo.rootLayer->layoutObjec
t()); |
502 Optional<ScrollRecorder> scrollRecorder; | 505 Optional<ScrollRecorder> scrollRecorder; |
503 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL
ayer.layoutBoxLocation()); | 506 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL
ayer.layoutBoxLocation()); |
504 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { | 507 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { |
505 // As a descendant of the root layer, m_paintLayer's painting is not con
trolled by the ScrollRecorders | 508 // As a descendant of the root layer, m_paintLayer's painting is not con
trolled by the ScrollRecorders |
506 // created by BlockPainter of the ancestor layers up to the root layer,
so we need to issue ScrollRecorder | 509 // created by BlockPainter of the ancestor layers up to the root layer,
so we need to issue ScrollRecorder |
507 // for this layer seperately, with the scroll offset accumulated from th
e root layer to the parent of this | 510 // for this layer seperately, with the scroll offset accumulated from th
e root layer to the parent of this |
508 // layer, to get the same result as ScrollRecorder in BlockPainter. | 511 // layer, to get the same result as ScrollRecorder in BlockPainter. |
509 paintOffset += paintingInfo.scrollOffsetAccumulation; | 512 paintOffset += paintingInfo.scrollOffsetAccumulation; |
510 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation); | 513 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 611 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
609 return; | 612 return; |
610 | 613 |
611 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 614 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
612 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 615 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
613 | 616 |
614 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 617 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
615 } | 618 } |
616 | 619 |
617 } // namespace blink | 620 } // namespace blink |
OLD | NEW |