| 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/InlineFlowBoxPainter.h" | 5 #include "core/paint/InlineFlowBoxPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/api/LineLayoutAPIShim.h" | 7 #include "core/layout/api/LineLayoutAPIShim.h" |
| 8 #include "core/layout/line/RootInlineBox.h" | 8 #include "core/layout/line/RootInlineBox.h" |
| 9 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
| 10 #include "core/paint/PaintInfo.h" | 10 #include "core/paint/PaintInfo.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 bool has_fill_image = img && img->CanRender(); | 80 bool has_fill_image = img && img->CanRender(); |
| 81 if ((!has_fill_image && | 81 if ((!has_fill_image && |
| 82 !inline_flow_box_.GetLineLayoutItem().Style()->HasBorderRadius()) || | 82 !inline_flow_box_.GetLineLayoutItem().Style()->HasBorderRadius()) || |
| 83 (!inline_flow_box_.PrevLineBox() && !inline_flow_box_.NextLineBox()) || | 83 (!inline_flow_box_.PrevLineBox() && !inline_flow_box_.NextLineBox()) || |
| 84 !inline_flow_box_.Parent()) { | 84 !inline_flow_box_.Parent()) { |
| 85 BoxPainter::PaintFillLayer(*box_model, paint_info, c, fill_layer, rect, | 85 BoxPainter::PaintFillLayer(*box_model, paint_info, c, fill_layer, rect, |
| 86 kBackgroundBleedNone, &inline_flow_box_, | 86 kBackgroundBleedNone, &inline_flow_box_, |
| 87 rect.Size(), op); | 87 rect.Size(), op); |
| 88 } else if (inline_flow_box_.GetLineLayoutItem() | 88 } else if (inline_flow_box_.GetLineLayoutItem() |
| 89 .Style() | 89 .Style() |
| 90 ->BoxDecorationBreak() == kBoxDecorationBreakClone) { | 90 ->BoxDecorationBreak() == EBoxDecorationBreak::kClone) { |
| 91 GraphicsContextStateSaver state_saver(paint_info.context); | 91 GraphicsContextStateSaver state_saver(paint_info.context); |
| 92 paint_info.context.Clip(PixelSnappedIntRect(rect)); | 92 paint_info.context.Clip(PixelSnappedIntRect(rect)); |
| 93 BoxPainter::PaintFillLayer(*box_model, paint_info, c, fill_layer, rect, | 93 BoxPainter::PaintFillLayer(*box_model, paint_info, c, fill_layer, rect, |
| 94 kBackgroundBleedNone, &inline_flow_box_, | 94 kBackgroundBleedNone, &inline_flow_box_, |
| 95 rect.Size(), op); | 95 rect.Size(), op); |
| 96 } else { | 96 } else { |
| 97 // We have a fill image that spans multiple lines. | 97 // We have a fill image that spans multiple lines. |
| 98 // FIXME: frameSize ought to be the same as rect.size(). | 98 // FIXME: frameSize ought to be the same as rect.size(). |
| 99 LayoutSize frame_size(inline_flow_box_.Width(), inline_flow_box_.Height()); | 99 LayoutSize frame_size(inline_flow_box_.Width(), inline_flow_box_.Height()); |
| 100 LayoutRect image_strip_paint_rect = PaintRectForImageStrip( | 100 LayoutRect image_strip_paint_rect = PaintRectForImageStrip( |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 rect.SetHeight(logical_height); | 447 rect.SetHeight(logical_height); |
| 448 } else { | 448 } else { |
| 449 rect.SetX(logical_top); | 449 rect.SetX(logical_top); |
| 450 rect.SetWidth(logical_height); | 450 rect.SetWidth(logical_height); |
| 451 } | 451 } |
| 452 } | 452 } |
| 453 return rect; | 453 return rect; |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace blink | 456 } // namespace blink |
| OLD | NEW |