| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, Docu
mentMarker*, RenderStyle*, const Font&, bool grammar); | 183 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, Docu
mentMarker*, RenderStyle*, const Font&, bool grammar); |
| 184 void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, Doc
umentMarker*, RenderStyle*, const Font&); | 184 void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, Doc
umentMarker*, RenderStyle*, const Font&); |
| 185 | 185 |
| 186 TextRun::ExpansionBehavior expansionBehavior() const | 186 TextRun::ExpansionBehavior expansionBehavior() const |
| 187 { | 187 { |
| 188 return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : Tex
tRun::ForbidLeadingExpansion) | 188 return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : Tex
tRun::ForbidLeadingExpansion) |
| 189 | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
: TextRun::ForbidTrailingExpansion); | 189 | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
: TextRun::ForbidTrailingExpansion); |
| 190 } | 190 } |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 inline InlineTextBox* toInlineTextBox(InlineBox* inlineBox) | 193 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
| 194 { | |
| 195 ASSERT_WITH_SECURITY_IMPLICATION(!inlineBox || inlineBox->isInlineTextBox())
; | |
| 196 return static_cast<InlineTextBox*>(inlineBox); | |
| 197 } | |
| 198 | |
| 199 inline const InlineTextBox* toInlineTextBox(const InlineBox* inlineBox) | |
| 200 { | |
| 201 ASSERT_WITH_SECURITY_IMPLICATION(!inlineBox || inlineBox->isInlineTextBox())
; | |
| 202 return static_cast<const InlineTextBox*>(inlineBox); | |
| 203 } | |
| 204 | |
| 205 // This will catch anyone doing an unnecessary cast. | |
| 206 void toInlineTextBox(const InlineTextBox*); | |
| 207 | 194 |
| 208 inline RenderText* InlineTextBox::textRenderer() const | 195 inline RenderText* InlineTextBox::textRenderer() const |
| 209 { | 196 { |
| 210 return toRenderText(renderer()); | 197 return toRenderText(renderer()); |
| 211 } | 198 } |
| 212 | 199 |
| 213 void alignSelectionRectToDevicePixels(FloatRect&); | 200 void alignSelectionRectToDevicePixels(FloatRect&); |
| 214 | 201 |
| 215 } // namespace WebCore | 202 } // namespace WebCore |
| 216 | 203 |
| 217 #endif // InlineTextBox_h | 204 #endif // InlineTextBox_h |
| OLD | NEW |