| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); | 507 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper
tySet::create(HTMLQuirksMode); |
| 508 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true,
HTMLStandardMode, 0); | 508 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true,
HTMLStandardMode, 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 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |