<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[19988] trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/19988">19988</a></dd>
<dt>Author</dt> <dd>kdecker</dd>
<dt>Date</dt> <dd>2007-03-06 14:38:17 -0800 (Tue, 06 Mar 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre> Reviewed by Adele.
Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
* bindings/objc/DOM.mm:
(WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
* css/html4.css: Apply the look of the <select> element to <keygen>.
* html/HTMLElementFactory.cpp:
(WebCore::keygenConstructor): Added.
(WebCore::createFunctionMap): Added keygen.
* html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const.
(WebCore::HTMLSelectElement::HTMLSelectElement): Fix both HTMLSelectElement constructors to initialize the
same number of member variables. The fact that some fields were not initialized could (and would) crash the
keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
initialization because this is not needed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorebindingsobjcDOMmm">trunk/WebCore/bindings/objc/DOM.mm</a></li>
<li><a href="#trunkWebCorecsshtml4css">trunk/WebCore/css/html4.css</a></li>
<li><a href="#trunkWebCorehtmlHTMLElementFactorycpp">trunk/WebCore/html/HTMLElementFactory.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLSelectElementcpp">trunk/WebCore/html/HTMLSelectElement.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasthtmlkeygenexpectedtxt">trunk/LayoutTests/fast/html/keygen-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthtmlkeygenhtml">trunk/LayoutTests/fast/html/keygen.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/LayoutTests/ChangeLog        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2007-03-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Adele.
+
+ <rdar://problem/5041660>
+ When we made the switch to non-NSView form controls, <keygen> was accidentally left behind.
+ * fast/html/keygen-expected.txt: Added.
+ * fast/html/keygen.html: Added.
+
</ins><span class="cx"> 2007-03-06 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx">
</span><span class="cx"> Reviewed by Mitz.
</span></span></pre></div>
<a id="trunkLayoutTestsfasthtmlkeygenexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/html/keygen-expected.txt (0 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/html/keygen-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/html/keygen-expected.txt        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderMenuList {KEYGEN} at (2,2) size 148x18 [bgcolor=#FFFFFF]
+ RenderBlock (anonymous) at (8,2) size 117x13
+ RenderText at (0,0) size 99x13
+ text run at (0,0) width 99: "2048 (High Grade)"
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="trunkLayoutTestsfasthtmlkeygenhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/html/keygen.html (0 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/html/keygen.html         (rev 0)
+++ trunk/LayoutTests/fast/html/keygen.html        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+<html>
+<!--<rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for thawte email certs -->
+<keygen id="keygen" name="spkac" challange="9uXv8BxtVEKAed34">
+</html>
+
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/WebCore/ChangeLog        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2007-03-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Adele.
+
+ Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
+
+ * bindings/objc/DOM.mm:
+ (WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
+ * css/html4.css: Apply the look of the <select> element to <keygen>.
+ * html/HTMLElementFactory.cpp:
+ (WebCore::keygenConstructor): Added.
+ (WebCore::createFunctionMap): Added keygen.
+ * html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const.
+ (WebCore::HTMLSelectElement::HTMLSelectElement): Fix both HTMLSelectElement constructors to initialize the
+ same number of member variables. The fact that some fields were not initialized could (and would) crash the
+ keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
+ initialization because this is not needed.
+
+
</ins><span class="cx"> 2007-03-06 Kevin McCullough <kmccullough@apple.com>
</span><span class="cx">
</span><span class="cx"> Reviewed by Darin.
</span></span></pre></div>
<a id="trunkWebCorebindingsobjcDOMmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/objc/DOM.mm (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/objc/DOM.mm        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/WebCore/bindings/objc/DOM.mm        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -164,6 +164,7 @@
</span><span class="cx"> addElementClass(HTMLNames::preTag, [DOMHTMLPreElement class]);
</span><span class="cx"> addElementClass(HTMLNames::qTag, [DOMHTMLQuoteElement class]);
</span><span class="cx"> addElementClass(HTMLNames::scriptTag, [DOMHTMLScriptElement class]);
</span><ins>+ addElementClass(HTMLNames::keygenTag, [DOMHTMLSelectElement class]);
</ins><span class="cx"> addElementClass(HTMLNames::selectTag, [DOMHTMLSelectElement class]);
</span><span class="cx"> addElementClass(HTMLNames::styleTag, [DOMHTMLStyleElement class]);
</span><span class="cx"> addElementClass(HTMLNames::tableTag, [DOMHTMLTableElement class]);
</span></span></pre></div>
<a id="trunkWebCorecsshtml4css"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/html4.css (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/html4.css        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/WebCore/css/html4.css        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> -webkit-appearance: button;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input, textarea, select, button, isindex {
</del><ins>+input, textarea, keygen, select, button, isindex {
</ins><span class="cx"> margin: 0__qem;
</span><span class="cx"> font: -webkit-small-control;
</span><span class="cx"> color: initial;
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx"> -webkit-user-select: ignore
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, input[type="file"]:disabled::-webkit-file-upload-button, button:disabled, select:disabled, optgroup:disabled, option:disabled {
</del><ins>+input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, input[type="file"]:disabled::-webkit-file-upload-button, button:disabled, select:disabled, keygen:disabled, optgroup:disabled, option:disabled {
</ins><span class="cx"> color: GrayText
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx"> border-style: outset
</span><span class="cx"> }
</span><span class="cx">
</span><del>-select, button, input[type="button"], input[type="image"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"], input[type="file"]::-webkit-file-upload-button, img {
</del><ins>+select, keygen, button, input[type="button"], input[type="image"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"], input[type="file"]::-webkit-file-upload-button, img {
</ins><span class="cx"> -webkit-user-select: ignore
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx"> box-sizing: border-box;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-select {
</del><ins>+keygen, select {
</ins><span class="cx"> -webkit-appearance: menulist;
</span><span class="cx"> box-sizing: border-box;
</span><span class="cx"> -webkit-box-align: center;
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx"> -webkit-border-radius: initial;
</span><span class="cx"> white-space: initial;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> select[size="0"],
</span><span class="cx"> select[size="1"] {
</span><span class="cx"> -webkit-appearance: menulist;
</span><span class="lines">@@ -549,7 +549,7 @@
</span><span class="cx"> outline: none
</span><span class="cx"> }
</span><span class="cx">
</span><del>-input:focus, textarea:focus, isindex:focus, select:focus {
</del><ins>+input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus {
</ins><span class="cx"> outline-offset: -2px
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLElementFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLElementFactory.cpp (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLElementFactory.cpp        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/WebCore/html/HTMLElementFactory.cpp        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> #include "HTMLIFrameElement.h"
</span><span class="cx"> #include "HTMLImageElement.h"
</span><span class="cx"> #include "HTMLIsIndexElement.h"
</span><ins>+#include "HTMLKeygenElement.h"
</ins><span class="cx"> #include "HTMLLabelElement.h"
</span><span class="cx"> #include "HTMLLegendElement.h"
</span><span class="cx"> #include "HTMLLIElement.h"
</span><span class="lines">@@ -169,6 +170,11 @@
</span><span class="cx"> return new HTMLFieldSetElement(doc, form);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static PassRefPtr<HTMLElement> keygenConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+{
+ return new HTMLKeygenElement(doc, form);
+}
+
</ins><span class="cx"> static PassRefPtr<HTMLElement> labelConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
</span><span class="cx"> {
</span><span class="cx"> return new HTMLLabelElement(doc);
</span><span class="lines">@@ -422,6 +428,7 @@
</span><span class="cx"> addTag(inputTag, inputConstructor);
</span><span class="cx"> addTag(insTag, modConstructor);
</span><span class="cx"> addTag(isindexTag, isindexConstructor);
</span><ins>+ addTag(keygenTag, keygenConstructor);
</ins><span class="cx"> addTag(labelTag, labelConstructor);
</span><span class="cx"> addTag(legendTag, legendConstructor);
</span><span class="cx"> addTag(liTag, liConstructor);
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLSelectElement.cpp (19987 => 19988)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLSelectElement.cpp        2007-03-06 21:48:12 UTC (rev 19987)
+++ trunk/WebCore/html/HTMLSelectElement.cpp        2007-03-06 22:38:17 UTC (rev 19988)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> using namespace EventNames;
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx">
</span><del>-const DOMTimeStamp typeAheadTimeout = 1000;
</del><ins>+static const DOMTimeStamp typeAheadTimeout = 1000;
</ins><span class="cx">
</span><span class="cx"> HTMLSelectElement::HTMLSelectElement(Document* doc, HTMLFormElement* f)
</span><span class="cx"> : HTMLGenericFormElement(selectTag, doc, f)
</span><span class="lines">@@ -74,13 +74,22 @@
</span><span class="cx"> , m_activeSelectionState(false)
</span><span class="cx"> , m_repeatingChar(0)
</span><span class="cx"> , m_lastCharTime(0)
</span><del>- , m_typedString(String())
</del><span class="cx"> {
</span><span class="cx"> document()->registerFormElementWithState(this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> HTMLSelectElement::HTMLSelectElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* f)
</span><del>- : HTMLGenericFormElement(tagName, doc, f), m_minwidth(0), m_size(0), m_multiple(false), m_recalcListItems(false)
</del><ins>+ : HTMLGenericFormElement(tagName, doc, f)
+ , m_minwidth(0)
+ , m_size(0)
+ , m_multiple(false)
+ , m_recalcListItems(false)
+ , m_lastOnChangeIndex(-1)
+ , m_activeSelectionAnchorIndex(-1)
+ , m_activeSelectionEndIndex(-1)
+ , m_activeSelectionState(false)
+ , m_repeatingChar(0)
+ , m_lastCharTime(0)
</ins><span class="cx"> {
</span><span class="cx"> document()->registerFormElementWithState(this);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>