Commit fed4d16e authored by darin@apple.com's avatar darin@apple.com

Frame::tree should return a reference instead of a pointer

https://bugs.webkit.org/show_bug.cgi?id=120259

Reviewed by Andreas Kling.

Source/WebCore:

* page/Frame.h:
(WebCore::Frame::tree): Return a reference instead of a pointer.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::setLocation):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore::Document::adoptNode):
(WebCore::Document::canNavigate):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::setDesignMode):
(WebCore::Document::parentDocument):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initContentSecurityPolicy):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::hasFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::documents):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::numPendingOrLoadingRequests):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::findFrameForNavigation):
(WebCore::FrameLoader::effectiveSandboxFlags):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::currentFramesMatchItem):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::isMainLoadProgressing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
* loader/icon/IconController.cpp:
(WebCore::IconController::urlsForTypes):
(WebCore::IconController::startLoader):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::windowScreenDidChange):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::length):
(WebCore::DOMWindow::name):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
(WebCore::DOMWindow::open):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):
* page/Frame.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::Frame::setPrinting):
(WebCore::Frame::shouldUsePrintingLayout):
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
(WebCore::Frame::willDetachPage):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::isURLAllowed):
* page/FrameTree.cpp:
(WebCore::FrameTree::~FrameTree):
(WebCore::FrameTree::setName):
(WebCore::FrameTree::transferChild):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::actuallyAppendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::scopedChild):
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::childCount):
(WebCore::FrameTree::child):
(WebCore::FrameTree::find):
(WebCore::FrameTree::isDescendantOf):
(WebCore::FrameTree::traverseNext):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::deepLastChild):
(WebCore::FrameTree::top):
(printFrames):
(showFrameTree):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::hasCompositingAncestor):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::updateCanBlitOnScrollRecursively):
(WebCore::FrameView::setIsOverlapped):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::updateBackgroundRecursively):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintContentsForSnapshot):
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::notifyWidgetsInAllFrames):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::~Page):
(WebCore::Page::renderTreeSize):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::refreshPlugins):
(WebCore::Page::takeAnyMediaCanStartListener):
(WebCore::incrementFrame):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMediaVolume):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::didMoveOnscreen):
(WebCore::Page::willMoveOffscreen):
(WebCore::Page::setIsInWindow):
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
(WebCore::Page::setDebugger):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::dnsPrefetchingStateChanged):
(WebCore::Page::collectPluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
(WebCore::Page::checkSubframeCountConsistency):
(WebCore::Page::suspendActiveDOMObjectsAndAnimations):
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
(WebCore::Page::captionPreferencesChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimations):
(WebCore::AnimationControllerPrivate::resumeAnimations):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::targetFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::numberOfScrollableAreas):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
Use tree(). instead of tree()->.

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::closeURLRecursively):
(BlackBerry::WebKit::enableCrossSiteXHRRecursively):
(BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::createFrame):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::convertPointToFrame):
(BlackBerry::WebKit::DOMSupport::incrementFrame):
Use tree(). instead of tree()->.

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::clearFrameName):
(DumpRenderTreeSupportEfl::frameChildren):
(DumpRenderTreeSupportEfl::frameParent):
* ewk/ewk_frame.cpp:
(_ewk_frame_children_iterator_next):
(ewk_frame_child_find):
(ewk_frame_name_get):
(ewk_frame_child_add):
* ewk/ewk_view.cpp:
(ewk_view_frame_create):
Use tree(). instead of tree()->.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::getFrameChildren):
(DumpRenderTreeSupportGtk::clearMainFrameName):
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::createFrame):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_name):
(webkit_web_frame_get_parent):
(webkit_web_frame_find_frame):
* webkit/webkitwebview.cpp:
(webkit_web_view_set_highlight_text_matches):
Use tree(). instead of tree()->.

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::performRequest):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView loadPluginRequest:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(applyAppleDictionaryApplicationQuirkNonInlinePart):
(WebFrameLoaderClient::prepareForDataSourceReplacement):
(WebFrameLoaderClient::createFrame):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _unmarkAllBadGrammar]):
(-[WebFrame _unmarkAllMisspellings]):
(-[WebFrame _atMostOneFrameHasSelection]):
(-[WebFrame _findFrameWithSelection]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame _isDescendantOfFrame:]):
(-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
(-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
(-[WebFrame name]):
(-[WebFrame findFrameNamed:]):
(-[WebFrame parentFrame]):
(-[WebFrame childFrames]):
* WebView/WebView.mm:
(-[WebView _attachScriptDebuggerToAllFrames]):
(-[WebView _detachScriptDebuggerFromAllFrames]):
(-[WebView _clearMainFrameName]):
(-[WebView _isUsingAcceleratedCompositing]):
(-[WebView _isSoftwareRenderable]):
(-[WebView setHostWindow:]):
(incrementFrame):
Use tree(). instead of tree()->.

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::clearFrameName):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(drtDescriptionSuitableForTestResult):
(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFinishDocumentLoad):
(WebCore::FrameLoaderClientQt::postProgressStartedNotification):
(WebCore::FrameLoaderClientQt::didPerformFirstNavigation):
(WebCore::FrameLoaderClientQt::createFrame):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameData::QWebFrameData):
(QWebFrameAdapter::load):
(QWebFrameAdapter::uniqueName):
(QWebFrameAdapter::childFrames):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::findText):
Use tree(). instead of tree()->.

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createFrame):
* WebFrame.cpp:
(WebFrame::name):
(WebFrame::findFrameNamed):
(WebFrame::parentFrame):
(EnumChildFrames::EnumChildFrames):
(EnumChildFrames::Next):
(EnumChildFrames::Skip):
(EnumChildFrames::Reset):
(WebFrame::isDescendantOfFrame):
(WebFrame::unmarkAllMisspellings):
(WebFrame::unmarkAllBadGrammar):
* WebView.cpp:
(WebView::initWithFrame):
(incrementFrame):
(WebView::clearMainFrameName):
Use tree(). instead of tree()->.

Source/WebKit/wince:

* WebView.cpp:
(WebView::createFrame):
Use tree(). instead of tree()->.

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createFrame):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithSpotlight):
* WebProcess/WebPage/FindController.cpp:
(WebKit::frameWithSelection):
(WebKit::FindController::rectsForTextMatches):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::init):
(WebKit::WebFrame::contentsAsString):
(WebKit::WebFrame::name):
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearMainFrameName):
(WebKit::WebPage::setDrawsBackground):
(WebKit::WebPage::setDrawsTransparentBackground):
(WebKit::WebPage::setWindowResizerSize):
(WebKit::frameWithSelection):
(WebKit::WebPage::unmarkAllMisspellings):
(WebKit::WebPage::unmarkAllBadGrammar):
(WebKit::pageContainsAnyHorizontalScrollbars):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
Use tree(). instead of tree()->.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 28a23036
This diff is collapsed.
......@@ -78,12 +78,12 @@ JSValue nonCachingStaticFunctionGetter(ExecState* exec, JSValue, PropertyName pr
static JSValue childFrameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
{
return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow());
return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow());
}
static JSValue indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
{
return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->scopedChild(index)->document()->domWindow());
return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree().scopedChild(index)->document()->domWindow());
}
static JSValue namedItemGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
......@@ -207,7 +207,7 @@ bool JSDOMWindow::getOwnPropertySlot(JSObject* object, ExecState* exec, Property
// naming frames things that conflict with window properties that
// are in Moz but not IE. Since we have some of these, we have to do
// it the Moz way.
if (thisObject->impl()->frame()->tree()->scopedChild(propertyNameToAtomicString(propertyName))) {
if (thisObject->impl()->frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))) {
slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, childFrameGetter);
return true;
}
......@@ -230,7 +230,7 @@ bool JSDOMWindow::getOwnPropertySlot(JSObject* object, ExecState* exec, Property
// allow window[1] or parent[1] etc. (#56983)
unsigned i = propertyName.asIndex();
if (i < thisObject->impl()->frame()->tree()->scopedChildCount()) {
if (i < thisObject->impl()->frame()->tree().scopedChildCount()) {
ASSERT(i != PropertyName::NotAnIndex);
slot.setCustomIndex(thisObject, ReadOnly | DontDelete | DontEnum, i, indexGetter);
return true;
......@@ -284,7 +284,7 @@ bool JSDOMWindow::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, u
// naming frames things that conflict with window properties that
// are in Moz but not IE. Since we have some of these, we have to do
// it the Moz way.
if (thisObject->impl()->frame()->tree()->scopedChild(propertyNameToAtomicString(propertyName))) {
if (thisObject->impl()->frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))) {
slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, childFrameGetter);
return true;
}
......@@ -306,7 +306,7 @@ bool JSDOMWindow::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, u
// We need to test the correct priority order.
// allow window[1] or parent[1] etc. (#56983)
if (index < thisObject->impl()->frame()->tree()->scopedChildCount()) {
if (index < thisObject->impl()->frame()->tree().scopedChildCount()) {
ASSERT(index != PropertyName::NotAnIndex);
slot.setCustomIndex(thisObject, ReadOnly | DontDelete | DontEnum, index, indexGetter);
return true;
......@@ -428,7 +428,7 @@ void JSDOMWindow::setLocation(ExecState* exec, JSValue value)
// To avoid breaking old widgets, make "var location =" in a top-level frame create
// a property named "location" instead of performing a navigation (<rdar://problem/5688039>).
if (Frame* activeFrame = activeDOMWindow(exec)->frame()) {
if (activeFrame->settings().usesDashboardBackwardCompatibilityMode() && !activeFrame->tree()->parent()) {
if (activeFrame->settings().usesDashboardBackwardCompatibilityMode() && !activeFrame->tree().parent()) {
if (BindingSecurity::shouldAllowAccessToDOMWindow(exec, impl()))
putDirect(exec->vm(), Identifier(exec, "location"), value);
return;
......
......@@ -189,7 +189,7 @@ void PageScriptDebugServer::setJavaScriptPaused(Page* page, bool paused)
page->setDefersLoading(paused);
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext())
setJavaScriptPaused(frame, paused);
}
......
......@@ -352,7 +352,7 @@ static bool canAccessAncestor(const SecurityOrigin* activeSecurityOrigin, Frame*
return false;
const bool isLocalActiveOrigin = activeSecurityOrigin->isLocal();
for (Frame* ancestorFrame = targetFrame; ancestorFrame; ancestorFrame = ancestorFrame->tree()->parent()) {
for (Frame* ancestorFrame = targetFrame; ancestorFrame; ancestorFrame = ancestorFrame->tree().parent()) {
Document* ancestorDocument = ancestorFrame->document();
// FIXME: Should be an ASSERT? Frames should alway have documents.
if (!ancestorDocument)
......@@ -1038,7 +1038,7 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
if (source->isFrameOwnerElement()) {
HTMLFrameOwnerElement* frameOwnerElement = toFrameOwnerElement(source.get());
if (frame() && frame()->tree()->isDescendantOf(frameOwnerElement->contentFrame())) {
if (frame() && frame()->tree().isDescendantOf(frameOwnerElement->contentFrame())) {
ec = HIERARCHY_REQUEST_ERR;
return 0;
}
......@@ -2674,15 +2674,15 @@ bool Document::canNavigate(Frame* targetFrame)
return true;
// Frame-busting is generally allowed, but blocked for sandboxed frames lacking the 'allow-top-navigation' flag.
if (!isSandboxed(SandboxTopNavigation) && targetFrame == m_frame->tree()->top())
if (!isSandboxed(SandboxTopNavigation) && targetFrame == m_frame->tree().top())
return true;
if (isSandboxed(SandboxNavigation)) {
if (targetFrame->tree()->isDescendantOf(m_frame))
if (targetFrame->tree().isDescendantOf(m_frame))
return true;
const char* reason = "The frame attempting navigation is sandboxed, and is therefore disallowed from navigating its ancestors.";
if (isSandboxed(SandboxTopNavigation) && targetFrame == m_frame->tree()->top())
if (isSandboxed(SandboxTopNavigation) && targetFrame == m_frame->tree().top())
reason = "The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set.";
printNavigationErrorMessage(targetFrame, url(), reason);
......@@ -2710,7 +2710,7 @@ bool Document::canNavigate(Frame* targetFrame)
// some way related to the frame being navigate (e.g., by the "opener"
// and/or "parent" relation). Requiring some sort of relation prevents a
// document from navigating arbitrary, unrelated top-level frames.
if (!targetFrame->tree()->parent()) {
if (!targetFrame->tree().parent()) {
if (targetFrame == m_frame->loader().opener())
return true;
......@@ -2728,13 +2728,13 @@ Frame* Document::findUnsafeParentScrollPropagationBoundary()
if (!currentFrame)
return 0;
Frame* ancestorFrame = currentFrame->tree()->parent();
Frame* ancestorFrame = currentFrame->tree().parent();
while (ancestorFrame) {
if (!ancestorFrame->document()->securityOrigin()->canAccess(securityOrigin()))
return currentFrame;
currentFrame = ancestorFrame;
ancestorFrame = ancestorFrame->tree()->parent();
ancestorFrame = ancestorFrame->tree().parent();
}
return 0;
}
......@@ -3171,7 +3171,7 @@ void Document::notifySeamlessChildDocumentsOfStylesheetUpdate() const
return;
// Seamless child frames are expected to notify their seamless children recursively, so we only do direct children.
for (Frame* child = frame()->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
for (Frame* child = frame()->tree().firstChild(); child; child = child->tree().nextSibling()) {
Document* childDocument = child->document();
if (childDocument->shouldDisplaySeamlesslyWithParent()) {
ASSERT(childDocument->seamlessParentIFrame()->document() == this);
......@@ -4147,7 +4147,7 @@ KURL Document::openSearchDescriptionURL()
static const char* const openSearchRelation = "search";
// FIXME: Why do only top-level frames have openSearchDescriptionURLs?
if (!frame() || frame()->tree()->parent())
if (!frame() || frame()->tree().parent())
return KURL();
// FIXME: Why do we need to wait for FrameStateComplete?
......@@ -4211,7 +4211,7 @@ void Document::setTransformSource(PassOwnPtr<TransformSource> source)
void Document::setDesignMode(InheritedBool value)
{
m_designMode = value;
for (Frame* frame = m_frame; frame && frame->document(); frame = frame->tree()->traverseNext(m_frame))
for (Frame* frame = m_frame; frame && frame->document(); frame = frame->tree().traverseNext(m_frame))
frame->document()->scheduleForcedStyleRecalc();
}
......@@ -4233,7 +4233,7 @@ Document* Document::parentDocument() const
{
if (!m_frame)
return 0;
Frame* parent = m_frame->tree()->parent();
Frame* parent = m_frame->tree().parent();
if (!parent)
return 0;
return parent->document();
......@@ -4549,7 +4549,7 @@ void Document::initSecurityContext()
// If we do not obtain a meaningful origin from the URL, then we try to
// find one via the frame hierarchy.
Frame* ownerFrame = m_frame->tree()->parent();
Frame* ownerFrame = m_frame->tree().parent();
if (!ownerFrame)
ownerFrame = m_frame->loader().opener();
......@@ -4576,10 +4576,10 @@ void Document::initSecurityContext()
void Document::initContentSecurityPolicy()
{
if (!m_frame->tree()->parent() || (!shouldInheritSecurityOriginFromOwner(m_url) && !isPluginDocument()))
if (!m_frame->tree().parent() || (!shouldInheritSecurityOriginFromOwner(m_url) && !isPluginDocument()))
return;
contentSecurityPolicy()->copyStateFrom(m_frame->tree()->parent()->document()->contentSecurityPolicy());
contentSecurityPolicy()->copyStateFrom(m_frame->tree().parent()->document()->contentSecurityPolicy());
}
bool Document::isContextThread() const
......@@ -4948,7 +4948,7 @@ void Document::requestFullScreenForElement(Element* element, unsigned short flag
// A descendant browsing context's document has a non-empty fullscreen element stack.
bool descendentHasNonEmptyStack = false;
for (Frame* descendant = frame() ? frame()->tree()->traverseNext() : 0; descendant; descendant = descendant->tree()->traverseNext()) {
for (Frame* descendant = frame() ? frame()->tree().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext()) {
if (descendant->document()->webkitFullscreenElement()) {
descendentHasNonEmptyStack = true;
break;
......@@ -5071,7 +5071,7 @@ void Document::webkitExitFullscreen()
// element stack (if any), ordered so that the child of the doc is last and the document furthest
// away from the doc is first.
Deque<RefPtr<Document> > descendants;
for (Frame* descendant = frame() ? frame()->tree()->traverseNext() : 0; descendant; descendant = descendant->tree()->traverseNext()) {
for (Frame* descendant = frame() ? frame()->tree().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext()) {
if (descendant->document()->webkitFullscreenElement())
descendants.prepend(descendant->document());
}
......@@ -5568,7 +5568,7 @@ void Document::didRemoveTouchEventHandler(Node* handler)
#endif
if (m_touchEventTargets->size())
return;
for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->document() && frame->document()->hasTouchEventHandlers())
return;
}
......
......@@ -376,8 +376,8 @@ void TreeScope::adoptIfNeeded(Node* node)
static Element* focusedFrameOwnerElement(Frame* focusedFrame, Frame* currentFrame)
{
for (; focusedFrame; focusedFrame = focusedFrame->tree()->parent()) {
if (focusedFrame->tree()->parent() == currentFrame)
for (; focusedFrame; focusedFrame = focusedFrame->tree().parent()) {
if (focusedFrame->tree().parent() == currentFrame)
return focusedFrame->ownerElement();
}
return 0;
......
......@@ -1591,7 +1591,7 @@ bool FrameSelection::contains(const LayoutPoint& point)
void FrameSelection::selectFrameElementInParentIfFullySelected()
{
// Find the parent frame; if there is none, then we have nothing to do.
Frame* parent = m_frame->tree()->parent();
Frame* parent = m_frame->tree().parent();
if (!parent)
return;
Page* page = m_frame->page();
......
......@@ -78,7 +78,7 @@ CachedFrameBase::CachedFrameBase(Frame* frame)
, m_view(frame->view())
, m_mousePressNode(frame->eventHandler().mousePressNode())
, m_url(frame->document()->url())
, m_isMainFrame(!frame->tree()->parent())
, m_isMainFrame(!frame->tree().parent())
#if USE(ACCELERATED_COMPOSITING)
, m_isComposited(frame->view()->hasCompositedContent())
#endif
......@@ -127,7 +127,7 @@ void CachedFrameBase::restore()
// Reconstruct the FrameTree
for (unsigned i = 0; i < m_childFrames.size(); ++i)
frame.tree()->appendChild(&m_childFrames[i]->view()->frame());
frame.tree().appendChild(&m_childFrames[i]->view()->frame());
// Open the child CachedFrames in their respective FrameLoaders.
for (unsigned i = 0; i < m_childFrames.size(); ++i)
......@@ -169,7 +169,7 @@ CachedFrame::CachedFrame(Frame* frame)
frame->loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);
// Create the CachedFrames for all Frames in the FrameTree.
for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling())
m_childFrames.append(CachedFrame::create(child));
// Active DOM objects must be suspended before we cache the frame script data,
......@@ -198,7 +198,7 @@ CachedFrame::CachedFrame(Frame* frame)
// 1 - We reuse the main frame, so when it navigates to a new page load it needs to start with a blank FrameTree.
// 2 - It's much easier to destroy a CachedFrame while it resides in the PageCache if it is disconnected from its parent.
for (unsigned i = 0; i < m_childFrames.size(); ++i)
frame->tree()->removeChild(&m_childFrames[i]->view()->frame());
frame->tree().removeChild(&m_childFrames[i]->view()->frame());
if (!m_isMainFrame)
frame->page()->decrementSubframeCount();
......
......@@ -89,7 +89,7 @@ void CachedPage::restore(Page* page)
element->updateFocusAppearance(true);
if (m_needStyleRecalcForVisitedLinks) {
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext())
frame->document()->visitedLinkState().invalidateStyleForAllLinks();
}
......
......@@ -175,7 +175,7 @@ static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
}
HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonCount", reasonCount, 1 + NumberOfReasonsFramesCannotBeInPageCache);
for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling())
rejectReasons |= logCanCacheFrameDecision(child, indentLevel + 1);
PCLOG(rejectReasons ? " Frame CANNOT be cached" : " Frame CAN be cached");
......@@ -303,7 +303,7 @@ PageCache::PageCache()
bool PageCache::canCachePageContainingThisFrame(Frame* frame)
{
for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
if (!canCachePageContainingThisFrame(child))
return false;
}
......
......@@ -153,7 +153,7 @@ bool HTMLDocument::hasFocus()
if (!page->focusController().isActive())
return false;
if (Frame* focusedFrame = page->focusController().focusedFrame()) {
if (focusedFrame->tree()->isDescendantOf(frame()))
if (focusedFrame->tree().isDescendantOf(frame()))
return true;
}
return false;
......
......@@ -451,7 +451,7 @@ void HTMLPlugInImageElement::restartSimilarPlugIns()
if (!document()->page())
return;
for (Frame* frame = document()->page()->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = document()->page()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->loader().subframeLoader()->containsPlugins())
continue;
......
......@@ -109,7 +109,7 @@ void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr
result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest>::create();
Frame* mainFrame = m_pageAgent->mainFrame();
for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext(mainFrame)) {
for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext(mainFrame)) {
DocumentLoader* documentLoader = frame->loader().documentLoader();
if (!documentLoader)
continue;
......
......@@ -266,7 +266,7 @@ void InspectorCanvasAgent::findFramesWithUninstrumentedCanvases()
{
m_framesWithUninstrumentedCanvases.clear();
for (Frame* frame = m_pageAgent->page()->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = m_pageAgent->page()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->document())
continue;
......@@ -313,7 +313,7 @@ void InspectorCanvasAgent::frameNavigated(Frame* frame)
String frameId = m_pageAgent->frameId(frame);
m_frontend->traceLogsRemoved(&frameId, 0);
}
frame = frame->tree()->traverseNext();
frame = frame->tree().traverseNext();
}
}
}
......
......@@ -279,7 +279,7 @@ void InspectorDOMAgent::restore()
Vector<Document*> InspectorDOMAgent::documents()
{
Vector<Document*> result;
for (Frame* frame = m_document->frame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traverseNext()) {
Document* document = frame->document();
if (!document)
continue;
......
......@@ -728,7 +728,7 @@ bool InspectorFileSystemAgent::assertEnabled(ErrorString* error)
ScriptExecutionContext* InspectorFileSystemAgent::assertScriptExecutionContextForOrigin(ErrorString* error, SecurityOrigin* origin)
{
for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->document() && frame->document()->securityOrigin()->isSameSchemeHostPort(origin))
return frame->document();
}
......
......@@ -583,7 +583,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
// always return the same true/false value.
bool rawCookiesImplemented = false;
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext(mainFrame())) {
for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext(mainFrame())) {
Document* document = frame->document();
Vector<KURL> allURLs = allResourcesURLsForFrame(frame);
for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) {
......@@ -618,7 +618,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
{
KURL parsedURL(ParsedURLString, url);
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext(m_page->mainFrame()))
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext(m_page->mainFrame()))
WebCore::deleteCookie(frame->document(), parsedURL, cookieName);
}
......@@ -700,7 +700,7 @@ void InspectorPageAgent::searchInResources(ErrorString*, const String& text, con
bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
RegularExpression regex = ContentSearchUtils::createSearchRegex(text, caseSensitive, isRegex);
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext(m_page->mainFrame())) {
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext(m_page->mainFrame())) {
String content;
Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it) {
......@@ -961,7 +961,7 @@ String InspectorPageAgent::loaderId(DocumentLoader* loader)
Frame* InspectorPageAgent::findFrameWithSecurityOrigin(const String& originRawString)
{
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
RefPtr<SecurityOrigin> documentOrigin = frame->document()->securityOrigin();
if (documentOrigin->toRawString() == originRawString)
return frame;
......@@ -1102,8 +1102,8 @@ PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Fra
.setUrl(frame->document()->url().string())
.setMimeType(frame->loader().documentLoader()->responseMIMEType())
.setSecurityOrigin(frame->document()->securityOrigin()->toRawString());
if (frame->tree()->parent())
frameObject->setParentId(frameId(frame->tree()->parent()));
if (frame->tree().parent())
frameObject->setParentId(frameId(frame->tree().parent()));
if (frame->ownerElement()) {
String name = frame->ownerElement()->getNameAttribute();
if (name.isEmpty())
......@@ -1141,7 +1141,7 @@ PassRefPtr<TypeBuilder::Page::FrameResourceTree> InspectorPageAgent::buildObject
}
RefPtr<TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree> > childrenArray;
for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
if (!childrenArray) {
childrenArray = TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree>::create();
result->setChildFrames(childrenArray);
......
......@@ -160,7 +160,7 @@ void PageRuntimeAgent::unmuteConsole()
void PageRuntimeAgent::reportExecutionContextCreation()
{
Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
continue;
String frameId = m_pageAgent->frameId(frame);
......
......@@ -504,7 +504,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
if (newRequest.cachePolicy() == UseProtocolCachePolicy && isPostOrRedirectAfterPost(newRequest, redirectResponse))
newRequest.setCachePolicy(ReloadIgnoringCacheData);
Frame* top = m_frame->tree()->top();
Frame* top = m_frame->tree().top();
if (top != m_frame) {
if (!frameLoader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
cancelMainResourceLoad(frameLoader()->cancelledError(newRequest));
......@@ -1047,7 +1047,7 @@ PassRefPtr<ArchiveResource> DocumentLoader::mainResource() const
if (!data)
data = SharedBuffer::create();
return ArchiveResource::create(data, r.url(), r.mimeType(), r.textEncodingName(), frame()->tree()->uniqueName());
return ArchiveResource::create(data, r.url(), r.mimeType(), r.textEncodingName(), frame()->tree().uniqueName());
}
PassRefPtr<ArchiveResource> DocumentLoader::subresource(const KURL& url) const
......
......@@ -172,7 +172,7 @@ TextResourceDecoder* DocumentWriter::createDecoderIfNeeded()
m_decoder = TextResourceDecoder::create(m_mimeType,
m_frame->settings().defaultTextEncodingName(),
m_frame->settings().usesEncodingDetector());
Frame* parentFrame = m_frame->tree()->parent();
Frame* parentFrame = m_frame->tree().parent();
// Set the hint encoding to the parent frame encoding only if
// the parent and the current frames share the security origin.
// We impose this condition because somebody can make a child frame
......
This diff is collapsed.
......@@ -179,7 +179,7 @@ void HistoryController::saveDocumentState()
ASSERT(document);
if (item->isCurrentDocument(document) && document->attached()) {
LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame.tree()->uniqueName().string().utf8().data(), item);
LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame.tree().uniqueName().string().utf8().data(), item);
item->setDocumentState(document->formElementsState());
}
}
......@@ -188,7 +188,7 @@ void HistoryController::saveDocumentState()
// history item.
void HistoryController::saveDocumentAndScrollState()
{
for (Frame* frame = &m_frame; frame; frame = frame->tree()->traverseNext(&m_frame)) {
for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame)) {
frame->loader().history().saveDocumentState();
frame->loader().history().saveScrollPositionAndViewStateToItem(frame->loader().history().currentItem());
}
......@@ -218,7 +218,7 @@ void HistoryController::restoreDocumentState()
if (m_frame.loader().documentLoader()->isClientRedirect())
return;
LOG(Loading, "WebCoreLoading %s: restoring form state from %p", m_frame.tree()->uniqueName().string().utf8().data(), m_currentItem.get());
LOG(Loading, "WebCoreLoading %s: restoring form state from %p", m_frame.tree().uniqueName().string().utf8().data(), m_currentItem.get());
m_frame.document()->setStateForNewFormElements(m_currentItem->documentState());
}
......@@ -257,7 +257,7 @@ bool HistoryController::shouldStopLoadingForHistoryItem(HistoryItem* targetItem)
// This includes recursion to handle loading into framesets properly
void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type)
{
ASSERT(!m_frame.tree()->parent());
ASSERT(!m_frame.tree().parent());
// shouldGoToHistoryItem is a private delegate method. This is needed to fix:
// <rdar://problem/3951283> can view pages from the back/forward cache that should be disallowed by Parental Controls
......@@ -387,7 +387,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
const KURL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
if (m_frame.loader().documentLoader()->isClientRedirect()) {
if (!m_currentItem && !m_frame.tree()->parent()) {
if (!m_currentItem && !m_frame.tree().parent()) {
if (!historyURL.isEmpty()) {
updateBackForwardListClippedAtTarget(true);
if (!needPrivacy) {
......@@ -403,7 +403,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
// The client redirect replaces the current history item.
updateCurrentItem();
} else {
Frame* parentFrame = m_frame.tree()->parent();
Frame* parentFrame = m_frame.tree().parent();
if (parentFrame && parentFrame->loader().history().currentItem())
parentFrame->loader().history().currentItem()->setChildItem(createItem());
}
......@@ -514,7 +514,7 @@ void HistoryController::recursiveUpdateForCommit()
}
// Iterate over the rest of the tree
for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling())
for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
child->loader().history().recursiveUpdateForCommit();
}
......@@ -558,7 +558,7 @@ void HistoryController::recursiveUpdateForSameDocumentNavigation()
m_provisionalItem = 0;
// Iterate over the rest of the tree.
for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling())
for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
child->loader().history().recursiveUpdateForSameDocumentNavigation();
}
......@@ -626,12 +626,12 @@ void HistoryController::initializeItem(HistoryItem* item)
if (originalURL.isEmpty())
originalURL = blankURL();
Frame* parentFrame = m_frame.tree()->parent();
String parent = parentFrame ? parentFrame->tree()->uniqueName() : "";
Frame* parentFrame = m_frame.tree().parent();
String parent = parentFrame ? parentFrame->tree().uniqueName() : "";
StringWithDirection title = documentLoader->title();
item->setURL(url);
item->setTarget(m_frame.tree()->uniqueName());
item->setTarget(m_frame.tree().uniqueName());
item->setParent(parent);
// FIXME: should store title directionality in history as well.
item->setTitle(title.string());
......@@ -677,7 +677,7 @@ PassRefPtr<HistoryItem> HistoryController::createItemTree(Frame& targetFrame, bo
bfItem->setDocumentSequenceNumber(m_previousItem->documentSequenceNumber());
}
for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling()) {
for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) {
FrameLoader& childLoader = child->loader();
bool hasChildLoaded = childLoader.frameHasLoaded();
......@@ -715,7 +715,7 @@ void HistoryController::recursiveSetProvisionalItem(HistoryItem* item, HistoryIt
String childFrameName = childItems[i]->target();
HistoryItem* fromChildItem = fromItem->childItemWithTarget(childFrameName);
ASSERT(fromChildItem);
Frame* childFrame = m_frame.tree()->child(childFrameName);
Frame* childFrame = m_frame.tree().child(childFrameName);
ASSERT(childFrame);
childFrame->loader().history().recursiveSetProvisionalItem(childItems[i].get(), fromChildItem, type);
}
......@@ -737,7 +737,7 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
String childFrameName = childItems[i]->target();
HistoryItem* fromChildItem = fromItem->childItemWithTarget(childFrameName);
ASSERT(fromChildItem);
Frame* childFrame = m_frame.tree()->child(childFrameName);
Frame* childFrame = m_frame.tree().child(childFrameName);
ASSERT(childFrame);
childFrame->loader().history().recursiveGoToItem(childItems[i].get(), fromChildItem, type);
}
......@@ -766,16 +766,16 @@ bool HistoryController::itemsAreClones(HistoryItem* item1, HistoryItem* item2) c
// Helper method that determines whether the current frame tree matches given history item's.
bool HistoryController::currentFramesMatchItem(HistoryItem* item) const
{
if ((!m_frame.tree()->uniqueName().isEmpty() || !item->target().isEmpty()) && m_frame.tree()->uniqueName() != item->target())
if ((!m_frame.tree().uniqueName().isEmpty() || !item->target().isEmpty()) && m_frame.tree().uniqueName() != item->target())
return false;
const HistoryItemVector& childItems = item->children();
if (childItems.size() != m_frame.tree()->childCount())
if (childItems.size() != m_frame.tree().childCount())
return false;
unsigned size = childItems