Chromium Code Reviews

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

Issue 340763003: Change [ConstructorCallWith={Document => ExecutionContext}] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 29 matching lines...)
40 #include "wtf/text/CString.h" 40 #include "wtf/text/CString.h"
41 #include "wtf/text/StringBuilder.h" 41 #include "wtf/text/StringBuilder.h"
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data ) 45 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data )
46 { 46 {
47 return adoptRefWillBeNoop(new Text(document, data, CreateText)); 47 return adoptRefWillBeNoop(new Text(document, data, CreateText));
48 } 48 }
49 49
50 PassRefPtrWillBeRawPtr<Text> Text::create(ExecutionContext* executionContext, co nst String& data)
51 {
52 return create(*toDocument(executionContext), data);
53 }
54
50 PassRefPtrWillBeRawPtr<Text> Text::createEditingText(Document& document, const S tring& data) 55 PassRefPtrWillBeRawPtr<Text> Text::createEditingText(Document& document, const S tring& data)
51 { 56 {
52 return adoptRefWillBeNoop(new Text(document, data, CreateEditingText)); 57 return adoptRefWillBeNoop(new Text(document, data, CreateEditingText));
53 } 58 }
54 59
55 PassRefPtrWillBeRawPtr<Node> Text::mergeNextSiblingNodesIfPossible() 60 PassRefPtrWillBeRawPtr<Node> Text::mergeNextSiblingNodesIfPossible()
56 { 61 {
57 RefPtrWillBeRawPtr<Node> protect(this); 62 RefPtrWillBeRawPtr<Node> protect(this);
58 63
59 // Remove empty text nodes. 64 // Remove empty text nodes.
(...skipping 308 matching lines...)
368 result.appendLiteral("; "); 373 result.appendLiteral("; ");
369 result.appendLiteral("value="); 374 result.appendLiteral("value=");
370 result.append(s); 375 result.append(s);
371 } 376 }
372 377
373 strncpy(buffer, result.toString().utf8().data(), length - 1); 378 strncpy(buffer, result.toString().utf8().data(), length - 1);
374 } 379 }
375 #endif 380 #endif
376 381
377 } // namespace WebCore 382 } // namespace WebCore
OLDNEW

Powered by Google App Engine