Changeset 154219 in webkit


Ignore:
Timestamp:
Aug 17, 2013 3:58:40 AM (11 years ago)
Author:
akling@apple.com
Message:

<https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)

Reviewed by Geoff Garen.

Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
It now also returns a reference, as it can never be null.

Removed 8.8 million lines of null-checking as a result.

Location:
trunk/Source
Files:
65 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154212 r154219  
     12013-08-16  Andreas Kling  <akling@apple.com>
     2
     3        <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
     4
     5        Reviewed by Geoff Garen.
     6
     7        Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
     8        It now also returns a reference, as it can never be null.
     9
     10        Removed 8.8 million lines of null-checking as a result.
     11
    1122013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/Source/WebCore/WebCore.exp.in

    r154183 r154219  
    15891589__ZNK7WebCore5Frame25trackedRepaintRectsAsTextEv
    15901590__ZNK7WebCore5Frame31displayStringModifiedByEncodingERKN3WTF6StringE
    1591 __ZNK7WebCore5Frame8settingsEv
    15921591__ZNK7WebCore5Range11startOffsetERi
    15931592__ZNK7WebCore5Range12endContainerERi
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r152716 r154219  
    646646        return false;
    647647
    648     Settings* settings = frame->settings();
    649     if (!settings || !settings->caretBrowsingEnabled())
     648    if (!frame->settings().caretBrowsingEnabled())
    650649        return false;
    651650
  • trunk/Source/WebCore/bindings/ScriptControllerBase.cpp

    r154142 r154219  
    5252    }
    5353
    54     Settings* settings = m_frame->settings();
    55     const bool allowed = m_frame->loader().client()->allowScript(settings && settings->isScriptEnabled());
     54    const bool allowed = m_frame->loader().client()->allowScript(m_frame->settings().isScriptEnabled());
    5655    if (!allowed && reason == AboutToExecuteScript)
    5756        m_frame->loader().client()->didNotAllowScript();
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r154192 r154219  
    161161    if (!frame)
    162162        return false;
    163     Settings* settings = frame->settings();
    164     if (!settings)
    165         return false;
    166     return settings->javaScriptExperimentsEnabled();
     163    return frame->settings().javaScriptExperimentsEnabled();
    167164}
    168165
  • trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r154038 r154219  
    502502    // a property named "location" instead of performing a navigation (<rdar://problem/5688039>).
    503503    if (Frame* activeFrame = activeDOMWindow(exec)->frame()) {
    504         if (Settings* settings = activeFrame->settings()) {
    505             if (settings->usesDashboardBackwardCompatibilityMode() && !activeFrame->tree()->parent()) {
    506                 if (BindingSecurity::shouldAllowAccessToDOMWindow(exec, impl()))
    507                     putDirect(exec->vm(), Identifier(exec, "location"), value);
    508                 return;
    509             }
     504        if (activeFrame->settings().usesDashboardBackwardCompatibilityMode() && !activeFrame->tree()->parent()) {
     505            if (BindingSecurity::shouldAllowAccessToDOMWindow(exec, impl()))
     506                putDirect(exec->vm(), Identifier(exec, "location"), value);
     507            return;
    510508        }
    511509    }
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r154127 r154219  
    19951995                        AddToImplIncludes("Settings.h");
    19961996                        my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{"EnabledBySetting"}) . "Enabled";
    1997                         push(@implContent, "    Settings* settings = castedThis->impl()->frame() ? castedThis->impl()->frame()->settings() : 0;\n");
    1998                         push(@implContent, "    if (!settings || !settings->$enable_function())\n");
     1997                        push(@implContent, "    if (!castedThis->impl()->frame())\n");
     1998                        push(@implContent, "        return jsUndefined();\n");
     1999                        push(@implContent, "    Settings& settings = castedThis->impl()->frame()->settings();\n");
     2000                        push(@implContent, "    if (!settings.$enable_function())\n");
    19992001                        push(@implContent, "        return jsUndefined();\n");
    20002002                    }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r154131 r154219  
    461461{
    462462    JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
    463     Settings* settings = castedThis->impl()->frame() ? castedThis->impl()->frame()->settings() : 0;
    464     if (!settings || !settings->testSettingEnabled())
     463    if (!castedThis->impl()->frame())
     464        return jsUndefined();
     465    Settings& settings = castedThis->impl()->frame()->settings();
     466    if (!settings.testSettingEnabled())
    465467        return jsUndefined();
    466468    return JSTestSubObj::getConstructor(exec, castedThis->globalObject());
  • trunk/Source/WebCore/css/CSSFontSelector.cpp

    r154142 r154219  
    215215#endif
    216216        if (!item->isLocal()) {
    217             Settings* settings = m_document ? m_document->frame() ? m_document->frame()->settings() : 0 : 0;
     217            Settings* settings = m_document ? m_document->frame() ? &m_document->frame()->settings() : 0 : 0;
    218218            bool allowDownloading = foundSVGFont || (settings && settings->downloadableBinaryFontsEnabled());
    219219            if (allowDownloading && item->isSupportedFormat() && m_document) {
     
    371371        return 0;
    372372
    373     const Settings* settings = document->frame()->settings();
    374     if (!settings)
    375         return 0;
     373    const Settings& settings = document->frame()->settings();
    376374
    377375    AtomicString genericFamily;
     
    379377
    380378    if (familyName == serifFamily)
    381          genericFamily = settings->serifFontFamily(script);
     379        genericFamily = settings.serifFontFamily(script);
    382380    else if (familyName == sansSerifFamily)
    383          genericFamily = settings->sansSerifFontFamily(script);
     381        genericFamily = settings.sansSerifFontFamily(script);
    384382    else if (familyName == cursiveFamily)
    385          genericFamily = settings->cursiveFontFamily(script);
     383        genericFamily = settings.cursiveFontFamily(script);
    386384    else if (familyName == fantasyFamily)
    387          genericFamily = settings->fantasyFontFamily(script);
     385        genericFamily = settings.fantasyFontFamily(script);
    388386    else if (familyName == monospaceFamily)
    389          genericFamily = settings->fixedFontFamily(script);
     387        genericFamily = settings.fixedFontFamily(script);
    390388    else if (familyName == pictographFamily)
    391          genericFamily = settings->pictographFontFamily(script);
     389        genericFamily = settings.pictographFontFamily(script);
    392390    else if (familyName == standardFamily)
    393          genericFamily = settings->standardFontFamily(script);
     391        genericFamily = settings.standardFontFamily(script);
    394392
    395393    if (!genericFamily.isEmpty())
  • trunk/Source/WebCore/css/MediaQueryEvaluator.cpp

    r151783 r154219  
    636636static PointerDeviceType leastCapablePrimaryPointerDeviceType(Frame* frame)
    637637{
    638     if (frame->settings()->deviceSupportsTouch())
     638    if (frame->settings().deviceSupportsTouch())
    639639        return TouchPointer;
    640640
  • trunk/Source/WebCore/dom/DOMImplementation.cpp

    r154142 r154219  
    368368     // Check to see if the type can be played by our MediaPlayer, if so create a MediaDocument
    369369    // Key system is not applicable here.
    370     DOMImplementationSupportsTypeClient client(frame && frame->settings() && frame->settings()->needsSiteSpecificQuirks(), url.host());
     370    DOMImplementationSupportsTypeClient client(frame && frame->settings().needsSiteSpecificQuirks(), url.host());
    371371    if (MediaPlayer::supportsType(ContentType(type), String(), url, &client))
    372372         return MediaDocument::create(frame, url);
  • trunk/Source/WebCore/dom/Document.cpp

    r154201 r154219  
    16511651Settings* Document::settings() const
    16521652{
    1653     return m_frame ? m_frame->settings() : 0;
     1653    return m_frame ? &m_frame->settings() : 0;
    16541654}
    16551655
  • trunk/Source/WebCore/editing/Editor.cpp

    r154178 r154219  
    183183EditingBehavior Editor::behavior() const
    184184{
    185     if (!m_frame || !m_frame->settings())
     185    if (!m_frame)
    186186        return EditingBehavior(EditingMacBehavior);
    187 
    188     return EditingBehavior(m_frame->settings()->editingBehaviorType());
     187    return EditingBehavior(m_frame->settings().editingBehaviorType());
    189188}
    190189
     
    21192118    RefPtr<Range> paragraphRange = paragraphToCheck.paragraphRange();
    21202119
    2121     bool asynchronous = m_frame && m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled() && !shouldShowCorrectionPanel;
     2120    bool asynchronous = m_frame && m_frame->settings().asynchronousSpellCheckingEnabled() && !shouldShowCorrectionPanel;
    21222121
    21232122    // In asynchronous mode, we intentionally check paragraph-wide sentence.
     
    26322631String Editor::selectedTextForClipboard() const
    26332632{
    2634     if (m_frame->settings() && m_frame->settings()->selectionIncludesAltImageText())
     2633    if (m_frame->settings().selectionIncludesAltImageText())
    26352634        return selectedText(TextIteratorEmitsImageAltText);
    26362635    return selectedText();
     
    29902989        VisibleSelection newAdjacentWords;
    29912990        VisibleSelection newSelectedSentence;
    2992         bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
     2991        bool caretBrowsing = m_frame->settings().caretBrowsingEnabled();
    29932992        if (m_frame->selection()->selection().isContentEditable() || caretBrowsing) {
    29942993            VisiblePosition newStart(m_frame->selection()->selection().visibleStart());
  • trunk/Source/WebCore/editing/EditorCommand.cpp

    r154178 r154219  
    11731173        return false;
    11741174
    1175     Settings* settings = frame->settings();
    1176     bool defaultValue = settings && settings->javaScriptCanAccessClipboard();
     1175    bool defaultValue = frame->settings().javaScriptCanAccessClipboard();
    11771176
    11781177    EditorClient* client = frame->editor().client();
     
    11851184        return false;
    11861185
    1187     Settings* settings = frame->settings();
    1188     bool defaultValue = settings && settings->javaScriptCanAccessClipboard() && settings->DOMPasteAllowed();
     1186    bool defaultValue = frame->settings().javaScriptCanAccessClipboard() && frame->settings().DOMPasteAllowed();
    11891187
    11901188    EditorClient* client = frame->editor().client();
     
    12081206static bool caretBrowsingEnabled(Frame* frame)
    12091207{
    1210     return frame->settings() && frame->settings()->caretBrowsingEnabled();
     1208    return frame->settings().caretBrowsingEnabled();
    12111209}
    12121210
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r154184 r154219  
    561561VisiblePosition FrameSelection::positionForPlatform(bool isGetStart) const
    562562{
    563     Settings* settings = m_frame ? m_frame->settings() : 0;
    564     if (settings && settings->editingBehaviorType() == EditingMacBehavior)
     563    if (m_frame && m_frame->settings().editingBehaviorType() == EditingMacBehavior)
    565564        return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd();
    566565    // Linux and Windows always extend selections from the extent endpoint.
     
    14141413    ASSERT(view);
    14151414    Frame* frame = view->frameView() ? &view->frameView()->frame() : 0; // The frame where the selection started.
    1416     bool caretBrowsing = frame && frame->settings() && frame->settings()->caretBrowsingEnabled();
     1415    bool caretBrowsing = frame && frame->settings().caretBrowsingEnabled();
    14171416    return (caretBrowsing || isContentEditable);
    14181417}
     
    17711770    bool caretRectChangedOrCleared = recomputeCaretRect();
    17721771
    1773     bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
     1772    bool caretBrowsing = m_frame->settings().caretBrowsingEnabled();
    17741773    bool shouldBlink = caretIsVisible() && isCaret() && (isContentEditable() || caretBrowsing) && forwardPosition.isNull();
    17751774
     
    18851884        return;
    18861885
    1887     bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
     1886    bool caretBrowsing = m_frame->settings().caretBrowsingEnabled();
    18881887    if (caretBrowsing) {
    18891888        if (Element* anchor = enclosingAnchorElement(base())) {
     
    20382037
    20392038    Document* document = m_frame->document();
    2040     bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
     2039    bool caretBrowsing = m_frame->settings().caretBrowsingEnabled();
    20412040    if (!isNone() || !(document->rendererIsEditable() || caretBrowsing))
    20422041        return;
     
    20652064inline bool FrameSelection::visualWordMovementEnabled() const
    20662065{
    2067     Settings* settings = m_frame ? m_frame->settings() : 0;
    2068     return settings && settings->visualWordMovementEnabled();
     2066    if (!m_frame)
     2067        return false;
     2068    return m_frame->settings().visualWordMovementEnabled();
    20692069}
    20702070
  • trunk/Source/WebCore/editing/SpellChecker.cpp

    r150140 r154219  
    142142bool SpellChecker::isAsynchronousEnabled() const
    143143{
    144     return m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled();
     144    return m_frame->settings().asynchronousSpellCheckingEnabled();
    145145}
    146146
  • trunk/Source/WebCore/editing/TextCheckingHelper.cpp

    r153515 r154219  
    684684    if (!frame)
    685685        return false;
    686 
    687     const Settings* settings = frame->settings();
    688     if (!settings)
    689         return false;
    690 
    691     return settings->unifiedTextCheckerEnabled();
    692 }
    693 
    694 }
     686    return frame->settings().unifiedTextCheckerEnabled();
     687}
     688
     689}
  • trunk/Source/WebCore/html/HTMLEmbedElement.cpp

    r154142 r154219  
    192192
    193193#if ENABLE(DASHBOARD_SUPPORT)
    194     // Workaround for <rdar://problem/6642221>.
    195     if (Settings* settings = frame->settings()) {
    196         if (settings->usesDashboardBackwardCompatibilityMode())
    197             return true;
    198     }
     194    // Workaround for <rdar://problem/6642221>.
     195    if (frame->settings().usesDashboardBackwardCompatibilityMode())
     196        return true;
    199197#endif
    200198
  • trunk/Source/WebCore/html/HTMLSelectElement.cpp

    r154178 r154219  
    11321132        // out of the select element when user hits a left or right arrow key.
    11331133        const Frame* frame = document()->frame();
    1134         if (frame && frame->settings() && frame->settings()->caretBrowsingEnabled()) {
     1134        if (frame && frame->settings().caretBrowsingEnabled()) {
    11351135            if (keyIdentifier == "Left" || keyIdentifier == "Right")
    11361136                return;
  • trunk/Source/WebCore/html/ImageDocument.cpp

    r154142 r154219  
    131131{
    132132    Frame* frame = document()->frame();
    133     Settings* settings = frame->settings();
    134     if (!frame->loader().client()->allowImage(!settings || settings->areImagesEnabled(), document()->url()))
     133    if (!frame->loader().client()->allowImage(frame->settings().areImagesEnabled(), document()->url()))
    135134        return;
    136135
  • trunk/Source/WebCore/html/PluginDocument.cpp

    r154142 r154219  
    111111    if (!frame)
    112112        return;
    113     Settings* settings = frame->settings();
    114     if (!settings)
    115         return;
    116113
    117114    document()->updateLayout();
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r154166 r154219  
    412412    if (!frame)
    413413        return nullptr;
    414     Settings* settings = frame->settings();
    415414
    416415    // The FrameLoaderClient might creation of a new WebGL context despite the page settings; in
    417416    // particular, if WebGL contexts were lost one or more times via the GL_ARB_robustness extension.
    418     if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled())) {
     417    if (!frame->loader().client()->allowWebGL(frame->settings().webGLEnabled())) {
    419418        canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Web page was not allowed to create a WebGL context."));
    420419        return nullptr;
     
    425424
    426425    if (attributes.antialias) {
    427         if (settings && !settings->openGLMultisamplingEnabled())
     426        if (!frame->settings().openGLMultisamplingEnabled())
    428427            attributes.antialias = false;
    429428    }
     
    58215820        return;
    58225821
    5823     if (!frame->loader().client()->allowWebGL(frame->settings() && frame->settings()->webGLEnabled()))
     5822    if (!frame->loader().client()->allowWebGL(frame->settings().webGLEnabled()))
    58245823        return;
    58255824
  • trunk/Source/WebCore/html/parser/XSSAuditor.cpp

    r154142 r154219  
    240240
    241241    if (Frame* frame = document->frame())
    242         if (Settings* settings = frame->settings())
    243             m_isEnabled = settings->xssAuditorEnabled();
     242        m_isEnabled = frame->settings().xssAuditorEnabled();
    244243
    245244    if (!m_isEnabled)
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r154192 r154219  
    435435    m_instrumentingAgents->setInspectorPageAgent(this);
    436436
    437     if (Frame* frame = mainFrame()) {
    438         if (Settings* settings = frame->settings())
    439             m_originalScriptExecutionDisabled = !settings->isScriptEnabled();
    440     }
     437    if (Frame* frame = mainFrame())
     438        m_originalScriptExecutionDisabled = !frame->settings().isScriptEnabled();
    441439}
    442440
     
    841839    if (frame) {
    842840        disabledByScriptController = !frame->script().canExecuteScripts(NotAboutToExecuteScript);
    843         if (frame->settings())
    844             disabledInSettings = !frame->settings()->isScriptEnabled();
     841        disabledInSettings = !frame->settings().isScriptEnabled();
    845842    }
    846843
     
    862859        return;
    863860
    864     Settings* settings = mainFrame()->settings();
    865     if (settings) {
    866         m_ignoreScriptsEnabledNotification = true;
    867         settings->setScriptEnabled(!value);
    868         m_ignoreScriptsEnabledNotification = false;
    869     }
     861    m_ignoreScriptsEnabledNotification = true;
     862    mainFrame()->settings().setScriptEnabled(!value);
     863    m_ignoreScriptsEnabledNotification = false;
    870864}
    871865
     
    11721166{
    11731167    m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled);
    1174     if (mainFrame() && mainFrame()->settings())
    1175         mainFrame()->settings()->setTouchEventEmulationEnabled(enabled);
     1168    if (mainFrame())
     1169        mainFrame()->settings().setTouchEventEmulationEnabled(enabled);
    11761170}
    11771171#endif
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r154142 r154219  
    627627#if ENABLE(FTPDIR)
    628628    // Respect the hidden FTP Directory Listing pref so it can be tested even if the policy delegate might otherwise disallow it
    629     Settings* settings = m_frame->settings();
    630     if (settings && settings->forceFTPDirectoryListings() && m_response.mimeType() == "application/x-ftp-directory") {
     629    if (m_frame->settings().forceFTPDirectoryListings() && m_response.mimeType() == "application/x-ftp-directory") {
    631630        continueAfterContentPolicy(PolicyUse);
    632631        return;
     
    941940    // but we still need to consider subframes.
    942941    if (frameLoader()->state() != FrameStateComplete) {
    943         if (m_frame->settings()->needsIsLoadingInAPISenseQuirk() && !m_subresourceLoaders.isEmpty())
     942        if (m_frame->settings().needsIsLoadingInAPISenseQuirk() && !m_subresourceLoaders.isEmpty())
    944943            return true;
    945944   
     
    11771176    case Archive::WebArchive:
    11781177        // WebArchiveDebugMode means we fail loads instead of trying to fetch them from the network if they're not in the archive.
    1179         return m_frame->settings() && m_frame->settings()->webArchiveDebugModeEnabled() && ArchiveFactory::isArchiveMimeType(responseMIMEType());
     1178        return m_frame->settings().webArchiveDebugModeEnabled() && ArchiveFactory::isArchiveMimeType(responseMIMEType());
    11801179#endif
    11811180#if ENABLE(MHTML)
  • trunk/Source/WebCore/loader/DocumentWriter.cpp

    r154192 r154219  
    170170{
    171171    if (!m_decoder) {
    172         if (Settings* settings = m_frame->settings()) {
    173             m_decoder = TextResourceDecoder::create(m_mimeType,
    174                 settings->defaultTextEncodingName(),
    175                 settings->usesEncodingDetector());
    176             Frame* parentFrame = m_frame->tree()->parent();
    177             // Set the hint encoding to the parent frame encoding only if
    178             // the parent and the current frames share the security origin.
    179             // We impose this condition because somebody can make a child frame
    180             // containing a carefully crafted html/javascript in one encoding
    181             // that can be mistaken for hintEncoding (or related encoding) by
    182             // an auto detector. When interpreted in the latter, it could be
    183             // an attack vector.
    184             // FIXME: This might be too cautious for non-7bit-encodings and
    185             // we may consider relaxing this later after testing.
    186             if (canReferToParentFrameEncoding(m_frame, parentFrame))
    187                 m_decoder->setHintEncoding(parentFrame->document()->decoder());
    188         } else
    189             m_decoder = TextResourceDecoder::create(m_mimeType, String());
     172        m_decoder = TextResourceDecoder::create(m_mimeType,
     173            m_frame->settings().defaultTextEncodingName(),
     174            m_frame->settings().usesEncodingDetector());
    190175        Frame* parentFrame = m_frame->tree()->parent();
     176        // Set the hint encoding to the parent frame encoding only if
     177        // the parent and the current frames share the security origin.
     178        // We impose this condition because somebody can make a child frame
     179        // containing a carefully crafted html/javascript in one encoding
     180        // that can be mistaken for hintEncoding (or related encoding) by
     181        // an auto detector. When interpreted in the latter, it could be
     182        // an attack vector.
     183        // FIXME: This might be too cautious for non-7bit-encodings and
     184        // we may consider relaxing this later after testing.
     185        if (canReferToParentFrameEncoding(m_frame, parentFrame))
     186            m_decoder->setHintEncoding(parentFrame->document()->decoder());
    191187        if (m_encoding.isEmpty()) {
    192188            if (canReferToParentFrameEncoding(m_frame, parentFrame))
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r154192 r154219  
    25042504    if (request.responseContentDispositionEncodingFallbackArray().isEmpty()) {
    25052505        // Always try UTF-8. If that fails, try frame encoding (if any) and then the default.
    2506         Settings* settings = m_frame->settings();
    2507         request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame->document()->encoding(), settings ? settings->defaultTextEncodingName() : String());
     2506        request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame->document()->encoding(), m_frame->settings().defaultTextEncodingName());
    25082507    }
    25092508}
     
    34233422    FrameLoader::addHTTPOriginIfNeeded(requestWithReferrer.resourceRequest(), openerFrame->loader().outgoingOrigin());
    34243423
    3425     if (openerFrame->settings() && !openerFrame->settings()->supportsMultipleWindows()) {
     3424    if (!openerFrame->settings().supportsMultipleWindows()) {
    34263425        created = false;
    34273426        return openerFrame;
  • trunk/Source/WebCore/loader/HistoryController.cpp

    r154142 r154219  
    363363    FrameLoader& frameLoader = m_frame->loader();
    364364
    365     Settings* settings = m_frame->settings();
    366     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
     365    bool needPrivacy = m_frame->settings().privateBrowsingEnabled();
    367366    const KURL& historyURL = frameLoader.documentLoader()->urlForHistory();
    368367
     
    401400#endif
    402401   
    403     Settings* settings = m_frame->settings();
    404     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
     402    bool needPrivacy = m_frame->settings().privateBrowsingEnabled();
    405403    const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory();
    406404
     
    450448    }
    451449
    452     Settings* settings = m_frame->settings();
    453     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
     450    bool needPrivacy = m_frame->settings().privateBrowsingEnabled();
    454451    const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory();
    455452
     
    543540        return;
    544541
    545     Settings* settings = m_frame->settings();
    546     if (!settings || settings->privateBrowsingEnabled())
     542    if (m_frame->settings().privateBrowsingEnabled())
    547543        return;
    548544
     
    872868    page->backForward()->addItem(topItem.release());
    873869
    874     Settings* settings = m_frame->settings();
    875     if (!settings || settings->privateBrowsingEnabled())
     870    if (m_frame->settings().privateBrowsingEnabled())
    876871        return;
    877872
     
    893888    m_currentItem->setFormContentType(String());
    894889
    895     Settings* settings = m_frame->settings();
    896     if (!settings || settings->privateBrowsingEnabled())
     890    if (m_frame->settings().privateBrowsingEnabled())
    897891        return;
    898892
  • trunk/Source/WebCore/loader/MixedContentChecker.cpp

    r154142 r154219  
    6969        return true;
    7070
    71     Settings* settings = m_frame->settings();
    72     bool allowed = client()->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), securityOrigin, url);
     71    bool allowed = client()->allowDisplayingInsecureContent(m_frame->settings().allowDisplayOfInsecureContent(), securityOrigin, url);
    7372    logWarning(allowed, "displayed", url);
    7473
     
    8483        return true;
    8584
    86     Settings* settings = m_frame->settings();
    87     bool allowed = client()->allowRunningInsecureContent(settings && settings->allowRunningOfInsecureContent(), securityOrigin, url);
     85    bool allowed = client()->allowRunningInsecureContent(m_frame->settings().allowRunningOfInsecureContent(), securityOrigin, url);
    8886    logWarning(allowed, "ran", url);
    8987
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r154192 r154219  
    109109bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType)
    110110{
    111     Settings* settings = m_frame->settings();
    112     if (!settings)
    113         return false;
    114 
    115111    if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
    116         if (!settings->isJavaEnabled())
    117             return false;
    118         if (document() && document()->securityOrigin()->isLocal() && !settings->isJavaEnabledForLocalFiles())
     112        if (!m_frame->settings().isJavaEnabled())
     113            return false;
     114        if (document() && document()->securityOrigin()->isLocal() && !m_frame->settings().isJavaEnabledForLocalFiles())
    119115            return false;
    120116    }
     
    405401bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
    406402{
    407     Settings* settings = m_frame->settings();
    408     bool allowed = m_frame->loader().client()->allowPlugins(settings && settings->arePluginsEnabled());
     403    bool allowed = m_frame->loader().client()->allowPlugins(m_frame->settings().arePluginsEnabled());
    409404    if (!allowed && reason == AboutToInstantiatePlugin)
    410405        m_frame->loader().client()->didNotAllowPlugins();
  • trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp

    r154142 r154219  
    139139    ASSERT(frame && frame->page());
    140140   
    141     if (!frame->settings() || !frame->settings()->offlineWebApplicationCacheEnabled())
     141    if (!frame->settings().offlineWebApplicationCacheEnabled())
    142142        return;
    143143
     
    197197
    198198    // Don't change anything on disk if private browsing is enabled.
    199     if (frame->settings()->privateBrowsingEnabled()) {
     199    if (frame->settings().privateBrowsingEnabled()) {
    200200        postListenerTask(ApplicationCacheHost::CHECKING_EVENT, documentLoader);
    201201        postListenerTask(ApplicationCacheHost::ERROR_EVENT, documentLoader);
     
    215215void ApplicationCacheGroup::selectCacheWithoutManifestURL(Frame* frame)
    216216{
    217     if (!frame->settings() || !frame->settings()->offlineWebApplicationCacheEnabled())
     217    if (!frame->settings().offlineWebApplicationCacheEnabled())
    218218        return;
    219219
     
    441441
    442442    // Don't change anything on disk if private browsing is enabled.
    443     if (!frame->settings() || frame->settings()->privateBrowsingEnabled()) {
     443    if (frame->settings().privateBrowsingEnabled()) {
    444444        ASSERT(m_pendingMasterResourceLoaders.isEmpty());
    445445        ASSERT(m_pendingEntries.isEmpty());
  • trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp

    r151099 r154219  
    475475bool ApplicationCacheHost::isApplicationCacheEnabled()
    476476{
    477     return m_documentLoader->frame() && m_documentLoader->frame()->settings()
    478            && m_documentLoader->frame()->settings()->offlineWebApplicationCacheEnabled();
     477    return m_documentLoader->frame() && m_documentLoader->frame()->settings().offlineWebApplicationCacheEnabled();
    479478}
    480479
  • trunk/Source/WebCore/loader/cache/CachedImage.cpp

    r151586 r154219  
    353353        return true;
    354354
    355     Settings* settings = m_loader->frameLoader()->frame()->settings();
    356     if (!settings)
    357         return true;
    358 
    359355    size_t estimatedDecodedImageSize = m_image->width() * m_image->height() * 4; // no overflow check
    360     return estimatedDecodedImageSize <= settings->maximumDecodedImageSize();
     356    return estimatedDecodedImageSize <= m_loader->frameLoader()->frame()->settings().maximumDecodedImageSize();
    361357}
    362358
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r154192 r154219  
    366366
    367367        if (frame()) {
    368             Settings* settings = frame()->settings();
    369             if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->isScriptEnabled(), url)) {
     368            if (!frame()->loader().client()->allowScriptFromSource(frame()->settings().isScriptEnabled(), url)) {
    370369                frame()->loader().client()->didNotAllowScript();
    371370                return false;
  • trunk/Source/WebCore/loader/icon/IconController.cpp

    r154142 r154219  
    148148    // People who want to avoid loading images generally want to avoid loading all images, unless an exception has been made for site icons.
    149149    // Now that we've accounted for URL mapping, avoid starting the network load if images aren't set to display automatically.
    150     Settings* settings = m_frame->settings();
    151     if (settings && !settings->loadsImagesAutomatically() && !settings->loadsSiteIconsIgnoringImageLoadingSetting())
     150    if (!m_frame->settings().loadsImagesAutomatically() && !m_frame->settings().loadsSiteIconsIgnoringImageLoadingSetting())
    152151        return;
    153152
  • trunk/Source/WebCore/page/ContextMenuController.cpp

    r154178 r154219  
    184184        FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
    185185        Page* newPage = oldPage;
    186         if (!frame->settings() || frame->settings()->supportsMultipleWindows()) {
     186        if (frame->settings().supportsMultipleWindows()) {
    187187            newPage = oldPage->chrome().createWindow(frame, request, WindowFeatures(), NavigationAction(request.resourceRequest()));
    188188            if (!newPage)
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r154178 r154219  
    358358        return true;
    359359
    360     Settings* settings = firstFrame->settings();
    361     return settings && settings->javaScriptCanOpenWindowsAutomatically();
     360    return firstFrame->settings().javaScriptCanOpenWindowsAutomatically();
    362361}
    363362
     
    924923        return;
    925924
    926     bool allowFocus = WindowFocusAllowedIndicator::windowFocusAllowed() || !m_frame->settings()->windowFocusRestricted();
     925    bool allowFocus = WindowFocusAllowedIndicator::windowFocusAllowed() || !m_frame->settings().windowFocusRestricted();
    927926    if (context) {
    928927        ASSERT(isMainThread());
     
    949948void DOMWindow::blur()
    950949{
    951 
    952950    if (!m_frame)
    953951        return;
     
    957955        return;
    958956
    959     if (m_frame->settings()->windowFocusRestricted())
     957    if (m_frame->settings().windowFocusRestricted())
    960958        return;
    961959
     
    988986    }
    989987
    990     Settings* settings = m_frame->settings();
    991     bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows();
     988    bool allowScriptsToCloseWindows = m_frame->settings().allowScriptsToCloseWindows();
    992989
    993990    if (!(page->openedByDOM() || page->backForward()->count() <= 1 || allowScriptsToCloseWindows))
     
    13871384    if (!authorOnly)
    13881385        rulesToInclude |= StyleResolver::UAAndUserCSSRules;
    1389     if (Settings* settings = m_frame->settings()) {
    1390         if (settings->crossOriginCheckInGetMatchedCSSRulesDisabled())
    1391             rulesToInclude |= StyleResolver::CrossOriginCSSRules;
    1392     }
     1386    if (m_frame->settings().crossOriginCheckInGetMatchedCSSRulesDisabled())
     1387        rulesToInclude |= StyleResolver::CrossOriginCSSRules;
    13931388
    13941389    PseudoId pseudoId = CSSSelector::pseudoId(pseudoType);
  • trunk/Source/WebCore/page/DragController.cpp

    r154178 r154219  
    662662                if ((m_dragSourceAction & DragSourceActionImage)
    663663                    && isHTMLImageElement(node)
    664                     && sourceFrame->settings()
    665                     && sourceFrame->settings()->loadsImagesAutomatically()) {
     664                    && sourceFrame->settings().loadsImagesAutomatically()) {
    666665                    state.type = static_cast<DragSourceAction>(state.type | DragSourceActionImage);
    667666                    return toElement(node);
     
    846845        m_client->willPerformDragSourceAction(DragSourceActionLink, dragOrigin, clipboard);
    847846        if (!dragImage) {
    848             dragImage = createDragImageForLink(linkURL, hitTestResult.textContent(), src->settings() ? src->settings()->fontRenderingMode() : NormalRenderingMode);
     847            dragImage = createDragImageForLink(linkURL, hitTestResult.textContent(), src->settings().fontRenderingMode());
    849848            IntSize size = dragImageSize(dragImage);
    850849            m_dragOffset = IntPoint(-size.width() / 2, -LinkDragBorderInset);
  • trunk/Source/WebCore/page/EventHandler.cpp

    r154184 r154219  
    947947        VisibleSelection newSelection;
    948948        Node* node = event.targetNode();
    949         bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
     949        bool caretBrowsing = m_frame->settings().caretBrowsingEnabled();
    950950        if (node && (caretBrowsing || node->rendererIsEditable()) && node->renderer()) {
    951951            VisiblePosition pos = node->renderer()->positionForPoint(event.localPoint());
     
    12151215    // If the link is editable, then we need to check the settings to see whether or not the link should be followed
    12161216    if (editable) {
    1217         ASSERT(m_frame->settings());
    1218         switch (m_frame->settings()->editableLinkBehavior()) {
     1217        switch (m_frame->settings().editableLinkBehavior()) {
    12191218        default:
    12201219        case EditableLinkDefaultBehavior:
     
    26362635{
    26372636#if ENABLE(DRAG_SUPPORT)
    2638     if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled()) {
     2637    if (m_frame->settings().touchDragDropEnabled()) {
    26392638        IntPoint adjustedPoint = gestureEvent.position();
    26402639#if ENABLE(TOUCH_ADJUSTMENT)
     
    28172816bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const
    28182817{
    2819     if (m_frame->settings() && !m_frame->settings()->touchAdjustmentEnabled())
     2818    if (!m_frame->settings().touchAdjustmentEnabled())
    28202819        return false;
    28212820    return !event.area().isEmpty();
     
    30313030        return;
    30323031
    3033     Settings* settings = m_frame->settings();
    3034     if (settings && !settings->deviceSupportsMouse())
     3032    if (!m_frame->settings().deviceSupportsMouse())
    30353033        return;
    30363034
     
    30713069    ASSERT(!m_mousePressed);
    30723070
    3073     Settings* settings = m_frame->settings();
    3074     if (settings && !settings->deviceSupportsMouse())
     3071    if (!m_frame->settings().deviceSupportsMouse())
    30753072        return;
    30763073
     
    37063703        return;
    37073704
    3708     if (!m_frame->settings()->backspaceKeyNavigationEnabled())
     3705    if (!m_frame->settings().backspaceKeyNavigationEnabled())
    37093706        return;
    37103707   
     
    40654062bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event)
    40664063{
    4067     if (!m_frame || !m_frame->settings() || !m_frame->settings()->isTouchEventEmulationEnabled())
     4064    if (!m_frame || !m_frame->settings().isTouchEventEmulationEnabled())
    40684065        return false;
    40694066
  • trunk/Source/WebCore/page/FocusController.cpp

    r154178 r154219  
    288288    Node* currentNode = document->focusedElement();
    289289    // FIXME: Not quite correct when it comes to focus transitions leaving/entering the WebView itself
    290     bool caretBrowsing = frame->settings() && frame->settings()->caretBrowsingEnabled();
     290    bool caretBrowsing = frame->settings().caretBrowsingEnabled();
    291291
    292292    if (caretBrowsing && !currentNode)
     
    569569        return;
    570570
    571     bool caretBrowsing = oldFocusedFrame->settings()->caretBrowsingEnabled();
     571    bool caretBrowsing = oldFocusedFrame->settings().caretBrowsingEnabled();
    572572    if (caretBrowsing)
    573573        return;
  • trunk/Source/WebCore/page/Frame.cpp

    r154192 r154219  
    152152inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient)
    153153    : m_page(page)
     154    , m_settings(&page->settings())
    154155    , m_treeNode(this, parentFromOwnerElement(ownerElement))
    155156    , m_loader(this, frameLoaderClient)
     
    184185#if USE(TILED_BACKING_STORE)
    185186        // Top level frame only for now.
    186         setTiledBackingStoreEnabled(page->settings().tiledBackingStoreEnabled());
     187        setTiledBackingStoreEnabled(settings().tiledBackingStoreEnabled());
    187188#endif
    188189    } else {
     
    327328}
    328329#endif // ENABLE(ORIENTATION_EVENTS)
    329    
    330 Settings* Frame::settings() const
    331 {
    332     return m_page ? &m_page->settings() : 0;
    333 }
    334330
    335331static PassOwnPtr<RegularExpression> createRegExpForLabels(const Vector<String>& labels)
     
    561557        return;
    562558
    563     if (loader().stateMachine()->creatingInitialEmptyDocument() && !settings()->shouldInjectUserScriptsInInitialEmptyDocument())
     559    if (loader().stateMachine()->creatingInitialEmptyDocument() && !settings().shouldInjectUserScriptsInInitialEmptyDocument())
    564560        return;
    565561
     
    947943
    948944    // Main frame is scaled with respect to he container but inner frames are not scaled with respect to the main frame.
    949     if (!page || page->mainFrame() != this || page->settings().applyPageScaleFactorInCompositor())
     945    if (!page || page->mainFrame() != this || settings().applyPageScaleFactorInCompositor())
    950946        return 1;
    951947
  • trunk/Source/WebCore/page/Frame.h

    r154192 r154219  
    142142        static Frame* frameForWidget(const Widget*);
    143143
    144         Settings* settings() const; // can be NULL
     144        Settings& settings() const { return *m_settings; }
    145145
    146146        void setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot);
     
    211211
    212212        Page* m_page;
     213        const RefPtr<Settings> m_settings;
    213214        mutable FrameTree m_treeNode;
    214215        mutable FrameLoader m_loader;
  • trunk/Source/WebCore/page/FrameView.cpp

    r154201 r154219  
    496496bool FrameView::frameFlatteningEnabled() const
    497497{
    498     if (Settings* settings = frame().settings())
    499         return settings->frameFlatteningEnabled();
    500     return false;
     498    return frame().settings().frameFlatteningEnabled();
    501499}
    502500
     
    541539PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
    542540{
    543     if (Settings* settings = frame().settings()) {
    544         if (!settings->allowCustomScrollbarInMainFrame() && isMainFrameView())
    545             return ScrollView::createScrollbar(orientation);
    546     }
     541    if (!frame().settings().allowCustomScrollbarInMainFrame() && isMainFrameView())
     542        return ScrollView::createScrollbar(orientation);
    547543
    548544    // FIXME: We need to update the scrollbar dynamically as documents change (or as doc elements and bodies get discovered that have custom styles).
     
    798794    if (!renderView)
    799795        return false;
    800     if (frame().settings() && frame().settings()->compositedScrollingForFramesEnabled())
     796    if (frame().settings().compositedScrollingForFramesEnabled())
    801797        return renderView->compositor()->inForcedCompositingMode();
    802798    return false;
     
    16341630bool FrameView::fixedElementsLayoutRelativeToFrame() const
    16351631{
    1636     if (!frame().settings())
    1637         return false;
    1638 
    1639     return frame().settings()->fixedElementsLayoutRelativeToFrame();
     1632    return frame().settings().fixedElementsLayoutRelativeToFrame();
    16401633}
    16411634
     
    30853078float FrameView::visibleContentScaleFactor() const
    30863079{
    3087     if (!isMainFrameView() || !frame().settings()->applyPageScaleFactorInCompositor())
     3080    if (!isMainFrameView() || !frame().settings().applyPageScaleFactorInCompositor())
    30883081        return 1;
    30893082
  • trunk/Source/WebCore/page/Navigator.cpp

    r154192 r154219  
    6464    if (!(sourceURL->endsWith("/dqm_script.js") || sourceURL->endsWith("/dqm_loader.js") || sourceURL->endsWith("/tdqm_loader.js")))
    6565        return false;
    66     Settings* settings = frame->settings();
    67     if (!settings)
    68         return false;
    69     return settings->needsSiteSpecificQuirks();
     66    return frame->settings().needsSiteSpecificQuirks();
    7067}
    7168
     
    125122bool Navigator::javaEnabled() const
    126123{
    127     if (!m_frame || !m_frame->settings())
     124    if (!m_frame)
    128125        return false;
    129126
    130     if (!m_frame->settings()->isJavaEnabled())
     127    if (!m_frame->settings().isJavaEnabled())
    131128        return false;
    132     if (m_frame->document()->securityOrigin()->isLocal() && !m_frame->settings()->isJavaEnabledForLocalFiles())
     129    if (m_frame->document()->securityOrigin()->isLocal() && !m_frame->settings().isJavaEnabledForLocalFiles())
    133130        return false;
    134131
  • trunk/Source/WebCore/page/Page.h

    r154122 r154219  
    458458    RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
    459459
    460     const OwnPtr<Settings> m_settings;
     460    const RefPtr<Settings> m_settings;
    461461    OwnPtr<ProgressTracker> m_progress;
    462462
  • trunk/Source/WebCore/page/Settings.cpp

    r153927 r154219  
    183183}
    184184
    185 PassOwnPtr<Settings> Settings::create(Page* page)
    186 {
    187     return adoptPtr(new Settings(page));
     185PassRefPtr<Settings> Settings::create(Page* page)
     186{
     187    return adoptRef(new Settings(page));
    188188}
    189189
  • trunk/Source/WebCore/page/Settings.h

    r153696 r154219  
    3636#include "Timer.h"
    3737#include <wtf/HashMap.h>
     38#include <wtf/RefCounted.h>
    3839#include <wtf/text/AtomicString.h>
    3940#include <wtf/text/AtomicStringHash.h>
     
    5960    };
    6061
    61     class Settings {
     62    class Settings : public RefCounted<Settings> {
    6263        WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
    6364    public:
    64         static PassOwnPtr<Settings> create(Page*);
    65 
     65        static PassRefPtr<Settings> create(Page*);
    6666        ~Settings();
    6767
  • trunk/Source/WebCore/page/SpatialNavigation.cpp

    r153704 r154219  
    9191bool isSpatialNavigationEnabled(const Frame* frame)
    9292{
    93     return (frame && frame->settings() && frame->settings()->spatialNavigationEnabled());
     93    return (frame && frame->settings().spatialNavigationEnabled());
    9494}
    9595
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r154184 r154219  
    709709bool EventHandler::needsKeyboardEventDisambiguationQuirks() const
    710710{
    711     Settings* settings = m_frame->settings();
    712     if (!settings)
    713         return false;
    714 
    715711#if ENABLE(DASHBOARD_SUPPORT)
    716     if (settings->usesDashboardBackwardCompatibilityMode())
     712    if (m_frame->settings().usesDashboardBackwardCompatibilityMode())
    717713        return true;
    718714#endif
    719715       
    720     if (settings->needsKeyboardEventDisambiguationQuirks())
     716    if (m_frame->settings().needsKeyboardEventDisambiguationQuirks())
    721717        return true;
    722718
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r154165 r154219  
    32733273{
    32743274    // Paint the caret if the FrameSelection says so or if caret browsing is enabled
    3275     bool caretBrowsing = frame()->settings() && frame()->settings()->caretBrowsingEnabled();
     3275    bool caretBrowsing = frame()->settings().caretBrowsingEnabled();
    32763276    RenderObject* caretPainter;
    32773277    bool isContentEditable;
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r154178 r154219  
    645645bool RenderFrameSet::flattenFrameSet() const
    646646{
    647     return frame() && frame()->settings() && frame()->settings()->frameFlatteningEnabled();
     647    return frame() && frame()->settings().frameFlatteningEnabled();
    648648}
    649649
  • trunk/Source/WebCore/rendering/RenderIFrame.cpp

    r154184 r154219  
    109109        return false; // Seamless iframes are already "flat", don't try to flatten them.
    110110
    111     bool enabled = frame && frame->settings() && frame->settings()->frameFlatteningEnabled();
     111    bool enabled = frame && frame->settings().frameFlatteningEnabled();
    112112
    113113    if (!enabled || !frame->page())
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r154184 r154219  
    146146                tiledBacking->setUnparentsOffscreenTiles(true);
    147147
    148             tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings() && frame->settings()->scrollingPerformanceLoggingEnabled());
     148            tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings().scrollingPerformanceLoggingEnabled());
    149149            adjustTiledBackingCoverage();
    150150        }
  • trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp

    r153927 r154219  
    292292        return false;
    293293
    294     if (!frame->settings())
    295         return false;
    296 
    297     bool caretBrowsing = frame->settings()->caretBrowsingEnabled();
     294    bool caretBrowsing = frame->settings().caretBrowsingEnabled();
    298295    if (caretBrowsing) {
    299296        switch (keyEvent->windowsVirtualKeyCode()) {
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r154192 r154219  
    436436    ASSERT(coreFrame);
    437437
    438     Settings* settings = coreFrame->settings();
    439     if (!settings || !settings->isScriptEnabled())
     438    if (!coreFrame->settings().isScriptEnabled())
    440439        return;
    441440
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r154192 r154219  
    586586    ASSERT(coreFrame);
    587587
    588     Settings* settings = coreFrame->settings();
    589     if (!settings || !settings->isScriptEnabled())
     588    if (!coreFrame->settings().isScriptEnabled())
    590589        return;
    591590
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r154192 r154219  
    16691669    Frame* frame = core(m_webFrame.get());
    16701670    NSMutableArray *attributeKeys = kit(paramNames);
    1671     if (frame && frame->settings()->needsSiteSpecificQuirks() && equalIgnoringCase(mimeType, "application/x-snkp")) {
     1671    if (frame && frame->settings().needsSiteSpecificQuirks() && equalIgnoringCase(mimeType, "application/x-snkp")) {
    16721672        for (NSUInteger i = 0; i < [attributeKeys count]; ++i)
    16731673            [attributeKeys replaceObjectAtIndex:i withObject:[[attributeKeys objectAtIndex:i] lowercaseString]];
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm

    r154142 r154219  
    5858bool WebFrameNetworkingContext::needsSiteSpecificQuirks() const
    5959{
    60     return frame() && frame()->settings() && frame()->settings()->needsSiteSpecificQuirks();
     60    return frame() && frame()->settings().needsSiteSpecificQuirks();
    6161}
    6262
    6363bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const
    6464{
    65     return frame() && frame()->settings() && frame()->settings()->localFileContentSniffingEnabled();
     65    return frame() && frame()->settings().localFileContentSniffingEnabled();
    6666}
    6767
     
    9494    ASSERT(isMainThread());
    9595
    96     if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())
     96    if (frame() && frame()->settings().privateBrowsingEnabled())
    9797        return *privateSession;
    9898
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r154178 r154219  
    633633        return true;
    634634
    635     if (m_frame && m_frame->settings()  && m_frame->settings()->arePluginsEnabled()
     635    if (m_frame && m_frame->settings().arePluginsEnabled()
    636636        && PluginDatabase::installedPlugins()->isMIMETypeRegistered(type))
    637637        return true;
     
    13491349        mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
    13501350
    1351     bool arePluginsEnabled = (m_frame && m_frame->settings() && m_frame->settings()->arePluginsEnabled());
     1351    bool arePluginsEnabled = (m_frame && m_frame->settings().arePluginsEnabled());
    13521352    if (arePluginsEnabled && !mimeType.length())
    13531353        mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
  • trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp

    r154142 r154219  
    109109    ASSERT(isMainThread());
    110110
    111     if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())
     111    if (frame() && frame()->settings().privateBrowsingEnabled())
    112112        return *privateSession;
    113113
  • trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp

    r153927 r154219  
    366366        return false;
    367367
    368     bool caretBrowsing = frame->settings()->caretBrowsingEnabled();
     368    bool caretBrowsing = frame->settings().caretBrowsingEnabled();
    369369    if (caretBrowsing) {
    370370        switch (keyEvent->windowsVirtualKeyCode()) {
  • trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp

    r150282 r154219  
    104104    ContentSniffingPolicy contentSniffingPolicy = resourceLoader->shouldSniffContent() ? SniffContent : DoNotSniffContent;
    105105    StoredCredentials allowStoredCredentials = resourceLoader->shouldUseCredentialStorage() ? AllowStoredCredentials : DoNotAllowStoredCredentials;
    106     bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame()->settings()->privateBrowsingEnabled();
     106    bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame()->settings().privateBrowsingEnabled();
    107107
    108108    // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r154192 r154219  
    609609            m_pluginElement->setNeedsStyleRecalc(SyntheticStyleChange);
    610610        }
    611         if (frame() && !frame()->settings()->maximumPlugInSnapshotAttempts()) {
     611        if (frame() && !frame()->settings().maximumPlugInSnapshotAttempts()) {
    612612            m_pluginElement->setDisplayState(HTMLPlugInElement::DisplayingSnapshot);
    613613            return;
     
    14161416        return false;
    14171417   
    1418     Settings* settings = frame()->settings();
    1419     if (!settings)
    1420         return false;
    1421 
    14221418    // We know that some plug-ins can support snapshotting without needing
    14231419    // accelerated compositing. Since we're trying to snapshot them anyway,
     
    14271423        return false;
    14281424
    1429     return settings->acceleratedCompositingEnabled();
     1425    return frame()->settings().acceleratedCompositingEnabled();
    14301426}
    14311427
     
    15321528        return true;
    15331529
    1534     Settings* settings = frame()->settings();
    1535     if (!settings)
    1536         return true;
    1537 
    1538     return settings->privateBrowsingEnabled();
     1530    return frame()->settings().privateBrowsingEnabled();
    15391531}
    15401532
     
    16891681
    16901682#if PLATFORM(MAC)
    1691         unsigned maximumSnapshotRetries = frame() ? frame()->settings()->maximumPlugInSnapshotAttempts() : 0;
     1683        unsigned maximumSnapshotRetries = frame() ? frame()->settings().maximumPlugInSnapshotAttempts() : 0;
    16921684        if (snapshotImage && isAlmostSolidColor(static_cast<BitmapImage*>(snapshotImage.get())) && m_countSnapshotRetries < maximumSnapshotRetries) {
    16931685            ++m_countSnapshotRetries;
     
    17201712void PluginView::pluginDidReceiveUserInteraction()
    17211713{
    1722     if (frame() && !frame()->settings()->plugInSnapshottingEnabled())
     1714    if (frame() && !frame()->settings().plugInSnapshottingEnabled())
    17231715        return;
    17241716
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm

    r154142 r154219  
    8989bool WebFrameNetworkingContext::needsSiteSpecificQuirks() const
    9090{
    91     return frame() && frame()->settings() && frame()->settings()->needsSiteSpecificQuirks();
     91    return frame() && frame()->settings().needsSiteSpecificQuirks();
    9292}
    9393
    9494bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const
    9595{
    96     return frame() && frame()->settings() && frame()->settings()->localFileContentSniffingEnabled();
     96    return frame() && frame()->settings().localFileContentSniffingEnabled();
    9797}
    9898
     
    118118    ASSERT(isMainThread());
    119119
    120     if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())
     120    if (frame() && frame()->settings().privateBrowsingEnabled())
    121121        return *privateSession;
    122122
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp

    r153355 r154219  
    6666NetworkStorageSession& WebFrameNetworkingContext::storageSession() const
    6767{
    68     if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())
     68    if (frame() && frame()->settings().privateBrowsingEnabled())
    6969        return *privateSession;
    7070
Note: See TracChangeset for help on using the changeset viewer.