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

Side by Side Diff: Source/core/css/FontFaceSet.cpp

Issue 49093004: Move more arrays of strings to shareable memory (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 1 month 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
« no previous file with comments | « Source/core/css/CSSDefaultStyleSheets.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 28 matching lines...) Expand all
39 #include "core/css/CSSSegmentedFontFace.h" 39 #include "core/css/CSSSegmentedFontFace.h"
40 #include "core/css/StylePropertySet.h" 40 #include "core/css/StylePropertySet.h"
41 #include "core/css/resolver/StyleResolver.h" 41 #include "core/css/resolver/StyleResolver.h"
42 #include "core/dom/Document.h" 42 #include "core/dom/Document.h"
43 #include "core/frame/FrameView.h" 43 #include "core/frame/FrameView.h"
44 #include "public/platform/Platform.h" 44 #include "public/platform/Platform.h"
45 45
46 namespace WebCore { 46 namespace WebCore {
47 47
48 static const int defaultFontSize = 10; 48 static const int defaultFontSize = 10;
49 static const char* const defaultFontFamily = "sans-serif"; 49 static const char defaultFontFamily[] = "sans-serif";
50 50
51 class LoadFontPromiseResolver : public CSSSegmentedFontFace::LoadFontCallback { 51 class LoadFontPromiseResolver : public CSSSegmentedFontFace::LoadFontCallback {
52 public: 52 public:
53 static PassRefPtr<LoadFontPromiseResolver> create(const FontFamily& family, ScriptPromise promise, ExecutionContext* context) 53 static PassRefPtr<LoadFontPromiseResolver> create(const FontFamily& family, ScriptPromise promise, ExecutionContext* context)
54 { 54 {
55 int numFamilies = 0; 55 int numFamilies = 0;
56 for (const FontFamily* f = &family; f; f = f->next()) 56 for (const FontFamily* f = &family; f; f = f->next())
57 numFamilies++; 57 numFamilies++;
58 return adoptRef<LoadFontPromiseResolver>(new LoadFontPromiseResolver(num Families, promise, context)); 58 return adoptRef<LoadFontPromiseResolver>(new LoadFontPromiseResolver(num Families, promise, context));
59 } 59 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 457
458 void FontFaceSet::didLayout(Document* document) 458 void FontFaceSet::didLayout(Document* document)
459 { 459 {
460 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName()))) 460 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu ment, supplementName())))
461 fonts->didLayout(); 461 fonts->didLayout();
462 } 462 }
463 463
464 464
465 } // namespace WebCore 465 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSDefaultStyleSheets.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698