<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[42268] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/42268">42268</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2009-04-07 10:22:47 -0700 (Tue, 07 Apr 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebCore:

2009-04-07  Anders Carlsson  &lt;andersca@apple.com&gt;

        Reviewed by Sam Weinig.

        &lt;rdar://problem/6667001&gt; NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
        
        * WebCore.base.exp:
        Add symbols needed by WebKit.
        
        * WebCore.xcodeproj/project.pbxproj:
        Make CookieJar a private header.
        
        * bridge/npapi.h:
        Add function definitions.
        
        * plugins/npfunctions.h:
        Fix the NPN_SetValueForURLProcPtr signature.

WebKit/mac:

2009-04-07  Anders Carlsson  &lt;andersca@apple.com&gt;

        Reviewed by Sam Weinig.

        &lt;rdar://problem/6667001&gt;
        NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
        
        * Plugins/Hosted/NetscapePluginHostProxy.mm:
        (WKPCGetCookies):
        (WKPCGetProxy):
        (WKPCSetCookies):
        (WKPCGetAuthenticationInfo):
        New MIG functions to be used by the plug-in host.
        
        * Plugins/Hosted/NetscapePluginInstanceProxy.h:
        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
        (WebKit::NetscapePluginInstanceProxy::getCookies):
        (WebKit::NetscapePluginInstanceProxy::setCookies):
        (WebKit::NetscapePluginInstanceProxy::getProxy):
        (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
        Implement these.
        
        * Plugins/Hosted/WebKitPluginClient.defs:
        Add callbacks.
        
        * Plugins/WebBaseNetscapePluginView.h:
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView URLWithCString:]):
        Factor this out of URLWithCString.
        
        (-[WebBaseNetscapePluginView requestWithURLCString:]):
        Call URLWithCString.
        
        (WebKit::proxiesForURL):
        Return a string representation of proxies for a given URL.
        
        (WebKit::getAuthenticationInfo):
        Get the authentication info for a given host/protocol/scheme/realm/port combination.
        
        * Plugins/WebNetscapePluginPackage.mm:
        (-[WebNetscapePluginPackage _tryLoad]):
        Initialize the new vtable functions.
        
        * Plugins/WebNetscapePluginView.h:
        * Plugins/WebNetscapePluginView.mm:
        (-[WebNetscapePluginView getVariable:forURL:value:length:]):
        (-[WebNetscapePluginView setVariable:forURL:value:length:]):
        (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
        Implement these.
        
        * Plugins/npapi.mm:
        (NPN_GetValueForURL):
        (NPN_SetValueForURL):
        (NPN_GetAuthenticationInfo):
        Call the plug-in view functions.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorebaseexp">trunk/WebCore/WebCore.base.exp</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCorebridgenpapih">trunk/WebCore/bridge/npapi.h</a></li>
<li><a href="#trunkWebCorepluginsnpfunctionsh">trunk/WebCore/plugins/npfunctions.h</a></li>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacPluginsHostedNetscapePluginHostProxymm">trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm</a></li>
<li><a href="#trunkWebKitmacPluginsHostedNetscapePluginInstanceProxyh">trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h</a></li>
<li><a href="#trunkWebKitmacPluginsHostedNetscapePluginInstanceProxymm">trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm</a></li>
<li><a href="#trunkWebKitmacPluginsHostedWebKitPluginClientdefs">trunk/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs</a></li>
<li><a href="#trunkWebKitmacPluginsWebBaseNetscapePluginViewh">trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h</a></li>
<li><a href="#trunkWebKitmacPluginsWebBaseNetscapePluginViewmm">trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm</a></li>
<li><a href="#trunkWebKitmacPluginsWebNetscapePluginPackagemm">trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm</a></li>
<li><a href="#trunkWebKitmacPluginsWebNetscapePluginViewh">trunk/WebKit/mac/Plugins/WebNetscapePluginView.h</a></li>
<li><a href="#trunkWebKitmacPluginsWebNetscapePluginViewmm">trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm</a></li>
<li><a href="#trunkWebKitmacPluginsnpapimm">trunk/WebKit/mac/Plugins/npapi.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebCore/ChangeLog        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2009-04-07  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Reviewed by Sam Weinig.
+
+        &lt;rdar://problem/6667001&gt; NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
+        
+        * WebCore.base.exp:
+        Add symbols needed by WebKit.
+        
+        * WebCore.xcodeproj/project.pbxproj:
+        Make CookieJar a private header.
+        
+        * bridge/npapi.h:
+        Add function definitions.
+        
+        * plugins/npfunctions.h:
+        Fix the NPN_SetValueForURLProcPtr signature.
+
</ins><span class="cx"> 2009-04-07  Adam Roben  &lt;aroben@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix &lt;rdar://6520933&gt; REGRESSION (3.2.1-ToT): Scroll bar disappears in
</span></span></pre></div>
<a id="trunkWebCoreWebCorebaseexp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.base.exp (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.base.exp        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebCore/WebCore.base.exp        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx"> __ZN7WebCore10StringImplcvP8NSStringEv
</span><span class="cx"> __ZN7WebCore10StringImpldlEPv
</span><span class="cx"> __ZN7WebCore10handCursorEv
</span><ins>+__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_4KURLES4_RKNS_6StringE
</ins><span class="cx"> __ZN7WebCore11CachedFrame23cachedFramePlatformDataEv
</span><span class="cx"> __ZN7WebCore11CachedFrame26setCachedFramePlatformDataEPNS_23CachedFramePlatformDataE
</span><span class="cx"> __ZN7WebCore11ContextMenu22setPlatformDescriptionEP14NSMutableArray
</span><span class="lines">@@ -547,6 +548,7 @@
</span><span class="cx"> __ZN7WebCore6Editor7outdentEv
</span><span class="cx"> __ZN7WebCore6String6appendERKS0_
</span><span class="cx"> __ZN7WebCore6String6appendEc
</span><ins>+__ZN7WebCore6String6numberEi
</ins><span class="cx"> __ZN7WebCore6StringC1EP8NSString
</span><span class="cx"> __ZN7WebCore6StringC1EPK10__CFString
</span><span class="cx"> __ZN7WebCore6StringC1EPKc
</span><span class="lines">@@ -564,9 +566,11 @@
</span><span class="cx"> __ZN7WebCore6WidgetC1EP6NSView
</span><span class="cx"> __ZN7WebCore6WidgetC2EP6NSView
</span><span class="cx"> __ZN7WebCore6WidgetD2Ev
</span><ins>+__ZN7WebCore7CStringC1EPKc
</ins><span class="cx"> __ZN7WebCore7Console21shouldPrintExceptionsEv
</span><span class="cx"> __ZN7WebCore7Console24setShouldPrintExceptionsEb
</span><span class="cx"> __ZN7WebCore7IntSizeC1ERK7_NSSize
</span><ins>+__ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE
</ins><span class="cx"> __ZN7WebCore7nsColorERKNS_5ColorE
</span><span class="cx"> __ZN7WebCore8Document11createRangeEv
</span><span class="cx"> __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE
</span><span class="lines">@@ -697,6 +701,7 @@
</span><span class="cx"> __ZN7WebCore9pageCacheEv
</span><span class="cx"> __ZN7WebCoreeqERKNS_12AtomicStringEPKc
</span><span class="cx"> __ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
</span><ins>+__ZN7WebCoreplEPKcRKNS_6StringE
</ins><span class="cx"> __ZN7WebCoreplERKNS_6StringES2_
</span><span class="cx"> __ZNK3JSC8Bindings10RootObject12globalObjectEv
</span><span class="cx"> __ZNK7WebCore10FloatPointcv8_NSPointEv
</span><span class="lines">@@ -880,11 +885,14 @@
</span><span class="cx"> __ZNK7WebCore6Editor9canDeleteEv
</span><span class="cx"> __ZNK7WebCore6String10charactersEv
</span><span class="cx"> __ZNK7WebCore6String14createCFStringEv
</span><ins>+__ZNK7WebCore6String4utf8Ev
</ins><span class="cx"> __ZNK7WebCore6String6lengthEv
</span><span class="cx"> __ZNK7WebCore6String7isEmptyEv
</span><span class="cx"> __ZNK7WebCore6String9substringEjj
</span><span class="cx"> __ZNK7WebCore6StringcvN3JSC7UStringEEv
</span><span class="cx"> __ZNK7WebCore6Widget9frameRectEv
</span><ins>+__ZNK7WebCore7CString4dataEv
+__ZNK7WebCore7CString6lengthEv
</ins><span class="cx"> __ZNK7WebCore7Element12getAttributeERKNS_13QualifiedNameE
</span><span class="cx"> __ZNK7WebCore7IntRectcv7_NSRectEv
</span><span class="cx"> __ZNK7WebCore8Document11completeURLERKNS_6StringE
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -1956,7 +1956,7 @@
</span><span class="cx">                 935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935207BF09BD412000F2038D /* LocalizedStringsMac.mm */; };
</span><span class="cx">                 9352084509BD43B900F2038D /* Language.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352084409BD43B900F2038D /* Language.mm */; };
</span><span class="cx">                 9352087709BD453400F2038D /* CookieJar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352087609BD453400F2038D /* CookieJar.mm */; };
</span><del>-                9352088209BD45E900F2038D /* CookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352088109BD45E900F2038D /* CookieJar.h */; };
</del><ins>+                9352088209BD45E900F2038D /* CookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352088109BD45E900F2038D /* CookieJar.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */; };
</span><span class="cx">                 935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */; };
</span><span class="cx">                 935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span></span></pre></div>
<a id="trunkWebCorebridgenpapih"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/npapi.h (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/npapi.h        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebCore/bridge/npapi.h        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -834,6 +834,9 @@
</span><span class="cx"> void        NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
</span><span class="cx"> void        NPN_PopPopupsEnabledState(NPP instance);
</span><span class="cx"> void        NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData);
</span><ins>+NPError     NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len);
+NPError     NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32_t len);
+NPError     NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen);
</ins><span class="cx"> uint32      NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID));
</span><span class="cx"> void        NPN_UnscheduleTimer(NPP instance, uint32 timerID);
</span><span class="cx"> NPError     NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
</span></span></pre></div>
<a id="trunkWebCorepluginsnpfunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/plugins/npfunctions.h (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/plugins/npfunctions.h        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebCore/plugins/npfunctions.h        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> typedef void  (*NPN_PopPopupsEnabledStateProcPtr)(NPP instance);
</span><span class="cx"> typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP npp, void (*func)(void *), void *userData);
</span><span class="cx"> typedef NPError (*NPN_GetValueForURLProcPtr)(NPP npp, NPNURLVariable variable, const char* url, char** value, uint32_t* len);
</span><del>-typedef NPError (*NPN_SetValueForURLProcPtr)(NPP npp, NPNURLVariable variable, const char* url, const char* value, uint32_t* len);
</del><ins>+typedef NPError (*NPN_SetValueForURLProcPtr)(NPP npp, NPNURLVariable variable, const char* url, const char* value, uint32_t len);
</ins><span class="cx"> typedef NPError (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen);
</span><span class="cx"> 
</span><span class="cx"> typedef uint32 (*NPN_ScheduleTimerProcPtr)(NPP npp, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID));
</span></span></pre></div>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/ChangeLog        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2009-04-07  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Reviewed by Sam Weinig.
+
+        &lt;rdar://problem/6667001&gt;
+        NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
+        
+        * Plugins/Hosted/NetscapePluginHostProxy.mm:
+        (WKPCGetCookies):
+        (WKPCGetProxy):
+        (WKPCSetCookies):
+        (WKPCGetAuthenticationInfo):
+        New MIG functions to be used by the plug-in host.
+        
+        * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+        (WebKit::NetscapePluginInstanceProxy::getCookies):
+        (WebKit::NetscapePluginInstanceProxy::setCookies):
+        (WebKit::NetscapePluginInstanceProxy::getProxy):
+        (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
+        Implement these.
+        
+        * Plugins/Hosted/WebKitPluginClient.defs:
+        Add callbacks.
+        
+        * Plugins/WebBaseNetscapePluginView.h:
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView URLWithCString:]):
+        Factor this out of URLWithCString.
+        
+        (-[WebBaseNetscapePluginView requestWithURLCString:]):
+        Call URLWithCString.
+        
+        (WebKit::proxiesForURL):
+        Return a string representation of proxies for a given URL.
+        
+        (WebKit::getAuthenticationInfo):
+        Get the authentication info for a given host/protocol/scheme/realm/port combination.
+        
+        * Plugins/WebNetscapePluginPackage.mm:
+        (-[WebNetscapePluginPackage _tryLoad]):
+        Initialize the new vtable functions.
+        
+        * Plugins/WebNetscapePluginView.h:
+        * Plugins/WebNetscapePluginView.mm:
+        (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+        (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+        (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+        Implement these.
+        
+        * Plugins/npapi.mm:
+        (NPN_GetValueForURL):
+        (NPN_SetValueForURL):
+        (NPN_GetAuthenticationInfo):
+        Call the plug-in view functions.
+
</ins><span class="cx"> 2009-04-03  Kevin Decker  &lt;kdecker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Anders Carlsson.
</span></span></pre></div>
<a id="trunkWebKitmacPluginsHostedNetscapePluginHostProxymm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -844,4 +844,101 @@
</span><span class="cx">     return KERN_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+kern_return_t WKPCGetCookies(mach_port_t clientPort, uint32_t pluginID,
+                             data_t urlData, mach_msg_type_number_t urlLength,
+                             boolean_t* returnValue, data_t* cookiesData, mach_msg_type_number_t* cookiesLength)
+{
+    *cookiesData = 0;
+    *cookiesLength = 0;
+    
+    DataDeallocator deallocator(urlData, urlLength);
+    
+    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+    if (!hostProxy)
+        return KERN_FAILURE;
+    
+    NetscapePluginInstanceProxy* instanceProxy = hostProxy-&gt;pluginInstance(pluginID);
+    if (!instanceProxy)
+        return KERN_FAILURE;
+    
+    *returnValue = instanceProxy-&gt;getCookies(urlData, urlLength, *cookiesData, *cookiesLength);
+    
+    return KERN_SUCCESS;
+}
+
+kern_return_t WKPCGetProxy(mach_port_t clientPort, uint32_t pluginID,
+                           data_t urlData, mach_msg_type_number_t urlLength,
+                           boolean_t* returnValue, data_t* proxyData, mach_msg_type_number_t* proxyLength)
+{
+    *proxyData = 0;
+    *proxyLength = 0;
+    
+    DataDeallocator deallocator(urlData, urlLength);
+    
+    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+    if (!hostProxy)
+        return KERN_FAILURE;
+    
+    NetscapePluginInstanceProxy* instanceProxy = hostProxy-&gt;pluginInstance(pluginID);
+    if (!instanceProxy)
+        return KERN_FAILURE;
+    
+    *returnValue = instanceProxy-&gt;getProxy(urlData, urlLength, *proxyData, *proxyLength);
+    
+    return KERN_SUCCESS;
+}
+
+kern_return_t WKPCSetCookies(mach_port_t clientPort, uint32_t pluginID,
+                             data_t urlData, mach_msg_type_number_t urlLength,
+                             data_t cookiesData, mach_msg_type_number_t cookiesLength,
+                             boolean_t* returnValue)
+{
+    DataDeallocator urlDeallocator(urlData, urlLength);
+    DataDeallocator cookiesDeallocator(cookiesData, cookiesLength);

+    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+    if (!hostProxy)
+        return KERN_FAILURE;
+    
+    NetscapePluginInstanceProxy* instanceProxy = hostProxy-&gt;pluginInstance(pluginID);
+    if (!instanceProxy)
+        return KERN_FAILURE;
+
+    *returnValue = instanceProxy-&gt;setCookies(urlData, urlLength, cookiesData, cookiesLength);
+    return KERN_SUCCESS;
+}
+
+kern_return_t WKPCGetAuthenticationInfo(mach_port_t clientPort, uint32_t pluginID,
+                                        data_t protocolData, mach_msg_type_number_t protocolLength,
+                                        data_t hostData, mach_msg_type_number_t hostLength,
+                                        uint32_t port,
+                                        data_t schemeData, mach_msg_type_number_t schemeLength,
+                                        data_t realmData, mach_msg_type_number_t realmLength,
+                                        boolean_t* returnValue,
+                                        data_t* usernameData, mach_msg_type_number_t *usernameLength,
+                                        data_t* passwordData, mach_msg_type_number_t *passwordLength)
+{
+    DataDeallocator protocolDeallocator(protocolData, protocolLength);
+    DataDeallocator hostDeallocator(hostData, hostLength);
+    DataDeallocator schemeDeallocator(schemeData, schemeLength);
+    DataDeallocator realmDeallocator(realmData, realmLength);
+
+    *usernameData = 0;
+    *usernameLength = 0;
+    *passwordData = 0;
+    *passwordLength = 0;
+    
+    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+    if (!hostProxy)
+        return KERN_FAILURE;
+    
+    NetscapePluginInstanceProxy* instanceProxy = hostProxy-&gt;pluginInstance(pluginID);
+    if (!instanceProxy)
+        return KERN_FAILURE;
+    
+    *returnValue = instanceProxy-&gt;getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, *usernameData, *usernameLength, *passwordData, *passwordLength);
+    
+    return KERN_SUCCESS;
+}
+
</ins><span class="cx"> #endif // USE(PLUGIN_HOST_PROCESS)
</span></span></pre></div>
<a id="trunkWebKitmacPluginsHostedNetscapePluginInstanceProxyh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -126,6 +126,13 @@
</span><span class="cx">     void status(const char* message);
</span><span class="cx">     NPError loadURL(const char* url, const char* target, const char* postData, uint32_t postDataLength, LoadURLFlags, uint32_t&amp; requestID);
</span><span class="cx"> 
</span><ins>+    bool getCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t&amp; cookiesData, mach_msg_type_number_t&amp; cookiesLength);
+    bool setCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t cookiesData, mach_msg_type_number_t cookiesLength);
+             
+    bool getProxy(data_t urlData, mach_msg_type_number_t urlLength, data_t&amp; proxyData, mach_msg_type_number_t&amp; proxyLength);
+    bool getAuthenticationInfo(data_t protocolData, data_t hostData, uint32_t port, data_t schemeData, data_t realmData, 
+                               data_t&amp; usernameData, mach_msg_type_number_t&amp; usernameLength, data_t&amp; passwordData, mach_msg_type_number_t&amp; passwordLength);
+    
</ins><span class="cx">     PassRefPtr&lt;JSC::Bindings::Instance&gt; createBindingsInstance(PassRefPtr&lt;JSC::Bindings::RootObject&gt;);
</span><span class="cx">     RetainPtr&lt;NSData *&gt; marshalValues(JSC::ExecState*, const JSC::ArgList&amp; args);
</span><span class="cx">     void marshalValue(JSC::ExecState*, JSC::JSValuePtr value, data_t&amp; resultData, mach_msg_type_number_t&amp; resultLength);
</span></span></pre></div>
<a id="trunkWebKitmacPluginsHostedNetscapePluginInstanceProxymm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -42,10 +42,13 @@
</span><span class="cx"> #import &quot;WebUIDelegatePrivate.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &lt;mach/mach.h&gt;
</span><ins>+#import &lt;WebCore/CookieJar.h&gt;
+#import &lt;WebCore/CString.h&gt;
</ins><span class="cx"> #import &lt;WebCore/DocumentLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #import &lt;WebCore/FrameLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/FrameTree.h&gt;
</span><ins>+#import &lt;WebCore/KURL.h&gt;
</ins><span class="cx"> #import &lt;WebCore/npruntime_impl.h&gt;
</span><span class="cx"> #import &lt;WebCore/runtime_object.h&gt;
</span><span class="cx"> #import &lt;WebCore/ScriptController.h&gt;
</span><span class="lines">@@ -1166,8 +1169,88 @@
</span><span class="cx">     
</span><span class="cx">     [m_pluginView setNeedsDisplayInRect:NSMakeRect(x, y, width, height)];
</span><span class="cx"> }
</span><ins>+
+bool NetscapePluginInstanceProxy::getCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t&amp; cookiesData, mach_msg_type_number_t&amp; cookiesLength)
+{
+    ASSERT(m_pluginView);
</ins><span class="cx">     
</span><ins>+    NSURL *url = [m_pluginView URLWithCString:urlData];
+    if (!url)
+        return false;
+    
+    if (Frame* frame = core([m_pluginView webFrame])) {
+        String cookieString = cookies(frame-&gt;document(), url); 
+        WebCore::CString cookieStringUTF8 = cookieString.utf8();
+        if (cookieStringUTF8.isNull())
+            return false;
+        
+        cookiesLength = cookieStringUTF8.length();
+        mig_allocate(reinterpret_cast&lt;vm_address_t*&gt;(&amp;cookiesData), cookiesLength);
+        memcpy(cookiesData, cookieStringUTF8.data(), cookiesLength);
+        
+        return true;
+    }
</ins><span class="cx"> 
</span><ins>+    return false;
+}
+    
+bool NetscapePluginInstanceProxy::setCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t cookiesData, mach_msg_type_number_t cookiesLength)
+{
+    ASSERT(m_pluginView);
+    
+    NSURL *url = [m_pluginView URLWithCString:urlData];
+    if (!url)
+        return false;
+
+    if (Frame* frame = core([m_pluginView webFrame])) {
+        String cookieString = String::fromUTF8(cookiesData, cookiesLength);
+        if (!cookieString)
+            return false;
+        
+        WebCore::setCookies(frame-&gt;document(), url, url, cookieString);
+        return true;
+    }
+
+    return false;
+}
+
+bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_t urlLength, data_t&amp; proxyData, mach_msg_type_number_t&amp; proxyLength)
+{
+    ASSERT(m_pluginView);
+    
+    NSURL *url = [m_pluginView URLWithCString:urlData];
+    if (!url)
+        return false;
+
+    WebCore::CString proxyStringUTF8 = proxiesForURL(url);
+
+    proxyLength = proxyStringUTF8.length();
+    mig_allocate(reinterpret_cast&lt;vm_address_t*&gt;(&amp;proxyData), proxyLength);
+    memcpy(proxyData, proxyStringUTF8.data(), proxyLength);
+    
+    return true;
+}
+    
+bool NetscapePluginInstanceProxy::getAuthenticationInfo(data_t protocolData, data_t hostData, uint32_t port, data_t schemeData, data_t realmData, 
+                                                        data_t&amp; usernameData, mach_msg_type_number_t&amp; usernameLength, data_t&amp; passwordData, mach_msg_type_number_t&amp; passwordLength)
+{
+    WebCore::CString username;
+    WebCore::CString password;
+    
+    if (!WebKit::getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, username, password))
+        return false;
+    
+    usernameLength = username.length();
+    mig_allocate(reinterpret_cast&lt;vm_address_t*&gt;(&amp;usernameData), usernameLength);
+    memcpy(usernameData, username.data(), usernameLength);
+    
+    passwordLength = password.length();
+    mig_allocate(reinterpret_cast&lt;vm_address_t*&gt;(&amp;passwordData), passwordLength);
+    memcpy(passwordData, password.data(), passwordLength);
+    
+    return true;
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(PLUGIN_HOST_PROCESS)
</span></span></pre></div>
<a id="trunkWebKitmacPluginsHostedWebKitPluginClientdefs"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -56,6 +56,34 @@
</span><span class="cx">                              width :double;
</span><span class="cx">                              height :double);
</span><span class="cx"> 
</span><ins>+routine PCGetCookies(clientPort :mach_port_t;
+                     pluginID :uint32_t;
+                     url :data_t;
+                     out returnValue :boolean_t;
+                     out cookies :data_t, dealloc);
+
+routine PCSetCookies(clientPort :mach_port_t;
+                     pluginID :uint32_t;
+                     url :data_t;
+                     cookies :data_t;
+                     out returnValue :boolean_t);
+
+routine PCGetProxy(clientPort :mach_port_t;
+                   pluginID :uint32_t;
+                   url :data_t;
+                   out returnValue :boolean_t;
+                   out proxy :data_t, dealloc);
+
+routine PCGetAuthenticationInfo(clientPort :mach_port_t;
+                                pluginID :uint32_t;
+                                protocol :data_t;
+                                host :data_t;
+                                port :uint32_t;
+                                scheme :data_t;
+                                realm :data_t;
+                                out returnValue :boolean_t;
+                                out username :data_t, dealloc;
+                                out password :data_t, dealloc);
</ins><span class="cx"> // NPRuntime
</span><span class="cx"> 
</span><span class="cx"> routine PCGetStringIdentifier(clientPort :mach_port_t;
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebBaseNetscapePluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.h        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (WebNetscapePluginPackage *)pluginPackage;
</span><span class="cx"> 
</span><ins>+- (NSURL *)URLWithCString:(const char *)URLCString;
</ins><span class="cx"> - (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString;
</span><span class="cx"> 
</span><span class="cx"> // Subclasses must override these.
</span><span class="lines">@@ -102,7 +103,21 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)addWindowObservers;
</span><span class="cx"> - (void)removeWindowObservers;
</span><ins>+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+namespace WebCore {
+class CString;
+}
+
+namespace WebKit {
+#ifndef BUILDING_ON_TIGER
+WebCore::CString proxiesForURL(NSURL *);
</ins><span class="cx"> #endif
</span><ins>+    
+bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
+                           WebCore::CString&amp; username, WebCore::CString&amp; password);
+} 
</ins><span class="cx"> 
</span><ins>+#endif
+
</ins></span></pre></div>
<a id="trunkWebKitmacPluginsWebBaseNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import &quot;WebViewInternal.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &lt;WebCore/WebCoreObjCExtras.h&gt;
</span><ins>+#import &lt;WebCore/CString.h&gt;
</ins><span class="cx"> #import &lt;WebCore/Document.h&gt;
</span><span class="cx"> #import &lt;WebCore/Element.h&gt;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt;
</span><span class="lines">@@ -123,7 +124,7 @@
</span><span class="cx">     return YES;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString
</del><ins>+- (NSURL *)URLWithCString:(const char *)URLCString
</ins><span class="cx"> {
</span><span class="cx">     if (!URLCString)
</span><span class="cx">         return nil;
</span><span class="lines">@@ -137,6 +138,15 @@
</span><span class="cx">     if (!URL)
</span><span class="cx">         return nil;
</span><span class="cx">     
</span><ins>+    return URL;
+}
+
+- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString
+{
+    NSURL *URL = [self URLWithCString:URLCString];
+    if (!URL)
+        return nil;
+    
</ins><span class="cx">     NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
</span><span class="cx">     Frame* frame = core([self webFrame]);
</span><span class="cx">     if (!frame)
</span><span class="lines">@@ -632,5 +642,112 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+
+#ifndef BUILDING_ON_TIGER
+namespace WebKit {
+
+CString proxiesForURL(NSURL *url)
+{
+    RetainPtr&lt;CFDictionaryRef&gt; systemProxies(AdoptCF, CFNetworkCopySystemProxySettings());
+    if (!systemProxies)
+        return &quot;DIRECT&quot;;
+    
+    RetainPtr&lt;CFArrayRef&gt; proxiesForURL(AdoptCF, CFNetworkCopyProxiesForURL((CFURLRef)url, systemProxies.get()));
+    CFIndex proxyCount = proxiesForURL ? CFArrayGetCount(proxiesForURL.get()) : 0;
+    if (!proxyCount)
+        return &quot;DIRECT&quot;;

+    // proxiesForURL is a CFArray of CFDictionaries. Each dictionary represents a proxy.
+    // The format of the result should be:
+    // &quot;PROXY host[:port]&quot; (for HTTP proxy) or
+    // &quot;SOCKS host[:port]&quot; (for SOCKS proxy) or
+    // A combination of the above, separated by semicolon, in the order that they should be tried.
+    String proxies;
+    for (CFIndex i = 0; i &lt; proxyCount; ++i) {
+        CFDictionaryRef proxy = static_cast&lt;CFDictionaryRef&gt;(CFArrayGetValueAtIndex(proxiesForURL.get(), i));
+        if (!proxy)
+            continue;
+
+        CFStringRef type = static_cast&lt;CFStringRef&gt;(CFDictionaryGetValue(proxy, kCFProxyTypeKey));
+        bool isHTTP = type == kCFProxyTypeHTTP || type == kCFProxyTypeHTTPS;
+        bool isSOCKS = type == kCFProxyTypeSOCKS;
+        
+        // We can only report HTTP and SOCKS proxies.
+        if (!isHTTP &amp;&amp; !isSOCKS)
+            continue;
+        
+        CFStringRef host = static_cast&lt;CFStringRef&gt;(CFDictionaryGetValue(proxy, kCFProxyHostNameKey));
+        CFNumberRef port = static_cast&lt;CFNumberRef&gt;(CFDictionaryGetValue(proxy, kCFProxyPortNumberKey));
+        
+        // If we are inserting multiple entries, add a separator
+        if (!proxies.isEmpty())
+            proxies += &quot;;&quot;;
+        
+        if (isHTTP)
+            proxies += &quot;PROXY &quot;;
+        else if (isSOCKS)
+            proxies += &quot;SOCKS &quot;;
+        
+        proxies += host;
+
+        if (port) {
+            SInt32 intPort;
+            CFNumberGetValue(port, kCFNumberSInt32Type, &amp;intPort);
+            
+            proxies += &quot;:&quot; + String::number(intPort);
+        }
+    }
+    
+    if (proxies.isEmpty())
+        return &quot;DIRECT&quot;;
+    
+    return proxies.utf8();
+}
+
+bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
+                           CString&amp; username, CString&amp; password)
+{
+    if (strcasecmp(protocolStr, &quot;http&quot;) != 0 &amp;&amp; 
+        strcasecmp(protocolStr, &quot;https&quot;) != 0)
+        return false;
+
+    NSString *host = [NSString stringWithUTF8String:hostStr];
+    if (!hostStr)
+        return false;
+    
+    NSString *protocol = [NSString stringWithUTF8String:protocolStr];
+    if (!protocol)
+        return false;
+    
+    NSString *realm = [NSString stringWithUTF8String:realmStr];
+    if (!realm)
+        return NPERR_GENERIC_ERROR;
+    
+    NSString *authenticationMethod = NSURLAuthenticationMethodDefault;
+    if (!strcasecmp(protocolStr, &quot;http&quot;)) {
+        if (!strcasecmp(schemeStr, &quot;basic&quot;))
+            authenticationMethod = NSURLAuthenticationMethodHTTPBasic;
+        else if (!strcasecmp(schemeStr, &quot;digest&quot;))
+            authenticationMethod = NSURLAuthenticationMethodHTTPDigest;
+    }
+    
+    RetainPtr&lt;NSURLProtectionSpace&gt; protectionSpace(AdoptNS, [[NSURLProtectionSpace alloc] initWithHost:host port:port protocol:protocol realm:realm authenticationMethod:authenticationMethod]);
+    
+    NSURLCredential *credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:protectionSpace.get()];
+    if (!credential)
+        return false;
+  
+    if (![credential hasPassword])
+        return false;
+    
+    username = [[credential user] UTF8String];
+    password = [[credential password] UTF8String];
+    
+    return true;
+}
+
+} // namespace WebKit
+#endif
+
</ins><span class="cx"> #endif //  ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebNetscapePluginPackagemm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -455,6 +455,9 @@
</span><span class="cx">         browserFuncs.pushpopupsenabledstate = (NPN_PushPopupsEnabledStateProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PushPopupsEnabledState);
</span><span class="cx">         browserFuncs.poppopupsenabledstate = (NPN_PopPopupsEnabledStateProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PopPopupsEnabledState);
</span><span class="cx">         browserFuncs.pluginthreadasynccall = (NPN_PluginThreadAsyncCallProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PluginThreadAsyncCall);
</span><ins>+        browserFuncs.getvalueforurl = (NPN_GetValueForURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetValueForURL);
+        browserFuncs.setvalueforurl = (NPN_SetValueForURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_SetValueForURL);
+        browserFuncs.getauthenticationinfo = (NPN_GetAuthenticationInfoProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetAuthenticationInfo);
</ins><span class="cx">         browserFuncs.scheduletimer = (NPN_ScheduleTimerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_ScheduleTimer);
</span><span class="cx">         browserFuncs.unscheduletimer = (NPN_UnscheduleTimerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_UnscheduleTimer);
</span><span class="cx">         browserFuncs.popupcontextmenu = (NPN_PopUpContextMenuProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PopUpContextMenu);
</span><span class="lines">@@ -564,10 +567,13 @@
</span><span class="cx">         browserFuncs.pushpopupsenabledstate = NPN_PushPopupsEnabledState;
</span><span class="cx">         browserFuncs.poppopupsenabledstate = NPN_PopPopupsEnabledState;
</span><span class="cx">         browserFuncs.pluginthreadasynccall = NPN_PluginThreadAsyncCall;
</span><ins>+        browserFuncs.getvalueforurl = NPN_GetValueForURL;
+        browserFuncs.setvalueforurl = NPN_SetValueForURL;
+        browserFuncs.getauthenticationinfo = NPN_GetAuthenticationInfo;
</ins><span class="cx">         browserFuncs.scheduletimer = NPN_ScheduleTimer;
</span><span class="cx">         browserFuncs.unscheduletimer = NPN_UnscheduleTimer;
</span><span class="cx">         browserFuncs.popupcontextmenu = NPN_PopUpContextMenu;
</span><del>-        
</del><ins>+
</ins><span class="cx">         browserFuncs.releasevariantvalue = _NPN_ReleaseVariantValue;
</span><span class="cx">         browserFuncs.getstringidentifier = _NPN_GetStringIdentifier;
</span><span class="cx">         browserFuncs.getstringidentifiers = _NPN_GetStringIdentifiers;
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebNetscapePluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebNetscapePluginView.h (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebNetscapePluginView.h        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/WebNetscapePluginView.h        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -164,7 +164,11 @@
</span><span class="cx"> - (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
</span><span class="cx"> - (void)unscheduleTimer:(uint32)timerID;
</span><span class="cx"> - (NPError)popUpContextMenu:(NPMenu *)menu;
</span><del>-
</del><ins>+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length;
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length;
+- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32_t)port scheme:(const char*)scheme realm:(const char*)realm
+                                    username:(char**)username usernameLength:(uint32_t*)usernameLength 
+                                    password:(char**)password passwordLength:(uint32_t*)passwordLength;
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx"> #import &lt;Carbon/Carbon.h&gt;
</span><span class="cx"> #import &lt;runtime/JSLock.h&gt;
</span><span class="cx"> #import &lt;WebCore/npruntime_impl.h&gt;
</span><ins>+#import &lt;WebCore/CookieJar.h&gt;
+#import &lt;WebCore/CString.h&gt;
</ins><span class="cx"> #import &lt;WebCore/DocumentLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/Element.h&gt;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt; 
</span><span class="lines">@@ -80,6 +82,7 @@
</span><span class="cx"> #define LoginWindowDidSwitchToUserNotification      @&quot;WebLoginWindowDidSwitchToUserNotification&quot;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><ins>+using namespace WebKit;
</ins><span class="cx"> 
</span><span class="cx"> static inline bool isDrawingModelQuickDraw(NPDrawingModel drawingModel)
</span><span class="cx"> {
</span><span class="lines">@@ -2044,6 +2047,107 @@
</span><span class="cx">     return NPERR_NO_ERROR;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length
+{
+    switch (variable) {
+        case NPNURLVCookie: {
+            if (!value)
+                break;
+            
+            NSURL *URL = [self URLWithCString:url];
+            if (!URL)
+                break;
+            
+            if (Frame* frame = core([self webFrame])) {
+                String cookieString = cookies(frame-&gt;document(), URL); 
+                CString cookieStringUTF8 = cookieString.utf8();
+                if (cookieStringUTF8.isNull())
+                    return NPERR_GENERIC_ERROR;
+
+                *value = static_cast&lt;char*&gt;(NPN_MemAlloc(cookieStringUTF8.length()));
+                memcpy(*value, cookieStringUTF8.data(), cookieStringUTF8.length());
+                
+                if (length)
+                    *length = cookieStringUTF8.length();
+                return NPERR_NO_ERROR;
+            }
+            break;
+        }
+        case NPNURLVProxy: {
+#ifndef BUILDING_ON_TIGER
+            if (!value)
+                break;
+            
+            NSURL *URL = [self URLWithCString:url];
+            if (!URL)
+                break;
+
+            CString proxiesUTF8 = proxiesForURL(URL);
+            
+            *value = static_cast&lt;char*&gt;(NPN_MemAlloc(proxiesUTF8.length()));
+            memcpy(*value, proxiesUTF8.data(), proxiesUTF8.length());
+            
+           if (length)
+               *length = proxiesUTF8.length();
+            
+            return NPERR_NO_ERROR;
+#else
+            break;
+#endif
+        }
+    }
+    return NPERR_GENERIC_ERROR;
+}
+
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length
+{
+    switch (variable) {
+        case NPNURLVCookie: {
+            NSURL *URL = [self URLWithCString:url];
+            if (!URL)
+                break;
+            
+            String cookieString = String::fromUTF8(value, length);
+            if (!cookieString)
+                break;
+            
+            if (Frame* frame = core([self webFrame])) {
+                setCookies(frame-&gt;document(), URL, URL, cookieString);
+                return NPERR_NO_ERROR;
+            }
+            
+            break;
+        }
+        case NPNURLVProxy:
+            // Can't set the proxy for a URL.
+            break;
+    }
+    return NPERR_GENERIC_ERROR;
+}
+
+- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr host:(const char*)hostStr port:(int32_t)port scheme:(const char*)schemeStr realm:(const char*)realmStr
+                                    username:(char**)usernameStr usernameLength:(uint32_t*)usernameLength 
+                                    password:(char**)passwordStr passwordLength:(uint32_t*)passwordLength
+{
+    if (!protocolStr || !hostStr || !schemeStr || !realmStr || !usernameStr || !usernameLength || !passwordStr || !passwordLength)
+        return NPERR_GENERIC_ERROR;
+  
+    CString username;
+    CString password;
+    if (!getAuthenticationInfo(protocolStr, hostStr, port, schemeStr, realmStr, username, password))
+        return NPERR_GENERIC_ERROR;
+    
+    *usernameLength = username.length();
+    *usernameStr = static_cast&lt;char*&gt;(NPN_MemAlloc(username.length()));
+    memcpy(*usernameStr, username.data(), username.length());
+    
+    *passwordLength = password.length();
+    *passwordStr = static_cast&lt;char*&gt;(NPN_MemAlloc(password.length()));
+    memcpy(*passwordStr, password.data(), password.length());
+    
+    return NPERR_NO_ERROR;
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @implementation WebNetscapePluginView (Internal)
</span></span></pre></div>
<a id="trunkWebKitmacPluginsnpapimm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/npapi.mm (42267 => 42268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/npapi.mm        2009-04-07 17:13:50 UTC (rev 42267)
+++ trunk/WebKit/mac/Plugins/npapi.mm        2009-04-07 17:22:47 UTC (rev 42268)
</span><span class="lines">@@ -191,4 +191,25 @@
</span><span class="cx">     return [pluginViewForInstance(instance) popUpContextMenu:menu];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len)
+{
+    return [pluginViewForInstance(instance) getVariable:variable forURL:url value:value length:len];
+}
+
+NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32_t len)
+{
+    return [pluginViewForInstance(instance) setVariable:variable forURL:url value:value length:len];
+}
+
+NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen)
+{
+    return [pluginViewForInstance(instance) getAuthenticationInfoWithProtocol:protocol 
+                                                                         host:host 
+                                                                         port:port
+                                                                       scheme:scheme
+                                                                        realm:realm
+                                                                     username:username usernameLength:ulen
+                                                                     password:password passwordLength:plen];
+}
+
</ins><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>