<!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>[20678] trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20678">20678</a></dd>
<dt>Author</dt> <dd>bdash</dd>
<dt>Date</dt> <dd>2007-04-03 05:56:28 -0700 (Tue, 03 Apr 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>2007-04-03 Mitz Pettel <mitz@webkit.org>
Reviewed by Darin.
- fix http://bugs.webkit.org/show_bug.cgi?id=13251
editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
Covered by existing editing tests.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::getFloatValue): Added ASSERTs that the requested conversion
is from a scalar type to a scalar type. The intermittent failures in the test were
the result of trying to convert an identifier type to a scalar type.
* editing/ApplyStyleCommand.cpp:
(WebCore::StyleChange::checkForLegacyHTMLStyleChange): Added a check that the
font-size property value is an absolute length. If it is not (such as in the case
of relative units or keywords like "x-large"), then no corresponding 'size' attribute
will be generated for legacy HTML.
2007-04-03 Mitz Pettel <mitz@webkit.org>
Reviewed by Darin.
- updated results for http://bugs.webkit.org/show_bug.cgi?id=13251
editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
* editing/style/block-style-004-expected.txt:
* editing/style/block-style-005-expected.txt:
* editing/style/block-style-006-expected.txt:
* editing/style/fontsize-1-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingstyleblockstyle004expectedtxt">trunk/LayoutTests/editing/style/block-style-004-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingstyleblockstyle005expectedtxt">trunk/LayoutTests/editing/style/block-style-005-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingstyleblockstyle006expectedtxt">trunk/LayoutTests/editing/style/block-style-006-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingstylefontsize1expectedtxt">trunk/LayoutTests/editing/style/fontsize-1-expected.txt</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorecssCSSPrimitiveValuecpp">trunk/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkWebCoreeditingApplyStyleCommandcpp">trunk/WebCore/editing/ApplyStyleCommand.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/LayoutTests/ChangeLog        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2007-04-03 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Darin.
+
+ - updated results for http://bugs.webkit.org/show_bug.cgi?id=13251
+ editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
+
+ * editing/style/block-style-004-expected.txt:
+ * editing/style/block-style-005-expected.txt:
+ * editing/style/block-style-006-expected.txt:
+ * editing/style/fontsize-1-expected.txt:
+
</ins><span class="cx"> 2007-04-03 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> Reviewed by Hyatt.
</span></span></pre></div>
<a id="trunkLayoutTestseditingstyleblockstyle004expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/block-style-004-expected.txt (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/block-style-004-expected.txt        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/LayoutTests/editing/style/block-style-004-expected.txt        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><del>-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</del><ins>+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</ins><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="lines">@@ -45,21 +45,18 @@
</span><span class="cx"> text run at (14,98) width 557: "REGRESSION (Mail): Style not preserved on blank lines"
</span><span class="cx"> RenderBlock {DIV} at (0,164) size 784x220
</span><span class="cx"> RenderBlock {DIV} at (0,0) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 24x13
- RenderInline {SPAN} at (0,0) size 24x55
- RenderText {#text} at (0,0) size 24x55
- text run at (0,0) width 24: "x"
</del><ins>+ RenderInline {SPAN} at (0,0) size 24x55
+ RenderText {#text} at (0,0) size 24x55
+ text run at (0,0) width 24: "x"
</ins><span class="cx"> RenderBlock {DIV} at (0,55) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 0x13
- RenderInline {SPAN} at (0,0) size 0x55
- RenderBR {BR} at (0,0) size 0x55
</del><ins>+ RenderInline {SPAN} at (0,0) size 0x55
+ RenderBR {BR} at (0,0) size 0x55
</ins><span class="cx"> RenderBlock {DIV} at (0,110) size 784x55
</span><span class="cx"> RenderInline {FONT} at (0,0) size 0x55
</span><span class="cx"> RenderInline {SPAN} at (0,0) size 0x55
</span><span class="cx"> RenderBR {BR} at (0,0) size 0x55
</span><span class="cx"> RenderBlock {DIV} at (0,165) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 24x13
- RenderInline {SPAN} at (0,0) size 24x55
- RenderText {#text} at (0,0) size 24x55
- text run at (0,0) width 24: "x"
</del><ins>+ RenderInline {SPAN} at (0,0) size 24x55
+ RenderText {#text} at (0,0) size 24x55
+ text run at (0,0) width 24: "x"
</ins><span class="cx"> caret: position 0 of child 0 {BR} of child 0 {SPAN} of child 0 {FONT} of child 3 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
</span></span></pre></div>
<a id="trunkLayoutTestseditingstyleblockstyle005expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/block-style-005-expected.txt (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/block-style-005-expected.txt        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/LayoutTests/editing/style/block-style-005-expected.txt        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -15,11 +15,11 @@
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><del>-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</del><ins>+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</ins><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><del>-EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document
</del><ins>+EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document
</ins><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="lines">@@ -48,14 +48,12 @@
</span><span class="cx"> text run at (14,98) width 106: "blank lines"
</span><span class="cx"> RenderBlock {DIV} at (0,164) size 784x165
</span><span class="cx"> RenderBlock {DIV} at (0,0) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 24x13
- RenderInline {SPAN} at (0,0) size 24x55
- RenderText {#text} at (0,0) size 24x55
- text run at (0,0) width 24: "x"
</del><ins>+ RenderInline {SPAN} at (0,0) size 24x55
+ RenderText {#text} at (0,0) size 24x55
+ text run at (0,0) width 24: "x"
</ins><span class="cx"> RenderBlock {DIV} at (0,55) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 0x13
- RenderInline {SPAN} at (0,0) size 0x55
- RenderBR {BR} at (0,0) size 0x55
</del><ins>+ RenderInline {SPAN} at (0,0) size 0x55
+ RenderBR {BR} at (0,0) size 0x55
</ins><span class="cx"> RenderBlock {DIV} at (0,110) size 784x55
</span><span class="cx"> RenderInline {FONT} at (0,0) size 0x55
</span><span class="cx"> RenderInline {SPAN} at (0,0) size 0x55
</span></span></pre></div>
<a id="trunkLayoutTestseditingstyleblockstyle006expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/block-style-006-expected.txt (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/block-style-006-expected.txt        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/LayoutTests/editing/style/block-style-006-expected.txt        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><del>-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > FONT > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</del><ins>+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
</ins><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
</span><span class="cx"> EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</span><span class="lines">@@ -45,21 +45,18 @@
</span><span class="cx"> text run at (14,98) width 273: "not preserved on blank lines"
</span><span class="cx"> RenderBlock {DIV} at (0,164) size 784x220
</span><span class="cx"> RenderBlock {DIV} at (0,0) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 24x13
- RenderInline {SPAN} at (0,0) size 24x55
- RenderText {#text} at (0,0) size 24x55
- text run at (0,0) width 24: "x"
</del><ins>+ RenderInline {SPAN} at (0,0) size 24x55
+ RenderText {#text} at (0,0) size 24x55
+ text run at (0,0) width 24: "x"
</ins><span class="cx"> RenderBlock {DIV} at (0,55) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 0x13
- RenderInline {SPAN} at (0,0) size 0x55
- RenderBR {BR} at (0,0) size 0x55
</del><ins>+ RenderInline {SPAN} at (0,0) size 0x55
+ RenderBR {BR} at (0,0) size 0x55
</ins><span class="cx"> RenderBlock {DIV} at (0,110) size 784x55
</span><span class="cx"> RenderInline {FONT} at (0,0) size 0x55
</span><span class="cx"> RenderInline {SPAN} at (0,0) size 0x55
</span><span class="cx"> RenderBR {BR} at (0,0) size 0x55
</span><span class="cx"> RenderBlock {DIV} at (0,165) size 784x55
</span><del>- RenderInline {FONT} at (0,0) size 24x13
- RenderInline {SPAN} at (0,0) size 24x55
- RenderText {#text} at (0,0) size 24x55
- text run at (0,0) width 24: "x"
-caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 0 {FONT} of child 4 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
</del><ins>+ RenderInline {SPAN} at (0,0) size 24x55
+ RenderText {#text} at (0,0) size 24x55
+ text run at (0,0) width 24: "x"
+caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 4 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
</ins></span></pre></div>
<a id="trunkLayoutTestseditingstylefontsize1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/fontsize-1-expected.txt (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/fontsize-1-expected.txt        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/LayoutTests/editing/style/fontsize-1-expected.txt        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -8,17 +8,14 @@
</span><span class="cx"> text run at (0,0) width 260: "This test execCommand(\"FontSize\", ...). "
</span><span class="cx"> text run at (260,0) width 503: "You should see 'small' 'medium' and 'large' below in every increasing font sizes."
</span><span class="cx"> RenderBlock {DIV} at (0,34) size 784x37
</span><del>- RenderInline {FONT} at (0,0) size 152x13
- RenderInline {SPAN} at (0,0) size 29x15
- RenderText {#text} at (0,17) size 29x15
- text run at (0,17) width 29: "small"
- RenderInline {FONT} at (0,0) size 123x13
- RenderInline {SPAN} at (0,0) size 59x22
- RenderText {#text} at (29,12) size 59x22
- text run at (29,12) width 59: "medium"
- RenderInline {FONT} at (0,0) size 64x13
- RenderInline {SPAN} at (0,0) size 64x37
- RenderText {#text} at (88,0) size 64x37
- text run at (88,0) width 64: "large"
</del><ins>+ RenderInline {SPAN} at (0,0) size 29x15
+ RenderText {#text} at (0,17) size 29x15
+ text run at (0,17) width 29: "small"
+ RenderInline {SPAN} at (0,0) size 59x22
+ RenderText {#text} at (29,12) size 59x22
+ text run at (29,12) width 59: "medium"
+ RenderInline {SPAN} at (0,0) size 64x37
+ RenderText {#text} at (88,0) size 64x37
+ text run at (88,0) width 64: "large"
</ins><span class="cx"> RenderBlock {UL} at (0,87) size 784x0
</span><del>-caret: position 5 of child 0 {#text} of child 0 {SPAN} of child 1 {FONT} of child 1 {FONT} of child 0 {FONT} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
</del><ins>+caret: position 5 of child 0 {#text} of child 2 {SPAN} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/WebCore/ChangeLog        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -2,6 +2,25 @@
</span><span class="cx">
</span><span class="cx"> Reviewed by Darin.
</span><span class="cx">
</span><ins>+ - fix http://bugs.webkit.org/show_bug.cgi?id=13251
+ editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
+
+ Covered by existing editing tests.
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::getFloatValue): Added ASSERTs that the requested conversion
+ is from a scalar type to a scalar type. The intermittent failures in the test were
+ the result of trying to convert an identifier type to a scalar type.
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::checkForLegacyHTMLStyleChange): Added a check that the
+ font-size property value is an absolute length. If it is not (such as in the case
+ of relative units or keywords like "x-large"), then no corresponding 'size' attribute
+ will be generated for legacy HTML.
+
+2007-04-03 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Darin.
+
</ins><span class="cx"> - fix http://bugs.webkit.org/show_bug.cgi?id=13218
</span><span class="cx"> <rdar://problem/5095977>
</span><span class="cx"> Reproducible crash after call to window.close()
</span></span></pre></div>
<a id="trunkWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/css/CSSPrimitiveValue.cpp (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/css/CSSPrimitiveValue.cpp        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/WebCore/css/CSSPrimitiveValue.cpp        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -369,6 +369,9 @@
</span><span class="cx">
</span><span class="cx"> double CSSPrimitiveValue::getFloatValue(unsigned short unitType)
</span><span class="cx"> {
</span><ins>+ ASSERT(m_type <= CSS_DIMENSION);
+ ASSERT(unitType <= CSS_DIMENSION);
+
</ins><span class="cx"> if (unitType == m_type || unitType < CSS_PX || unitType > CSS_PC)
</span><span class="cx"> return m_value.num;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/editing/ApplyStyleCommand.cpp (20677 => 20678)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/editing/ApplyStyleCommand.cpp        2007-04-03 12:51:55 UTC (rev 20677)
+++ trunk/WebCore/editing/ApplyStyleCommand.cpp        2007-04-03 12:56:28 UTC (rev 20678)
</span><span class="lines">@@ -169,6 +169,11 @@
</span><span class="cx"> case CSS_PROP_FONT_SIZE:
</span><span class="cx"> if (property->value()->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) {
</span><span class="cx"> CSSPrimitiveValue *value = static_cast<CSSPrimitiveValue *>(property->value());
</span><ins>+
+ if (value->primitiveType() < CSSPrimitiveValue::CSS_PX || value->primitiveType() > CSSPrimitiveValue::CSS_PC)
+ // Size keyword or relative unit.
+ return false;
+
</ins><span class="cx"> float number = value->getFloatValue(CSSPrimitiveValue::CSS_PX);
</span><span class="cx"> if (number <= 9)
</span><span class="cx"> m_applyFontSize = "1";
</span></span></pre>
</div>
</div>
</body>
</html>