Changeset 154219 in webkit
- Timestamp:
- Aug 17, 2013 3:58:40 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 65 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r154212 r154219 1 2013-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 1 12 2013-08-16 Ryosuke Niwa <rniwa@webkit.org> 2 13 -
trunk/Source/WebCore/WebCore.exp.in
r154183 r154219 1589 1589 __ZNK7WebCore5Frame25trackedRepaintRectsAsTextEv 1590 1590 __ZNK7WebCore5Frame31displayStringModifiedByEncodingERKN3WTF6StringE 1591 __ZNK7WebCore5Frame8settingsEv1592 1591 __ZNK7WebCore5Range11startOffsetERi 1593 1592 __ZNK7WebCore5Range12endContainerERi -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r152716 r154219 646 646 return false; 647 647 648 Settings* settings = frame->settings(); 649 if (!settings || !settings->caretBrowsingEnabled()) 648 if (!frame->settings().caretBrowsingEnabled()) 650 649 return false; 651 650 -
trunk/Source/WebCore/bindings/ScriptControllerBase.cpp
r154142 r154219 52 52 } 53 53 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()); 56 55 if (!allowed && reason == AboutToExecuteScript) 57 56 m_frame->loader().client()->didNotAllowScript(); -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r154192 r154219 161 161 if (!frame) 162 162 return false; 163 Settings* settings = frame->settings(); 164 if (!settings) 165 return false; 166 return settings->javaScriptExperimentsEnabled(); 163 return frame->settings().javaScriptExperimentsEnabled(); 167 164 } 168 165 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r154038 r154219 502 502 // a property named "location" instead of performing a navigation (<rdar://problem/5688039>). 503 503 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; 510 508 } 511 509 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r154127 r154219 1995 1995 AddToImplIncludes("Settings.h"); 1996 1996 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"); 1999 2001 push(@implContent, " return jsUndefined();\n"); 2000 2002 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r154131 r154219 461 461 { 462 462 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()) 465 467 return jsUndefined(); 466 468 return JSTestSubObj::getConstructor(exec, castedThis->globalObject()); -
trunk/Source/WebCore/css/CSSFontSelector.cpp
r154142 r154219 215 215 #endif 216 216 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; 218 218 bool allowDownloading = foundSVGFont || (settings && settings->downloadableBinaryFontsEnabled()); 219 219 if (allowDownloading && item->isSupportedFormat() && m_document) { … … 371 371 return 0; 372 372 373 const Settings* settings = document->frame()->settings(); 374 if (!settings) 375 return 0; 373 const Settings& settings = document->frame()->settings(); 376 374 377 375 AtomicString genericFamily; … … 379 377 380 378 if (familyName == serifFamily) 381 genericFamily = settings->serifFontFamily(script);379 genericFamily = settings.serifFontFamily(script); 382 380 else if (familyName == sansSerifFamily) 383 genericFamily = settings->sansSerifFontFamily(script);381 genericFamily = settings.sansSerifFontFamily(script); 384 382 else if (familyName == cursiveFamily) 385 genericFamily = settings->cursiveFontFamily(script);383 genericFamily = settings.cursiveFontFamily(script); 386 384 else if (familyName == fantasyFamily) 387 genericFamily = settings->fantasyFontFamily(script);385 genericFamily = settings.fantasyFontFamily(script); 388 386 else if (familyName == monospaceFamily) 389 genericFamily = settings->fixedFontFamily(script);387 genericFamily = settings.fixedFontFamily(script); 390 388 else if (familyName == pictographFamily) 391 genericFamily = settings->pictographFontFamily(script);389 genericFamily = settings.pictographFontFamily(script); 392 390 else if (familyName == standardFamily) 393 genericFamily = settings->standardFontFamily(script);391 genericFamily = settings.standardFontFamily(script); 394 392 395 393 if (!genericFamily.isEmpty()) -
trunk/Source/WebCore/css/MediaQueryEvaluator.cpp
r151783 r154219 636 636 static PointerDeviceType leastCapablePrimaryPointerDeviceType(Frame* frame) 637 637 { 638 if (frame->settings() ->deviceSupportsTouch())638 if (frame->settings().deviceSupportsTouch()) 639 639 return TouchPointer; 640 640 -
trunk/Source/WebCore/dom/DOMImplementation.cpp
r154142 r154219 368 368 // Check to see if the type can be played by our MediaPlayer, if so create a MediaDocument 369 369 // 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()); 371 371 if (MediaPlayer::supportsType(ContentType(type), String(), url, &client)) 372 372 return MediaDocument::create(frame, url); -
trunk/Source/WebCore/dom/Document.cpp
r154201 r154219 1651 1651 Settings* Document::settings() const 1652 1652 { 1653 return m_frame ? m_frame->settings() : 0;1653 return m_frame ? &m_frame->settings() : 0; 1654 1654 } 1655 1655 -
trunk/Source/WebCore/editing/Editor.cpp
r154178 r154219 183 183 EditingBehavior Editor::behavior() const 184 184 { 185 if (!m_frame || !m_frame->settings())185 if (!m_frame) 186 186 return EditingBehavior(EditingMacBehavior); 187 188 return EditingBehavior(m_frame->settings()->editingBehaviorType()); 187 return EditingBehavior(m_frame->settings().editingBehaviorType()); 189 188 } 190 189 … … 2119 2118 RefPtr<Range> paragraphRange = paragraphToCheck.paragraphRange(); 2120 2119 2121 bool asynchronous = m_frame && m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled() && !shouldShowCorrectionPanel;2120 bool asynchronous = m_frame && m_frame->settings().asynchronousSpellCheckingEnabled() && !shouldShowCorrectionPanel; 2122 2121 2123 2122 // In asynchronous mode, we intentionally check paragraph-wide sentence. … … 2632 2631 String Editor::selectedTextForClipboard() const 2633 2632 { 2634 if (m_frame->settings() && m_frame->settings()->selectionIncludesAltImageText())2633 if (m_frame->settings().selectionIncludesAltImageText()) 2635 2634 return selectedText(TextIteratorEmitsImageAltText); 2636 2635 return selectedText(); … … 2990 2989 VisibleSelection newAdjacentWords; 2991 2990 VisibleSelection newSelectedSentence; 2992 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();2991 bool caretBrowsing = m_frame->settings().caretBrowsingEnabled(); 2993 2992 if (m_frame->selection()->selection().isContentEditable() || caretBrowsing) { 2994 2993 VisiblePosition newStart(m_frame->selection()->selection().visibleStart()); -
trunk/Source/WebCore/editing/EditorCommand.cpp
r154178 r154219 1173 1173 return false; 1174 1174 1175 Settings* settings = frame->settings(); 1176 bool defaultValue = settings && settings->javaScriptCanAccessClipboard(); 1175 bool defaultValue = frame->settings().javaScriptCanAccessClipboard(); 1177 1176 1178 1177 EditorClient* client = frame->editor().client(); … … 1185 1184 return false; 1186 1185 1187 Settings* settings = frame->settings(); 1188 bool defaultValue = settings && settings->javaScriptCanAccessClipboard() && settings->DOMPasteAllowed(); 1186 bool defaultValue = frame->settings().javaScriptCanAccessClipboard() && frame->settings().DOMPasteAllowed(); 1189 1187 1190 1188 EditorClient* client = frame->editor().client(); … … 1208 1206 static bool caretBrowsingEnabled(Frame* frame) 1209 1207 { 1210 return frame->settings() && frame->settings()->caretBrowsingEnabled();1208 return frame->settings().caretBrowsingEnabled(); 1211 1209 } 1212 1210 -
trunk/Source/WebCore/editing/FrameSelection.cpp
r154184 r154219 561 561 VisiblePosition FrameSelection::positionForPlatform(bool isGetStart) const 562 562 { 563 Settings* settings = m_frame ? m_frame->settings() : 0; 564 if (settings && settings->editingBehaviorType() == EditingMacBehavior) 563 if (m_frame && m_frame->settings().editingBehaviorType() == EditingMacBehavior) 565 564 return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd(); 566 565 // Linux and Windows always extend selections from the extent endpoint. … … 1414 1413 ASSERT(view); 1415 1414 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(); 1417 1416 return (caretBrowsing || isContentEditable); 1418 1417 } … … 1771 1770 bool caretRectChangedOrCleared = recomputeCaretRect(); 1772 1771 1773 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();1772 bool caretBrowsing = m_frame->settings().caretBrowsingEnabled(); 1774 1773 bool shouldBlink = caretIsVisible() && isCaret() && (isContentEditable() || caretBrowsing) && forwardPosition.isNull(); 1775 1774 … … 1885 1884 return; 1886 1885 1887 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();1886 bool caretBrowsing = m_frame->settings().caretBrowsingEnabled(); 1888 1887 if (caretBrowsing) { 1889 1888 if (Element* anchor = enclosingAnchorElement(base())) { … … 2038 2037 2039 2038 Document* document = m_frame->document(); 2040 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();2039 bool caretBrowsing = m_frame->settings().caretBrowsingEnabled(); 2041 2040 if (!isNone() || !(document->rendererIsEditable() || caretBrowsing)) 2042 2041 return; … … 2065 2064 inline bool FrameSelection::visualWordMovementEnabled() const 2066 2065 { 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(); 2069 2069 } 2070 2070 -
trunk/Source/WebCore/editing/SpellChecker.cpp
r150140 r154219 142 142 bool SpellChecker::isAsynchronousEnabled() const 143 143 { 144 return m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled();144 return m_frame->settings().asynchronousSpellCheckingEnabled(); 145 145 } 146 146 -
trunk/Source/WebCore/editing/TextCheckingHelper.cpp
r153515 r154219 684 684 if (!frame) 685 685 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 192 192 193 193 #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; 199 197 #endif 200 198 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r154178 r154219 1132 1132 // out of the select element when user hits a left or right arrow key. 1133 1133 const Frame* frame = document()->frame(); 1134 if (frame && frame->settings() && frame->settings()->caretBrowsingEnabled()) {1134 if (frame && frame->settings().caretBrowsingEnabled()) { 1135 1135 if (keyIdentifier == "Left" || keyIdentifier == "Right") 1136 1136 return; -
trunk/Source/WebCore/html/ImageDocument.cpp
r154142 r154219 131 131 { 132 132 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())) 135 134 return; 136 135 -
trunk/Source/WebCore/html/PluginDocument.cpp
r154142 r154219 111 111 if (!frame) 112 112 return; 113 Settings* settings = frame->settings();114 if (!settings)115 return;116 113 117 114 document()->updateLayout(); -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r154166 r154219 412 412 if (!frame) 413 413 return nullptr; 414 Settings* settings = frame->settings();415 414 416 415 // The FrameLoaderClient might creation of a new WebGL context despite the page settings; in 417 416 // 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())) { 419 418 canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Web page was not allowed to create a WebGL context.")); 420 419 return nullptr; … … 425 424 426 425 if (attributes.antialias) { 427 if ( settings && !settings->openGLMultisamplingEnabled())426 if (!frame->settings().openGLMultisamplingEnabled()) 428 427 attributes.antialias = false; 429 428 } … … 5821 5820 return; 5822 5821 5823 if (!frame->loader().client()->allowWebGL(frame->settings() && frame->settings()->webGLEnabled()))5822 if (!frame->loader().client()->allowWebGL(frame->settings().webGLEnabled())) 5824 5823 return; 5825 5824 -
trunk/Source/WebCore/html/parser/XSSAuditor.cpp
r154142 r154219 240 240 241 241 if (Frame* frame = document->frame()) 242 if (Settings* settings = frame->settings()) 243 m_isEnabled = settings->xssAuditorEnabled(); 242 m_isEnabled = frame->settings().xssAuditorEnabled(); 244 243 245 244 if (!m_isEnabled) -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r154192 r154219 435 435 m_instrumentingAgents->setInspectorPageAgent(this); 436 436 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(); 441 439 } 442 440 … … 841 839 if (frame) { 842 840 disabledByScriptController = !frame->script().canExecuteScripts(NotAboutToExecuteScript); 843 if (frame->settings()) 844 disabledInSettings = !frame->settings()->isScriptEnabled(); 841 disabledInSettings = !frame->settings().isScriptEnabled(); 845 842 } 846 843 … … 862 859 return; 863 860 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; 870 864 } 871 865 … … 1172 1166 { 1173 1167 m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled); 1174 if (mainFrame() && mainFrame()->settings())1175 mainFrame()->settings() ->setTouchEventEmulationEnabled(enabled);1168 if (mainFrame()) 1169 mainFrame()->settings().setTouchEventEmulationEnabled(enabled); 1176 1170 } 1177 1171 #endif -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r154142 r154219 627 627 #if ENABLE(FTPDIR) 628 628 // 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") { 631 630 continueAfterContentPolicy(PolicyUse); 632 631 return; … … 941 940 // but we still need to consider subframes. 942 941 if (frameLoader()->state() != FrameStateComplete) { 943 if (m_frame->settings() ->needsIsLoadingInAPISenseQuirk() && !m_subresourceLoaders.isEmpty())942 if (m_frame->settings().needsIsLoadingInAPISenseQuirk() && !m_subresourceLoaders.isEmpty()) 944 943 return true; 945 944 … … 1177 1176 case Archive::WebArchive: 1178 1177 // 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()); 1180 1179 #endif 1181 1180 #if ENABLE(MHTML) -
trunk/Source/WebCore/loader/DocumentWriter.cpp
r154192 r154219 170 170 { 171 171 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()); 190 175 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()); 191 187 if (m_encoding.isEmpty()) { 192 188 if (canReferToParentFrameEncoding(m_frame, parentFrame)) -
trunk/Source/WebCore/loader/FrameLoader.cpp
r154192 r154219 2504 2504 if (request.responseContentDispositionEncodingFallbackArray().isEmpty()) { 2505 2505 // 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()); 2508 2507 } 2509 2508 } … … 3423 3422 FrameLoader::addHTTPOriginIfNeeded(requestWithReferrer.resourceRequest(), openerFrame->loader().outgoingOrigin()); 3424 3423 3425 if ( openerFrame->settings() && !openerFrame->settings()->supportsMultipleWindows()) {3424 if (!openerFrame->settings().supportsMultipleWindows()) { 3426 3425 created = false; 3427 3426 return openerFrame; -
trunk/Source/WebCore/loader/HistoryController.cpp
r154142 r154219 363 363 FrameLoader& frameLoader = m_frame->loader(); 364 364 365 Settings* settings = m_frame->settings(); 366 bool needPrivacy = !settings || settings->privateBrowsingEnabled(); 365 bool needPrivacy = m_frame->settings().privateBrowsingEnabled(); 367 366 const KURL& historyURL = frameLoader.documentLoader()->urlForHistory(); 368 367 … … 401 400 #endif 402 401 403 Settings* settings = m_frame->settings(); 404 bool needPrivacy = !settings || settings->privateBrowsingEnabled(); 402 bool needPrivacy = m_frame->settings().privateBrowsingEnabled(); 405 403 const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory(); 406 404 … … 450 448 } 451 449 452 Settings* settings = m_frame->settings(); 453 bool needPrivacy = !settings || settings->privateBrowsingEnabled(); 450 bool needPrivacy = m_frame->settings().privateBrowsingEnabled(); 454 451 const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory(); 455 452 … … 543 540 return; 544 541 545 Settings* settings = m_frame->settings(); 546 if (!settings || settings->privateBrowsingEnabled()) 542 if (m_frame->settings().privateBrowsingEnabled()) 547 543 return; 548 544 … … 872 868 page->backForward()->addItem(topItem.release()); 873 869 874 Settings* settings = m_frame->settings(); 875 if (!settings || settings->privateBrowsingEnabled()) 870 if (m_frame->settings().privateBrowsingEnabled()) 876 871 return; 877 872 … … 893 888 m_currentItem->setFormContentType(String()); 894 889 895 Settings* settings = m_frame->settings(); 896 if (!settings || settings->privateBrowsingEnabled()) 890 if (m_frame->settings().privateBrowsingEnabled()) 897 891 return; 898 892 -
trunk/Source/WebCore/loader/MixedContentChecker.cpp
r154142 r154219 69 69 return true; 70 70 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); 73 72 logWarning(allowed, "displayed", url); 74 73 … … 84 83 return true; 85 84 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); 88 86 logWarning(allowed, "ran", url); 89 87 -
trunk/Source/WebCore/loader/SubframeLoader.cpp
r154192 r154219 109 109 bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType) 110 110 { 111 Settings* settings = m_frame->settings();112 if (!settings)113 return false;114 115 111 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()) 119 115 return false; 120 116 } … … 405 401 bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason) 406 402 { 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()); 409 404 if (!allowed && reason == AboutToInstantiatePlugin) 410 405 m_frame->loader().client()->didNotAllowPlugins(); -
trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
r154142 r154219 139 139 ASSERT(frame && frame->page()); 140 140 141 if (!frame->settings() || !frame->settings()->offlineWebApplicationCacheEnabled())141 if (!frame->settings().offlineWebApplicationCacheEnabled()) 142 142 return; 143 143 … … 197 197 198 198 // Don't change anything on disk if private browsing is enabled. 199 if (frame->settings() ->privateBrowsingEnabled()) {199 if (frame->settings().privateBrowsingEnabled()) { 200 200 postListenerTask(ApplicationCacheHost::CHECKING_EVENT, documentLoader); 201 201 postListenerTask(ApplicationCacheHost::ERROR_EVENT, documentLoader); … … 215 215 void ApplicationCacheGroup::selectCacheWithoutManifestURL(Frame* frame) 216 216 { 217 if (!frame->settings() || !frame->settings()->offlineWebApplicationCacheEnabled())217 if (!frame->settings().offlineWebApplicationCacheEnabled()) 218 218 return; 219 219 … … 441 441 442 442 // Don't change anything on disk if private browsing is enabled. 443 if ( !frame->settings() || frame->settings()->privateBrowsingEnabled()) {443 if (frame->settings().privateBrowsingEnabled()) { 444 444 ASSERT(m_pendingMasterResourceLoaders.isEmpty()); 445 445 ASSERT(m_pendingEntries.isEmpty()); -
trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
r151099 r154219 475 475 bool ApplicationCacheHost::isApplicationCacheEnabled() 476 476 { 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(); 479 478 } 480 479 -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r151586 r154219 353 353 return true; 354 354 355 Settings* settings = m_loader->frameLoader()->frame()->settings();356 if (!settings)357 return true;358 359 355 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(); 361 357 } 362 358 -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r154192 r154219 366 366 367 367 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)) { 370 369 frame()->loader().client()->didNotAllowScript(); 371 370 return false; -
trunk/Source/WebCore/loader/icon/IconController.cpp
r154142 r154219 148 148 // People who want to avoid loading images generally want to avoid loading all images, unless an exception has been made for site icons. 149 149 // 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()) 152 151 return; 153 152 -
trunk/Source/WebCore/page/ContextMenuController.cpp
r154178 r154219 184 184 FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer())); 185 185 Page* newPage = oldPage; 186 if ( !frame->settings() || frame->settings()->supportsMultipleWindows()) {186 if (frame->settings().supportsMultipleWindows()) { 187 187 newPage = oldPage->chrome().createWindow(frame, request, WindowFeatures(), NavigationAction(request.resourceRequest())); 188 188 if (!newPage) -
trunk/Source/WebCore/page/DOMWindow.cpp
r154178 r154219 358 358 return true; 359 359 360 Settings* settings = firstFrame->settings(); 361 return settings && settings->javaScriptCanOpenWindowsAutomatically(); 360 return firstFrame->settings().javaScriptCanOpenWindowsAutomatically(); 362 361 } 363 362 … … 924 923 return; 925 924 926 bool allowFocus = WindowFocusAllowedIndicator::windowFocusAllowed() || !m_frame->settings() ->windowFocusRestricted();925 bool allowFocus = WindowFocusAllowedIndicator::windowFocusAllowed() || !m_frame->settings().windowFocusRestricted(); 927 926 if (context) { 928 927 ASSERT(isMainThread()); … … 949 948 void DOMWindow::blur() 950 949 { 951 952 950 if (!m_frame) 953 951 return; … … 957 955 return; 958 956 959 if (m_frame->settings() ->windowFocusRestricted())957 if (m_frame->settings().windowFocusRestricted()) 960 958 return; 961 959 … … 988 986 } 989 987 990 Settings* settings = m_frame->settings(); 991 bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows(); 988 bool allowScriptsToCloseWindows = m_frame->settings().allowScriptsToCloseWindows(); 992 989 993 990 if (!(page->openedByDOM() || page->backForward()->count() <= 1 || allowScriptsToCloseWindows)) … … 1387 1384 if (!authorOnly) 1388 1385 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; 1393 1388 1394 1389 PseudoId pseudoId = CSSSelector::pseudoId(pseudoType); -
trunk/Source/WebCore/page/DragController.cpp
r154178 r154219 662 662 if ((m_dragSourceAction & DragSourceActionImage) 663 663 && isHTMLImageElement(node) 664 && sourceFrame->settings() 665 && sourceFrame->settings()->loadsImagesAutomatically()) { 664 && sourceFrame->settings().loadsImagesAutomatically()) { 666 665 state.type = static_cast<DragSourceAction>(state.type | DragSourceActionImage); 667 666 return toElement(node); … … 846 845 m_client->willPerformDragSourceAction(DragSourceActionLink, dragOrigin, clipboard); 847 846 if (!dragImage) { 848 dragImage = createDragImageForLink(linkURL, hitTestResult.textContent(), src->settings() ? src->settings()->fontRenderingMode() : NormalRenderingMode);847 dragImage = createDragImageForLink(linkURL, hitTestResult.textContent(), src->settings().fontRenderingMode()); 849 848 IntSize size = dragImageSize(dragImage); 850 849 m_dragOffset = IntPoint(-size.width() / 2, -LinkDragBorderInset); -
trunk/Source/WebCore/page/EventHandler.cpp
r154184 r154219 947 947 VisibleSelection newSelection; 948 948 Node* node = event.targetNode(); 949 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();949 bool caretBrowsing = m_frame->settings().caretBrowsingEnabled(); 950 950 if (node && (caretBrowsing || node->rendererIsEditable()) && node->renderer()) { 951 951 VisiblePosition pos = node->renderer()->positionForPoint(event.localPoint()); … … 1215 1215 // If the link is editable, then we need to check the settings to see whether or not the link should be followed 1216 1216 if (editable) { 1217 ASSERT(m_frame->settings()); 1218 switch (m_frame->settings()->editableLinkBehavior()) { 1217 switch (m_frame->settings().editableLinkBehavior()) { 1219 1218 default: 1220 1219 case EditableLinkDefaultBehavior: … … 2636 2635 { 2637 2636 #if ENABLE(DRAG_SUPPORT) 2638 if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled()) {2637 if (m_frame->settings().touchDragDropEnabled()) { 2639 2638 IntPoint adjustedPoint = gestureEvent.position(); 2640 2639 #if ENABLE(TOUCH_ADJUSTMENT) … … 2817 2816 bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const 2818 2817 { 2819 if ( m_frame->settings() && !m_frame->settings()->touchAdjustmentEnabled())2818 if (!m_frame->settings().touchAdjustmentEnabled()) 2820 2819 return false; 2821 2820 return !event.area().isEmpty(); … … 3031 3030 return; 3032 3031 3033 Settings* settings = m_frame->settings(); 3034 if (settings && !settings->deviceSupportsMouse()) 3032 if (!m_frame->settings().deviceSupportsMouse()) 3035 3033 return; 3036 3034 … … 3071 3069 ASSERT(!m_mousePressed); 3072 3070 3073 Settings* settings = m_frame->settings(); 3074 if (settings && !settings->deviceSupportsMouse()) 3071 if (!m_frame->settings().deviceSupportsMouse()) 3075 3072 return; 3076 3073 … … 3706 3703 return; 3707 3704 3708 if (!m_frame->settings() ->backspaceKeyNavigationEnabled())3705 if (!m_frame->settings().backspaceKeyNavigationEnabled()) 3709 3706 return; 3710 3707 … … 4065 4062 bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event) 4066 4063 { 4067 if (!m_frame || !m_frame->settings() || !m_frame->settings()->isTouchEventEmulationEnabled())4064 if (!m_frame || !m_frame->settings().isTouchEventEmulationEnabled()) 4068 4065 return false; 4069 4066 -
trunk/Source/WebCore/page/FocusController.cpp
r154178 r154219 288 288 Node* currentNode = document->focusedElement(); 289 289 // 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(); 291 291 292 292 if (caretBrowsing && !currentNode) … … 569 569 return; 570 570 571 bool caretBrowsing = oldFocusedFrame->settings() ->caretBrowsingEnabled();571 bool caretBrowsing = oldFocusedFrame->settings().caretBrowsingEnabled(); 572 572 if (caretBrowsing) 573 573 return; -
trunk/Source/WebCore/page/Frame.cpp
r154192 r154219 152 152 inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient) 153 153 : m_page(page) 154 , m_settings(&page->settings()) 154 155 , m_treeNode(this, parentFromOwnerElement(ownerElement)) 155 156 , m_loader(this, frameLoaderClient) … … 184 185 #if USE(TILED_BACKING_STORE) 185 186 // Top level frame only for now. 186 setTiledBackingStoreEnabled( page->settings().tiledBackingStoreEnabled());187 setTiledBackingStoreEnabled(settings().tiledBackingStoreEnabled()); 187 188 #endif 188 189 } else { … … 327 328 } 328 329 #endif // ENABLE(ORIENTATION_EVENTS) 329 330 Settings* Frame::settings() const331 {332 return m_page ? &m_page->settings() : 0;333 }334 330 335 331 static PassOwnPtr<RegularExpression> createRegExpForLabels(const Vector<String>& labels) … … 561 557 return; 562 558 563 if (loader().stateMachine()->creatingInitialEmptyDocument() && !settings() ->shouldInjectUserScriptsInInitialEmptyDocument())559 if (loader().stateMachine()->creatingInitialEmptyDocument() && !settings().shouldInjectUserScriptsInInitialEmptyDocument()) 564 560 return; 565 561 … … 947 943 948 944 // 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()) 950 946 return 1; 951 947 -
trunk/Source/WebCore/page/Frame.h
r154192 r154219 142 142 static Frame* frameForWidget(const Widget*); 143 143 144 Settings * settings() const; // can be NULL144 Settings& settings() const { return *m_settings; } 145 145 146 146 void setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot); … … 211 211 212 212 Page* m_page; 213 const RefPtr<Settings> m_settings; 213 214 mutable FrameTree m_treeNode; 214 215 mutable FrameLoader m_loader; -
trunk/Source/WebCore/page/FrameView.cpp
r154201 r154219 496 496 bool FrameView::frameFlatteningEnabled() const 497 497 { 498 if (Settings* settings = frame().settings()) 499 return settings->frameFlatteningEnabled(); 500 return false; 498 return frame().settings().frameFlatteningEnabled(); 501 499 } 502 500 … … 541 539 PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation) 542 540 { 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); 547 543 548 544 // FIXME: We need to update the scrollbar dynamically as documents change (or as doc elements and bodies get discovered that have custom styles). … … 798 794 if (!renderView) 799 795 return false; 800 if (frame().settings() && frame().settings()->compositedScrollingForFramesEnabled())796 if (frame().settings().compositedScrollingForFramesEnabled()) 801 797 return renderView->compositor()->inForcedCompositingMode(); 802 798 return false; … … 1634 1630 bool FrameView::fixedElementsLayoutRelativeToFrame() const 1635 1631 { 1636 if (!frame().settings()) 1637 return false; 1638 1639 return frame().settings()->fixedElementsLayoutRelativeToFrame(); 1632 return frame().settings().fixedElementsLayoutRelativeToFrame(); 1640 1633 } 1641 1634 … … 3085 3078 float FrameView::visibleContentScaleFactor() const 3086 3079 { 3087 if (!isMainFrameView() || !frame().settings() ->applyPageScaleFactorInCompositor())3080 if (!isMainFrameView() || !frame().settings().applyPageScaleFactorInCompositor()) 3088 3081 return 1; 3089 3082 -
trunk/Source/WebCore/page/Navigator.cpp
r154192 r154219 64 64 if (!(sourceURL->endsWith("/dqm_script.js") || sourceURL->endsWith("/dqm_loader.js") || sourceURL->endsWith("/tdqm_loader.js"))) 65 65 return false; 66 Settings* settings = frame->settings(); 67 if (!settings) 68 return false; 69 return settings->needsSiteSpecificQuirks(); 66 return frame->settings().needsSiteSpecificQuirks(); 70 67 } 71 68 … … 125 122 bool Navigator::javaEnabled() const 126 123 { 127 if (!m_frame || !m_frame->settings())124 if (!m_frame) 128 125 return false; 129 126 130 if (!m_frame->settings() ->isJavaEnabled())127 if (!m_frame->settings().isJavaEnabled()) 131 128 return false; 132 if (m_frame->document()->securityOrigin()->isLocal() && !m_frame->settings() ->isJavaEnabledForLocalFiles())129 if (m_frame->document()->securityOrigin()->isLocal() && !m_frame->settings().isJavaEnabledForLocalFiles()) 133 130 return false; 134 131 -
trunk/Source/WebCore/page/Page.h
r154122 r154219 458 458 RefPtr<ScrollingCoordinator> m_scrollingCoordinator; 459 459 460 const OwnPtr<Settings> m_settings;460 const RefPtr<Settings> m_settings; 461 461 OwnPtr<ProgressTracker> m_progress; 462 462 -
trunk/Source/WebCore/page/Settings.cpp
r153927 r154219 183 183 } 184 184 185 Pass OwnPtr<Settings> Settings::create(Page* page)186 { 187 return adopt Ptr(new Settings(page));185 PassRefPtr<Settings> Settings::create(Page* page) 186 { 187 return adoptRef(new Settings(page)); 188 188 } 189 189 -
trunk/Source/WebCore/page/Settings.h
r153696 r154219 36 36 #include "Timer.h" 37 37 #include <wtf/HashMap.h> 38 #include <wtf/RefCounted.h> 38 39 #include <wtf/text/AtomicString.h> 39 40 #include <wtf/text/AtomicStringHash.h> … … 59 60 }; 60 61 61 class Settings {62 class Settings : public RefCounted<Settings> { 62 63 WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED; 63 64 public: 64 static PassOwnPtr<Settings> create(Page*); 65 65 static PassRefPtr<Settings> create(Page*); 66 66 ~Settings(); 67 67 -
trunk/Source/WebCore/page/SpatialNavigation.cpp
r153704 r154219 91 91 bool isSpatialNavigationEnabled(const Frame* frame) 92 92 { 93 return (frame && frame->settings() && frame->settings()->spatialNavigationEnabled());93 return (frame && frame->settings().spatialNavigationEnabled()); 94 94 } 95 95 -
trunk/Source/WebCore/page/mac/EventHandlerMac.mm
r154184 r154219 709 709 bool EventHandler::needsKeyboardEventDisambiguationQuirks() const 710 710 { 711 Settings* settings = m_frame->settings();712 if (!settings)713 return false;714 715 711 #if ENABLE(DASHBOARD_SUPPORT) 716 if ( settings->usesDashboardBackwardCompatibilityMode())712 if (m_frame->settings().usesDashboardBackwardCompatibilityMode()) 717 713 return true; 718 714 #endif 719 715 720 if ( settings->needsKeyboardEventDisambiguationQuirks())716 if (m_frame->settings().needsKeyboardEventDisambiguationQuirks()) 721 717 return true; 722 718 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r154165 r154219 3273 3273 { 3274 3274 // 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(); 3276 3276 RenderObject* caretPainter; 3277 3277 bool isContentEditable; -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r154178 r154219 645 645 bool RenderFrameSet::flattenFrameSet() const 646 646 { 647 return frame() && frame()->settings() && frame()->settings()->frameFlatteningEnabled();647 return frame() && frame()->settings().frameFlatteningEnabled(); 648 648 } 649 649 -
trunk/Source/WebCore/rendering/RenderIFrame.cpp
r154184 r154219 109 109 return false; // Seamless iframes are already "flat", don't try to flatten them. 110 110 111 bool enabled = frame && frame->settings() && frame->settings()->frameFlatteningEnabled();111 bool enabled = frame && frame->settings().frameFlatteningEnabled(); 112 112 113 113 if (!enabled || !frame->page()) -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r154184 r154219 146 146 tiledBacking->setUnparentsOffscreenTiles(true); 147 147 148 tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings() && frame->settings()->scrollingPerformanceLoggingEnabled());148 tiledBacking->setScrollingPerformanceLoggingEnabled(frame->settings().scrollingPerformanceLoggingEnabled()); 149 149 adjustTiledBackingCoverage(); 150 150 } -
trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
r153927 r154219 292 292 return false; 293 293 294 if (!frame->settings()) 295 return false; 296 297 bool caretBrowsing = frame->settings()->caretBrowsingEnabled(); 294 bool caretBrowsing = frame->settings().caretBrowsingEnabled(); 298 295 if (caretBrowsing) { 299 296 switch (keyEvent->windowsVirtualKeyCode()) { -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r154192 r154219 436 436 ASSERT(coreFrame); 437 437 438 Settings* settings = coreFrame->settings(); 439 if (!settings || !settings->isScriptEnabled()) 438 if (!coreFrame->settings().isScriptEnabled()) 440 439 return; 441 440 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r154192 r154219 586 586 ASSERT(coreFrame); 587 587 588 Settings* settings = coreFrame->settings(); 589 if (!settings || !settings->isScriptEnabled()) 588 if (!coreFrame->settings().isScriptEnabled()) 590 589 return; 591 590 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r154192 r154219 1669 1669 Frame* frame = core(m_webFrame.get()); 1670 1670 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")) { 1672 1672 for (NSUInteger i = 0; i < [attributeKeys count]; ++i) 1673 1673 [attributeKeys replaceObjectAtIndex:i withObject:[[attributeKeys objectAtIndex:i] lowercaseString]]; -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
r154142 r154219 58 58 bool WebFrameNetworkingContext::needsSiteSpecificQuirks() const 59 59 { 60 return frame() && frame()->settings() && frame()->settings()->needsSiteSpecificQuirks();60 return frame() && frame()->settings().needsSiteSpecificQuirks(); 61 61 } 62 62 63 63 bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const 64 64 { 65 return frame() && frame()->settings() && frame()->settings()->localFileContentSniffingEnabled();65 return frame() && frame()->settings().localFileContentSniffingEnabled(); 66 66 } 67 67 … … 94 94 ASSERT(isMainThread()); 95 95 96 if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())96 if (frame() && frame()->settings().privateBrowsingEnabled()) 97 97 return *privateSession; 98 98 -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r154178 r154219 633 633 return true; 634 634 635 if (m_frame && m_frame->settings() && m_frame->settings()->arePluginsEnabled()635 if (m_frame && m_frame->settings().arePluginsEnabled() 636 636 && PluginDatabase::installedPlugins()->isMIMETypeRegistered(type)) 637 637 return true; … … 1349 1349 mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension); 1350 1350 1351 bool arePluginsEnabled = (m_frame && m_frame->settings() && m_frame->settings()->arePluginsEnabled());1351 bool arePluginsEnabled = (m_frame && m_frame->settings().arePluginsEnabled()); 1352 1352 if (arePluginsEnabled && !mimeType.length()) 1353 1353 mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension); -
trunk/Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
r154142 r154219 109 109 ASSERT(isMainThread()); 110 110 111 if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())111 if (frame() && frame()->settings().privateBrowsingEnabled()) 112 112 return *privateSession; 113 113 -
trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
r153927 r154219 366 366 return false; 367 367 368 bool caretBrowsing = frame->settings() ->caretBrowsingEnabled();368 bool caretBrowsing = frame->settings().caretBrowsingEnabled(); 369 369 if (caretBrowsing) { 370 370 switch (keyEvent->windowsVirtualKeyCode()) { -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
r150282 r154219 104 104 ContentSniffingPolicy contentSniffingPolicy = resourceLoader->shouldSniffContent() ? SniffContent : DoNotSniffContent; 105 105 StoredCredentials allowStoredCredentials = resourceLoader->shouldUseCredentialStorage() ? AllowStoredCredentials : DoNotAllowStoredCredentials; 106 bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame()->settings() ->privateBrowsingEnabled();106 bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame()->settings().privateBrowsingEnabled(); 107 107 108 108 // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient. -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r154192 r154219 609 609 m_pluginElement->setNeedsStyleRecalc(SyntheticStyleChange); 610 610 } 611 if (frame() && !frame()->settings() ->maximumPlugInSnapshotAttempts()) {611 if (frame() && !frame()->settings().maximumPlugInSnapshotAttempts()) { 612 612 m_pluginElement->setDisplayState(HTMLPlugInElement::DisplayingSnapshot); 613 613 return; … … 1416 1416 return false; 1417 1417 1418 Settings* settings = frame()->settings();1419 if (!settings)1420 return false;1421 1422 1418 // We know that some plug-ins can support snapshotting without needing 1423 1419 // accelerated compositing. Since we're trying to snapshot them anyway, … … 1427 1423 return false; 1428 1424 1429 return settings->acceleratedCompositingEnabled();1425 return frame()->settings().acceleratedCompositingEnabled(); 1430 1426 } 1431 1427 … … 1532 1528 return true; 1533 1529 1534 Settings* settings = frame()->settings(); 1535 if (!settings) 1536 return true; 1537 1538 return settings->privateBrowsingEnabled(); 1530 return frame()->settings().privateBrowsingEnabled(); 1539 1531 } 1540 1532 … … 1689 1681 1690 1682 #if PLATFORM(MAC) 1691 unsigned maximumSnapshotRetries = frame() ? frame()->settings() ->maximumPlugInSnapshotAttempts() : 0;1683 unsigned maximumSnapshotRetries = frame() ? frame()->settings().maximumPlugInSnapshotAttempts() : 0; 1692 1684 if (snapshotImage && isAlmostSolidColor(static_cast<BitmapImage*>(snapshotImage.get())) && m_countSnapshotRetries < maximumSnapshotRetries) { 1693 1685 ++m_countSnapshotRetries; … … 1720 1712 void PluginView::pluginDidReceiveUserInteraction() 1721 1713 { 1722 if (frame() && !frame()->settings() ->plugInSnapshottingEnabled())1714 if (frame() && !frame()->settings().plugInSnapshottingEnabled()) 1723 1715 return; 1724 1716 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r154142 r154219 89 89 bool WebFrameNetworkingContext::needsSiteSpecificQuirks() const 90 90 { 91 return frame() && frame()->settings() && frame()->settings()->needsSiteSpecificQuirks();91 return frame() && frame()->settings().needsSiteSpecificQuirks(); 92 92 } 93 93 94 94 bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const 95 95 { 96 return frame() && frame()->settings() && frame()->settings()->localFileContentSniffingEnabled();96 return frame() && frame()->settings().localFileContentSniffingEnabled(); 97 97 } 98 98 … … 118 118 ASSERT(isMainThread()); 119 119 120 if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())120 if (frame() && frame()->settings().privateBrowsingEnabled()) 121 121 return *privateSession; 122 122 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
r153355 r154219 66 66 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const 67 67 { 68 if (frame() && frame()->settings() && frame()->settings()->privateBrowsingEnabled())68 if (frame() && frame()->settings().privateBrowsingEnabled()) 69 69 return *privateSession; 70 70
Note: See TracChangeset
for help on using the changeset viewer.