Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 95 |
| 96 if (paintInfo.phase == PaintPhaseMask) { | 96 if (paintInfo.phase == PaintPhaseMask) { |
| 97 paintMask(paintInfo, adjustedPaintOffset); | 97 paintMask(paintInfo, adjustedPaintOffset); |
| 98 return; | 98 return; |
| 99 } | 99 } |
| 100 | 100 |
| 101 if (hasBoxDecorationBackground()) | 101 if (hasBoxDecorationBackground()) |
| 102 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); | 102 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); |
| 103 | 103 |
| 104 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size()); | 104 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size()); |
| 105 if (paintInfo.phase == PaintPhaseForeground && style()->outlineWidth()) | 105 if (style()->outlineWidth()) |
| 106 paintOutline(paintInfo, paintRect); | 106 paintOutline(paintInfo, paintRect); |
| 107 | 107 |
| 108 if (paintInfo.phase == PaintPhaseMask && !canHaveChildren()) | |
|
ojan
2015/01/30 01:25:59
We've already early returned above if we're painti
| |
| 109 return; | |
| 110 | |
| 111 bool completelyClippedOut = false; | 108 bool completelyClippedOut = false; |
| 112 if (style()->hasBorderRadius()) { | 109 if (style()->hasBorderRadius()) { |
| 113 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); | 110 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); |
| 114 | 111 |
| 115 if (borderRect.isEmpty()) | 112 if (borderRect.isEmpty()) |
| 116 completelyClippedOut = true; | 113 completelyClippedOut = true; |
| 117 else { | 114 else { |
| 118 // Push a clip if we have a border radius, since we want to round th e foreground content that gets painted. | 115 // Push a clip if we have a border radius, since we want to round th e foreground content that gets painted. |
| 119 paintInfo.context->save(); | 116 paintInfo.context->save(); |
| 120 RoundedRect roundedInnerRect = style()->getRoundedInnerBorderFor(pai ntRect, | 117 RoundedRect roundedInnerRect = style()->getRoundedInnerBorderFor(pai ntRect, |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 if (s == SelectionEnd) | 460 if (s == SelectionEnd) |
| 464 return selectionEnd == end; | 461 return selectionEnd == end; |
| 465 if (s == SelectionBoth) | 462 if (s == SelectionBoth) |
| 466 return selectionStart == 0 && selectionEnd == end; | 463 return selectionStart == 0 && selectionEnd == end; |
| 467 | 464 |
| 468 ASSERT(0); | 465 ASSERT(0); |
| 469 return false; | 466 return false; |
| 470 } | 467 } |
| 471 | 468 |
| 472 } | 469 } |
| OLD | NEW |