Chromium Code Reviews| 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/BoxPainter.h" | 6 #include "core/paint/BoxPainter.h" |
| 7 | 7 |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/html/HTMLFrameOwnerElement.h" | 10 #include "core/html/HTMLFrameOwnerElement.h" |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 if (!paintInfo.shouldPaintWithinRoot(&m_layoutBox) || m_layoutBox.style()->v isibility() != VISIBLE) | 561 if (!paintInfo.shouldPaintWithinRoot(&m_layoutBox) || m_layoutBox.style()->v isibility() != VISIBLE) |
| 562 return; | 562 return; |
| 563 | 563 |
| 564 if (!m_layoutBox.layer() || m_layoutBox.layer()->compositingState() != Paint sIntoOwnBacking) | 564 if (!m_layoutBox.layer() || m_layoutBox.layer()->compositingState() != Paint sIntoOwnBacking) |
| 565 return; | 565 return; |
| 566 | 566 |
| 567 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte xt, m_layoutBox, paintInfo.phase)) | 567 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte xt, m_layoutBox, paintInfo.phase)) |
| 568 return; | 568 return; |
| 569 | 569 |
| 570 IntRect paintRect = pixelSnappedIntRect(LayoutRect(paintOffset, m_layoutBox. size())); | 570 IntRect paintRect = pixelSnappedIntRect(LayoutRect(paintOffset, m_layoutBox. size())); |
| 571 LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layoutBox, paintInfo.phase, paintRect); | 571 LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layoutBox, paintInfo.phase, LayoutRect(paintRect)); |
|
jbroman
2015/08/26 19:06:43
ditto (no need to go via LayoutRect)
chrishtr
2015/08/26 20:53:51
Reverted.
| |
| 572 paintInfo.context->fillRect(paintRect, Color::black); | 572 paintInfo.context->fillRect(paintRect, Color::black); |
| 573 } | 573 } |
| 574 | 574 |
| 575 InterpolationQuality BoxPainter::chooseInterpolationQuality(LayoutObject& obj, G raphicsContext* context, Image* image, const void* layer, const LayoutSize& size ) | 575 InterpolationQuality BoxPainter::chooseInterpolationQuality(LayoutObject& obj, G raphicsContext* context, Image* image, const void* layer, const LayoutSize& size ) |
| 576 { | 576 { |
| 577 return ImageQualityController::imageQualityController()->chooseInterpolation Quality(context, &obj, image, layer, size); | 577 return ImageQualityController::imageQualityController()->chooseInterpolation Quality(context, &obj, image, layer, size); |
| 578 } | 578 } |
| 579 | 579 |
| 580 bool BoxPainter::paintNinePieceImage(LayoutBoxModelObject& obj, GraphicsContext* graphicsContext, const LayoutRect& rect, const ComputedStyle& style, const Nine PieceImage& ninePieceImage, SkXfermode::Mode op) | 580 bool BoxPainter::paintNinePieceImage(LayoutBoxModelObject& obj, GraphicsContext* graphicsContext, const LayoutRect& rect, const ComputedStyle& style, const Nine PieceImage& ninePieceImage, SkXfermode::Mode op) |
| 581 { | 581 { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 } | 762 } |
| 763 } | 763 } |
| 764 | 764 |
| 765 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) | 765 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) |
| 766 { | 766 { |
| 767 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc onomy | 767 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc onomy |
| 768 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); | 768 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); |
| 769 } | 769 } |
| 770 | 770 |
| 771 } // namespace blink | 771 } // namespace blink |
| OLD | NEW |