OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2224 | 2224 |
2225 const FontMetrics& fontMetrics = style(firstLine)->fontMetrics(); | 2225 const FontMetrics& fontMetrics = style(firstLine)->fontMetrics(); |
2226 return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction,
linePositionMode) - fontMetrics.height()) / 2; | 2226 return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction,
linePositionMode) - fontMetrics.height()) / 2; |
2227 } | 2227 } |
2228 | 2228 |
2229 LayoutUnit LayoutBlock::minLineHeightForReplacedObject(bool isFirstLine, LayoutU
nit replacedHeight) const | 2229 LayoutUnit LayoutBlock::minLineHeightForReplacedObject(bool isFirstLine, LayoutU
nit replacedHeight) const |
2230 { | 2230 { |
2231 if (!document().inNoQuirksMode() && replacedHeight) | 2231 if (!document().inNoQuirksMode() && replacedHeight) |
2232 return replacedHeight; | 2232 return replacedHeight; |
2233 | 2233 |
2234 if (!(style(isFirstLine)->lineBoxContain() & LineBoxContainBlock)) | |
2235 return LayoutUnit(); | |
2236 | |
2237 return std::max<LayoutUnit>(replacedHeight, lineHeight(isFirstLine, isHorizo
ntalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes))
; | 2234 return std::max<LayoutUnit>(replacedHeight, lineHeight(isFirstLine, isHorizo
ntalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes))
; |
2238 } | 2235 } |
2239 | 2236 |
2240 int LayoutBlock::firstLineBoxBaseline() const | 2237 int LayoutBlock::firstLineBoxBaseline() const |
2241 { | 2238 { |
2242 if (isWritingModeRoot() && !isRubyRun()) | 2239 if (isWritingModeRoot() && !isRubyRun()) |
2243 return -1; | 2240 return -1; |
2244 | 2241 |
2245 if (childrenInline()) { | 2242 if (childrenInline()) { |
2246 if (firstLineBox()) | 2243 if (firstLineBox()) |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2882 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2886 { | 2883 { |
2887 showLayoutObject(); | 2884 showLayoutObject(); |
2888 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2885 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2889 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2886 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2890 } | 2887 } |
2891 | 2888 |
2892 #endif | 2889 #endif |
2893 | 2890 |
2894 } // namespace blink | 2891 } // namespace blink |
OLD | NEW |