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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 // Interpret fontString in the same way as the 'font' attribute of CanvasRen
deringContext2D. | 503 // Interpret fontString in the same way as the 'font' attribute of CanvasRen
deringContext2D. |
504 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper
tySet::create(); | 504 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper
tySet::create(); |
505 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true,
HTMLStandardMode, 0); | 505 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true,
HTMLStandardMode, 0); |
506 if (parsedStyle->isEmpty()) | 506 if (parsedStyle->isEmpty()) |
507 return false; | 507 return false; |
508 | 508 |
509 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); | 509 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); |
510 if (fontValue == "inherit" || fontValue == "initial") | 510 if (fontValue == "inherit" || fontValue == "initial") |
511 return false; | 511 return false; |
512 | 512 |
513 RefPtr<LayoutStyle> style = LayoutStyle::create(); | 513 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
514 | 514 |
515 FontFamily fontFamily; | 515 FontFamily fontFamily; |
516 fontFamily.setFamily(defaultFontFamily); | 516 fontFamily.setFamily(defaultFontFamily); |
517 | 517 |
518 FontDescription defaultFontDescription; | 518 FontDescription defaultFontDescription; |
519 defaultFontDescription.setFamily(fontFamily); | 519 defaultFontDescription.setFamily(fontFamily); |
520 defaultFontDescription.setSpecifiedSize(defaultFontSize); | 520 defaultFontDescription.setSpecifiedSize(defaultFontSize); |
521 defaultFontDescription.setComputedSize(defaultFontSize); | 521 defaultFontDescription.setComputedSize(defaultFontSize); |
522 | 522 |
523 style->setFontDescription(defaultFontDescription); | 523 style->setFontDescription(defaultFontDescription); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 visitor->trace(m_loadedFonts); | 594 visitor->trace(m_loadedFonts); |
595 visitor->trace(m_failedFonts); | 595 visitor->trace(m_failedFonts); |
596 visitor->trace(m_nonCSSConnectedFaces); | 596 visitor->trace(m_nonCSSConnectedFaces); |
597 DocumentSupplement::trace(visitor); | 597 DocumentSupplement::trace(visitor); |
598 #endif | 598 #endif |
599 EventTargetWithInlineData::trace(visitor); | 599 EventTargetWithInlineData::trace(visitor); |
600 ActiveDOMObject::trace(visitor); | 600 ActiveDOMObject::trace(visitor); |
601 } | 601 } |
602 | 602 |
603 } // namespace blink | 603 } // namespace blink |
OLD | NEW |