<!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>[175043] 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/175043">175043</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-22 04:16:39 -0700 (Wed, 22 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919

Patch by Tibor Meszaros &lt;tmeszaros.u-szeged@partner.samsung.com&gt; on 2014-10-22
Reviewed by Andreas Kling.

This patch is a merge of Blink's
Source/WebCore:

https://chromiumcodereview.appspot.com/15994009

Currently, bolder and lighter change font-weight in a non-compliant way.
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight values,
so we should match those.

The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).

and https://codereview.chromium.org/137813004

According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
that inherited weight before calculating 'lighter' and 'bolder'.

Tests: css3/font-weight-multiple-selectors.html
       css3/font-weight.html

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontWeight::applyValue):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::lighterWeight):
(WebCore::FontDescription::bolderWeight):

LayoutTests:

https://chromiumcodereview.appspot.com/15994009 and
https://codereview.chromium.org/137813004

* css3/font-weight-expected.txt: Added.
* css3/font-weight-multiple-selectors-expected.txt: Added.
* css3/font-weight-multiple-selectors.html: Added.
* css3/font-weight.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDescriptioncpp">trunk/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3fontweightexpectedtxt">trunk/LayoutTests/css3/font-weight-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3fontweightmultipleselectorsexpectedtxt">trunk/LayoutTests/css3/font-weight-multiple-selectors-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3fontweightmultipleselectorshtml">trunk/LayoutTests/css3/font-weight-multiple-selectors.html</a></li>
<li><a href="#trunkLayoutTestscss3fontweighthtml">trunk/LayoutTests/css3/font-weight.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (175042 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-22 10:32:29 UTC (rev 175042)
+++ trunk/LayoutTests/ChangeLog        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-10-22  Tibor Meszaros  &lt;tmeszaros.u-szeged@partner.samsung.com&gt;
+
+        Match spec for font-weight: bolder|lighter
+        https://bugs.webkit.org/show_bug.cgi?id=137919
+
+        Reviewed by Andreas Kling.
+
+        This patch is a merge of Blink's
+        https://chromiumcodereview.appspot.com/15994009 and
+        https://codereview.chromium.org/137813004
+
+        * css3/font-weight-expected.txt: Added.
+        * css3/font-weight-multiple-selectors-expected.txt: Added.
+        * css3/font-weight-multiple-selectors.html: Added.
+        * css3/font-weight.html: Added.
+
</ins><span class="cx"> 2014-10-22  Dhi Aurrahman  &lt;diorahman@rockybars.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add relList to the anchor, area and link elements
</span></span></pre></div>
<a id="trunkLayoutTestscss3fontweightexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-weight-expected.txt (0 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-weight-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/font-weight-expected.txt        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+Test that font-weight: bolder and font-weight: lighter behave according to spec.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS getComputedStyle(outer).fontWeight is &quot;100&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;200&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;300&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;500&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;600&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;800&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;900&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;bold&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3fontweightmultipleselectorsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-weight-multiple-selectors-expected.txt (0 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-weight-multiple-selectors-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/font-weight-multiple-selectors-expected.txt        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+Test that font-weight: bolder and font-weight: lighter are not cumulative when multiple selectors apply.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS getComputedStyle(outer).fontWeight is &quot;100&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;200&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;300&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;500&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;100&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;600&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;normal&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;800&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;bold&quot;
+PASS getComputedStyle(outer).fontWeight is &quot;900&quot;
+PASS getComputedStyle(bolder).fontWeight is &quot;900&quot;
+PASS getComputedStyle(lighter).fontWeight is &quot;bold&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3fontweightmultipleselectorshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-weight-multiple-selectors.html (0 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-weight-multiple-selectors.html                                (rev 0)
+++ trunk/LayoutTests/css3/font-weight-multiple-selectors.html        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+#outer &gt; div { font-weight: bolder; }
+#outer &gt; div#bolder { font-weight: bolder; }
+#outer &gt; div#lighter { font-weight: lighter; }
+&lt;/style&gt;
+&lt;script src=&quot;../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;outer&quot;&gt;
+    &lt;div id=&quot;bolder&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;lighter&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description('Test that font-weight: bolder and font-weight: lighter are not cumulative when multiple selectors apply.');
+
+table = [
+[&quot;100&quot;   , &quot;100&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;200&quot;   , &quot;200&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;300&quot;   , &quot;300&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;400&quot;   , &quot;normal&quot;, &quot;bold&quot;  , &quot;100&quot;],
+[&quot;normal&quot;, &quot;normal&quot;, &quot;bold&quot;  , &quot;100&quot;],
+[&quot;500&quot;   , &quot;500&quot;   , &quot;bold&quot;  , &quot;100&quot;],
+[&quot;600&quot;   , &quot;600&quot;   , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;700&quot;   , &quot;bold&quot;  , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;bold&quot;  , &quot;bold&quot;  , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;800&quot;   , &quot;800&quot;   , &quot;900&quot;   , &quot;bold&quot;],
+[&quot;900&quot;   , &quot;900&quot;   , &quot;900&quot;   , &quot;bold&quot;],
+];
+
+var outer = document.getElementById(&quot;outer&quot;);
+var bolder = document.getElementById(&quot;bolder&quot;);
+var lighter = document.getElementById(&quot;lighter&quot;);
+for(var i=0; i&lt;table.length; i++) {
+    outer.style.fontWeight = table[i][0];
+    shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]);
+    shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]);
+    shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]);
+}
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscss3fontweighthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/font-weight.html (0 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/font-weight.html                                (rev 0)
+++ trunk/LayoutTests/css3/font-weight.html        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+#bolder { font-weight: bolder; }
+#lighter { font-weight: lighter; }
+&lt;/style&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;outer&quot;&gt;
+    &lt;div id=&quot;bolder&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;lighter&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description('Test that font-weight: bolder and font-weight: lighter behave according to spec.');
+
+table = [
+[&quot;100&quot;   , &quot;100&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;200&quot;   , &quot;200&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;300&quot;   , &quot;300&quot;   , &quot;normal&quot;, &quot;100&quot;],
+[&quot;400&quot;   , &quot;normal&quot;, &quot;bold&quot;  , &quot;100&quot;],
+[&quot;normal&quot;, &quot;normal&quot;, &quot;bold&quot;  , &quot;100&quot;],
+[&quot;500&quot;   , &quot;500&quot;   , &quot;bold&quot;  , &quot;100&quot;],
+[&quot;600&quot;   , &quot;600&quot;   , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;700&quot;   , &quot;bold&quot;  , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;bold&quot;  , &quot;bold&quot;  , &quot;900&quot;   , &quot;normal&quot;],
+[&quot;800&quot;   , &quot;800&quot;   , &quot;900&quot;   , &quot;bold&quot;],
+[&quot;900&quot;   , &quot;900&quot;   , &quot;900&quot;   , &quot;bold&quot;],
+];
+
+var outer = document.getElementById(&quot;outer&quot;);
+var bolder = document.getElementById(&quot;bolder&quot;);
+var lighter = document.getElementById(&quot;lighter&quot;);
+for(var i=0; i&lt;table.length; i++) {
+    outer.style.fontWeight = table[i][0];
+    shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]);
+    shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]);
+    shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]);
+}
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175042 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-22 10:32:29 UTC (rev 175042)
+++ trunk/Source/WebCore/ChangeLog        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-10-22  Tibor Meszaros  &lt;tmeszaros.u-szeged@partner.samsung.com&gt;
+
+        Match spec for font-weight: bolder|lighter
+        https://bugs.webkit.org/show_bug.cgi?id=137919
+
+        Reviewed by Andreas Kling.
+
+        This patch is a merge of Blink's
+        https://chromiumcodereview.appspot.com/15994009
+        
+        Currently, bolder and lighter change font-weight in a non-compliant way.
+        The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
+        exactly what the computed values should be given the inherited weight values,
+        so we should match those.
+        
+        The removed FIXME's for selecting the next lightest/heaviest weight from
+        the used font family seems to refer to behaviour from
+        CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
+        with a simpler procedure for resolving bolder and lighter in font weights
+        in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
+        
+        and https://codereview.chromium.org/137813004
+        
+        According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
+        weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
+        that inherited weight before calculating 'lighter' and 'bolder'.
+
+        Tests: css3/font-weight-multiple-selectors.html
+               css3/font-weight.html
+
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyFontWeight::applyValue):
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::FontDescription::lighterWeight):
+        (WebCore::FontDescription::bolderWeight):
+
</ins><span class="cx"> 2014-10-22  Rohit Kumar  &lt;kumar.rohit@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK]: Fix unused parameter build warnings in WebCore/platform module
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (175042 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-22 10:32:29 UTC (rev 175042)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -928,9 +928,11 @@
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             break;
</span><span class="cx">         case CSSValueBolder:
</span><ins>+            fontDescription.setWeight(styleResolver-&gt;parentStyle()-&gt;fontDescription().weight());
</ins><span class="cx">             fontDescription.setWeight(fontDescription.bolderWeight());
</span><span class="cx">             break;
</span><span class="cx">         case CSSValueLighter:
</span><ins>+            fontDescription.setWeight(styleResolver-&gt;parentStyle()-&gt;fontDescription().weight());
</ins><span class="cx">             fontDescription.setWeight(fontDescription.lighterWeight());
</span><span class="cx">             break;
</span><span class="cx">         default:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (175042 => 175043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2014-10-22 10:32:29 UTC (rev 175042)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2014-10-22 11:16:39 UTC (rev 175043)
</span><span class="lines">@@ -44,27 +44,19 @@
</span><span class="cx"> 
</span><span class="cx"> FontWeight FontDescription::lighterWeight(void) const
</span><span class="cx"> {
</span><del>-    // FIXME: Should actually return the CSS weight corresponding to next lightest
-    // weight of the currently used font family.
</del><span class="cx">     switch (m_weight) {
</span><span class="cx">         case FontWeight100:
</span><span class="cx">         case FontWeight200:
</span><del>-            return FontWeight100;
-
</del><span class="cx">         case FontWeight300:
</span><del>-            return FontWeight200;
-
</del><span class="cx">         case FontWeight400:
</span><span class="cx">         case FontWeight500:
</span><del>-            return FontWeight300;
</del><ins>+            return FontWeight100;
</ins><span class="cx"> 
</span><span class="cx">         case FontWeight600:
</span><span class="cx">         case FontWeight700:
</span><span class="cx">             return FontWeight400;
</span><span class="cx"> 
</span><span class="cx">         case FontWeight800:
</span><del>-            return FontWeight500;
-
</del><span class="cx">         case FontWeight900:
</span><span class="cx">             return FontWeight700;
</span><span class="cx">     }
</span><span class="lines">@@ -74,13 +66,9 @@
</span><span class="cx"> 
</span><span class="cx"> FontWeight FontDescription::bolderWeight(void) const
</span><span class="cx"> {
</span><del>-    // FIXME: Should actually return the CSS weight corresponding to next heaviest
-    // weight of the currently used font family.
</del><span class="cx">     switch (m_weight) {
</span><span class="cx">         case FontWeight100:
</span><span class="cx">         case FontWeight200:
</span><del>-            return FontWeight300;
-
</del><span class="cx">         case FontWeight300:
</span><span class="cx">             return FontWeight400;
</span><span class="cx"> 
</span><span class="lines">@@ -90,8 +78,6 @@
</span><span class="cx"> 
</span><span class="cx">         case FontWeight600:
</span><span class="cx">         case FontWeight700:
</span><del>-            return FontWeight800;
-
</del><span class="cx">         case FontWeight800:
</span><span class="cx">         case FontWeight900:
</span><span class="cx">             return FontWeight900;
</span></span></pre>
</div>
</div>

</body>
</html>