OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 // Using computedFontSize should take care of zoom as well. | 1085 // Using computedFontSize should take care of zoom as well. |
1086 | 1086 |
1087 // Update Underline thickness, in case we have Faulty Font Metrics calculati
ng underline thickness by old method. | 1087 // Update Underline thickness, in case we have Faulty Font Metrics calculati
ng underline thickness by old method. |
1088 float textDecorationThickness = styleToUse->fontMetrics().underlineThickness
(); | 1088 float textDecorationThickness = styleToUse->fontMetrics().underlineThickness
(); |
1089 int fontHeightInt = (int)(styleToUse->fontMetrics().floatHeight() + 0.5); | 1089 int fontHeightInt = (int)(styleToUse->fontMetrics().floatHeight() + 0.5); |
1090 if ((textDecorationThickness == 0.f) || (textDecorationThickness >= (fontHei
ghtInt >> 1))) | 1090 if ((textDecorationThickness == 0.f) || (textDecorationThickness >= (fontHei
ghtInt >> 1))) |
1091 textDecorationThickness = std::max(1.f, styleToUse->computedFontSize() /
10.f); | 1091 textDecorationThickness = std::max(1.f, styleToUse->computedFontSize() /
10.f); |
1092 | 1092 |
1093 context->setStrokeThickness(textDecorationThickness); | 1093 context->setStrokeThickness(textDecorationThickness); |
1094 | 1094 |
| 1095 switch (decorationStyle) { |
| 1096 case TextDecorationStyleSolid: |
| 1097 case TextDecorationStyleDouble: |
| 1098 case TextDecorationStyleDotted: |
| 1099 case TextDecorationStyleDashed: |
| 1100 context->setShouldAntialias(RenderBoxModelObject::shouldAntialiasLines(c
ontext)); |
| 1101 break; |
| 1102 } |
| 1103 |
1095 float extraOffset = 0; | 1104 float extraOffset = 0; |
1096 if (!linesAreOpaque && shadowCount > 1) { | 1105 if (!linesAreOpaque && shadowCount > 1) { |
1097 FloatRect clipRect(localOrigin, FloatSize(width, baseline + 2)); | 1106 FloatRect clipRect(localOrigin, FloatSize(width, baseline + 2)); |
1098 for (size_t i = shadowCount; i--; ) { | 1107 for (size_t i = shadowCount; i--; ) { |
1099 const ShadowData& s = shadowList->shadows()[i]; | 1108 const ShadowData& s = shadowList->shadows()[i]; |
1100 FloatRect shadowRect(localOrigin, FloatSize(width, baseline + 2)); | 1109 FloatRect shadowRect(localOrigin, FloatSize(width, baseline + 2)); |
1101 shadowRect.inflate(s.blur()); | 1110 shadowRect.inflate(s.blur()); |
1102 float shadowX = isHorizontal() ? s.x() : s.y(); | 1111 float shadowX = isHorizontal() ? s.x() : s.y(); |
1103 float shadowY = isHorizontal() ? s.y() : -s.x(); | 1112 float shadowY = isHorizontal() ? s.y() : -s.x(); |
1104 shadowRect.move(shadowX, shadowY); | 1113 shadowRect.move(shadowX, shadowY); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 1563 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
1555 const int rendererCharacterOffset = 24; | 1564 const int rendererCharacterOffset = 24; |
1556 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1565 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1557 fputc(' ', stderr); | 1566 fputc(' ', stderr); |
1558 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1567 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1559 } | 1568 } |
1560 | 1569 |
1561 #endif | 1570 #endif |
1562 | 1571 |
1563 } // namespace WebCore | 1572 } // namespace WebCore |
OLD | NEW |