<!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>[81173] 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/81173">81173</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2011-03-15 14:15:40 -0700 (Tue, 15 Mar 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Darin Adler.

        REGRESSION (WebKit2): keygen element doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=56402
        <rdar://problem/9006545>

        Covered by existing regresison tests.

        * English.lproj/Localizable.strings:

        * WebCore.exp.in: Removed WebCoreKeyGenerator, which no longer exists. Added
        _wkSignedPublicKeyAndChallengeString, so that this WKSI function could be used in WebCore.

        * platform/mac/SSLKeyGeneratorMac.mm: Removed.
        * platform/mac/WebCoreKeyGenerator.h: Removed.
        * platform/mac/WebCoreKeyGenerator.m: Removed.
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        * WebCore.xcodeproj/project.pbxproj:
        Renamed SSLKeyGeneratorMac.mm to .cpp, as it doesn't use any Objective C any more.
        Removed WebCoreKeyGenerator, as we no longer need an interface to WebKit.

        * platform/LocalizationStrategy.h:
        * platform/LocalizedStrings.cpp:
        (WebCore::keygenMenuItem512):
        (WebCore::keygenMenuItem1024):
        (WebCore::keygenMenuItem2048):
        (WebCore::keygenKeychainItemName):
        * platform/LocalizedStrings.h:
        Added strings used by keygen element, now that the code using them is in WebCore.

        * platform/mac/SSLKeyGeneratorMac.cpp: Copied from Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm.
        (WebCore::getSupportedKeySizes):
        (WebCore::signedPublicKeyAndChallengeString):
        Moved the code from WebKit. There is never any need to provide implementation at runtime,
        like old code was doing.

        * platform/win/SSLKeyGeneratorWin.cpp: (WebCore::WebCore::getSupportedKeySizes):
        Added a FIXME about localization. Note that Safari for Windows doesn't support keygen.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2Skipped">trunk/LayoutTests/platform/mac-wk2/Skipped</a></li>
<li><a href="#trunkLayoutTestsplatformwinwk2Skipped">trunk/LayoutTests/platform/win-wk2/Skipped</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreEnglishlprojLocalizablestrings">trunk/Source/WebCore/English.lproj/Localizable.strings</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizationStrategyh">trunk/Source/WebCore/platform/LocalizationStrategy.h</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringscpp">trunk/Source/WebCore/platform/LocalizedStrings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringsh">trunk/Source/WebCore/platform/LocalizedStrings.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformwinSSLKeyGeneratorWincpp">trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebKeyGeneratorh">trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm">trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFrameViewmm">trunk/Source/WebKit/mac/WebView/WebFrameView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacSSLKeyGeneratorMaccpp">trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebKeyGeneratormm">trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacSSLKeyGeneratorMacmm">trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreKeyGeneratorh">trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreKeyGeneratorm">trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.m</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebKeyGeneratorm">trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/LayoutTests/ChangeLog 2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2011-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): keygen element doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=56402
+        <rdar://problem/9006545>
+
+        * platform/mac-wk2/Skipped:
+        * platform/win-wk2/Skipped:
+        Moved tests that were skipped becasue of keygen to win-wk2/Skipped.
+
</ins><span class="cx"> 2011-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
</span><span class="cx"> 
</span><span class="cx">         Not reviewed.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2Skipped"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/Skipped (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/Skipped       2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/LayoutTests/platform/mac-wk2/Skipped  2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1912,11 +1912,6 @@
</span><span class="cx"> fast/dom/Window/window-resize-and-move-arguments.html
</span><span class="cx"> fast/dom/Window/window-resize.html
</span><span class="cx"> 
</span><del>-# WebKit2 needs keygen support
-fast/html/keygen.html
-fast/invalid/residual-style.html
-html5lib/runner.html
-
</del><span class="cx"> # WebKitTestRunner needs to sanitize file urls in the output
</span><span class="cx"> http/tests/misc/image-blocked-src-change.html
</span><span class="cx"> http/tests/misc/image-blocked-src-no-change.html
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinwk2Skipped"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win-wk2/Skipped (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win-wk2/Skipped       2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/LayoutTests/platform/win-wk2/Skipped  2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -155,3 +155,8 @@
</span><span class="cx"> 
</span><span class="cx"> # Crashes http://webkit.org/b/55780
</span><span class="cx"> platform/win/plugins/get-value-netscape-window.html
</span><ins>+
+# No keygen support
+fast/html/keygen.html
+fast/invalid/residual-style.html
+html5lib/runner.html
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/ChangeLog      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2011-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): keygen element doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=56402
+        <rdar://problem/9006545>
+
+        Covered by existing regresison tests.
+
+        * English.lproj/Localizable.strings:
+
+        * WebCore.exp.in: Removed WebCoreKeyGenerator, which no longer exists. Added
+        _wkSignedPublicKeyAndChallengeString, so that this WKSI function could be used in WebCore.
+
+        * platform/mac/SSLKeyGeneratorMac.mm: Removed.
+        * platform/mac/WebCoreKeyGenerator.h: Removed.
+        * platform/mac/WebCoreKeyGenerator.m: Removed.
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        * WebCore.xcodeproj/project.pbxproj:
+        Renamed SSLKeyGeneratorMac.mm to .cpp, as it doesn't use any Objective C any more.
+        Removed WebCoreKeyGenerator, as we no longer need an interface to WebKit.
+
+        * platform/LocalizationStrategy.h:
+        * platform/LocalizedStrings.cpp:
+        (WebCore::keygenMenuItem512):
+        (WebCore::keygenMenuItem1024):
+        (WebCore::keygenMenuItem2048):
+        (WebCore::keygenKeychainItemName):
+        * platform/LocalizedStrings.h:
+        Added strings used by keygen element, now that the code using them is in WebCore.
+
+        * platform/mac/SSLKeyGeneratorMac.cpp: Copied from Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm.
+        (WebCore::getSupportedKeySizes):
+        (WebCore::signedPublicKeyAndChallengeString):
+        Moved the code from WebKit. There is never any need to provide implementation at runtime,
+        like old code was doing.
+
+        * platform/win/SSLKeyGeneratorWin.cpp: (WebCore::WebCore::getSupportedKeySizes):
+        Added a FIXME about localization. Note that Safari for Windows doesn't support keygen.
+
</ins><span class="cx"> 2011-03-15  Anders Carlsson  <andersca@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Fix clang build.
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -181,9 +181,12 @@
</span><span class="cx"> /* Undo action name */
</span><span class="cx"> "Justify (Undo action name)" = "Justify";
</span><span class="cx"> 
</span><del>-/* name of keychain key generated by the KEYGEN tag */
</del><ins>+/* Name of keychain key generated by the KEYGEN tag */
</ins><span class="cx"> "Key from %@" = "Key from %@";
</span><span class="cx"> 
</span><ins>+/* Name of keychain key generated by the KEYGEN tag */
+"Key from <hostname>" = "Key from <hostname>";
+
</ins><span class="cx"> /* Learn Spelling context menu item */
</span><span class="cx"> "Learn Spelling" = "Learn Spelling";
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in      2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -105,7 +105,6 @@
</span><span class="cx"> .objc_class_name_DOMTreeWalker
</span><span class="cx"> .objc_class_name_DOMUIEvent
</span><span class="cx"> .objc_class_name_DOMWheelEvent
</span><del>-.objc_class_name_WebCoreKeyGenerator
</del><span class="cx"> .objc_class_name_WebCoreViewFactory
</span><span class="cx"> .objc_class_name_WebFontCache
</span><span class="cx"> .objc_class_name_WebScriptObject
</span><span class="lines">@@ -1355,6 +1354,7 @@
</span><span class="cx"> _wkSignalCFReadStreamEnd
</span><span class="cx"> _wkSignalCFReadStreamError
</span><span class="cx"> _wkSignalCFReadStreamHasBytes
</span><ins>+_wkSignedPublicKeyAndChallengeString
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DOM_STORAGE)
</span><span class="cx"> __ZN7WebCore14StorageTracker17initializeTrackerERKN3WTF6StringE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -2976,7 +2976,6 @@
</span><span class="cx">          93F199B808245E59001E9ABC /* Scrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7B2AF80450824100A8000F /* Scrollbar.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */ = {isa = PBXBuildFile; fileRef = BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A640F00533BB1F0085E777 /* BlockExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               93F199C208245E59001E9ABC /* WebCoreKeyGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">           93F199DE08245E59001E9ABC /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = BE91FC8B06133666005E3790 /* Position.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */; };
</span><span class="cx">          93F199E708245E59001E9ABC /* ClipboardMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D90660B0665D937006B6F1A /* ClipboardMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2992,8 +2991,7 @@
</span><span class="cx">          93F19ABC08245E59001E9ABC /* XMLDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30902DE4476018635CA /* XMLDocumentParser.cpp */; };
</span><span class="cx">          93F19AD508245E59001E9ABC /* RenderTreeAsText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93955A4203D72932008635CE /* RenderTreeAsText.cpp */; };
</span><span class="cx">          93F19AE108245E59001E9ABC /* BlockExceptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65F80697054D9F86008BF776 /* BlockExceptions.mm */; };
</span><del>-               93F19AE508245E59001E9ABC /* WebCoreKeyGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B2B1F8056BEF3A00D2B771 /* WebCoreKeyGenerator.m */; };
-               93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */; };
</del><ins>+                93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.cpp */; };
</ins><span class="cx">           93F19AF808245E59001E9ABC /* Position.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE91FC8C06133666005E3790 /* Position.cpp */; };
</span><span class="cx">          93F19AFD08245E59001E9ABC /* HTMLCanvasElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */; };
</span><span class="cx">          93F19AFF08245E59001E9ABC /* ClipboardMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D90660C0665D937006B6F1A /* ClipboardMac.mm */; };
</span><span class="lines">@@ -8319,9 +8317,7 @@
</span><span class="cx">          84A81F3C0FC7DFF000955300 /* SourceAlpha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceAlpha.h; path = filters/SourceAlpha.h; sourceTree = "<group>"; };
</span><span class="cx">          84A81F3F0FC7E02700955300 /* SourceGraphic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceGraphic.cpp; path = filters/SourceGraphic.cpp; sourceTree = "<group>"; };
</span><span class="cx">          84A81F400FC7E02700955300 /* SourceGraphic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceGraphic.h; path = filters/SourceGraphic.h; sourceTree = "<group>"; };
</span><del>-               84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreKeyGenerator.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               84B2B1F8056BEF3A00D2B771 /* WebCoreKeyGenerator.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreKeyGenerator.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SSLKeyGeneratorMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</del><ins>+                84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SSLKeyGeneratorMac.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</ins><span class="cx">           84B6B975120F13E500B8EFAF /* SVGPathSegListSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSegListSource.cpp; sourceTree = "<group>"; };
</span><span class="cx">          84B6B976120F13E500B8EFAF /* SVGPathSegListSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegListSource.h; sourceTree = "<group>"; };
</span><span class="cx">          84C5B2F81216DC810088B53A /* SVGPathTraversalStateBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathTraversalStateBuilder.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -14065,14 +14061,12 @@
</span><span class="cx">                          93309E9F099EB78C0056E581 /* SharedTimerMac.mm */,
</span><span class="cx">                          0A4844980CA44CB200B7BD48 /* SoftLinking.h */,
</span><span class="cx">                          4B3043C80AE0371D00A82647 /* SoundMac.mm */,
</span><del>-                               84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */,
</del><ins>+                                84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.cpp */,
</ins><span class="cx">                           93B2D8170F9920EE006AE6B2 /* SuddenTermination.mm */,
</span><span class="cx">                          6582A15509999D6D00BEEB6D /* SystemTimeMac.cpp */,
</span><span class="cx">                          BCE659E50EA92FB2007E4533 /* ThemeMac.h */,
</span><span class="cx">                          BCE659E80EA92FFA007E4533 /* ThemeMac.mm */,
</span><span class="cx">                          51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */,
</span><del>-                               84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */,
-                               84B2B1F8056BEF3A00D2B771 /* WebCoreKeyGenerator.m */,
</del><span class="cx">                           934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */,
</span><span class="cx">                          934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */,
</span><span class="cx">                          DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */,
</span><span class="lines">@@ -22523,7 +22517,6 @@
</span><span class="cx">                          93F199A808245E59001E9ABC /* WebCoreFrameView.h in Headers */,
</span><span class="cx">                          BC53D911114310CC000D817E /* WebCoreJSClientData.h in Headers */,
</span><span class="cx">                          93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */,
</span><del>-                               93F199C208245E59001E9ABC /* WebCoreKeyGenerator.h in Headers */,
</del><span class="cx">                           934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */,
</span><span class="cx">                          DD05FE0D0B8BA3C6009ACDFE /* WebCoreObjCExtras.h in Headers */,
</span><span class="cx">                          EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */,
</span><span class="lines">@@ -24941,7 +24934,7 @@
</span><span class="cx">                          B5C1123B102B6C4600096578 /* SQLTransactionCoordinator.cpp in Sources */,
</span><span class="cx">                          B523CF091182675400EBB29C /* SQLTransactionSync.cpp in Sources */,
</span><span class="cx">                          1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */,
</span><del>-                               93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.mm in Sources */,
</del><ins>+                                93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.cpp in Sources */,
</ins><span class="cx">                           CEA3949C11D45CDA003094CF /* StaticHashSetNodeList.cpp in Sources */,
</span><span class="cx">                          BC7FA62E0D1F0EFF00DB22A9 /* StaticNodeList.cpp in Sources */,
</span><span class="cx">                          A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */,
</span><span class="lines">@@ -25204,7 +25197,6 @@
</span><span class="cx">                          93309E1D099E64920056E581 /* visible_units.cpp in Sources */,
</span><span class="cx">                          93309E1F099E64920056E581 /* VisiblePosition.cpp in Sources */,
</span><span class="cx">                          A883DF270F3D045D00F19BF6 /* VisibleSelection.cpp in Sources */,
</span><del>-                               93F19AE508245E59001E9ABC /* WebCoreKeyGenerator.m in Sources */,
</del><span class="cx">                           934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */,
</span><span class="cx">                          B50F5B810E96CD9900AD71A6 /* WebCoreObjCExtras.mm in Sources */,
</span><span class="cx">                          93EB169509F880B00091F8FF /* WebCoreSystemInterface.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizationStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizationStrategy.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizationStrategy.h     2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/LocalizationStrategy.h        2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -167,6 +167,13 @@
</span><span class="cx">     virtual String allFilesText() = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    virtual String keygenMenuItem512() = 0;
+    virtual String keygenMenuItem1024() = 0;
+    virtual String keygenMenuItem2048() = 0;
+    virtual String keygenKeychainItemName(const String& host) = 0;
+#endif
+
</ins><span class="cx">     virtual String imageTitle(const String& filename, const IntSize& size) = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual String mediaElementLoadingStateText() = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp       2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp  2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -569,6 +569,29 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+String keygenMenuItem512()
+{
+    return platformStrategies()->localizationStrategy()->keygenMenuItem512();
+}
+
+String keygenMenuItem1024()
+{
+    return platformStrategies()->localizationStrategy()->keygenMenuItem1024();
+}
+
+String keygenMenuItem2048()
+{
+    return platformStrategies()->localizationStrategy()->keygenMenuItem2048();
+}
+
+String keygenKeychainItemName(const String& host)
+{
+    return platformStrategies()->localizationStrategy()->keygenKeychainItemName(host);
+}
+
+#endif
+
</ins><span class="cx"> String imageTitle(const String& filename, const IntSize& size)
</span><span class="cx"> {
</span><span class="cx">     return platformStrategies()->localizationStrategy()->imageTitle(filename, size);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -163,6 +163,13 @@
</span><span class="cx">     String allFilesText();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    String keygenMenuItem512();
+    String keygenMenuItem1024();
+    String keygenMenuItem2048();
+    String keygenKeychainItemName(const String& host);
+#endif
+
</ins><span class="cx">     String imageTitle(const String& filename, const IntSize& size);
</span><span class="cx"> 
</span><span class="cx">     String mediaElementLoadingStateText();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacSSLKeyGeneratorMaccppfromrev81063trunkSourceWebCoreplatformmacSSLKeyGeneratorMacmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp (from rev 81063, trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm) (0 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp                         (rev 0)
+++ trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2003, 2005, 2008, 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SSLKeyGenerator.h"
+
+#include "KURL.h"
+#include "LocalizedStrings.h"
+#include "WebCoreSystemInterface.h"
+#include <wtf/RetainPtr.h>
+
+namespace WebCore {
+
+void getSupportedKeySizes(Vector<String>& supportedKeySizes)
+{
+    ASSERT(supportedKeySizes.isEmpty());
+    supportedKeySizes.append(keygenMenuItem2048());
+    supportedKeySizes.append(keygenMenuItem1024());
+    supportedKeySizes.append(keygenMenuItem512());
+}
+
+String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const KURL& url)
+{   
+    // This switch statement must always be synced with the UI strings returned by getSupportedKeySizes.
+    UInt32 keySize;
+    switch (keySizeIndex) {
+    case 0:
+        keySize = 2048;
+        break;
+    case 1:
+        keySize = 1024;
+        break;
+    case 2:
+        keySize = 512;
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+        return String();
+    }
+
+    RetainPtr<CFStringRef> challengeStringCF(AdoptCF, challengeString.createCFString());
+    RetainPtr<CFStringRef> keyDescription(AdoptCF, keygenKeychainItemName(url.host()).createCFString());
+    RetainPtr<CFStringRef> result(AdoptCF, wkSignedPublicKeyAndChallengeString(keySize, challengeStringCF.get(), keyDescription.get()));
+
+    return result.get();
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacSSLKeyGeneratorMacmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm  2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm     2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2003, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import "config.h"
-#import "SSLKeyGenerator.h"
-
-#import "KURL.h"
-#import "WebCoreKeyGenerator.h"
-
-namespace WebCore {
-
-void getSupportedKeySizes(Vector<String>& supportedKeySizes)
-{ 
-    NSEnumerator *enumerator = [[[WebCoreKeyGenerator sharedGenerator] strengthMenuItemTitles] objectEnumerator];
-    NSString *string;
-    while ((string = [enumerator nextObject]) != nil)
-        supportedKeySizes.append(string);
-}
-
-String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const KURL& url)
-{   
-    return [[WebCoreKeyGenerator sharedGenerator] signedPublicKeyAndChallengeStringWithStrengthIndex:keySizeIndex 
-                                                                                           challenge:challengeString
-                                                                                             pageURL:url];
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreKeyGeneratorh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.h  2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.h     2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-/*
- * Copyright (C) 2003 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-@interface WebCoreKeyGenerator : NSObject
-
-+ (WebCoreKeyGenerator *)sharedGenerator;
-- (NSArray *)strengthMenuItemTitles;
-- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge pageURL:(NSURL *)pageURL;
-
-@end
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreKeyGeneratorm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.m (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.m  2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/mac/WebCoreKeyGenerator.m     2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,63 +0,0 @@
</span><del>-/*
- * Copyright (C) 2003 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import "config.h"
-#import "WebCoreKeyGenerator.h"
-
-#import <wtf/Assertions.h>
-#import <wtf/UnusedParam.h>
-
-static WebCoreKeyGenerator *sharedGenerator;
-
-@implementation WebCoreKeyGenerator
-
-+ (WebCoreKeyGenerator *)sharedGenerator
-{
-    return sharedGenerator;
-}
-
-- init
-{
-    ASSERT(!sharedGenerator);
-    [super init];
-    sharedGenerator = [self retain];
-    return self;
-}
-
-- (NSArray *)strengthMenuItemTitles
-{
-    return nil;
-}
-
-- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)unusedIndex challenge:(NSString *)unusedChallenge pageURL:(NSURL *)unusedPageURL
-{
-    UNUSED_PARAM(unusedIndex);
-    UNUSED_PARAM(unusedChallenge);
-    UNUSED_PARAM(unusedPageURL);
-
-    return nil;
-}
-
-@end
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h       2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h  2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -117,6 +117,7 @@
</span><span class="cx"> extern void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, 
</span><span class="cx">     float duration, unsigned state);
</span><span class="cx"> extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
</span><ins>+extern CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
</ins><span class="cx"> extern NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
</span><span class="cx"> extern NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
</span><span class="cx"> extern NSString* (*wkGetMIMETypeForExtension)(NSString*);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm      2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
</span><span class="cx"> BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
</span><span class="cx"> NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
</span><ins>+CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
</ins><span class="cx"> NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
</span><span class="cx"> NSString* (*wkGetMIMETypeForExtension)(NSString*);
</span><span class="cx"> NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinSSLKeyGeneratorWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebCore::getSupportedKeySizes(Vector<String>& v)
</span><span class="cx"> {
</span><ins>+    // FIXME: Strings should be localizable.
</ins><span class="cx">     v.append("High Grade");
</span><span class="cx">     v.append("Medium Grade");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/ChangeLog       2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2011-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): keygen element doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=56402
+        <rdar://problem/9006545>
+
+        * WebKit.xcodeproj/project.pbxproj: Renamed WebKeyGenerator.m to use Objective C++.
+
</ins><span class="cx"> 2011-03-11  Anton D'Auria  <adauria@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Reviewed and landed by Brady Eidson.
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">          939811130824BF01008DF038 /* WebHistory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65DA2608052CC18700A97B31 /* WebHistory.mm */; };
</span><span class="cx">          939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BECD142A0565830A005BB09C /* WebNSDataExtras.m */; };
</span><span class="cx">          939811160824BF01008DF038 /* WebNSEventExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BE887C00056D3A6E009BB3E7 /* WebNSEventExtras.m */; };
</span><del>-               939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 84723BE4056D719E0044BFEA /* WebKeyGenerator.m */; };
</del><ins>+                939811170824BF01008DF038 /* WebKeyGenerator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */; };
</ins><span class="cx">           939811190824BF01008DF038 /* WebNSPrintOperationExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD1A5C705C83987008E3150 /* WebNSPrintOperationExtras.m */; };
</span><span class="cx">          9398111A0824BF01008DF038 /* WebResource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84311A1305EAAAF00088EDA4 /* WebResource.mm */; };
</span><span class="cx">          9398111B0824BF01008DF038 /* WebDefaultEditingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE95BEE505FD0805006E1513 /* WebDefaultEditingDelegate.m */; };
</span><span class="lines">@@ -597,7 +597,7 @@
</span><span class="cx">          8467275C0367158500CA2ACA /* WebPluginController.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginController.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">          8467275D0367158500CA2ACA /* WebPluginController.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPluginController.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">          84723BE3056D719E0044BFEA /* WebKeyGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKeyGenerator.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><del>-               84723BE4056D719E0044BFEA /* WebKeyGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebKeyGenerator.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</del><ins>+                84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKeyGenerator.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</ins><span class="cx">           848DFF840365FE6A00CA2ACA /* WebPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPlugin.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">          848DFF850365FE6A00CA2ACA /* WebPluginContainer.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">          848DFF860365FE6A00CA2ACA /* WebPluginViewFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginViewFactory.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="lines">@@ -1325,7 +1325,7 @@
</span><span class="cx">                          9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */,
</span><span class="cx">                          9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */,
</span><span class="cx">                          84723BE3056D719E0044BFEA /* WebKeyGenerator.h */,
</span><del>-                               84723BE4056D719E0044BFEA /* WebKeyGenerator.m */,
</del><ins>+                                84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */,
</ins><span class="cx">                           1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */,
</span><span class="cx">                          1AA879B511CBE9BF003C664F /* WebPlatformStrategies.mm */,
</span><span class="cx">                          0A2D87FB107AF52B00CDDEE3 /* WebPluginHalterClient.h */,
</span><span class="lines">@@ -1926,7 +1926,7 @@
</span><span class="cx">                          1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */,
</span><span class="cx">                          939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */,
</span><span class="cx">                          37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */,
</span><del>-                               939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */,
</del><ins>+                                939811170824BF01008DF038 /* WebKeyGenerator.mm in Sources */,
</ins><span class="cx">                           939811030824BF01008DF038 /* WebKitErrors.m in Sources */,
</span><span class="cx">                          939810C30824BF01008DF038 /* WebKitLogging.m in Sources */,
</span><span class="cx">                          939810C40824BF01008DF038 /* WebKitNSStringExtras.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/ChangeLog   2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2011-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): keygen element doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=56402
+        <rdar://problem/9006545>
+
+        * WebCoreSupport/WebKeyGenerator.h:
+        * WebCoreSupport/WebKeyGenerator.m: Removed.
+        * WebCoreSupport/WebKeyGenerator.mm: Copied from Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m.
+        (+[WebKeyGenerator sharedGenerator]):
+        (toWebCertificateParseResult):
+        WebCore no longer needs WebKeyGenerator. Safari still does need a part of it, so keeping
+        this misnamed and misplaced code for now.
+
+        * WebCoreSupport/WebPlatformStrategies.h:
+        * WebCoreSupport/WebPlatformStrategies.mm:
+        (WebPlatformStrategies::keygenMenuItem512):
+        (WebPlatformStrategies::keygenMenuItem1024):
+        (WebPlatformStrategies::keygenMenuItem2048):
+        (WebPlatformStrategies::keygenKeychainItemName):
+        Added strings used by keygen.
+
+        * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize a WebCore
+        pointer to a function used by keygen.
+
+        * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): WebKeyGenerator can be lazily
+        initialized now.
+
</ins><span class="cx"> 2011-03-15  Beth Dakin  <bdakin@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon Fraser.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebKeyGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.h 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.h    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,29 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2011 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
</ins><span class="cx">  *
</span><del>- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</del><ins>+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="lines">@@ -34,14 +31,11 @@
</span><span class="cx"> 
</span><span class="cx"> #ifdef __OBJC__
</span><span class="cx"> 
</span><del>-#import <WebCore/WebCoreKeyGenerator.h>
</del><ins>+@interface WebKeyGenerator : NSObject
</ins><span class="cx"> 
</span><del>-@interface WebKeyGenerator : WebCoreKeyGenerator
-{
-    NSArray *strengthMenuItemTitles;
-}
-+ (void)createSharedGenerator;
</del><ins>++ (WebKeyGenerator *)sharedGenerator;
</ins><span class="cx"> - (WebCertificateParseResult)addCertificatesToKeychainFromData:(NSData *)data;
</span><ins>+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebKeyGeneratorm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,104 +0,0 @@
</span><del>-/*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <WebKit/WebKeyGenerator.h>
-
-#import "WebLocalizableStringsInternal.h"
-#import <WebKitSystemInterface.h>
-#import <wtf/Assertions.h>
-
-@implementation WebKeyGenerator
-
-+ (void)createSharedGenerator
-{
-    if (![self sharedGenerator]) {
-        [[[self alloc] init] release];
-    }
-    ASSERT([[self sharedGenerator] isKindOfClass:self]);
-}
-
-- (void)dealloc
-{
-    [strengthMenuItemTitles release];
-    [super dealloc];
-}
-
-- (NSArray *)strengthMenuItemTitles
-{
-    if (!strengthMenuItemTitles) {
-        strengthMenuItemTitles = [[NSArray alloc] initWithObjects:
-            UI_STRING_INTERNAL("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"),
-            UI_STRING_INTERNAL("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"),
-            UI_STRING_INTERNAL("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"), nil];
-    }
-    return strengthMenuItemTitles;
-}
-
-- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge pageURL:(NSURL *)pageURL
-{    
-    // This switch statement must always be synced with the UI strings returned by strengthMenuItemTitles.
-    UInt32 keySize;
-    switch (index) {
-        case 0:
-            keySize = 2048;
-            break;
-        case 1:
-            keySize = 1024;
-            break;
-        case 2:
-            keySize = 512;
-            break;
-        default:
-            return nil;
-    }
-    
-    NSString *keyDescription = [NSString stringWithFormat:UI_STRING_INTERNAL("Key from %@", "name of keychain key generated by the KEYGEN tag"), [pageURL host]];
-    return [(NSString *)WKSignedPublicKeyAndChallengeString(keySize, (CFStringRef)challenge, (CFStringRef)keyDescription) autorelease];
-}
-
-static inline WebCertificateParseResult toWebCertificateParseResult(WKCertificateParseResult result)
-{
-    switch (result) {
-    case WKCertificateParseResultSucceeded:
-        return WebCertificateParseResultSucceeded;
-    case WKCertificateParseResultFailed:
-        return WebCertificateParseResultFailed;
-    case WKCertificateParseResultPKCS7:
-        return WebCertificateParseResultPKCS7;
-    }
-
-    ASSERT_NOT_REACHED();
-    return WebCertificateParseResultFailed;
-}
-
-- (WebCertificateParseResult)addCertificatesToKeychainFromData:(NSData *)data
-{
-    return toWebCertificateParseResult(WKAddCertificatesToKeychainFromData([data bytes], [data length]));
-}
-
-@end
</del></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebKeyGeneratormmfromrev81063trunkSourceWebKitmacWebCoreSupportWebKeyGeneratorm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.mm (from rev 81063, trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m) (0 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.mm                                (rev 0)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.mm   2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2005, 2011 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit/WebKeyGenerator.h>
+
+#import <WebKitSystemInterface.h>
+#import <wtf/Assertions.h>
+
+@implementation WebKeyGenerator
+
++ (WebKeyGenerator *)sharedGenerator
+{
+    static WebKeyGenerator *sharedGenerator = [[WebKeyGenerator alloc] init];
+    return sharedGenerator;
+}
+
+static inline WebCertificateParseResult toWebCertificateParseResult(WKCertificateParseResult result)
+{
+    // FIXME: WebKeyGenerator is not used in WebKit, and this code should be moved to Safari.
+
+    switch (result) {
+    case WKCertificateParseResultSucceeded:
+        return WebCertificateParseResultSucceeded;
+    case WKCertificateParseResultFailed:
+        return WebCertificateParseResultFailed;
+    case WKCertificateParseResultPKCS7:
+        return WebCertificateParseResultPKCS7;
+    }
+
+    ASSERT_NOT_REACHED();
+    return WebCertificateParseResultFailed;
+}
+
+- (WebCertificateParseResult)addCertificatesToKeychainFromData:(NSData *)data
+{
+    return toWebCertificateParseResult(WKAddCertificatesToKeychainFromData([data bytes], [data length]));
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -153,6 +153,10 @@
</span><span class="cx">     virtual WTF::String crashedPluginText();
</span><span class="cx">     virtual WTF::String multipleFileUploadText(unsigned numberOfFiles);
</span><span class="cx">     virtual WTF::String unknownFileSizeText();
</span><ins>+    virtual WTF::String keygenMenuItem512();
+    virtual WTF::String keygenMenuItem1024();
+    virtual WTF::String keygenMenuItem2048();
+    virtual WTF::String keygenKeychainItemName(const WTF::String& host);
</ins><span class="cx">     virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize& size);
</span><span class="cx">     virtual WTF::String mediaElementLoadingStateText();
</span><span class="cx">     virtual WTF::String mediaElementLiveBroadcastStateText();
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm  2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm     2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -666,6 +666,26 @@
</span><span class="cx">     return UI_STRING_INTERNAL("Unknown", "Unknown filesize FTP directory listing item");
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String WebPlatformStrategies::keygenMenuItem512()
+{
+    return UI_STRING_INTERNAL("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenMenuItem1024()
+{
+    return UI_STRING_INTERNAL("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenMenuItem2048()
+{
+    return UI_STRING_INTERNAL("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenKeychainItemName(const WTF::String& host)
+{
+    return [NSString stringWithFormat:UI_STRING_INTERNAL("Key from %@", "Name of keychain key generated by the KEYGEN tag"), (NSString *)host];
+}
+
</ins><span class="cx"> String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size)
</span><span class="cx"> {
</span><span class="cx"> #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm     2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx">     INIT(GetHTTPPipeliningPriority);
</span><span class="cx">     INIT(GetMIMETypeForExtension);
</span><span class="cx">     INIT(GetNSURLResponseLastModifiedDate);
</span><ins>+    INIT(SignedPublicKeyAndChallengeString);
</ins><span class="cx">     INIT(GetPreferredExtensionForMIMEType);
</span><span class="cx">     INIT(GetWheelEventDeltas);
</span><span class="cx">     INIT(HitTestMediaUIPart);
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm  2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm     2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -308,7 +308,6 @@
</span><span class="cx">         WebCore::notifyHistoryItemChanged = WKNotifyHistoryItemChanged;
</span><span class="cx"> 
</span><span class="cx">         [WebViewFactory createSharedFactory];
</span><del>-        [WebKeyGenerator createSharedGenerator];
</del><span class="cx"> 
</span><span class="cx"> // FIXME: Remove the NSAppKitVersionNumberWithDeferredWindowDisplaySupport check once
</span><span class="cx"> // once AppKit's Deferred Window Display support is available.
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit2/ChangeLog      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2011-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (WebKit2): keygen element doesn't work
+        https://bugs.webkit.org/show_bug.cgi?id=56402
+        <rdar://problem/9006545>
+
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+        Added strings used by keygen.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
+        a function used by keygen.
+
</ins><span class="cx"> 2011-03-15  Beth Dakin  <bdakin@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon Fraser.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -771,6 +771,30 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+
+String WebPlatformStrategies::keygenMenuItem512()
+{
+    return UI_STRING("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenMenuItem1024()
+{
+    return UI_STRING("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenMenuItem2048()
+{
+    return UI_STRING("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu");
+}
+
+String WebPlatformStrategies::keygenKeychainItemName(const WTF::String& host)
+{
+    return UI_STRING("Key from <hostname>", "Name of keychain key generated by the KEYGEN tag").replace("<hostname>", host);
+}
+
+#endif
+
</ins><span class="cx"> String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: This should format the numbers correctly. In Mac WebKit, we used +[NSNumberFormatter localizedStringFromNumber:numberStyle:].
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h   2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h      2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -178,6 +178,12 @@
</span><span class="cx">     virtual String uploadFileText();
</span><span class="cx">     virtual String allFilesText();
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(MAC)
+    virtual String keygenMenuItem512();
+    virtual String keygenMenuItem1024();
+    virtual String keygenMenuItem2048();
+    virtual String keygenKeychainItemName(const String& host);
+#endif
</ins><span class="cx">     virtual String imageTitle(const String& filename, const WebCore::IntSize& size);
</span><span class="cx">     virtual String mediaElementLoadingStateText();
</span><span class="cx">     virtual String mediaElementLiveBroadcastStateText();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (81172 => 81173)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2011-03-15 21:02:24 UTC (rev 81172)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm    2011-03-15 21:15:40 UTC (rev 81173)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">         INIT(GetHTTPPipeliningPriority);
</span><span class="cx">         INIT(GetMIMETypeForExtension);
</span><span class="cx">         INIT(GetNSURLResponseLastModifiedDate);
</span><ins>+        INIT(SignedPublicKeyAndChallengeString);
</ins><span class="cx">         INIT(GetPreferredExtensionForMIMEType);
</span><span class="cx">         INIT(GetUserToBaseCTM);
</span><span class="cx">         INIT(GetWheelEventDeltas);
</span></span></pre>
</div>
</div>

</body>
</html>