| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. |
| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return 0; | 243 return 0; |
| 244 | 244 |
| 245 LayoutUnit maxPositionTop = 0; | 245 LayoutUnit maxPositionTop = 0; |
| 246 LayoutUnit maxPositionBottom = 0; | 246 LayoutUnit maxPositionBottom = 0; |
| 247 int maxAscent = 0; | 247 int maxAscent = 0; |
| 248 int maxDescent = 0; | 248 int maxDescent = 0; |
| 249 bool setMaxAscent = false; | 249 bool setMaxAscent = false; |
| 250 bool setMaxDescent = false; | 250 bool setMaxDescent = false; |
| 251 | 251 |
| 252 // Figure out if we're in no-quirks mode. | 252 // Figure out if we're in no-quirks mode. |
| 253 bool noQuirksMode = renderer()->document()->inNoQuirksMode(); | 253 bool noQuirksMode = renderer()->document().inNoQuirksMode(); |
| 254 | 254 |
| 255 m_baselineType = requiresIdeographicBaseline(textBoxDataMap) ? IdeographicBa
seline : AlphabeticBaseline; | 255 m_baselineType = requiresIdeographicBaseline(textBoxDataMap) ? IdeographicBa
seline : AlphabeticBaseline; |
| 256 | 256 |
| 257 computeLogicalBoxHeights(this, maxPositionTop, maxPositionBottom, maxAscent,
maxDescent, setMaxAscent, setMaxDescent, noQuirksMode, | 257 computeLogicalBoxHeights(this, maxPositionTop, maxPositionBottom, maxAscent,
maxDescent, setMaxAscent, setMaxDescent, noQuirksMode, |
| 258 textBoxDataMap, baselineType(), verticalPositionCac
he); | 258 textBoxDataMap, baselineType(), verticalPositionCac
he); |
| 259 | 259 |
| 260 if (maxAscent + maxDescent < max(maxPositionTop, maxPositionBottom)) | 260 if (maxAscent + maxDescent < max(maxPositionTop, maxPositionBottom)) |
| 261 adjustMaxAscentAndDescent(maxAscent, maxDescent, maxPositionTop, maxPosi
tionBottom); | 261 adjustMaxAscentAndDescent(maxAscent, maxDescent, maxPositionTop, maxPosi
tionBottom); |
| 262 | 262 |
| 263 LayoutUnit maxHeight = maxAscent + maxDescent; | 263 LayoutUnit maxHeight = maxAscent + maxDescent; |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 if (box->renderer()->isText()) | 835 if (box->renderer()->isText()) |
| 836 return box->parent()->logicalTop(); | 836 return box->parent()->logicalTop(); |
| 837 | 837 |
| 838 RenderBoxModelObject* renderer = box->boxModelObject(); | 838 RenderBoxModelObject* renderer = box->boxModelObject(); |
| 839 ASSERT(renderer->isInline()); | 839 ASSERT(renderer->isInline()); |
| 840 if (!renderer->isInline()) | 840 if (!renderer->isInline()) |
| 841 return 0; | 841 return 0; |
| 842 | 842 |
| 843 // This method determines the vertical position for inline elements. | 843 // This method determines the vertical position for inline elements. |
| 844 bool firstLine = isFirstLineStyle(); | 844 bool firstLine = isFirstLineStyle(); |
| 845 if (firstLine && !renderer->document()->styleSheetCollections()->usesFirstLi
neRules()) | 845 if (firstLine && !renderer->document().styleSheetCollections()->usesFirstLin
eRules()) |
| 846 firstLine = false; | 846 firstLine = false; |
| 847 | 847 |
| 848 // Check the cache. | 848 // Check the cache. |
| 849 bool isRenderInline = renderer->isRenderInline(); | 849 bool isRenderInline = renderer->isRenderInline(); |
| 850 if (isRenderInline && !firstLine) { | 850 if (isRenderInline && !firstLine) { |
| 851 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli
neType()); | 851 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli
neType()); |
| 852 if (verticalPosition != PositionUndefined) | 852 if (verticalPosition != PositionUndefined) |
| 853 return verticalPosition; | 853 return verticalPosition; |
| 854 } | 854 } |
| 855 | 855 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 } | 989 } |
| 990 | 990 |
| 991 #ifndef NDEBUG | 991 #ifndef NDEBUG |
| 992 const char* RootInlineBox::boxName() const | 992 const char* RootInlineBox::boxName() const |
| 993 { | 993 { |
| 994 return "RootInlineBox"; | 994 return "RootInlineBox"; |
| 995 } | 995 } |
| 996 #endif | 996 #endif |
| 997 | 997 |
| 998 } // namespace WebCore | 998 } // namespace WebCore |
| OLD | NEW |