| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 context->setFillColor(foreground); | 51 context->setFillColor(foreground); |
| 52 } | 52 } |
| 53 | 53 |
| 54 // Text shadows are disabled when printing. http://crbug.com/258321 | 54 // Text shadows are disabled when printing. http://crbug.com/258321 |
| 55 const ShadowList* shadowList = context->printing() ? 0 : style->textShadow()
; | 55 const ShadowList* shadowList = context->printing() ? 0 : style->textShadow()
; |
| 56 bool hasShadow = shadowList; | 56 bool hasShadow = shadowList; |
| 57 if (hasShadow) { | 57 if (hasShadow) { |
| 58 DrawLooper drawLooper; | 58 DrawLooper drawLooper; |
| 59 for (size_t i = shadowList->shadows().size(); i--; ) { | 59 for (size_t i = shadowList->shadows().size(); i--; ) { |
| 60 const ShadowData& shadow = shadowList->shadows()[i]; | 60 const ShadowData& shadow = shadowList->shadows()[i]; |
| 61 int shadowX = isHorizontal() ? shadow.x() : shadow.y(); | 61 LayoutUnit shadowX = isHorizontal() ? shadow.x() : shadow.y(); |
| 62 int shadowY = isHorizontal() ? shadow.y() : -shadow.x(); | 62 LayoutUnit shadowY = isHorizontal() ? shadow.y() : -shadow.x(); |
| 63 FloatSize offset(shadowX, shadowY); | 63 FloatSize offset(shadowX, shadowY); |
| 64 drawLooper.addShadow(offset, shadow.blur(), m_renderer->resolveColor
(shadow.color()), | 64 drawLooper.addShadow(offset, shadow.blur(), m_renderer->resolveColor
(shadow.color()), |
| 65 DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresA
lpha); | 65 DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresA
lpha); |
| 66 } | 66 } |
| 67 drawLooper.addUnmodifiedContent(); | 67 drawLooper.addUnmodifiedContent(); |
| 68 context->setDrawLooper(drawLooper); | 68 context->setDrawLooper(drawLooper); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // FIXME: Why is this always LTR? Fix by passing correct text run flags belo
w. | 71 // FIXME: Why is this always LTR? Fix by passing correct text run flags belo
w. |
| 72 FloatPoint boxOrigin(paintOffset); | 72 FloatPoint boxOrigin(paintOffset); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (visibleToHitTestRequest(request) && boundsRect.intersects(HitTestLocatio
n::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) { | 168 if (visibleToHitTestRequest(request) && boundsRect.intersects(HitTestLocatio
n::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) { |
| 169 renderer()->updateHitTestResult(result, locationInContainer.point() - to
LayoutSize(adjustedLocation)); | 169 renderer()->updateHitTestResult(result, locationInContainer.point() - to
LayoutSize(adjustedLocation)); |
| 170 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo
cationInContainer, boundsRect)) | 170 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo
cationInContainer, boundsRect)) |
| 171 return true; | 171 return true; |
| 172 } | 172 } |
| 173 | 173 |
| 174 return false; | 174 return false; |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace WebCore | 177 } // namespace WebCore |
| OLD | NEW |