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() && !needsStyleRecalc()) | 297 if (!attached()) |
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. | |
304 reattach(); | 301 reattach(); |
305 return; | 302 return; |
306 } | 303 } |
307 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe
placedData); | 304 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe
placedData); |
308 } | 305 } |
309 | 306 |
310 bool Text::childTypeAllowed(NodeType) const | 307 bool Text::childTypeAllowed(NodeType) const |
311 { | 308 { |
312 return false; | 309 return false; |
313 } | 310 } |
(...skipping 30 matching lines...) Expand all Loading... |
344 result.appendLiteral("; "); | 341 result.appendLiteral("; "); |
345 result.appendLiteral("value="); | 342 result.appendLiteral("value="); |
346 result.append(s); | 343 result.append(s); |
347 } | 344 } |
348 | 345 |
349 strncpy(buffer, result.toString().utf8().data(), length - 1); | 346 strncpy(buffer, result.toString().utf8().data(), length - 1); |
350 } | 347 } |
351 #endif | 348 #endif |
352 | 349 |
353 } // namespace WebCore | 350 } // namespace WebCore |
OLD | NEW |