Bug 12617
Summary: | Using NPN_SetProperty to set document.title doesn't work. | ||
---|---|---|---|
Product: | WebKit | Reporter: | William Bardwell <wbardwel> |
Component: | Plug-ins | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | ap |
Priority: | P2 | ||
Version: | 416.x | ||
Hardware: | PC | ||
OS: | OS X 10.4 |
William Bardwell
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
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
I think this is easiest to test with our own TestNetscapePlugin (in WebKitTools/DumpRenderTree).
Alexey Proskuryakov
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.