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

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

Issue 1312843008: Remove CSSParserMode argument on CSSParser::parseValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/core/css/DOMWindowCSS.cpp ('k') | Source/core/css/StylePropertySet.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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 return false; 498 return false;
499 } 499 }
500 500
501 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) 501 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font)
502 { 502 {
503 if (fontString.isEmpty()) 503 if (fontString.isEmpty())
504 return false; 504 return false;
505 505
506 // Interpret fontString in the same way as the 'font' attribute of CanvasRen deringContext2D. 506 // Interpret fontString in the same way as the 'font' attribute of CanvasRen deringContext2D.
507 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper tySet::create(HTMLQuirksMode); 507 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper tySet::create(HTMLStandardMode);
508 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true, HTMLStandardMode, 0); 508 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true, 0);
509 if (parsedStyle->isEmpty()) 509 if (parsedStyle->isEmpty())
510 return false; 510 return false;
511 511
512 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); 512 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont);
513 if (fontValue == "inherit" || fontValue == "initial") 513 if (fontValue == "inherit" || fontValue == "initial")
514 return false; 514 return false;
515 515
516 RefPtr<ComputedStyle> style = ComputedStyle::create(); 516 RefPtr<ComputedStyle> style = ComputedStyle::create();
517 517
518 FontFamily fontFamily; 518 FontFamily fontFamily;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 visitor->trace(m_loadedFonts); 587 visitor->trace(m_loadedFonts);
588 visitor->trace(m_failedFonts); 588 visitor->trace(m_failedFonts);
589 visitor->trace(m_nonCSSConnectedFaces); 589 visitor->trace(m_nonCSSConnectedFaces);
590 HeapSupplement<Document>::trace(visitor); 590 HeapSupplement<Document>::trace(visitor);
591 #endif 591 #endif
592 EventTargetWithInlineData::trace(visitor); 592 EventTargetWithInlineData::trace(visitor);
593 ActiveDOMObject::trace(visitor); 593 ActiveDOMObject::trace(visitor);
594 } 594 }
595 595
596 } // namespace blink 596 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/DOMWindowCSS.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698