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

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

Issue 2671173002: Change CSSParserContext to have a Document handle (vs UseCounter). (Closed)
Patch Set: fix todo style Created 3 years, 10 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "platform/Histogram.h" 62 #include "platform/Histogram.h"
63 #include "platform/RuntimeEnabledFeatures.h" 63 #include "platform/RuntimeEnabledFeatures.h"
64 #include "platform/SharedBuffer.h" 64 #include "platform/SharedBuffer.h"
65 #include "platform/WebTaskRunner.h" 65 #include "platform/WebTaskRunner.h"
66 66
67 namespace blink { 67 namespace blink {
68 68
69 static const CSSValue* parseCSSValue(const Document* document, 69 static const CSSValue* parseCSSValue(const Document* document,
70 const String& value, 70 const String& value,
71 CSSPropertyID propertyID) { 71 CSSPropertyID propertyID) {
72 CSSParserContext* context = 72 CSSParserContext* context = CSSParserContext::create(*document, document);
73 CSSParserContext::create(*document, UseCounter::getFrom(document));
74 return CSSParser::parseFontFaceDescriptor(propertyID, value, context); 73 return CSSParser::parseFontFaceDescriptor(propertyID, value, context);
75 } 74 }
76 75
77 FontFace* FontFace::create(ExecutionContext* context, 76 FontFace* FontFace::create(ExecutionContext* context,
78 const AtomicString& family, 77 const AtomicString& family,
79 StringOrArrayBufferOrArrayBufferView& source, 78 StringOrArrayBufferOrArrayBufferView& source,
80 const FontFaceDescriptors& descriptors) { 79 const FontFaceDescriptors& descriptors) {
81 if (source.isString()) 80 if (source.isString())
82 return create(context, family, source.getAsString(), descriptors); 81 return create(context, family, source.getAsString(), descriptors);
83 if (source.isArrayBuffer()) 82 if (source.isArrayBuffer())
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 671
673 bool FontFace::hadBlankText() const { 672 bool FontFace::hadBlankText() const {
674 return m_cssFontFace->hadBlankText(); 673 return m_cssFontFace->hadBlankText();
675 } 674 }
676 675
677 bool FontFace::hasPendingActivity() const { 676 bool FontFace::hasPendingActivity() const {
678 return m_status == Loading && getExecutionContext(); 677 return m_status == Loading && getExecutionContext();
679 } 678 }
680 679
681 } // namespace blink 680 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheet.cpp ('k') | third_party/WebKit/Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698