Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: third_party/WebKit/Source/core/css/FontFace.cpp

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 33
34 #include "bindings/core/v8/ExceptionState.h" 34 #include "bindings/core/v8/ExceptionState.h"
35 #include "bindings/core/v8/ScriptState.h" 35 #include "bindings/core/v8/ScriptState.h"
36 #include "bindings/core/v8/UnionTypesCore.h" 36 #include "bindings/core/v8/UnionTypesCore.h"
37 #include "core/CSSValueKeywords.h" 37 #include "core/CSSValueKeywords.h"
38 #include "core/css/BinaryDataFontFaceSource.h" 38 #include "core/css/BinaryDataFontFaceSource.h"
39 #include "core/css/CSSFontFace.h" 39 #include "core/css/CSSFontFace.h"
40 #include "core/css/CSSFontFaceSrcValue.h" 40 #include "core/css/CSSFontFaceSrcValue.h"
41 #include "core/css/CSSFontSelector.h" 41 #include "core/css/CSSFontSelector.h"
42 #include "core/css/CSSPrimitiveValue.h" 42 #include "core/css/CSSPrimitiveValue.h"
43 #include "core/css/CSSStringValueBase.h" 43 #include "core/css/CSSStringValues.h"
44 #include "core/css/CSSUnicodeRangeValue.h" 44 #include "core/css/CSSUnicodeRangeValue.h"
45 #include "core/css/CSSValueList.h" 45 #include "core/css/CSSValueList.h"
46 #include "core/css/FontFaceDescriptors.h" 46 #include "core/css/FontFaceDescriptors.h"
47 #include "core/css/LocalFontFaceSource.h" 47 #include "core/css/LocalFontFaceSource.h"
48 #include "core/css/RemoteFontFaceSource.h" 48 #include "core/css/RemoteFontFaceSource.h"
49 #include "core/css/StylePropertySet.h" 49 #include "core/css/StylePropertySet.h"
50 #include "core/css/StyleRule.h" 50 #include "core/css/StyleRule.h"
51 #include "core/css/parser/CSSParser.h" 51 #include "core/css/parser/CSSParser.h"
52 #include "core/dom/DOMArrayBuffer.h" 52 #include "core/dom/DOMArrayBuffer.h"
53 #include "core/dom/DOMArrayBufferView.h" 53 #include "core/dom/DOMArrayBufferView.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ASSERT_NOT_REACHED(); 268 ASSERT_NOT_REACHED();
269 return false; 269 return false;
270 } 270 }
271 return true; 271 return true;
272 } 272 }
273 273
274 bool FontFace::setFamilyValue(CSSValue* familyValue) 274 bool FontFace::setFamilyValue(CSSValue* familyValue)
275 { 275 {
276 AtomicString family; 276 AtomicString family;
277 if (familyValue->isCustomIdentValue()) { 277 if (familyValue->isCustomIdentValue()) {
278 family = AtomicString(toCSSCustomIdentValue(familyValue)->value()); 278 family = AtomicString(toCSSCustomIdentValue(familyValue)->string());
279 } else if (toCSSPrimitiveValue(familyValue)->isValueID()) { 279 } else if (toCSSPrimitiveValue(familyValue)->isValueID()) {
280 // We need to use the raw text for all the generic family types, since @ font-face is a way of actually 280 // We need to use the raw text for all the generic family types, since @ font-face is a way of actually
281 // defining what font to use for those types. 281 // defining what font to use for those types.
282 switch (toCSSPrimitiveValue(familyValue)->getValueID()) { 282 switch (toCSSPrimitiveValue(familyValue)->getValueID()) {
283 case CSSValueSerif: 283 case CSSValueSerif:
284 family = FontFamilyNames::webkit_serif; 284 family = FontFamilyNames::webkit_serif;
285 break; 285 break;
286 case CSSValueSansSerif: 286 case CSSValueSansSerif:
287 family = FontFamilyNames::webkit_sans_serif; 287 family = FontFamilyNames::webkit_sans_serif;
288 break; 288 break;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 { 613 {
614 return m_cssFontFace->hadBlankText(); 614 return m_cssFontFace->hadBlankText();
615 } 615 }
616 616
617 bool FontFace::hasPendingActivity() const 617 bool FontFace::hasPendingActivity() const
618 { 618 {
619 return m_status == Loading && executionContext() && !executionContext()->act iveDOMObjectsAreStopped(); 619 return m_status == Loading && executionContext() && !executionContext()->act iveDOMObjectsAreStopped();
620 } 620 }
621 621
622 } // namespace blink 622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698