[Webkit-unassigned] [Bug 71190] Document.importNode's 'deep' argument should default to true

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 2 01:11:29 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=71190


Vineet Chaudhary (vineetc) <rgf748 at motorola.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abarth at webkit.org,
                   |                            |haraken at chromium.org




--- Comment #2 from Vineet Chaudhary (vineetc) <rgf748 at motorola.com>  2011-11-02 01:11:28 PST ---
Currently importNode() is defined in Document.idl as,

[OldStyleObjC, ReturnsNew] Node importNode(in [Optional=CallWithDefaultValue] Node importedNode,
                                                   in [Optional=CallWithDefaultValue] boolean deep)
            raises (DOMException);

Which generates code in JSDocument.cpp as,

bool deep(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toBoolean(exec));

So I thought Document.idl is the correct place to fix this issue but,

on debugging it is found that if there is method in idl with boolean argument as "Optional=CallWithDefaultValue",
CodeGeneratorJS.pm creates code with policy "MissingIsUndefined" and for boolean jsUndefined() means "false". 
So for all booleans args with "Optional=CallWithDefaultValue" default value is set to false.

This contradicts with this bug's requirement "Document.importNode's 'deep' argument should default to true".

Should we have policy like "MissingIsTrue" or extended attribute like "CallWithTrueValue"..?

Please guide me If I am looking in wrong direction.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list