| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location(); | 269 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location(); |
| 270 | 270 |
| 271 LayoutRect adjustedFrameRect = | 271 LayoutRect adjustedFrameRect = |
| 272 LayoutRect(adjustedPaintOffset, frameRect.size()); | 272 LayoutRect(adjustedPaintOffset, frameRect.size()); |
| 273 | 273 |
| 274 IntRect adjustedClipRect; | 274 IntRect adjustedClipRect; |
| 275 BorderPaintingType borderPaintingType = | 275 BorderPaintingType borderPaintingType = |
| 276 getBorderPaintType(adjustedFrameRect, adjustedClipRect); | 276 getBorderPaintType(adjustedFrameRect, adjustedClipRect); |
| 277 | 277 |
| 278 // Shadow comes first and is behind the background and border. | 278 // Shadow comes first and is behind the background and border. |
| 279 if (!m_inlineFlowBox.boxModelObject().boxShadowShouldBeAppliedToBackground( | 279 paintBoxShadow(paintInfo, *styleToUse, Normal, adjustedFrameRect); |
| 280 BackgroundBleedNone, &m_inlineFlowBox)) | |
| 281 paintBoxShadow(paintInfo, *styleToUse, Normal, adjustedFrameRect); | |
| 282 | 280 |
| 283 Color backgroundColor = inlineFlowBoxLayoutObject->resolveColor( | 281 Color backgroundColor = inlineFlowBoxLayoutObject->resolveColor( |
| 284 *styleToUse, CSSPropertyBackgroundColor); | 282 *styleToUse, CSSPropertyBackgroundColor); |
| 285 paintFillLayers(paintInfo, backgroundColor, styleToUse->backgroundLayers(), | 283 paintFillLayers(paintInfo, backgroundColor, styleToUse->backgroundLayers(), |
| 286 adjustedFrameRect); | 284 adjustedFrameRect); |
| 287 paintBoxShadow(paintInfo, *styleToUse, Inset, adjustedFrameRect); | 285 paintBoxShadow(paintInfo, *styleToUse, Inset, adjustedFrameRect); |
| 288 | 286 |
| 289 switch (borderPaintingType) { | 287 switch (borderPaintingType) { |
| 290 case DontPaintBorders: | 288 case DontPaintBorders: |
| 291 break; | 289 break; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 rect.setHeight(logicalHeight); | 428 rect.setHeight(logicalHeight); |
| 431 } else { | 429 } else { |
| 432 rect.setX(logicalTop); | 430 rect.setX(logicalTop); |
| 433 rect.setWidth(logicalHeight); | 431 rect.setWidth(logicalHeight); |
| 434 } | 432 } |
| 435 } | 433 } |
| 436 return rect; | 434 return rect; |
| 437 } | 435 } |
| 438 | 436 |
| 439 } // namespace blink | 437 } // namespace blink |
| OLD | NEW |