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

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

Issue 199423003: Add plumbing for font-stretch (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/CSSShorthands.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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 defaultFontDescription.setSpecifiedSize(defaultFontSize); 490 defaultFontDescription.setSpecifiedSize(defaultFontSize);
491 defaultFontDescription.setComputedSize(defaultFontSize); 491 defaultFontDescription.setComputedSize(defaultFontSize);
492 492
493 style->setFontDescription(defaultFontDescription); 493 style->setFontDescription(defaultFontDescription);
494 494
495 style->font().update(style->font().fontSelector()); 495 style->font().update(style->font().fontSelector());
496 496
497 // Now map the font property longhands into the style. 497 // Now map the font property longhands into the style.
498 CSSPropertyValue properties[] = { 498 CSSPropertyValue properties[] = {
499 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), 499 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle),
500 CSSPropertyValue(CSSPropertyFontStretch, *parsedStyle),
500 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), 501 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle),
501 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), 502 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle),
502 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), 503 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle),
503 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), 504 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle),
504 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), 505 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle),
505 }; 506 };
506 StyleResolver& styleResolver = document()->ensureStyleResolver(); 507 StyleResolver& styleResolver = document()->ensureStyleResolver();
507 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), style.get()); 508 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), style.get());
508 509
509 font = style->font(); 510 font = style->font();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 551 }
551 552
552 void FontFaceSet::didLayout(Document& document) 553 void FontFaceSet::didLayout(Document& document)
553 { 554 {
554 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName()))) 555 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName())))
555 fonts->didLayout(); 556 fonts->didLayout();
556 } 557 }
557 558
558 559
559 } // namespace WebCore 560 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSShorthands.in ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698