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 | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "core/css/CSSFontFaceSrcValue.h" | 40 #include "core/css/CSSFontFaceSrcValue.h" |
41 #include "core/css/CSSParser.h" | 41 #include "core/css/CSSParser.h" |
42 #include "core/css/CSSPrimitiveValue.h" | 42 #include "core/css/CSSPrimitiveValue.h" |
43 #include "core/css/CSSUnicodeRangeValue.h" | 43 #include "core/css/CSSUnicodeRangeValue.h" |
44 #include "core/css/CSSValueList.h" | 44 #include "core/css/CSSValueList.h" |
45 #include "core/css/StylePropertySet.h" | 45 #include "core/css/StylePropertySet.h" |
46 #include "core/css/StyleRule.h" | 46 #include "core/css/StyleRule.h" |
47 #include "core/dom/Document.h" | 47 #include "core/dom/Document.h" |
48 #include "core/frame/Frame.h" | 48 #include "core/frame/Frame.h" |
49 #include "core/page/Settings.h" | 49 #include "core/page/Settings.h" |
50 #include "core/platform/graphics/FontTraitsMask.h" | |
51 #include "core/svg/SVGFontFaceElement.h" | 50 #include "core/svg/SVGFontFaceElement.h" |
| 51 #include "platform/fonts/FontTraitsMask.h" |
52 | 52 |
53 namespace WebCore { | 53 namespace WebCore { |
54 | 54 |
55 static PassRefPtr<CSSValue> parseCSSValue(const String& s, CSSPropertyID propert
yID) | 55 static PassRefPtr<CSSValue> parseCSSValue(const String& s, CSSPropertyID propert
yID) |
56 { | 56 { |
57 if (s.isEmpty()) | 57 if (s.isEmpty()) |
58 return 0; | 58 return 0; |
59 RefPtr<MutableStylePropertySet> parsedStyle = MutableStylePropertySet::creat
e(); | 59 RefPtr<MutableStylePropertySet> parsedStyle = MutableStylePropertySet::creat
e(); |
60 CSSParser::parseValue(parsedStyle.get(), propertyID, s, true, HTMLStandardMo
de, 0); | 60 CSSParser::parseValue(parsedStyle.get(), propertyID, s, true, HTMLStandardMo
de, 0); |
61 return parsedStyle->getPropertyCSSValue(propertyID); | 61 return parsedStyle->getPropertyCSSValue(propertyID); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 unsigned numRanges = rangeList->length(); | 447 unsigned numRanges = rangeList->length(); |
448 for (unsigned i = 0; i < numRanges; i++) { | 448 for (unsigned i = 0; i < numRanges; i++) { |
449 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item
WithoutBoundsCheck(i)); | 449 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item
WithoutBoundsCheck(i)); |
450 cssFontFace->ranges().add(range->from(), range->to()); | 450 cssFontFace->ranges().add(range->from(), range->to()); |
451 } | 451 } |
452 } | 452 } |
453 return cssFontFace; | 453 return cssFontFace; |
454 } | 454 } |
455 | 455 |
456 } // namespace WebCore | 456 } // namespace WebCore |
OLD | NEW |