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

Side by Side Diff: Source/core/frame/Settings.h

Issue 82583005: Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added 2 layout tests Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserved.
3 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EditableLinkLiveWhenNotFocused, 48 EditableLinkLiveWhenNotFocused,
49 EditableLinkNeverLive 49 EditableLinkNeverLive
50 }; 50 };
51 51
52 class Settings { 52 class Settings {
53 WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED; 53 WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
54 public: 54 public:
55 static PassOwnPtr<Settings> create(); 55 static PassOwnPtr<Settings> create();
56 56
57 GenericFontFamilySettings& genericFontFamilySettings() { return m_genericFon tFamilySettings; } 57 GenericFontFamilySettings& genericFontFamilySettings() { return m_genericFon tFamilySettings; }
58 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ;
59 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ;
60 void setFixedFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON);
61 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM ON);
62 void setSansSerifFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMO N);
63 void setSerifFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON);
64 void setStandardFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON );
58 65
59 void setTextAutosizingEnabled(bool); 66 void setTextAutosizingEnabled(bool);
60 bool textAutosizingEnabled() const; 67 bool textAutosizingEnabled() const;
61 68
62 // Compensates for poor text legibility on mobile devices. This value is 69 // Compensates for poor text legibility on mobile devices. This value is
63 // multiplied by the font scale factor when performing text autosizing of 70 // multiplied by the font scale factor when performing text autosizing of
64 // websites that do not set an explicit viewport description. 71 // websites that do not set an explicit viewport description.
65 void setDeviceScaleAdjustment(float); 72 void setDeviceScaleAdjustment(float);
66 float deviceScaleAdjustment() const; 73 float deviceScaleAdjustment() const;
67 74
(...skipping 17 matching lines...) Expand all
85 // It could handle "GL", but that seems a bit overly broad. 92 // It could handle "GL", but that seems a bit overly broad.
86 void setOpenGLMultisamplingEnabled(bool flag); 93 void setOpenGLMultisamplingEnabled(bool flag);
87 bool openGLMultisamplingEnabled() { return m_openGLMultisamplingEnabled; } 94 bool openGLMultisamplingEnabled() { return m_openGLMultisamplingEnabled; }
88 95
89 void setDelegate(SettingsDelegate*); 96 void setDelegate(SettingsDelegate*);
90 97
91 private: 98 private:
92 Settings(); 99 Settings();
93 100
94 void invalidate(SettingsDelegate::ChangeType); 101 void invalidate(SettingsDelegate::ChangeType);
102 void notifyFontFamilySettingsChanged();
95 103
96 // FIXME: pageOfShame() is a hack for the inspector code: 104 // FIXME: pageOfShame() is a hack for the inspector code:
97 // http://crbug.com/327476 105 // http://crbug.com/327476
98 Page* pageOfShame() const; 106 Page* pageOfShame() const;
99 107
100 SettingsDelegate* m_delegate; 108 SettingsDelegate* m_delegate;
101 109
102 GenericFontFamilySettings m_genericFontFamilySettings; 110 GenericFontFamilySettings m_genericFontFamilySettings;
103 float m_deviceScaleAdjustment; 111 float m_deviceScaleAdjustment;
104 IntSize m_textAutosizingWindowSizeOverride; 112 IntSize m_textAutosizingWindowSizeOverride;
105 bool m_textAutosizingEnabled : 1; 113 bool m_textAutosizingEnabled : 1;
106 114
107 SETTINGS_MEMBER_VARIABLES 115 SETTINGS_MEMBER_VARIABLES
108 116
109 bool m_isScriptEnabled : 1; 117 bool m_isScriptEnabled : 1;
110 bool m_openGLMultisamplingEnabled : 1; 118 bool m_openGLMultisamplingEnabled : 1;
111 }; 119 };
112 120
113 } // namespace WebCore 121 } // namespace WebCore
114 122
115 #endif // Settings_h 123 #endif // Settings_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698