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
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return false; | 395 return false; |
396 } | 396 } |
397 | 397 |
398 void Text::updateTextLayoutObject(unsigned offsetOfReplacedData, unsigned length
OfReplacedData, RecalcStyleBehavior recalcStyleBehavior) | 398 void Text::updateTextLayoutObject(unsigned offsetOfReplacedData, unsigned length
OfReplacedData, RecalcStyleBehavior recalcStyleBehavior) |
399 { | 399 { |
400 if (!inActiveDocument()) | 400 if (!inActiveDocument()) |
401 return; | 401 return; |
402 LayoutText* textLayoutObject = layoutObject(); | 402 LayoutText* textLayoutObject = layoutObject(); |
403 if (!textLayoutObject || !textLayoutObjectIsNeeded(*textLayoutObject->style(
), *textLayoutObject->parent())) { | 403 if (!textLayoutObject || !textLayoutObjectIsNeeded(*textLayoutObject->style(
), *textLayoutObject->parent())) { |
404 lazyReattachIfAttached(); | 404 lazyReattachIfAttached(); |
405 // FIXME: Editing should be updated so this is not neccesary. | 405 // FIXME: Editing should be updated so this is not necessary. |
406 if (recalcStyleBehavior == DeprecatedRecalcStyleImmediatlelyForEditing) | 406 if (recalcStyleBehavior == DeprecatedRecalcStyleImmediatlelyForEditing) |
407 document().updateLayoutTreeIfNeeded(); | 407 document().updateLayoutTreeIfNeeded(); |
408 return; | 408 return; |
409 } | 409 } |
410 textLayoutObject->setTextWithOffset(dataImpl(), offsetOfReplacedData, length
OfReplacedData); | 410 textLayoutObject->setTextWithOffset(dataImpl(), offsetOfReplacedData, length
OfReplacedData); |
411 } | 411 } |
412 | 412 |
413 PassRefPtrWillBeRawPtr<Text> Text::cloneWithData(const String& data) | 413 PassRefPtrWillBeRawPtr<Text> Text::cloneWithData(const String& data) |
414 { | 414 { |
415 return create(document(), data); | 415 return create(document(), data); |
(...skipping 18 matching lines...) Expand all Loading... |
434 result.appendLiteral("; "); | 434 result.appendLiteral("; "); |
435 result.appendLiteral("value="); | 435 result.appendLiteral("value="); |
436 result.append(s); | 436 result.append(s); |
437 } | 437 } |
438 | 438 |
439 strncpy(buffer, result.toString().utf8().data(), length - 1); | 439 strncpy(buffer, result.toString().utf8().data(), length - 1); |
440 } | 440 } |
441 #endif | 441 #endif |
442 | 442 |
443 } // namespace blink | 443 } // namespace blink |
OLD | NEW |