Bug 115640 - Text should be constructable
Summary: Text should be constructable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 115701
  Show dependency treegraph
 
Reported: 2013-05-06 07:22 PDT by Erik Arvidsson
Modified: 2014-01-14 00:20 PST (History)
9 users (show)

See Also:


Attachments
Patch (8.29 KB, patch)
2014-01-09 00:56 PST, László Langó
no flags Details | Formatted Diff | Diff
Patch (8.47 KB, patch)
2014-01-09 04:40 PST, László Langó
no flags Details | Formatted Diff | Diff
Patch (8.47 KB, patch)
2014-01-10 00:34 PST, László Langó
no flags Details | Formatted Diff | Diff
patch for landing (8.54 KB, patch)
2014-01-13 04:21 PST, László Langó
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2013-05-06 07:22:21 PDT
http://dom.spec.whatwg.org/#interface-text

Make Text constructable so that one can do "new Text('abc')" instead of "document.createTexte('abc')"
Comment 1 László Langó 2014-01-09 00:56:08 PST
Created attachment 220701 [details]
Patch
Comment 2 László Langó 2014-01-09 04:40:14 PST
Created attachment 220715 [details]
Patch
Comment 3 EFL EWS Bot 2014-01-09 04:59:28 PST
Comment on attachment 220715 [details]
Patch

Attachment 220715 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/5110474479763456
Comment 4 László Langó 2014-01-10 00:34:56 PST
Created attachment 220817 [details]
Patch
Comment 5 WebKit Commit Bot 2014-01-13 02:02:33 PST
Comment on attachment 220817 [details]
Patch

Rejecting attachment 220817 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 220817, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
    -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 161866 = 41d60a4a901854d1207540d97b72c55011be5f69
r161867 = 8c325df8e8ed83167416651d0b713fca53dfb8fe
r161868 = 89061aa53453fa276ca9953d05b40a3277a033e8
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.appspot.com/results/6009007810543616
Comment 6 László Langó 2014-01-13 04:21:21 PST
Created attachment 221026 [details]
patch for landing
Comment 7 WebKit Commit Bot 2014-01-13 04:48:22 PST
Comment on attachment 221026 [details]
patch for landing

Clearing flags on attachment: 221026

Committed r161876: <http://trac.webkit.org/changeset/161876>
Comment 8 WebKit Commit Bot 2014-01-13 04:48:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Sam Weinig 2014-01-13 10:33:35 PST
Comment on attachment 221026 [details]
patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=221026&action=review

> Source/WebCore/dom/Text.h:39
> +    static PassRefPtr<Text> create(ScriptExecutionContext&, const String&);

Why ScriptExecutionContext? This always need to be a Document.
Comment 10 László Langó 2014-01-14 00:20:32 PST
(In reply to comment #9)
> (From update of attachment 221026 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221026&action=review
> 
> > Source/WebCore/dom/Text.h:39
> > +    static PassRefPtr<Text> create(ScriptExecutionContext&, const String&);
> 
> Why ScriptExecutionContext? This always need to be a Document.

Basically because this is how in the Blink did it. :) https://chromium.googlesource.com/chromium/blink/+/cdd5a914daf3862379a5ce4596149bd690d0fa08

I'm not sure I fully understand, but we have only this in bindings/scripts/IDLAttributes (ConstructorCallWith=ScriptExecutionContext). A don't think that this is a problem, because we can safely convert it into a document with the toDocument function. Do you know another equivalent way how can we do this?