Ejemplo n.º 1
0
unsigned QWebPreferencesPrivate::fontSize(QWebPreferencesPrivate::FontSizeType type) const
{
    switch (type) {
    case MinimumFontSize:
        return WKPreferencesGetMinimumFontSize(preferencesRef());
    case DefaultFontSize:
        return WKPreferencesGetDefaultFontSize(preferencesRef());
    case DefaultFixedFontSize:
        return WKPreferencesGetDefaultFixedFontSize(preferencesRef());
    default:
        ASSERT_NOT_REACHED();
        return false;
    }
}
Ejemplo n.º 2
0
unsigned QWebPreferencesPrivate::fontSize(QWebPreferencesPrivate::FontSizeType type) const
{
    WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
    switch (type) {
    case MinimumFontSize:
        return static_cast<unsigned>(WKPreferencesGetMinimumFontSize(preferencesRef));
    case DefaultFontSize:
        return static_cast<unsigned>(WKPreferencesGetDefaultFontSize(preferencesRef));
    case DefaultFixedFontSize:
        return static_cast<unsigned>(WKPreferencesGetDefaultFixedFontSize(preferencesRef));
    default:
        ASSERT_NOT_REACHED();
        return false;
    }
}