Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: Source/core/dom/Text.cpp

Issue 130263005: Remove some childTypeAllowed implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (!textRenderer || !textRendererIsNeeded(*textRenderer->style(), *textRend erer->parent())) { 342 if (!textRenderer || !textRendererIsNeeded(*textRenderer->style(), *textRend erer->parent())) {
343 lazyReattachIfAttached(); 343 lazyReattachIfAttached();
344 // FIXME: Editing should be updated so this is not neccesary. 344 // FIXME: Editing should be updated so this is not neccesary.
345 if (recalcStyleBehavior == DeprecatedRecalcStyleImmediatlelyForEditing) 345 if (recalcStyleBehavior == DeprecatedRecalcStyleImmediatlelyForEditing)
346 document().updateStyleIfNeeded(); 346 document().updateStyleIfNeeded();
347 return; 347 return;
348 } 348 }
349 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe placedData); 349 textRenderer->setTextWithOffset(dataImpl(), offsetOfReplacedData, lengthOfRe placedData);
350 } 350 }
351 351
352 bool Text::childTypeAllowed(NodeType) const
353 {
354 return false;
355 }
356
357 PassRefPtr<Text> Text::cloneWithData(const String& data) 352 PassRefPtr<Text> Text::cloneWithData(const String& data)
358 { 353 {
359 return create(document(), data); 354 return create(document(), data);
360 } 355 }
361 356
362 #ifndef NDEBUG 357 #ifndef NDEBUG
363 void Text::formatForDebugger(char *buffer, unsigned length) const 358 void Text::formatForDebugger(char *buffer, unsigned length) const
364 { 359 {
365 StringBuilder result; 360 StringBuilder result;
366 String s; 361 String s;
367 362
368 result.append(nodeName()); 363 result.append(nodeName());
369 364
370 s = data(); 365 s = data();
371 if (s.length() > 0) { 366 if (s.length() > 0) {
372 if (result.length()) 367 if (result.length())
373 result.appendLiteral("; "); 368 result.appendLiteral("; ");
374 result.appendLiteral("value="); 369 result.appendLiteral("value=");
375 result.append(s); 370 result.append(s);
376 } 371 }
377 372
378 strncpy(buffer, result.toString().utf8().data(), length - 1); 373 strncpy(buffer, result.toString().utf8().data(), length - 1);
379 } 374 }
380 #endif 375 #endif
381 376
382 } // namespace WebCore 377 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698