| 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, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 protected: | 178 protected: |
| 179 void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigi
n, RenderStyle*, const Font&, int startPos, int endPos); | 179 void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigi
n, RenderStyle*, const Font&, int startPos, int endPos); |
| 180 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren
derStyle*, const Font&, bool background); | 180 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren
derStyle*, const Font&, bool background); |
| 181 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin
, const CompositionUnderline&); | 181 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin
, const CompositionUnderline&); |
| 182 | 182 |
| 183 // These functions both paint markers and update the DocumentMarker's render
edRect. | 183 // These functions both paint markers and update the DocumentMarker's render
edRect. |
| 184 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrig
in, DocumentMarker*, RenderStyle*, const Font&, bool grammar); | 184 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrig
in, DocumentMarker*, RenderStyle*, const Font&, bool grammar); |
| 185 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOri
gin, DocumentMarker*, RenderStyle*, const Font&); | 185 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOri
gin, DocumentMarker*, RenderStyle*, const Font&); |
| 186 | 186 |
| 187 private: | 187 private: |
| 188 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco
ration, TextDecorationStyle, const ShadowList*); | 188 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco
ration, const ShadowList*); |
| 189 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty
le*, const Font&, Color textColor); | 189 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty
le*, const Font&, Color textColor); |
| 190 | 190 |
| 191 TextRun::ExpansionBehavior expansionBehavior() const | 191 TextRun::ExpansionBehavior expansionBehavior() const |
| 192 { | 192 { |
| 193 return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : Tex
tRun::ForbidLeadingExpansion) | 193 return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : Tex
tRun::ForbidLeadingExpansion) |
| 194 | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
: TextRun::ForbidTrailingExpansion); | 194 | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
: TextRun::ForbidTrailingExpansion); |
| 195 } | 195 } |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); | 198 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
| 199 | 199 |
| 200 inline RenderText& InlineTextBox::textRenderer() const | 200 inline RenderText& InlineTextBox::textRenderer() const |
| 201 { | 201 { |
| 202 return toRenderText(renderer()); | 202 return toRenderText(renderer()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void alignSelectionRectToDevicePixels(FloatRect&); | 205 void alignSelectionRectToDevicePixels(FloatRect&); |
| 206 | 206 |
| 207 inline AffineTransform InlineTextBox::rotation(const FloatRect& boxRect, Rotatio
nDirection rotationDirection) | 207 inline AffineTransform InlineTextBox::rotation(const FloatRect& boxRect, Rotatio
nDirection rotationDirection) |
| 208 { | 208 { |
| 209 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect
.x() + boxRect.maxY(), boxRect.maxY() - boxRect.x()) | 209 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect
.x() + boxRect.maxY(), boxRect.maxY() - boxRect.x()) |
| 210 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x()
+ boxRect.maxY()); | 210 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x()
+ boxRect.maxY()); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace WebCore | 213 } // namespace WebCore |
| 214 | 214 |
| 215 #endif // InlineTextBox_h | 215 #endif // InlineTextBox_h |
| OLD | NEW |