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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 if (style()->writingMode() == TopToBottomWritingMode || style()->writingMode () == BottomToTopWritingMode) // Horizontal mode |
136 boxOrigin.move(borderLeft() + paddingLeft() + (style()->isLeftToRightDir ection() ? marginLeft(): marginRight()), borderTop() + paddingTop()); | |
137 else | |
138 boxOrigin.move(borderLeft() + paddingLeft(), borderTop() + paddingTop()) ; | |
leviw_travelin_and_unemployed
2014/06/10 19:06:58
This seems wrong. Why do you only consider margin
| |
136 paintInfo.context->fillPath(getPath(boxOrigin)); | 139 paintInfo.context->fillPath(getPath(boxOrigin)); |
137 } | 140 } |
138 | 141 |
139 bool RenderDetailsMarker::isOpen() const | 142 bool RenderDetailsMarker::isOpen() const |
140 { | 143 { |
141 for (RenderObject* renderer = parent(); renderer; renderer = renderer->paren t()) { | 144 for (RenderObject* renderer = parent(); renderer; renderer = renderer->paren t()) { |
142 if (!renderer->node()) | 145 if (!renderer->node()) |
143 continue; | 146 continue; |
144 if (isHTMLDetailsElement(*renderer->node())) | 147 if (isHTMLDetailsElement(*renderer->node())) |
145 return !toElement(renderer->node())->getAttribute(openAttr).isNull() ; | 148 return !toElement(renderer->node())->getAttribute(openAttr).isNull() ; |
146 if (isHTMLInputElement(*renderer->node())) | 149 if (isHTMLInputElement(*renderer->node())) |
147 return true; | 150 return true; |
148 } | 151 } |
149 | 152 |
150 return false; | 153 return false; |
151 } | 154 } |
152 | 155 |
153 } | 156 } |
OLD | NEW |