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

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

Issue 25735003: Add text autosizing override in the inspector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typeo Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/page/Settings.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) 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 30 matching lines...) Expand all
41 class Page; 41 class Page;
42 42
43 enum EditableLinkBehavior { 43 enum EditableLinkBehavior {
44 EditableLinkDefaultBehavior, 44 EditableLinkDefaultBehavior,
45 EditableLinkAlwaysLive, 45 EditableLinkAlwaysLive,
46 EditableLinkOnlyLiveWithShiftKey, 46 EditableLinkOnlyLiveWithShiftKey,
47 EditableLinkLiveWhenNotFocused, 47 EditableLinkLiveWhenNotFocused,
48 EditableLinkNeverLive 48 EditableLinkNeverLive
49 }; 49 };
50 50
51 enum TextAutosizingOverride {
52 NoOverride,
53 TextAutosizingOverrideEnabled,
54 TextAutosizingOverrideDisabled
55 };
56
51 // UScriptCode uses -1 and 0 for UScriptInvalidCode and UScriptCommon. 57 // UScriptCode uses -1 and 0 for UScriptInvalidCode and UScriptCommon.
52 // We need to use -2 and -3 for empty value and deleted value. 58 // We need to use -2 and -3 for empty value and deleted value.
53 struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> { 59 struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> {
54 static const bool emptyValueIsZero = false; 60 static const bool emptyValueIsZero = false;
55 static int emptyValue() { return -2; } 61 static int emptyValue() { return -2; }
56 static void constructDeletedValue(int& slot) { slot = -3; } 62 static void constructDeletedValue(int& slot) { slot = -3; }
57 static bool isDeletedValue(int value) { return value == -3; } 63 static bool isDeletedValue(int value) { return value == -3; }
58 }; 64 };
59 65
60 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits > ScriptFontFamilyMap; 66 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits > ScriptFontFamilyMap;
(...skipping 18 matching lines...) Expand all
79 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; 85 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ;
80 const AtomicString& cursiveFontFamily(UScriptCode = USCRIPT_COMMON) const; 86 const AtomicString& cursiveFontFamily(UScriptCode = USCRIPT_COMMON) const;
81 87
82 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; 88 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ;
83 const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const; 89 const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const;
84 90
85 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM ON); 91 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM ON);
86 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const ; 92 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const ;
87 93
88 void setTextAutosizingEnabled(bool); 94 void setTextAutosizingEnabled(bool);
89 bool textAutosizingEnabled() const { return m_textAutosizingEnabled; } 95 bool textAutosizingEnabled() const;
90 96
91 void setTextAutosizingFontScaleFactor(float); 97 void setTextAutosizingFontScaleFactor(float);
92 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca leFactor; } 98 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca leFactor; }
93 99
94 // Only set by Layout Tests, and only used if textAutosizingEnabled() return s true. 100 // Only set by Layout Tests, and only used if textAutosizingEnabled() return s true.
95 void setTextAutosizingWindowSizeOverride(const IntSize&); 101 void setTextAutosizingWindowSizeOverride(const IntSize&);
96 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutos izingWindowSizeOverride; } 102 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutos izingWindowSizeOverride; }
97 103
104 void setTextAutosizingEnabledOverride(TextAutosizingOverride);
105
98 void setUseWideViewport(bool); 106 void setUseWideViewport(bool);
99 bool useWideViewport() const { return m_useWideViewport; } 107 bool useWideViewport() const { return m_useWideViewport; }
100 108
101 void setLoadWithOverviewMode(bool); 109 void setLoadWithOverviewMode(bool);
102 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; } 110 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; }
103 111
104 // Only set by Layout Tests. 112 // Only set by Layout Tests.
105 void setMediaTypeOverride(const String&); 113 void setMediaTypeOverride(const String&);
106 const String& mediaTypeOverride() const { return m_mediaTypeOverride; } 114 const String& mediaTypeOverride() const { return m_mediaTypeOverride; }
107 115
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ScriptFontFamilyMap m_fixedFontFamilyMap; 176 ScriptFontFamilyMap m_fixedFontFamilyMap;
169 ScriptFontFamilyMap m_sansSerifFontFamilyMap; 177 ScriptFontFamilyMap m_sansSerifFontFamilyMap;
170 ScriptFontFamilyMap m_cursiveFontFamilyMap; 178 ScriptFontFamilyMap m_cursiveFontFamilyMap;
171 ScriptFontFamilyMap m_fantasyFontFamilyMap; 179 ScriptFontFamilyMap m_fantasyFontFamilyMap;
172 ScriptFontFamilyMap m_pictographFontFamilyMap; 180 ScriptFontFamilyMap m_pictographFontFamilyMap;
173 float m_textAutosizingFontScaleFactor; 181 float m_textAutosizingFontScaleFactor;
174 IntSize m_textAutosizingWindowSizeOverride; 182 IntSize m_textAutosizingWindowSizeOverride;
175 bool m_textAutosizingEnabled : 1; 183 bool m_textAutosizingEnabled : 1;
176 bool m_useWideViewport : 1; 184 bool m_useWideViewport : 1;
177 bool m_loadWithOverviewMode : 1; 185 bool m_loadWithOverviewMode : 1;
186 unsigned m_textAutosizingOverride : 2; // TextAutosizingOverride
178 187
179 SETTINGS_MEMBER_VARIABLES 188 SETTINGS_MEMBER_VARIABLES
180 189
181 bool m_isJavaEnabled : 1; 190 bool m_isJavaEnabled : 1;
182 bool m_loadsImagesAutomatically : 1; 191 bool m_loadsImagesAutomatically : 1;
183 bool m_areImagesEnabled : 1; 192 bool m_areImagesEnabled : 1;
184 bool m_arePluginsEnabled : 1; 193 bool m_arePluginsEnabled : 1;
185 bool m_isScriptEnabled : 1; 194 bool m_isScriptEnabled : 1;
186 bool m_isCSSCustomFilterEnabled : 1; 195 bool m_isCSSCustomFilterEnabled : 1;
187 bool m_cssStickyPositionEnabled : 1; 196 bool m_cssStickyPositionEnabled : 1;
188 bool m_dnsPrefetchingEnabled : 1; 197 bool m_dnsPrefetchingEnabled : 1;
189 198
190 bool m_touchEventEmulationEnabled : 1; 199 bool m_touchEventEmulationEnabled : 1;
191 bool m_openGLMultisamplingEnabled : 1; 200 bool m_openGLMultisamplingEnabled : 1;
192 bool m_viewportEnabled : 1; 201 bool m_viewportEnabled : 1;
193 202
194 // FIXME: This is a temporary flag and should be removed once accelerated 203 // FIXME: This is a temporary flag and should be removed once accelerated
195 // overflow scroll is ready (crbug.com/254111). 204 // overflow scroll is ready (crbug.com/254111).
196 bool m_compositorDrivenAcceleratedScrollingEnabled : 1; 205 bool m_compositorDrivenAcceleratedScrollingEnabled : 1;
197 206
198 Timer<Settings> m_setImageLoadingSettingsTimer; 207 Timer<Settings> m_setImageLoadingSettingsTimer;
199 void imageLoadingSettingsTimerFired(Timer<Settings>*); 208 void imageLoadingSettingsTimerFired(Timer<Settings>*);
200 209
201 static bool gMockScrollbarsEnabled; 210 static bool gMockScrollbarsEnabled;
202 }; 211 };
203 212
204 } // namespace WebCore 213 } // namespace WebCore
205 214
206 #endif // Settings_h 215 #endif // Settings_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/page/Settings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698