Changeset 161876 in webkit
- Timestamp:
- Jan 13, 2014 4:52:28 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161872 r161876 1 2014-01-13 László Langó <llango.u-szeged@partner.samsung.com> 2 3 Text should be constructable. 4 https://bugs.webkit.org/show_bug.cgi?id=115640 5 6 Reviewed by Csaba Osztrogonác. 7 8 * fast/dom/Text/text-constructor-expected.txt: Added. 9 * fast/dom/Text/text-constructor.html: Added. 10 * fast/dom/dom-constructors-expected.txt: 11 * fast/dom/dom-constructors.html: 12 1 13 2014-01-13 Zan Dobersek <zdobersek@igalia.com> 2 14 -
trunk/LayoutTests/fast/dom/dom-constructors-expected.txt
r161867 r161876 17 17 PASS TryAllocate('Notation') is 'exception' 18 18 PASS TryAllocate('ProcessingInstruction') is 'exception' 19 PASS TryAllocate('Text') is 'exception'20 19 PASS TryAllocate('HTMLAllCollection') is 'exception' 21 20 PASS TryAllocate('HTMLAnchorElement') is 'exception' … … 135 134 PASS TryAllocate('DOMParser') is '[object DOMParser]' 136 135 PASS TryAllocate('DOMParser') is '[object DOMParser]' 136 PASS TryAllocate('Text') is '[object Text]' 137 PASS TryAllocate('Text') is '[object Text]' 138 PASS TryAllocate('Text') is '[object Text]' 137 139 PASS TryAllocate('XMLHttpRequest') is '[object XMLHttpRequest]' 138 140 PASS TryAllocate('XMLHttpRequest') is '[object XMLHttpRequest]' -
trunk/LayoutTests/fast/dom/dom-constructors.html
r161867 r161876 17 17 'DocumentFragment', 'DocumentType', 'Element', 'Entity', 18 18 'EntityReference', 'HTMLDocument', 'Node', 'Notation', 19 'ProcessingInstruction', ' Text', 'HTMLAllCollection', 'HTMLAnchorElement',19 'ProcessingInstruction', 'HTMLAllCollection', 'HTMLAnchorElement', 20 20 'HTMLAppletElement', 'HTMLAreaElement', 'HTMLBaseElement', 21 21 'HTMLBaseFontElement', 'HTMLBodyElement', … … 56 56 // These objects should have a working constructor. 57 57 var objects_constructor = [ 58 'Comment', 'DOMParser', ' XMLHttpRequest', 'XMLSerializer', 'XPathEvaluator',58 'Comment', 'DOMParser', 'Text', 'XMLHttpRequest', 'XMLSerializer', 'XPathEvaluator', 59 59 'XSLTProcessor' 60 60 ]; -
trunk/Source/WebCore/ChangeLog
r161873 r161876 1 2014-01-13 László Langó <llango.u-szeged@partner.samsung.com> 2 3 Text should be constructable. 4 https://bugs.webkit.org/show_bug.cgi?id=115640 5 6 Reviewed by Csaba Osztrogonác. 7 8 http://dom.spec.whatwg.org/#interface-text 9 Make Text constructable so that one can do "new Text('abc')" 10 instead of "document.createTexte('abc')". 11 12 Backported from Blink: https://chromium.googlesource.com/chromium/blink/+/cdd5a914daf3862379a5ce4596149bd690d0fa08 13 14 Test: fast/dom/Text/text-constructor.html 15 16 * dom/Text.cpp: 17 (WebCore::Text::create): 18 * dom/Text.h: 19 * dom/Text.idl: 20 1 21 2014-01-13 Zan Dobersek <zdobersek@igalia.com> 2 22 -
trunk/Source/WebCore/dom/Text.cpp
r161153 r161876 47 47 } 48 48 49 PassRefPtr<Text> Text::create(ScriptExecutionContext& context, const String& data) 50 { 51 return adoptRef(new Text(toDocument(context), data, CreateText)); 52 } 53 49 54 PassRefPtr<Text> Text::createEditingText(Document& document, const String& data) 50 55 { -
trunk/Source/WebCore/dom/Text.h
r161208 r161876 30 30 31 31 class RenderText; 32 class ScriptExecutionContext; 32 33 33 34 class Text : public CharacterData { … … 36 37 37 38 static PassRefPtr<Text> create(Document&, const String&); 39 static PassRefPtr<Text> create(ScriptExecutionContext&, const String&); 38 40 static PassRefPtr<Text> createWithLengthLimit(Document&, const String&, unsigned positionInString, unsigned lengthLimit = defaultLengthLimit); 39 41 static PassRefPtr<Text> createEditingText(Document&, const String&); -
trunk/Source/WebCore/dom/Text.idl
r159061 r161876 17 17 * Boston, MA 02110-1301, USA. 18 18 */ 19 20 interface Text : CharacterData { 19 [ 20 Constructor([Default=NullString] optional DOMString data), 21 ConstructorCallWith=ScriptExecutionContext 22 ] interface Text : CharacterData { 21 23 22 24 // DOM Level 1
Note: See TracChangeset
for help on using the changeset viewer.