| 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/BoxPainter.h" | 5 #include "core/paint/BoxPainter.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/html/HTMLFrameOwnerElement.h" | 9 #include "core/html/HTMLFrameOwnerElement.h" |
| 10 #include "core/layout/ImageQualityController.h" | 10 #include "core/layout/ImageQualityController.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 private: | 271 private: |
| 272 GraphicsContextStateSaver m_saver; | 272 GraphicsContextStateSaver m_saver; |
| 273 }; | 273 }; |
| 274 | 274 |
| 275 FloatRoundedRect getBackgroundRoundedRect(const LayoutObject& obj, const LayoutR
ect& borderRect, | 275 FloatRoundedRect getBackgroundRoundedRect(const LayoutObject& obj, const LayoutR
ect& borderRect, |
| 276 const InlineFlowBox* box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHei
ght, | 276 const InlineFlowBox* box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHei
ght, |
| 277 bool includeLogicalLeftEdge, bool includeLogicalRightEdge) | 277 bool includeLogicalLeftEdge, bool includeLogicalRightEdge) |
| 278 { | 278 { |
| 279 FloatRoundedRect border = obj.style()->getRoundedBorderFor(borderRect, inclu
deLogicalLeftEdge, includeLogicalRightEdge); | 279 FloatRoundedRect border = obj.style()->getRoundedBorderFor(borderRect, inclu
deLogicalLeftEdge, includeLogicalRightEdge); |
| 280 if (box && (box->nextLineBox() || box->prevLineBox())) { | 280 if (box && (box->nextLineBox() || box->prevLineBox())) { |
| 281 FloatRoundedRect segmentBorder = obj.style()->getRoundedBorderFor(Layout
Rect(0, 0, inlineBoxWidth, inlineBoxHeight), | 281 FloatRoundedRect segmentBorder = obj.style()->getRoundedBorderFor(Layout
Rect(0, 0, inlineBoxWidth.toInt(), inlineBoxHeight.toInt()), |
| 282 includeLogicalLeftEdge, includeLogicalRightEdge); | 282 includeLogicalLeftEdge, includeLogicalRightEdge); |
| 283 border.setRadii(segmentBorder.getRadii()); | 283 border.setRadii(segmentBorder.getRadii()); |
| 284 } | 284 } |
| 285 return border; | 285 return border; |
| 286 } | 286 } |
| 287 | 287 |
| 288 FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const LayoutObje
ct& obj, | 288 FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const LayoutObje
ct& obj, |
| 289 const LayoutRect& borderRect, BackgroundBleedAvoidance bleedAvoidance, const
InlineFlowBox* box, | 289 const LayoutRect& borderRect, BackgroundBleedAvoidance bleedAvoidance, const
InlineFlowBox* box, |
| 290 const LayoutSize& boxSize, bool includeLogicalLeftEdge, bool includeLogicalR
ightEdge) | 290 const LayoutSize& boxSize, bool includeLogicalLeftEdge, bool includeLogicalR
ightEdge) |
| 291 { | 291 { |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 } | 867 } |
| 868 } | 868 } |
| 869 | 869 |
| 870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) | 870 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&
style, const Document& document) |
| 871 { | 871 { |
| 872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus
tEconomy | 872 return document.printing() && style.getPrintColorAdjust() == PrintColorAdjus
tEconomy |
| 873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); | 873 && (!document.settings() || !document.settings()->shouldPrintBackgrounds
()); |
| 874 } | 874 } |
| 875 | 875 |
| 876 } // namespace blink | 876 } // namespace blink |
| OLD | NEW |