| 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 14 matching lines...) Expand all Loading... |
| 25 #include "bindings/core/v8/ExceptionState.h" | 25 #include "bindings/core/v8/ExceptionState.h" |
| 26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 27 #include "core/css/resolver/StyleResolver.h" | 27 #include "core/css/resolver/StyleResolver.h" |
| 28 #include "core/dom/ExceptionCode.h" | 28 #include "core/dom/ExceptionCode.h" |
| 29 #include "core/dom/NodeRenderStyle.h" | 29 #include "core/dom/NodeRenderStyle.h" |
| 30 #include "core/dom/NodeRenderingTraversal.h" | 30 #include "core/dom/NodeRenderingTraversal.h" |
| 31 #include "core/dom/NodeTraversal.h" | 31 #include "core/dom/NodeTraversal.h" |
| 32 #include "core/dom/RenderTreeBuilder.h" | 32 #include "core/dom/RenderTreeBuilder.h" |
| 33 #include "core/dom/shadow/ShadowRoot.h" | 33 #include "core/dom/shadow/ShadowRoot.h" |
| 34 #include "core/events/ScopedEventQueue.h" | 34 #include "core/events/ScopedEventQueue.h" |
| 35 #include "core/rendering/RenderCombineText.h" | |
| 36 #include "core/rendering/RenderText.h" | 35 #include "core/rendering/RenderText.h" |
| 37 #include "wtf/text/CString.h" | 36 #include "wtf/text/CString.h" |
| 38 #include "wtf/text/StringBuilder.h" | 37 #include "wtf/text/StringBuilder.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 PassRefPtr<Text> Text::create(Document& document, const String& data) | 41 PassRefPtr<Text> Text::create(Document& document, const String& data) |
| 43 { | 42 { |
| 44 return adoptRef(new Text(document, data, CreateText)); | 43 return adoptRef(new Text(document, data, CreateText)); |
| 45 } | 44 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 if (!first || NodeRenderingTraversal::nextSiblingRenderer(this) == first
) | 272 if (!first || NodeRenderingTraversal::nextSiblingRenderer(this) == first
) |
| 274 // Whitespace at the start of a block just goes away. Don't even | 273 // Whitespace at the start of a block just goes away. Don't even |
| 275 // make a render object for this text. | 274 // make a render object for this text. |
| 276 return false; | 275 return false; |
| 277 } | 276 } |
| 278 return true; | 277 return true; |
| 279 } | 278 } |
| 280 | 279 |
| 281 RenderText* Text::createTextRenderer(RenderStyle* style) | 280 RenderText* Text::createTextRenderer(RenderStyle* style) |
| 282 { | 281 { |
| 283 if (style->hasTextCombine()) | |
| 284 return new RenderCombineText(this, dataImpl()); | |
| 285 | |
| 286 return new RenderText(this, dataImpl()); | 282 return new RenderText(this, dataImpl()); |
| 287 } | 283 } |
| 288 | 284 |
| 289 void Text::attach(const AttachContext& context) | 285 void Text::attach(const AttachContext& context) |
| 290 { | 286 { |
| 291 RenderTreeBuilder(this, context.resolvedStyle).createRendererForTextIfNeeded
(); | 287 RenderTreeBuilder(this, context.resolvedStyle).createRendererForTextIfNeeded
(); |
| 292 CharacterData::attach(context); | 288 CharacterData::attach(context); |
| 293 } | 289 } |
| 294 | 290 |
| 295 void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) | 291 void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 result.appendLiteral("; "); | 347 result.appendLiteral("; "); |
| 352 result.appendLiteral("value="); | 348 result.appendLiteral("value="); |
| 353 result.append(s); | 349 result.append(s); |
| 354 } | 350 } |
| 355 | 351 |
| 356 strncpy(buffer, result.toString().utf8().data(), length - 1); | 352 strncpy(buffer, result.toString().utf8().data(), length - 1); |
| 357 } | 353 } |
| 358 #endif | 354 #endif |
| 359 | 355 |
| 360 } // namespace blink | 356 } // namespace blink |
| OLD | NEW |