| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 439 } |
| 440 | 440 |
| 441 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) { | 441 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) { |
| 442 if (fontString.isEmpty()) | 442 if (fontString.isEmpty()) |
| 443 return false; | 443 return false; |
| 444 | 444 |
| 445 // Interpret fontString in the same way as the 'font' attribute of | 445 // Interpret fontString in the same way as the 'font' attribute of |
| 446 // CanvasRenderingContext2D. | 446 // CanvasRenderingContext2D. |
| 447 MutableStylePropertySet* parsedStyle = | 447 MutableStylePropertySet* parsedStyle = |
| 448 MutableStylePropertySet::create(HTMLStandardMode); | 448 MutableStylePropertySet::create(HTMLStandardMode); |
| 449 CSSParser::parseValue(parsedStyle, CSSPropertyFont, fontString, true, 0); | 449 CSSParser::parseValue(parsedStyle, CSSPropertyFont, fontString, true); |
| 450 if (parsedStyle->isEmpty()) | 450 if (parsedStyle->isEmpty()) |
| 451 return false; | 451 return false; |
| 452 | 452 |
| 453 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); | 453 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); |
| 454 if (fontValue == "inherit" || fontValue == "initial") | 454 if (fontValue == "inherit" || fontValue == "initial") |
| 455 return false; | 455 return false; |
| 456 | 456 |
| 457 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 457 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 458 | 458 |
| 459 FontFamily fontFamily; | 459 FontFamily fontFamily; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 visitor->trace(m_failedFonts); | 561 visitor->trace(m_failedFonts); |
| 562 visitor->trace(m_nonCSSConnectedFaces); | 562 visitor->trace(m_nonCSSConnectedFaces); |
| 563 visitor->trace(m_asyncRunner); | 563 visitor->trace(m_asyncRunner); |
| 564 EventTargetWithInlineData::trace(visitor); | 564 EventTargetWithInlineData::trace(visitor); |
| 565 Supplement<Document>::trace(visitor); | 565 Supplement<Document>::trace(visitor); |
| 566 SuspendableObject::trace(visitor); | 566 SuspendableObject::trace(visitor); |
| 567 FontFace::LoadFontCallback::trace(visitor); | 567 FontFace::LoadFontCallback::trace(visitor); |
| 568 } | 568 } |
| 569 | 569 |
| 570 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |