RESOLVED FIXED 137919
Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919
Summary Match spec for font-weight: bolder|lighter
Tibor Mészáros
Reported 2014-10-21 06:21:06 PDT
Consider merging https://chromiumcodereview.appspot.com/15994009 and https://codereview.chromium.org/137813004 from blink to make font-weight: bolder/lighter work correctly. Match spec for font-weight: bolder|lighter 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). Multiple selectors setting relative font-weight names to an element result in a cumulative result 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'.
Attachments
Patch (12.98 KB, patch)
2014-10-21 06:50 PDT, Tibor Mészáros
kling: review+
kling: commit-queue-
patch for landing (12.96 KB, patch)
2014-10-22 03:31 PDT, Tibor Mészáros
no flags
Tibor Mészáros
Comment 1 2014-10-21 06:50:28 PDT
Andreas Kling
Comment 2 2014-10-21 14:00:17 PDT
Comment on attachment 240199 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240199&action=review Looks nice. r=me > Source/WebCore/ChangeLog:29 > + css3/font-wight.html font-wight -> font-weight
Tibor Mészáros
Comment 3 2014-10-22 03:31:16 PDT
Created attachment 240260 [details] patch for landing patch for landing
WebKit Commit Bot
Comment 4 2014-10-22 04:16:38 PDT
Comment on attachment 240260 [details] patch for landing Clearing flags on attachment: 240260 Committed r175043: <http://trac.webkit.org/changeset/175043>
WebKit Commit Bot
Comment 5 2014-10-22 04:16:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.