| 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 verticalPosition -= (renderer->lineHeight(firstLine, lineDirecti
on) - renderer->baselinePosition(baselineType(), firstLine, lineDirection)); | 884 verticalPosition -= (renderer->lineHeight(firstLine, lineDirecti
on) - renderer->baselinePosition(baselineType(), firstLine, lineDirection)); |
| 885 } else if (verticalAlign == BASELINE_MIDDLE) | 885 } else if (verticalAlign == BASELINE_MIDDLE) |
| 886 verticalPosition += -renderer->lineHeight(firstLine, lineDirection)
/ 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection); | 886 verticalPosition += -renderer->lineHeight(firstLine, lineDirection)
/ 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection); |
| 887 else if (verticalAlign == LENGTH) { | 887 else if (verticalAlign == LENGTH) { |
| 888 LayoutUnit lineHeight; | 888 LayoutUnit lineHeight; |
| 889 //Per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
: 'Percentages: refer to the 'line-height' of the element itself'. | 889 //Per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
: 'Percentages: refer to the 'line-height' of the element itself'. |
| 890 if (renderer->style()->verticalAlignLength().isPercent()) | 890 if (renderer->style()->verticalAlignLength().isPercent()) |
| 891 lineHeight = renderer->style()->computedLineHeight(); | 891 lineHeight = renderer->style()->computedLineHeight(); |
| 892 else | 892 else |
| 893 lineHeight = renderer->lineHeight(firstLine, lineDirection); | 893 lineHeight = renderer->lineHeight(firstLine, lineDirection); |
| 894 verticalPosition -= valueForLength(renderer->style()->verticalAlignL
ength(), lineHeight, renderer->view()); | 894 verticalPosition -= valueForLength(renderer->style()->verticalAlignL
ength(), lineHeight); |
| 895 } | 895 } |
| 896 } | 896 } |
| 897 | 897 |
| 898 // Store the cached value. | 898 // Store the cached value. |
| 899 if (isRenderInline && !firstLine) | 899 if (isRenderInline && !firstLine) |
| 900 verticalPositionCache.set(renderer, baselineType(), verticalPosition); | 900 verticalPositionCache.set(renderer, baselineType(), verticalPosition); |
| 901 | 901 |
| 902 return verticalPosition; | 902 return verticalPosition; |
| 903 } | 903 } |
| 904 | 904 |
| (...skipping 84 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 |