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, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
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 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1714 unsigned len, | 1714 unsigned len, |
1715 const Font& f, | 1715 const Font& f, |
1716 LayoutUnit xPos, | 1716 LayoutUnit xPos, |
1717 TextDirection textDirection, | 1717 TextDirection textDirection, |
1718 HashSet<const SimpleFontData*>* fallbackFonts, | 1718 HashSet<const SimpleFontData*>* fallbackFonts, |
1719 FloatRect* glyphBounds) const { | 1719 FloatRect* glyphBounds) const { |
1720 ASSERT(from + len <= textLength()); | 1720 ASSERT(from + len <= textLength()); |
1721 if (!textLength()) | 1721 if (!textLength()) |
1722 return 0; | 1722 return 0; |
1723 | 1723 |
| 1724 // This should not be needed here. Still if we remove it, the |
| 1725 // subpixel ascent / descent wont work. |
| 1726 f.getFontDescription().setSubpixelAscentDescent(true); |
1724 const SimpleFontData* fontData = f.primaryFont(); | 1727 const SimpleFontData* fontData = f.primaryFont(); |
1725 DCHECK(fontData); | 1728 DCHECK(fontData); |
1726 if (!fontData) | 1729 if (!fontData) |
1727 return 0; | 1730 return 0; |
1728 | 1731 |
1729 float w; | 1732 float w; |
1730 if (&f == &style()->font()) { | 1733 if (&f == &style()->font()) { |
1731 if (!style()->preserveNewline() && !from && len == textLength()) { | 1734 if (!style()->preserveNewline() && !from && len == textLength()) { |
1732 if (fallbackFonts) { | 1735 if (fallbackFonts) { |
1733 ASSERT(glyphBounds); | 1736 ASSERT(glyphBounds); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 LayoutRect rect = LayoutRect( | 1955 LayoutRect rect = LayoutRect( |
1953 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 1956 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
1954 LayoutBlock* block = containingBlock(); | 1957 LayoutBlock* block = containingBlock(); |
1955 if (block && hasTextBoxes()) | 1958 if (block && hasTextBoxes()) |
1956 block->adjustChildDebugRect(rect); | 1959 block->adjustChildDebugRect(rect); |
1957 | 1960 |
1958 return rect; | 1961 return rect; |
1959 } | 1962 } |
1960 | 1963 |
1961 } // namespace blink | 1964 } // namespace blink |
OLD | NEW |