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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
5 * reserved. | 5 * reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 457 |
458 void Text::UpdateTextLayoutObject(unsigned offset_of_replaced_data, | 458 void Text::UpdateTextLayoutObject(unsigned offset_of_replaced_data, |
459 unsigned length_of_replaced_data) { | 459 unsigned length_of_replaced_data) { |
460 if (!InActiveDocument()) | 460 if (!InActiveDocument()) |
461 return; | 461 return; |
462 LayoutText* text_layout_object = GetLayoutObject(); | 462 LayoutText* text_layout_object = GetLayoutObject(); |
463 if (ShouldUpdateLayoutByReattaching(*this, text_layout_object)) { | 463 if (ShouldUpdateLayoutByReattaching(*this, text_layout_object)) { |
464 LazyReattachIfAttached(); | 464 LazyReattachIfAttached(); |
465 return; | 465 return; |
466 } | 466 } |
| 467 |
467 text_layout_object->SetTextWithOffset(DataImpl(), offset_of_replaced_data, | 468 text_layout_object->SetTextWithOffset(DataImpl(), offset_of_replaced_data, |
468 length_of_replaced_data); | 469 length_of_replaced_data); |
469 } | 470 } |
470 | 471 |
471 Text* Text::CloneWithData(const String& data) { | 472 Text* Text::CloneWithData(const String& data) { |
472 return Create(GetDocument(), data); | 473 return Create(GetDocument(), data); |
473 } | 474 } |
474 | 475 |
475 DEFINE_TRACE(Text) { | 476 DEFINE_TRACE(Text) { |
476 CharacterData::Trace(visitor); | 477 CharacterData::Trace(visitor); |
477 } | 478 } |
478 | 479 |
479 } // namespace blink | 480 } // namespace blink |
OLD | NEW |