| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 if (renderer) | 287 if (renderer) |
| 288 renderer->setText(dataImpl()); | 288 renderer->setText(dataImpl()); |
| 289 else | 289 else |
| 290 reattach(); | 290 reattach(); |
| 291 } | 291 } |
| 292 clearNeedsStyleRecalc(); | 292 clearNeedsStyleRecalc(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfRe
placedData) | 295 void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfRe
placedData) |
| 296 { | 296 { |
| 297 if (!attached()) | 297 if (!attached() && !needsStyleRecalc()) |
| 298 return; | 298 return; |
| 299 RenderText* textRenderer = toRenderText(renderer()); | 299 RenderText* textRenderer = toRenderText(renderer()); |
| 300 if (!textRenderer || !textRendererIsNeeded(NodeRenderingContext(this, textRe
nderer->style()))) { | 300 if (!textRenderer || !textRendererIsNeeded(NodeRenderingContext(this, textRe
nderer->style()))) { |
| 301 // FIXME: Editing code expects that inserting a text node will produce a
renderer |
| 302 // immediately so it can inspect the style of the text nodes. We should
fix this |
| 303 // so we can lazyReattach here. |
| 301 reattach(); | 304 reattach(); |
| 302 return; | 305 return; |
| 303 } | 306 } |
| 304 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe
placedData); | 307 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe
placedData); |
| 305 } | 308 } |
| 306 | 309 |
| 307 bool Text::childTypeAllowed(NodeType) const | 310 bool Text::childTypeAllowed(NodeType) const |
| 308 { | 311 { |
| 309 return false; | 312 return false; |
| 310 } | 313 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 341 result.appendLiteral("; "); | 344 result.appendLiteral("; "); |
| 342 result.appendLiteral("value="); | 345 result.appendLiteral("value="); |
| 343 result.append(s); | 346 result.append(s); |
| 344 } | 347 } |
| 345 | 348 |
| 346 strncpy(buffer, result.toString().utf8().data(), length - 1); | 349 strncpy(buffer, result.toString().utf8().data(), length - 1); |
| 347 } | 350 } |
| 348 #endif | 351 #endif |
| 349 | 352 |
| 350 } // namespace WebCore | 353 } // namespace WebCore |
| OLD | NEW |