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

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

Issue 1964183004: Revert of Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 FontFace* fontFace = new FontFace(context, family, descriptors); 86 FontFace* fontFace = new FontFace(context, family, descriptors);
87 87
88 CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc); 88 CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc);
89 if (!src || !src->isValueList()) 89 if (!src || !src->isValueList())
90 fontFace->setError(DOMException::create(SyntaxError, "The source provide d ('" + source + "') could not be parsed as a value list.")); 90 fontFace->setError(DOMException::create(SyntaxError, "The source provide d ('" + source + "') could not be parsed as a value list."));
91 91
92 fontFace->initCSSFontFace(toDocument(context), src); 92 fontFace->initCSSFontFace(toDocument(context), src);
93 return fontFace; 93 return fontFace;
94 } 94 }
95 95
96 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family , DOMArrayBuffer* source, const FontFaceDescriptors& descriptors) 96 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family , PassRefPtr<DOMArrayBuffer> source, const FontFaceDescriptors& descriptors)
97 { 97 {
98 FontFace* fontFace = new FontFace(context, family, descriptors); 98 FontFace* fontFace = new FontFace(context, family, descriptors);
99 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->data()), source->byteLength()); 99 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->data()), source->byteLength());
100 return fontFace; 100 return fontFace;
101 } 101 }
102 102
103 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family , DOMArrayBufferView* source, const FontFaceDescriptors& descriptors) 103 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family , PassRefPtr<DOMArrayBufferView> source, const FontFaceDescriptors& descriptors)
104 { 104 {
105 FontFace* fontFace = new FontFace(context, family, descriptors); 105 FontFace* fontFace = new FontFace(context, family, descriptors);
106 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->baseAddr ess()), source->byteLength()); 106 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->baseAddr ess()), source->byteLength());
107 return fontFace; 107 return fontFace;
108 } 108 }
109 109
110 FontFace* FontFace::create(Document* document, const StyleRuleFontFace* fontFace Rule) 110 FontFace* FontFace::create(Document* document, const StyleRuleFontFace* fontFace Rule)
111 { 111 {
112 const StylePropertySet& properties = fontFaceRule->properties(); 112 const StylePropertySet& properties = fontFaceRule->properties();
113 113
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 { 645 {
646 return m_cssFontFace->hadBlankText(); 646 return m_cssFontFace->hadBlankText();
647 } 647 }
648 648
649 bool FontFace::hasPendingActivity() const 649 bool FontFace::hasPendingActivity() const
650 { 650 {
651 return m_status == Loading && getExecutionContext() && !getExecutionContext( )->activeDOMObjectsAreStopped(); 651 return m_status == Loading && getExecutionContext() && !getExecutionContext( )->activeDOMObjectsAreStopped();
652 } 652 }
653 653
654 } // namespace blink 654 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.h ('k') | third_party/WebKit/Source/core/dom/ArrayBuffer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698