| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo
, const LayoutPoint& paintOffset, const LayoutRect& paintRect) | 91 void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo
, const LayoutPoint& paintOffset, const LayoutRect& paintRect) |
| 92 { | 92 { |
| 93 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBox, Displa
yItem::BoxDecorationBackground, boundsForDrawingRecorder(paintOffset)); | 93 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBox, Displa
yItem::BoxDecorationBackground, boundsForDrawingRecorder(paintOffset)); |
| 94 if (recorder.canUseCachedDrawing()) | 94 if (recorder.canUseCachedDrawing()) |
| 95 return; | 95 return; |
| 96 | 96 |
| 97 const ComputedStyle& style = m_layoutBox.styleRef(); | 97 const ComputedStyle& style = m_layoutBox.styleRef(); |
| 98 BoxDecorationData boxDecorationData(m_layoutBox); | 98 BoxDecorationData boxDecorationData(m_layoutBox); |
| 99 | 99 |
| 100 #if ENABLE(ASSERT) | 100 #if ENABLE(ASSERT) |
| 101 // For now we don't have notification on media buffered range change from me
dia player | 101 // FIXME: For now we don't have notification on media buffered range change
from media player |
| 102 // and miss paint invalidation on buffered range chagne. crbug.com/484288. | 102 // and miss paint invalidation on buffered range change. crbug.com/484288. |
| 103 if (style.appearance() == MediaSliderPart) | 103 if (style.appearance() == MediaSliderPart) |
| 104 recorder.setSkipUnderInvalidationChecking(); | 104 recorder.setUnderInvalidationCheckingMode(DrawingDisplayItem::DontCheck)
; |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 // FIXME: Should eventually give the theme control over whether the box shad
ow should paint, since controls could have | 107 // FIXME: Should eventually give the theme control over whether the box shad
ow should paint, since controls could have |
| 108 // custom shadows of their own. | 108 // custom shadows of their own. |
| 109 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData.blee
dAvoidance)) | 109 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData.blee
dAvoidance)) |
| 110 paintBoxShadow(paintInfo, paintRect, style, Normal); | 110 paintBoxShadow(paintInfo, paintRect, style, Normal); |
| 111 | 111 |
| 112 GraphicsContextStateSaver stateSaver(*paintInfo.context, false); | 112 GraphicsContextStateSaver stateSaver(*paintInfo.context, false); |
| 113 if (bleedAvoidanceIsClipping(boxDecorationData.bleedAvoidance)) { | 113 if (bleedAvoidanceIsClipping(boxDecorationData.bleedAvoidance)) { |
| 114 | 114 |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2297 | 2297 |
| 2298 FloatPoint secondQuad[4]; | 2298 FloatPoint secondQuad[4]; |
| 2299 secondQuad[0] = quad[0]; | 2299 secondQuad[0] = quad[0]; |
| 2300 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); | 2300 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); |
| 2301 secondQuad[2] = quad[2]; | 2301 secondQuad[2] = quad[2]; |
| 2302 secondQuad[3] = quad[3]; | 2302 secondQuad[3] = quad[3]; |
| 2303 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); | 2303 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); |
| 2304 } | 2304 } |
| 2305 | 2305 |
| 2306 } // namespace blink | 2306 } // namespace blink |
| OLD | NEW |