|
Lines 33-38
a/Source/WebCore/testing/InternalSettings.cpp_sec1
|
| 33 |
#include "FrameView.h" |
33 |
#include "FrameView.h" |
| 34 |
#include "InspectorController.h" |
34 |
#include "InspectorController.h" |
| 35 |
#include "Language.h" |
35 |
#include "Language.h" |
|
|
36 |
#include "LocaleToScriptMapping.h" |
| 36 |
#include "Page.h" |
37 |
#include "Page.h" |
| 37 |
#include "Settings.h" |
38 |
#include "Settings.h" |
| 38 |
|
39 |
|
|
Lines 231-234
void InternalSettings::setTouchEventEmulationEnabled(bool enabled, ExceptionCode
a/Source/WebCore/testing/InternalSettings.cpp_sec2
|
| 231 |
#endif |
232 |
#endif |
| 232 |
} |
233 |
} |
| 233 |
|
234 |
|
|
|
235 |
static void setStandardFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 236 |
{ |
| 237 |
settings->setStandardFontFamily(family, code); |
| 238 |
} |
| 239 |
|
| 240 |
static void setSerifFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 241 |
{ |
| 242 |
settings->setSerifFontFamily(family, code); |
| 243 |
} |
| 244 |
|
| 245 |
static void setSansSerifFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 246 |
{ |
| 247 |
settings->setSansSerifFontFamily(family, code); |
| 248 |
} |
| 249 |
|
| 250 |
static void setFixedFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 251 |
{ |
| 252 |
settings->setFixedFontFamily(family, code); |
| 253 |
} |
| 254 |
|
| 255 |
static void setCursiveFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 256 |
{ |
| 257 |
settings->setCursiveFontFamily(family, code); |
| 258 |
} |
| 259 |
|
| 260 |
static void setFantasyFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 261 |
{ |
| 262 |
settings->setFantasyFontFamily(family, code); |
| 263 |
} |
| 264 |
|
| 265 |
static void setPictographFontFamilyWrapper(Settings* settings, const String& family, UScriptCode code) |
| 266 |
{ |
| 267 |
settings->setPictographFontFamily(family, code); |
| 268 |
} |
| 269 |
|
| 270 |
void InternalSettings::setFontFamily(const String& family, const String& script, SetFontFamilyWrapper setter) |
| 271 |
{ |
| 272 |
UScriptCode code = scriptNameToCode(script); |
| 273 |
if (code != USCRIPT_INVALID_CODE) |
| 274 |
(*setter)(settings(), family, code); |
| 275 |
} |
| 276 |
|
| 277 |
void InternalSettings::setStandardFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 278 |
{ |
| 279 |
InternalSettingsGuardForSettings(); |
| 280 |
setFontFamily(family, script, setStandardFontFamilyWrapper); |
| 281 |
} |
| 282 |
|
| 283 |
void InternalSettings::setSerifFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 284 |
{ |
| 285 |
InternalSettingsGuardForSettings(); |
| 286 |
setFontFamily(family, script, setSerifFontFamilyWrapper); |
| 287 |
} |
| 288 |
|
| 289 |
void InternalSettings::setSansSerifFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 290 |
{ |
| 291 |
InternalSettingsGuardForSettings(); |
| 292 |
setFontFamily(family, script, setSansSerifFontFamilyWrapper); |
| 293 |
} |
| 294 |
|
| 295 |
void InternalSettings::setFixedFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 296 |
{ |
| 297 |
InternalSettingsGuardForSettings(); |
| 298 |
setFontFamily(family, script, setFixedFontFamilyWrapper); |
| 299 |
} |
| 300 |
|
| 301 |
void InternalSettings::setCursiveFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 302 |
{ |
| 303 |
InternalSettingsGuardForSettings(); |
| 304 |
setFontFamily(family, script, setCursiveFontFamilyWrapper); |
| 305 |
} |
| 306 |
|
| 307 |
void InternalSettings::setFantasyFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 308 |
{ |
| 309 |
InternalSettingsGuardForSettings(); |
| 310 |
setFontFamily(family, script, setFantasyFontFamilyWrapper); |
| 311 |
} |
| 312 |
|
| 313 |
void InternalSettings::setPictographFontFamily(const String& family, const String& script, ExceptionCode& ec) |
| 314 |
{ |
| 315 |
InternalSettingsGuardForSettings(); |
| 316 |
setFontFamily(family, script, setPictographFontFamilyWrapper); |
| 317 |
} |
| 318 |
|
| 234 |
} |
319 |
} |