| 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, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 return gTextBoxesWithOverflow->get(this); | 90 return gTextBoxesWithOverflow->get(this); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void InlineTextBox::setLogicalOverflowRect(const LayoutRect& rect) | 93 void InlineTextBox::setLogicalOverflowRect(const LayoutRect& rect) |
| 94 { | 94 { |
| 95 ASSERT(!knownToHaveNoOverflow()); | 95 ASSERT(!knownToHaveNoOverflow()); |
| 96 if (!gTextBoxesWithOverflow) | 96 if (!gTextBoxesWithOverflow) |
| 97 gTextBoxesWithOverflow = new InlineTextBoxOverflowMap; | 97 gTextBoxesWithOverflow = new InlineTextBoxOverflowMap; |
| 98 gTextBoxesWithOverflow->add(this, rect); | 98 gTextBoxesWithOverflow->set(this, rect); |
| 99 } |
| 100 |
| 101 void InlineTextBox::move(const LayoutSize& delta) |
| 102 { |
| 103 InlineBox::move(delta); |
| 104 |
| 105 if (!knownToHaveNoOverflow()) { |
| 106 LayoutRect logicalOverflowRect = this->logicalOverflowRect(); |
| 107 logicalOverflowRect.move(isHorizontal() ? delta : delta.transposedSize()
); |
| 108 setLogicalOverflowRect(logicalOverflowRect); |
| 109 } |
| 99 } | 110 } |
| 100 | 111 |
| 101 int InlineTextBox::baselinePosition(FontBaseline baselineType) const | 112 int InlineTextBox::baselinePosition(FontBaseline baselineType) const |
| 102 { | 113 { |
| 103 if (!isText() || !parent()) | 114 if (!isText() || !parent()) |
| 104 return 0; | 115 return 0; |
| 105 if (parent()->layoutObject() == layoutObject().parent()) | 116 if (parent()->layoutObject() == layoutObject().parent()) |
| 106 return parent()->baselinePosition(baselineType); | 117 return parent()->baselinePosition(baselineType); |
| 107 return toLayoutBoxModelObject(layoutObject().parent())->baselinePosition(bas
elineType, isFirstLineStyle(), isHorizontal() ? HorizontalLine : VerticalLine, P
ositionOnContainingLine); | 118 return toLayoutBoxModelObject(layoutObject().parent())->baselinePosition(bas
elineType, isFirstLineStyle(), isHorizontal() ? HorizontalLine : VerticalLine, P
ositionOnContainingLine); |
| 108 } | 119 } |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), &obj); | 562 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), &obj); |
| 552 const int layoutObjectCharacterOffset = 75; | 563 const int layoutObjectCharacterOffset = 75; |
| 553 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 564 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
| 554 fputc(' ', stderr); | 565 fputc(' ', stderr); |
| 555 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 566 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 556 } | 567 } |
| 557 | 568 |
| 558 #endif | 569 #endif |
| 559 | 570 |
| 560 } // namespace blink | 571 } // namespace blink |
| OLD | NEW |