Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 } | 438 } |
| 439 | 439 |
| 440 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) { | 440 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) { |
| 441 if (fontString.isEmpty()) | 441 if (fontString.isEmpty()) |
| 442 return false; | 442 return false; |
| 443 | 443 |
| 444 // Interpret fontString in the same way as the 'font' attribute of | 444 // Interpret fontString in the same way as the 'font' attribute of |
| 445 // CanvasRenderingContext2D. | 445 // CanvasRenderingContext2D. |
| 446 MutableStylePropertySet* parsedStyle = | 446 MutableStylePropertySet* parsedStyle = |
| 447 MutableStylePropertySet::create(HTMLStandardMode); | 447 MutableStylePropertySet::create(HTMLStandardMode); |
| 448 CSSParser::parseValue(parsedStyle, CSSPropertyFont, fontString, true, 0); | 448 CSSParser::parseValue(parsedStyle, CSSPropertyFont, fontString, true, |
| 449 static_cast<StyleSheetContents*>(nullptr)); | |
|
rune
2016/12/19 20:34:17
Do you need the static_cast?
Bret
2016/12/20 01:26:58
No, reverted. Sorry, this was left over from me sp
| |
| 449 if (parsedStyle->isEmpty()) | 450 if (parsedStyle->isEmpty()) |
| 450 return false; | 451 return false; |
| 451 | 452 |
| 452 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); | 453 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); |
| 453 if (fontValue == "inherit" || fontValue == "initial") | 454 if (fontValue == "inherit" || fontValue == "initial") |
| 454 return false; | 455 return false; |
| 455 | 456 |
| 456 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 457 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 457 | 458 |
| 458 FontFamily fontFamily; | 459 FontFamily fontFamily; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 560 visitor->trace(m_failedFonts); | 561 visitor->trace(m_failedFonts); |
| 561 visitor->trace(m_nonCSSConnectedFaces); | 562 visitor->trace(m_nonCSSConnectedFaces); |
| 562 visitor->trace(m_asyncRunner); | 563 visitor->trace(m_asyncRunner); |
| 563 EventTargetWithInlineData::trace(visitor); | 564 EventTargetWithInlineData::trace(visitor); |
| 564 Supplement<Document>::trace(visitor); | 565 Supplement<Document>::trace(visitor); |
| 565 SuspendableObject::trace(visitor); | 566 SuspendableObject::trace(visitor); |
| 566 FontFace::LoadFontCallback::trace(visitor); | 567 FontFace::LoadFontCallback::trace(visitor); |
| 567 } | 568 } |
| 568 | 569 |
| 569 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |