| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 setNeedsLayoutAndPrefWidthsRecalc(); | 86 setNeedsLayoutAndPrefWidthsRecalc(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 89 void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| 90 { | 90 { |
| 91 if (!shouldPaint(paintInfo, paintOffset)) | 91 if (!shouldPaint(paintInfo, paintOffset)) |
| 92 return; | 92 return; |
| 93 | 93 |
| 94 LayoutPoint adjustedPaintOffset = paintOffset + location(); | 94 LayoutPoint adjustedPaintOffset = paintOffset + location(); |
| 95 | 95 |
| 96 if (hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground
|| paintInfo.phase == PaintPhaseSelection)) | |
| 97 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); | |
| 98 | |
| 99 if (paintInfo.phase == PaintPhaseMask) { | 96 if (paintInfo.phase == PaintPhaseMask) { |
| 100 paintMask(paintInfo, adjustedPaintOffset); | 97 paintMask(paintInfo, adjustedPaintOffset); |
| 101 return; | 98 return; |
| 102 } | 99 } |
| 103 | 100 |
| 101 if (hasBoxDecorationBackground()) |
| 102 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); |
| 103 |
| 104 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size()); | 104 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size()); |
| 105 if (paintInfo.phase == PaintPhaseForeground && style()->outlineWidth()) | 105 if (paintInfo.phase == PaintPhaseForeground && style()->outlineWidth()) |
| 106 paintOutline(paintInfo, paintRect); | 106 paintOutline(paintInfo, paintRect); |
| 107 | 107 |
| 108 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Selection && !canHaveChildren()) | 108 if (paintInfo.phase == PaintPhaseMask && !canHaveChildren()) |
| 109 return; | 109 return; |
| 110 | 110 |
| 111 bool drawSelectionTint = selectionState() != SelectionNone; | 111 bool drawSelectionTint = selectionState() != SelectionNone; |
| 112 if (paintInfo.phase == PaintPhaseSelection) { | 112 if (paintInfo.phase == PaintPhaseSelection) { |
| 113 if (selectionState() == SelectionNone) | 113 if (selectionState() == SelectionNone) |
| 114 return; | 114 return; |
| 115 drawSelectionTint = false; | 115 drawSelectionTint = false; |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool completelyClippedOut = false; | 118 bool completelyClippedOut = false; |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 if (s == SelectionEnd) | 470 if (s == SelectionEnd) |
| 471 return selectionEnd == end; | 471 return selectionEnd == end; |
| 472 if (s == SelectionBoth) | 472 if (s == SelectionBoth) |
| 473 return selectionStart == 0 && selectionEnd == end; | 473 return selectionStart == 0 && selectionEnd == end; |
| 474 | 474 |
| 475 ASSERT(0); | 475 ASSERT(0); |
| 476 return false; | 476 return false; |
| 477 } | 477 } |
| 478 | 478 |
| 479 } | 479 } |
| OLD | NEW |