Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: Source/core/css/FontFace.cpp

Issue 130783004: Add support for font-weight: lighter for web fonts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/css/webfont-lighter-weight-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 break; 430 break;
431 case CSSValue500: 431 case CSSValue500:
432 traitsMask |= FontWeight500Mask; 432 traitsMask |= FontWeight500Mask;
433 break; 433 break;
434 case CSSValue300: 434 case CSSValue300:
435 traitsMask |= FontWeight300Mask; 435 traitsMask |= FontWeight300Mask;
436 break; 436 break;
437 case CSSValue200: 437 case CSSValue200:
438 traitsMask |= FontWeight200Mask; 438 traitsMask |= FontWeight200Mask;
439 break; 439 break;
440 case CSSValueLighter:
440 case CSSValue100: 441 case CSSValue100:
441 traitsMask |= FontWeight100Mask; 442 traitsMask |= FontWeight100Mask;
442 break; 443 break;
443 default: 444 default:
445 ASSERT_NOT_REACHED();
444 break; 446 break;
445 } 447 }
446 } else { 448 } else {
447 traitsMask |= FontWeight400Mask; 449 traitsMask |= FontWeight400Mask;
448 } 450 }
449 451
450 if (RefPtr<CSSValue> fontVariant = m_variant) { 452 if (RefPtr<CSSValue> fontVariant = m_variant) {
451 // font-variant descriptor can be a value list. 453 // font-variant descriptor can be a value list.
452 if (fontVariant->isPrimitiveValue()) { 454 if (fontVariant->isPrimitiveValue()) {
453 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 455 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 unsigned numRanges = rangeList->length(); 533 unsigned numRanges = rangeList->length();
532 for (unsigned i = 0; i < numRanges; i++) { 534 for (unsigned i = 0; i < numRanges; i++) {
533 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item WithoutBoundsCheck(i)); 535 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item WithoutBoundsCheck(i));
534 cssFontFace->ranges().add(range->from(), range->to()); 536 cssFontFace->ranges().add(range->from(), range->to());
535 } 537 }
536 } 538 }
537 return cssFontFace; 539 return cssFontFace;
538 } 540 }
539 541
540 } // namespace WebCore 542 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/webfont-lighter-weight-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698