| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies) |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 if (paintInfo.phase != PaintPhaseForeground || style()->visibility() != VISI
BLE) { | 116 if (paintInfo.phase != PaintPhaseForeground || style()->visibility() != VISI
BLE) { |
| 117 RenderBlock::paint(paintInfo, paintOffset); | 117 RenderBlock::paint(paintInfo, paintOffset); |
| 118 return; | 118 return; |
| 119 } | 119 } |
| 120 | 120 |
| 121 LayoutPoint boxOrigin(paintOffset + location()); | 121 LayoutPoint boxOrigin(paintOffset + location()); |
| 122 LayoutRect overflowRect(visualOverflowRect()); | 122 LayoutRect overflowRect(visualOverflowRect()); |
| 123 overflowRect.moveBy(boxOrigin); | 123 overflowRect.moveBy(boxOrigin); |
| 124 overflowRect.inflate(maximalOutlineSize(paintInfo.phase)); | 124 overflowRect.inflate(maximalOutlineSize(paintInfo.phase)); |
| 125 | 125 |
| 126 if (!paintInfo.rect().intersects(pixelSnappedIntRect(overflowRect))) | 126 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect))) |
| 127 return; | 127 return; |
| 128 | 128 |
| 129 const Color color(resolveColor(CSSPropertyColor)); | 129 const Color color(resolveColor(CSSPropertyColor)); |
| 130 paintInfo.context->setStrokeColor(color); | 130 paintInfo.context->setStrokeColor(color); |
| 131 paintInfo.context->setStrokeStyle(SolidStroke); | 131 paintInfo.context->setStrokeStyle(SolidStroke); |
| 132 paintInfo.context->setStrokeThickness(1.0f); | 132 paintInfo.context->setStrokeThickness(1.0f); |
| 133 paintInfo.context->setFillColor(color); | 133 paintInfo.context->setFillColor(color); |
| 134 | 134 |
| 135 boxOrigin.move(borderLeft() + paddingLeft(), borderTop() + paddingTop()); | 135 boxOrigin.move(borderLeft() + paddingLeft(), borderTop() + paddingTop()); |
| 136 paintInfo.context->fillPath(getPath(boxOrigin)); | 136 paintInfo.context->fillPath(getPath(boxOrigin)); |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool RenderDetailsMarker::isOpen() const | 139 bool RenderDetailsMarker::isOpen() const |
| 140 { | 140 { |
| 141 for (RenderObject* renderer = parent(); renderer; renderer = renderer->paren
t()) { | 141 for (RenderObject* renderer = parent(); renderer; renderer = renderer->paren
t()) { |
| 142 if (!renderer->node()) | 142 if (!renderer->node()) |
| 143 continue; | 143 continue; |
| 144 if (renderer->node()->hasTagName(detailsTag)) | 144 if (renderer->node()->hasTagName(detailsTag)) |
| 145 return !toElement(renderer->node())->getAttribute(openAttr).isNull()
; | 145 return !toElement(renderer->node())->getAttribute(openAttr).isNull()
; |
| 146 if (renderer->node()->hasTagName(inputTag)) | 146 if (renderer->node()->hasTagName(inputTag)) |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 return false; | 150 return false; |
| 151 } | 151 } |
| 152 | 152 |
| 153 } | 153 } |
| OLD | NEW |