当前位置: 首页>>代码示例>>C++>>正文


C++ Settings::setShouldUseFirstScheduledLayoutDelay方法代码示例

本文整理汇总了C++中webcore::Settings::setShouldUseFirstScheduledLayoutDelay方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setShouldUseFirstScheduledLayoutDelay方法的具体用法?C++ Settings::setShouldUseFirstScheduledLayoutDelay怎么用?C++ Settings::setShouldUseFirstScheduledLayoutDelay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webcore::Settings的用法示例。


在下文中一共展示了Settings::setShouldUseFirstScheduledLayoutDelay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: apply


//.........这里部分代码省略.........
        if (setting == AllSettings || setting == UseWebKitCache)
            settings->setUseCache(webcoreSettingsState->useWebKitCache);
#if ENABLE(DATABASE)
        if (setting == AllSettings || setting == LocalStoragePath)
            settings->setLocalStorageDatabasePath(webcoreSettingsState->localStoragePath);

        if (setting == AllSettings || setting == IsDatabasesEnabled) {
            WebCore::Database::setIsAvailable(webcoreSettingsState->isDatabasesEnabled);
            WebCore::DatabaseSync::setIsAvailable(webcoreSettingsState->isDatabasesEnabled);
        }

        if (setting == AllSettings || setting == IsLocalStorageEnabled)
            settings->setLocalStorageEnabled(webcoreSettingsState->isLocalStorageEnabled);

        if (setting == AllSettings || setting == IsOfflineWebApplicationCacheEnabled)
            settings->setOfflineWebApplicationCacheEnabled(webcoreSettingsState->isOfflineWebApplicationCacheEnabled);

        if (setting == AllSettings || setting == LocalStorageQuota)
            getGroupSettings(m_page)->setLocalStorageQuotaBytes(webcoreSettingsState->localStorageQuota);
        
        if (setting == AllSettings || setting == IsFrameFlatteningEnabled)
            settings->setFrameFlatteningEnabled(webcoreSettingsState->isFrameFlatteningEnabled);
#endif

        // These are *NOT* exposed via the API so just always set them if this
        // is global and we're setting all the settings...
        if (setting == AllSettings && global) {
            settings->setJavaEnabled(webcoreSettingsState->isJavaEnabled);
        }

        // Apply the Olympia settings to this page's settings
        OlympiaSettingsState* olympiaSettingsState = global ? WebSettings::pageGroupSettings(m_webCoreSettingsState->pageGroupName)->d->m_olympiaSettingsState : m_olympiaSettingsState;

        if (setting == AllSettings || setting == UserAgentString)
            m_olympiaSettingsState->userAgentString = olympiaSettingsState->userAgentString;

        if (setting == AllSettings || setting == IsZoomToFitOnLoad)
            m_olympiaSettingsState->isZoomToFitOnLoad = olympiaSettingsState->isZoomToFitOnLoad;

        if (setting == AllSettings || setting == IsScrollbarsEnabled)
            m_olympiaSettingsState->isScrollbarsEnabled = olympiaSettingsState->isScrollbarsEnabled;

        if (setting == AllSettings || setting == IsGeolocationEnabled)
            m_olympiaSettingsState->isGeolocationEnabled = olympiaSettingsState->isGeolocationEnabled;

        if (setting == AllSettings || setting == DoesGetFocusNodeContext)
            m_olympiaSettingsState->doesGetFocusNodeContext = olympiaSettingsState->doesGetFocusNodeContext;

        if (setting == AllSettings || setting == AreLinksHandledExternally)
            m_olympiaSettingsState->areLinksHandledExternally = olympiaSettingsState->areLinksHandledExternally;

        if (setting == AllSettings || setting == ShouldUpdateTextReflowMode) {
            m_olympiaSettingsState->textReflowMode = olympiaSettingsState->textReflowMode;
            settings->setTextReflowEnabled(m_olympiaSettingsState->textReflowMode == WebSettings::TextReflowEnabled);
        }

        if (setting == AllSettings || setting == IsEmailMode) {
            m_olympiaSettingsState->isEmailMode = olympiaSettingsState->isEmailMode;
            // FIXME: See RIM Bug #746.
            // We don't want HTMLTokenizer to yield for anything other than email
            // case because call to currentTime() is too expensive at currentTime() :(
            settings->setShouldUseFirstScheduledLayoutDelay(m_olympiaSettingsState->isEmailMode);
            settings->setProcessHTTPEquiv(!m_olympiaSettingsState->isEmailMode);
        }

        if (setting == AllSettings || setting == ShouldRenderAnimationsOnScroll)
            m_olympiaSettingsState->shouldRenderAnimationsOnScroll = olympiaSettingsState->shouldRenderAnimationsOnScroll;

        if (setting == AllSettings || setting == OverZoomColor)
            m_olympiaSettingsState->overZoomColor = olympiaSettingsState->overZoomColor;

        if (setting == AllSettings || setting == IsWritingDirectionRTL)
            m_olympiaSettingsState->isWritingDirectionRTL = olympiaSettingsState->isWritingDirectionRTL;

        if (setting == AllSettings || setting == IsDirectRenderingToCanvasEnabled)
            m_olympiaSettingsState->isDirectRenderingToCanvasEnabled = olympiaSettingsState->isDirectRenderingToCanvasEnabled;

        if (setting == AllSettings || setting == MaxPluginInstances)
            m_olympiaSettingsState->maxPluginInstances = olympiaSettingsState->maxPluginInstances;

        // BrowserField2 settings
        if ( setting == AllSettings || setting == AllowCrossSiteRequests )
            m_olympiaSettingsState->allowCrossSiteRequests = olympiaSettingsState->allowCrossSiteRequests;
            
        if ( setting == AllSettings || setting == UserScalable )
            m_olympiaSettingsState->userScalable = olympiaSettingsState->userScalable;

        if ( setting == AllSettings || setting == InitialScale )
            m_olympiaSettingsState->initialScale = olympiaSettingsState->initialScale;

        if ( setting == AllSettings || setting == ViewportWidth )
            m_olympiaSettingsState->viewportWidth = olympiaSettingsState->viewportWidth;

        if ( setting == AllSettings || setting == ShouldHandlePatternUrls )
            m_olympiaSettingsState->shouldHandlePatternUrls = olympiaSettingsState->shouldHandlePatternUrls;

        if ( setting == AllSettings || setting == IsCookieCacheEnabled )
            m_olympiaSettingsState->isCookieCacheEnabled = olympiaSettingsState->isCookieCacheEnabled;
    }
}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:101,代码来源:WebSettings.cpp


注:本文中的webcore::Settings::setShouldUseFirstScheduledLayoutDelay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。