zhouivy / torora

Automatically exported from code.google.com/p/torora
0 stars 0 forks source link

document.referrer #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
JSDOMWindowBase::JSDOMWindowBase(NonNullPassRefPtr<Structure> structure, 
PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
    : JSDOMGlobalObject(structure, new JSDOMWindowBaseData(window, shell), shell)
{
    ASSERT(inherits(&s_info));

    GlobalPropertyInfo staticGlobals[] = {
        GlobalPropertyInfo(Identifier(globalExec(), "document"), jsNull(), DontDelete | ReadOnly),
        GlobalPropertyInfo(Identifier(globalExec(), "window"), d()->shell, DontDelete | ReadOnly)
    };

    addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
}

in WebCore/bindings/js/JSDOMWindowbase.cpp means that we can never overload the 
document object. Making the object overloadable is unlikely to be acceptable.

So need to expose an API through FrameLoaderClient for overloading 
document.referrer.

Original issue reported on code.google.com by rob...@roberthogan.net on 8 Mar 2011 at 8:47