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

Side by Side Diff: sky/engine/core/css/FontFaceSet.cpp

Issue 860423004: Remove css !important (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/css/FontFace.cpp ('k') | sky/engine/core/css/PropertySetCSSStyleDeclaration.h » ('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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return false; 487 return false;
488 } 488 }
489 489
490 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) 490 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font)
491 { 491 {
492 if (fontString.isEmpty()) 492 if (fontString.isEmpty())
493 return false; 493 return false;
494 494
495 // Interpret fontString in the same way as the 'font' attribute of CanvasRen deringContext2D. 495 // Interpret fontString in the same way as the 'font' attribute of CanvasRen deringContext2D.
496 RefPtr<MutableStylePropertySet> parsedStyle = MutableStylePropertySet::creat e(); 496 RefPtr<MutableStylePropertySet> parsedStyle = MutableStylePropertySet::creat e();
497 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, t rue, HTMLStandardMode, 0); 497 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, H TMLStandardMode, 0);
498 if (parsedStyle->isEmpty()) 498 if (parsedStyle->isEmpty())
499 return false; 499 return false;
500 500
501 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); 501 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont);
502 if (fontValue == "inherit" || fontValue == "initial") 502 if (fontValue == "inherit" || fontValue == "initial")
503 return false; 503 return false;
504 504
505 RefPtr<RenderStyle> style = RenderStyle::create(); 505 RefPtr<RenderStyle> style = RenderStyle::create();
506 506
507 FontFamily fontFamily; 507 FontFamily fontFamily;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 return fonts.release(); 572 return fonts.release();
573 } 573 }
574 574
575 void FontFaceSet::didLayout(Document& document) 575 void FontFaceSet::didLayout(Document& document)
576 { 576 {
577 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName()))) 577 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName())))
578 fonts->didLayout(); 578 fonts->didLayout();
579 } 579 }
580 580
581 } // namespace blink 581 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/FontFace.cpp ('k') | sky/engine/core/css/PropertySetCSSStyleDeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698