| 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/css/FontFaceSet.h" | 27 #include "core/css/FontFaceSet.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/Dictionary.h" | 29 #include "bindings/core/v8/Dictionary.h" |
| 30 #include "bindings/core/v8/ScriptPromiseResolver.h" | 30 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 31 #include "bindings/core/v8/ScriptState.h" | 31 #include "bindings/core/v8/ScriptState.h" |
| 32 #include "core/css/CSSFontSelector.h" | 32 #include "core/css/CSSFontSelector.h" |
| 33 #include "core/css/CSSSegmentedFontFace.h" | 33 #include "core/css/CSSSegmentedFontFace.h" |
| 34 #include "core/css/FontFaceCache.h" | 34 #include "core/css/FontFaceCache.h" |
| 35 #include "core/css/FontFaceSetLoadEvent.h" | 35 #include "core/css/FontFaceSetLoadEvent.h" |
| 36 #include "core/css/StylePropertySet.h" | 36 #include "core/css/StylePropertySet.h" |
| 37 #include "core/css/parser/BisonCSSParser.h" | 37 #include "core/css/parser/CSSParser.h" |
| 38 #include "core/css/resolver/StyleResolver.h" | 38 #include "core/css/resolver/StyleResolver.h" |
| 39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
| 40 #include "core/dom/StyleEngine.h" | 40 #include "core/dom/StyleEngine.h" |
| 41 #include "core/frame/FrameView.h" | 41 #include "core/frame/FrameView.h" |
| 42 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 43 #include "core/rendering/style/StyleInheritedData.h" | 43 #include "core/rendering/style/StyleInheritedData.h" |
| 44 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 return false; | 489 return false; |
| 490 } | 490 } |
| 491 | 491 |
| 492 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) | 492 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) |
| 493 { | 493 { |
| 494 if (fontString.isEmpty()) | 494 if (fontString.isEmpty()) |
| 495 return false; | 495 return false; |
| 496 | 496 |
| 497 // Interpret fontString in the same way as the 'font' attribute of CanvasRen
deringContext2D. | 497 // Interpret fontString in the same way as the 'font' attribute of CanvasRen
deringContext2D. |
| 498 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper
tySet::create(); | 498 RefPtrWillBeRawPtr<MutableStylePropertySet> parsedStyle = MutableStyleProper
tySet::create(); |
| 499 BisonCSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, t
rue, HTMLStandardMode, 0); | 499 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, fontString, true,
HTMLStandardMode, 0); |
| 500 if (parsedStyle->isEmpty()) | 500 if (parsedStyle->isEmpty()) |
| 501 return false; | 501 return false; |
| 502 | 502 |
| 503 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); | 503 String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont); |
| 504 if (fontValue == "inherit" || fontValue == "initial") | 504 if (fontValue == "inherit" || fontValue == "initial") |
| 505 return false; | 505 return false; |
| 506 | 506 |
| 507 RefPtr<RenderStyle> style = RenderStyle::create(); | 507 RefPtr<RenderStyle> style = RenderStyle::create(); |
| 508 | 508 |
| 509 FontFamily fontFamily; | 509 FontFamily fontFamily; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 visitor->trace(m_loadingFonts); | 586 visitor->trace(m_loadingFonts); |
| 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 DocumentSupplement::trace(visitor); | 590 DocumentSupplement::trace(visitor); |
| 591 EventTargetWithInlineData::trace(visitor); | 591 EventTargetWithInlineData::trace(visitor); |
| 592 } | 592 } |
| 593 #endif | 593 #endif |
| 594 | 594 |
| 595 } // namespace blink | 595 } // namespace blink |
| OLD | NEW |