| 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/ObjectPainter.h" | 5 #include "core/paint/ObjectPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
| 8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
| 9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
| 10 #include "core/layout/LayoutTheme.h" | 10 #include "core/layout/LayoutTheme.h" |
| 11 #include "core/paint/BoxBorderPainter.h" | 11 #include "core/paint/BoxBorderPainter.h" |
| 12 #include "core/paint/LayoutObjectDrawingRecorder.h" | 12 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 13 #include "core/paint/PaintInfo.h" | 13 #include "core/paint/PaintInfo.h" |
| 14 #include "core/paint/PaintLayer.h" |
| 14 #include "core/style/BorderEdge.h" | 15 #include "core/style/BorderEdge.h" |
| 15 #include "core/style/ComputedStyle.h" | 16 #include "core/style/ComputedStyle.h" |
| 16 #include "platform/geometry/LayoutPoint.h" | 17 #include "platform/geometry/LayoutPoint.h" |
| 17 #include "platform/graphics/GraphicsContextStateSaver.h" | 18 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 18 | 19 |
| 19 namespace blink { | 20 namespace blink { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| 23 void PaintSingleRectangleOutline(const PaintInfo& paint_info, | 24 void PaintSingleRectangleOutline(const PaintInfo& paint_info, |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 708 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 708 | 709 |
| 709 // TODO(pdr): Let painter and paint property tree builder generate the same | 710 // TODO(pdr): Let painter and paint property tree builder generate the same |
| 710 // paint offset for LayoutScrollbarPart. crbug.com/664249. | 711 // paint offset for LayoutScrollbarPart. crbug.com/664249. |
| 711 if (layout_object_.IsLayoutScrollbarPart()) | 712 if (layout_object_.IsLayoutScrollbarPart()) |
| 712 return; | 713 return; |
| 713 | 714 |
| 714 LayoutPoint adjusted_paint_offset = paint_offset; | 715 LayoutPoint adjusted_paint_offset = paint_offset; |
| 715 if (layout_object_.IsBox()) | 716 if (layout_object_.IsBox()) |
| 716 adjusted_paint_offset += ToLayoutBox(layout_object_).Location(); | 717 adjusted_paint_offset += ToLayoutBox(layout_object_).Location(); |
| 717 DCHECK(layout_object_.PaintOffset() == adjusted_paint_offset) | 718 |
| 718 << " Paint offset mismatch: " << layout_object_.DebugName() | 719 // Paint offsets don't apply to fragments other than the first, |
| 719 << " from PaintPropertyTreeBuilder: " | 720 // so disbale these checks for all paginated content. |
| 720 << layout_object_.PaintOffset().ToString() | 721 if (!layout_object_.PaintingLayer()->EnclosingPaginationLayer()) { |
| 721 << " from painter: " << adjusted_paint_offset.ToString(); | 722 DCHECK(layout_object_.PaintOffset() == adjusted_paint_offset) |
| 723 << " Paint offset mismatch: " << layout_object_.DebugName() |
| 724 << " from PaintPropertyTreeBuilder: " |
| 725 << layout_object_.PaintOffset().ToString() |
| 726 << " from painter: " << adjusted_paint_offset.ToString(); |
| 727 } |
| 722 } | 728 } |
| 723 #endif | 729 #endif |
| 724 | 730 |
| 725 } // namespace blink | 731 } // namespace blink |
| OLD | NEW |