Chromium Code Reviews| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 } | 290 } |
| 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()) |
| 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) { |
| 301 reattach(); | 301 reattach(); |
| 302 return; | 302 return; |
| 303 } | 303 } |
| 304 NodeRenderingContext renderingContext(this, textRenderer->style()); | |
| 305 if (!textRendererIsNeeded(renderingContext)) { | |
| 306 reattach(); | |
| 307 return; | |
|
esprehn
2013/06/28 20:29:36
Why did you change this code? What you have looks
| |
| 308 } | |
| 304 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe placedData); | 309 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe placedData); |
| 305 } | 310 } |
| 306 | 311 |
| 307 bool Text::childTypeAllowed(NodeType) const | 312 bool Text::childTypeAllowed(NodeType) const |
| 308 { | 313 { |
| 309 return false; | 314 return false; |
| 310 } | 315 } |
| 311 | 316 |
| 312 PassRefPtr<Text> Text::cloneWithData(const String& data) | 317 PassRefPtr<Text> Text::cloneWithData(const String& data) |
| 313 { | 318 { |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 341 result.appendLiteral("; "); | 346 result.appendLiteral("; "); |
| 342 result.appendLiteral("value="); | 347 result.appendLiteral("value="); |
| 343 result.append(s); | 348 result.append(s); |
| 344 } | 349 } |
| 345 | 350 |
| 346 strncpy(buffer, result.toString().utf8().data(), length - 1); | 351 strncpy(buffer, result.toString().utf8().data(), length - 1); |
| 347 } | 352 } |
| 348 #endif | 353 #endif |
| 349 | 354 |
| 350 } // namespace WebCore | 355 } // namespace WebCore |
| OLD | NEW |