RESOLVED WORKSFORME 12617
Using NPN_SetProperty to set document.title doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=12617
Summary Using NPN_SetProperty to set document.title doesn't work.
William Bardwell
Reported 2007-02-05 11:31:23 PST
In Safari 2.0.2(416.13), when I try to set the title in the browser using: NPN_GetValue(inst->npp, NPNVWindowNPObject, &window_object) NPN_GetProperty(inst->npp, window_object, NPN_GetStringIdentifier("document"), &vdoc) NPVariant title_variant; STRINGZ_TO_NPVARIANT(title_copy, title_variant); NPN_SetProperty(npp, document, NPN_GetStringIdentifier("title"), &title_variant); Seems to not work, even though that works in other browsers.
Attachments
David Kilzer (:ddkilzer)
Comment 1 2007-02-05 12:17:50 PST
Hi William, please test this against WebKit ToT (tip-of-tree) to find out if the bug still exists. A stand-alone test case (code and/or HTML) would also help to get this bug fixed quicker. Thanks! http://webkit.org/building/checkout.html
Alexey Proskuryakov
Comment 2 2007-02-06 03:14:40 PST
I think this is easiest to test with our own TestNetscapePlugin (in WebKitTools/DumpRenderTree).
Alexey Proskuryakov
Comment 3 2007-02-06 09:19:47 PST
I have tried adding this code to TestNetscapePlugin, and the window title got successfully changed after calling it. void* window_object; NPVariant vdoc; browser->getvalue(obj->npp, NPNVWindowNPObject, &window_object); browser->getproperty(obj->npp, window_object, browser->getstringidentifier("document"), &vdoc); browser->setproperty(obj->npp, vdoc.value.objectValue, browser->getstringidentifier("title"), &newName); I don't know if it was a bug in shipping WebKit, or something else. Please re-open if you can still reproduce with TOT WebKit.
Note You need to log in before you can comment on or make changes to this bug.