| 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 } | 99 } |
| 100 | 100 |
| 101 int InlineTextBox::baselinePosition(FontBaseline baselineType) const | 101 int InlineTextBox::baselinePosition(FontBaseline baselineType) const |
| 102 { | 102 { |
| 103 if (!isText() || !parent()) | 103 if (!isText() || !parent()) |
| 104 return 0; | 104 return 0; |
| 105 if (parent()->layoutObject() == layoutObject().parent()) | 105 if (parent()->layoutObject() == layoutObject().parent()) |
| 106 return parent()->baselinePosition(baselineType); | 106 return parent()->baselinePosition(baselineType); |
| 107 return toLayoutBoxModelObject(layoutObject().parent())->baselinePosition(bas
elineType, isFirstLineStyle(), isHorizontal() ? HorizontalLine : VerticalLine, P
ositionOnContainingLine); | 107 return toLayoutBoxModelObject(layoutObject().parent())->baselinePosition(bas
elineType, isFirstLineStyle(), isHorizontal() ? HorizontalLine : VerticalLine, P
ositionOnContainingLine); |
| 108 } | 108 } |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 const LayoutText& obj = layoutObject(); | 550 const LayoutText& obj = layoutObject(); |
| 551 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), &obj); | 551 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), &obj); |
| 552 const int layoutObjectCharacterOffset = 75; | 552 const int layoutObjectCharacterOffset = 75; |
| 553 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 553 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
| 554 fputc(' ', stderr); | 554 fputc(' ', stderr); |
| 555 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 555 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 556 } | 556 } |
| 557 | 557 |
| 558 #endif | 558 #endif |
| 559 | 559 |
| 560 void InlineTextBox::move(const LayoutSize& delta) |
| 561 { |
| 562 InlineBox::move(delta); |
| 563 |
| 564 if (!knownToHaveNoOverflow()) { |
| 565 LayoutRect logicalOverflowRect = this->logicalOverflowRect(); |
| 566 logicalOverflowRect.move(isHorizontal() ? delta : delta.transposedSize()
); |
| 567 setLogicalOverflowRect(logicalOverflowRect); |
| 568 } |
| 569 } |
| 570 |
| 560 } // namespace blink | 571 } // namespace blink |
| OLD | NEW |