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

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

Issue 203523002: Reland "Add plumbing for font-stretch" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: w/fix for ASSERT Created 6 years, 5 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 | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | 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 met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 defaultFontDescription.setSpecifiedSize(defaultFontSize); 526 defaultFontDescription.setSpecifiedSize(defaultFontSize);
527 defaultFontDescription.setComputedSize(defaultFontSize); 527 defaultFontDescription.setComputedSize(defaultFontSize);
528 528
529 style->setFontDescription(defaultFontDescription); 529 style->setFontDescription(defaultFontDescription);
530 530
531 style->font().update(style->font().fontSelector()); 531 style->font().update(style->font().fontSelector());
532 532
533 // Now map the font property longhands into the style. 533 // Now map the font property longhands into the style.
534 CSSPropertyValue properties[] = { 534 CSSPropertyValue properties[] = {
535 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), 535 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle),
536 CSSPropertyValue(CSSPropertyFontStretch, *parsedStyle),
536 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), 537 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle),
537 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), 538 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle),
538 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), 539 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle),
539 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), 540 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle),
540 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), 541 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle),
541 }; 542 };
542 StyleResolver& styleResolver = document()->ensureStyleResolver(); 543 StyleResolver& styleResolver = document()->ensureStyleResolver();
543 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), style.get()); 544 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), style.get());
544 545
545 font = style->font(); 546 font = style->font();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 visitor->trace(m_loadingFonts); 598 visitor->trace(m_loadingFonts);
598 visitor->trace(m_loadedFonts); 599 visitor->trace(m_loadedFonts);
599 visitor->trace(m_failedFonts); 600 visitor->trace(m_failedFonts);
600 visitor->trace(m_nonCSSConnectedFaces); 601 visitor->trace(m_nonCSSConnectedFaces);
601 DocumentSupplement::trace(visitor); 602 DocumentSupplement::trace(visitor);
602 EventTargetWithInlineData::trace(visitor); 603 EventTargetWithInlineData::trace(visitor);
603 } 604 }
604 #endif 605 #endif
605 606
606 } // namespace blink 607 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698