| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 , m_selection(FrameSelection::create(this)) | 99 , m_selection(FrameSelection::create(this)) |
| 100 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) | 100 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) |
| 101 , m_console(FrameConsole::create(*this)) | 101 , m_console(FrameConsole::create(*this)) |
| 102 , m_inputMethodController(InputMethodController::create(*this)) | 102 , m_inputMethodController(InputMethodController::create(*this)) |
| 103 , m_pageZoomFactor(parentPageZoomFactor(this)) | 103 , m_pageZoomFactor(parentPageZoomFactor(this)) |
| 104 , m_textZoomFactor(parentTextZoomFactor(this)) | 104 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 105 , m_inViewSourceMode(false) | 105 , m_inViewSourceMode(false) |
| 106 { | 106 { |
| 107 } | 107 } |
| 108 | 108 |
| 109 PassRefPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost*
host, FrameOwner* owner) | 109 PassRefPtrWillBeRawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client,
FrameHost* host, FrameOwner* owner) |
| 110 { | 110 { |
| 111 RefPtr<LocalFrame> frame = adoptRef(new LocalFrame(client, host, owner)); | 111 RefPtrWillBeRawPtr<LocalFrame> frame = adoptRefWillBeNoop(new LocalFrame(cli
ent, host, owner)); |
| 112 InspectorInstrumentation::frameAttachedToParent(frame.get()); | 112 InspectorInstrumentation::frameAttachedToParent(frame.get()); |
| 113 return frame.release(); | 113 return frame.release(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 LocalFrame::~LocalFrame() | 116 LocalFrame::~LocalFrame() |
| 117 { | 117 { |
| 118 setView(nullptr); | 118 // Verify that the FrameView and FrameLoader have instead been |
| 119 loader().clear(); | 119 // cleared as part of detaching the frame. |
| 120 ASSERT(!m_owner); |
| 121 ASSERT(!m_view); |
| 122 #if !ENABLE(OILPAN) |
| 123 // Oilpan: see setDOMWindow() comment why it is acceptable not to |
| 124 // mirror the non-Oilpan call below. |
| 125 // |
| 126 // Also, FrameDestructionObservers that live longer than this |
| 127 // frame object keep weak references to the frame; those will be |
| 128 // automatically cleared by the garbage collector. Hence, explicit |
| 129 // frameDestroyed() notifications aren't needed. |
| 120 setDOMWindow(nullptr); | 130 setDOMWindow(nullptr); |
| 121 | 131 |
| 122 // FIXME: What to do here... some of this is redundant with ~Frame. | 132 HashSet<RawPtr<FrameDestructionObserver> >::iterator stop = m_destructionObs
ervers.end(); |
| 123 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 133 for (HashSet<RawPtr<FrameDestructionObserver> >::iterator it = m_destruction
Observers.begin(); it != stop; ++it) |
| 124 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) | |
| 125 (*it)->frameDestroyed(); | 134 (*it)->frameDestroyed(); |
| 135 #endif |
| 136 } |
| 137 |
| 138 void LocalFrame::trace(Visitor* visitor) |
| 139 { |
| 140 #if ENABLE(OILPAN) |
| 141 visitor->trace(m_destructionObservers); |
| 142 #endif |
| 143 visitor->trace(m_loader); |
| 144 visitor->trace(m_navigationScheduler); |
| 145 visitor->trace(m_pagePopupOwner); |
| 146 visitor->trace(m_editor); |
| 147 visitor->trace(m_spellChecker); |
| 148 visitor->trace(m_selection); |
| 149 visitor->trace(m_eventHandler); |
| 150 visitor->trace(m_console); |
| 151 visitor->trace(m_inputMethodController); |
| 152 Frame::trace(visitor); |
| 153 WillBeHeapSupplementable<LocalFrame>::trace(visitor); |
| 126 } | 154 } |
| 127 | 155 |
| 128 void LocalFrame::detach() | 156 void LocalFrame::detach() |
| 129 { | 157 { |
| 130 // A lot of the following steps can result in the current frame being | 158 // A lot of the following steps can result in the current frame being |
| 131 // detached, so protect a reference to it. | 159 // detached, so protect a reference to it. |
| 132 RefPtr<LocalFrame> protect(this); | 160 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
| 133 m_loader.stopAllLoaders(); | 161 m_loader.stopAllLoaders(); |
| 134 m_loader.closeURL(); | 162 m_loader.closeURL(); |
| 135 detachChildren(); | 163 detachChildren(); |
| 136 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() | 164 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() |
| 137 // will trigger the unload event handlers of any child frames, and those eve
nt | 165 // will trigger the unload event handlers of any child frames, and those eve
nt |
| 138 // handlers might start a new subresource load in this frame. | 166 // handlers might start a new subresource load in this frame. |
| 139 m_loader.stopAllLoaders(); | 167 m_loader.stopAllLoaders(); |
| 140 m_loader.detachFromParent(); | 168 m_loader.detachFromParent(); |
| 141 } | 169 } |
| 142 | 170 |
| 143 bool LocalFrame::inScope(TreeScope* scope) const | 171 bool LocalFrame::inScope(TreeScope* scope) const |
| 144 { | 172 { |
| 145 ASSERT(scope); | 173 ASSERT(scope); |
| 146 Document* doc = document(); | 174 Document* doc = document(); |
| 147 if (!doc) | 175 if (!doc) |
| 148 return false; | 176 return false; |
| 149 // FIXME: This check is broken in for OOPI. | 177 // FIXME: This check is broken in for OOPI. |
| 150 HTMLFrameOwnerElement* owner = doc->ownerElement(); | 178 HTMLFrameOwnerElement* owner = doc->ownerElement(); |
| 151 if (!owner) | 179 if (!owner) |
| 152 return false; | 180 return false; |
| 153 return owner->treeScope() == scope; | 181 return owner->treeScope() == scope; |
| 154 } | 182 } |
| 155 | 183 |
| 184 void LocalFrame::detachView() |
| 185 { |
| 186 // We detach the FrameView's custom scroll bars as early as |
| 187 // possible to prevent m_doc->detach() from messing with the view |
| 188 // such that its scroll bars won't be torn down. |
| 189 // |
| 190 // FIXME: We should revisit this. |
| 191 if (m_view) |
| 192 m_view->prepareForDetach(); |
| 193 } |
| 194 |
| 156 void LocalFrame::setView(PassRefPtr<FrameView> view) | 195 void LocalFrame::setView(PassRefPtr<FrameView> view) |
| 157 { | 196 { |
| 158 // We the custom scroll bars as early as possible to prevent m_doc->detach() | 197 detachView(); |
| 159 // from messing with the view such that its scroll bars won't be torn down. | |
| 160 // FIXME: We should revisit this. | |
| 161 if (m_view) | |
| 162 m_view->prepareForDetach(); | |
| 163 | 198 |
| 164 // Prepare for destruction now, so any unload event handlers get run and the
LocalDOMWindow is | 199 // Prepare for destruction now, so any unload event handlers get run and the
LocalDOMWindow is |
| 165 // notified. If we wait until the view is destroyed, then things won't be ho
oked up enough for | 200 // notified. If we wait until the view is destroyed, then things won't be ho
oked up enough for |
| 166 // these calls to work. | 201 // these calls to work. |
| 167 if (!view && document() && document()->isActive()) { | 202 if (!view && document() && document()->isActive()) { |
| 168 // FIXME: We don't call willRemove here. Why is that OK? | 203 // FIXME: We don't call willRemove here. Why is that OK? |
| 169 document()->prepareForDestruction(); | 204 document()->prepareForDestruction(); |
| 170 } | 205 } |
| 171 | 206 |
| 172 eventHandler().clear(); | 207 eventHandler().clear(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 192 | 227 |
| 193 document()->styleResolverChanged(); | 228 document()->styleResolverChanged(); |
| 194 if (shouldUsePrintingLayout()) { | 229 if (shouldUsePrintingLayout()) { |
| 195 view()->forceLayoutForPagination(pageSize, originalPageSize, maximumShri
nkRatio); | 230 view()->forceLayoutForPagination(pageSize, originalPageSize, maximumShri
nkRatio); |
| 196 } else { | 231 } else { |
| 197 view()->forceLayout(); | 232 view()->forceLayout(); |
| 198 view()->adjustViewSize(); | 233 view()->adjustViewSize(); |
| 199 } | 234 } |
| 200 | 235 |
| 201 // Subframes of the one we're printing don't lay out to the page size. | 236 // Subframes of the one we're printing don't lay out to the page size. |
| 202 for (RefPtr<Frame> child = tree().firstChild(); child; child = child->tree()
.nextSibling()) { | 237 for (RefPtrWillBeRawPtr<Frame> child = tree().firstChild(); child; child = c
hild->tree().nextSibling()) { |
| 203 if (child->isLocalFrame()) | 238 if (child->isLocalFrame()) |
| 204 toLocalFrame(child.get())->setPrinting(printing, FloatSize(), FloatS
ize(), 0); | 239 toLocalFrame(child.get())->setPrinting(printing, FloatSize(), FloatS
ize(), 0); |
| 205 } | 240 } |
| 206 } | 241 } |
| 207 | 242 |
| 208 bool LocalFrame::shouldUsePrintingLayout() const | 243 bool LocalFrame::shouldUsePrintingLayout() const |
| 209 { | 244 { |
| 210 // Only top frame being printed should be fit to page size. | 245 // Only top frame being printed should be fit to page size. |
| 211 // Subframes should be constrained by parents only. | 246 // Subframes should be constrained by parents only. |
| 212 return document()->printing() && (!tree().parent() || !tree().parent()->isLo
calFrame() || !toLocalFrame(tree().parent())->document()->printing()); | 247 return document()->printing() && (!tree().parent() || !tree().parent()->isLo
calFrame() || !toLocalFrame(tree().parent())->document()->printing()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 228 float ratio = originalSize.width() / originalSize.height(); | 263 float ratio = originalSize.width() / originalSize.height(); |
| 229 resultSize.setHeight(floorf(expectedSize.height())); | 264 resultSize.setHeight(floorf(expectedSize.height())); |
| 230 resultSize.setWidth(floorf(resultSize.height() * ratio)); | 265 resultSize.setWidth(floorf(resultSize.height() * ratio)); |
| 231 } | 266 } |
| 232 return resultSize; | 267 return resultSize; |
| 233 } | 268 } |
| 234 | 269 |
| 235 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow) | 270 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow) |
| 236 { | 271 { |
| 237 if (m_domWindow) { | 272 if (m_domWindow) { |
| 273 // Oilpan: the assumption is that FrameDestructionObserver::willDetachFr
ameHost() |
| 274 // on LocalWindow will have signalled these frameWindowDiscarded() notif
ications. |
| 275 // |
| 276 // It is not invoked when finalizing the LocalFrame, as setDOMWindow() i
sn't |
| 277 // performed (accessing the m_domWindow heap object is unsafe then.) |
| 238 console().messageStorage()->frameWindowDiscarded(m_domWindow.get()); | 278 console().messageStorage()->frameWindowDiscarded(m_domWindow.get()); |
| 239 InspectorInstrumentation::frameWindowDiscarded(this, m_domWindow.get()); | 279 InspectorInstrumentation::frameWindowDiscarded(this, m_domWindow.get()); |
| 240 } | 280 } |
| 241 if (domWindow) | 281 if (domWindow) |
| 242 script().clearWindowProxy(); | 282 script().clearWindowProxy(); |
| 243 Frame::setDOMWindow(domWindow); | 283 Frame::setDOMWindow(domWindow); |
| 244 } | 284 } |
| 245 | 285 |
| 246 void LocalFrame::didChangeVisibilityState() | 286 void LocalFrame::didChangeVisibilityState() |
| 247 { | 287 { |
| 248 if (document()) | 288 if (document()) |
| 249 document()->didChangeVisibilityState(); | 289 document()->didChangeVisibilityState(); |
| 250 | 290 |
| 251 Vector<RefPtr<LocalFrame> > childFrames; | 291 WillBeHeapVector<RefPtrWillBeMember<LocalFrame> > childFrames; |
| 252 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) { | 292 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) { |
| 253 if (child->isLocalFrame()) | 293 if (child->isLocalFrame()) |
| 254 childFrames.append(toLocalFrame(child)); | 294 childFrames.append(toLocalFrame(child)); |
| 255 } | 295 } |
| 256 | 296 |
| 257 for (size_t i = 0; i < childFrames.size(); ++i) | 297 for (size_t i = 0; i < childFrames.size(); ++i) |
| 258 childFrames[i]->didChangeVisibilityState(); | 298 childFrames[i]->didChangeVisibilityState(); |
| 259 } | 299 } |
| 260 | 300 |
| 261 void LocalFrame::addDestructionObserver(FrameDestructionObserver* observer) | 301 void LocalFrame::addDestructionObserver(FrameDestructionObserver* observer) |
| 262 { | 302 { |
| 263 m_destructionObservers.add(observer); | 303 m_destructionObservers.add(observer); |
| 264 } | 304 } |
| 265 | 305 |
| 266 void LocalFrame::removeDestructionObserver(FrameDestructionObserver* observer) | 306 void LocalFrame::removeDestructionObserver(FrameDestructionObserver* observer) |
| 267 { | 307 { |
| 268 m_destructionObservers.remove(observer); | 308 m_destructionObservers.remove(observer); |
| 269 } | 309 } |
| 270 | 310 |
| 271 void LocalFrame::willDetachFrameHost() | 311 void LocalFrame::willDetachFrameHost() |
| 272 { | 312 { |
| 273 // We should never be detatching the page during a Layout. | 313 // We should never be detatching the page during a Layout. |
| 274 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); | 314 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); |
| 275 | 315 |
| 276 Frame* parent = tree().parent(); | 316 Frame* parent = tree().parent(); |
| 277 if (parent && parent->isLocalFrame()) | 317 if (parent && parent->isLocalFrame()) |
| 278 toLocalFrame(parent)->loader().checkLoadComplete(); | 318 toLocalFrame(parent)->loader().checkLoadComplete(); |
| 279 | 319 |
| 280 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 320 WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver> >::iterat
or stop = m_destructionObservers.end(); |
| 281 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) | 321 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver> >::i
terator it = m_destructionObservers.begin(); it != stop; ++it) |
| 282 (*it)->willDetachFrameHost(); | 322 (*it)->willDetachFrameHost(); |
| 283 | 323 |
| 284 // FIXME: Page should take care of updating focus/scrolling instead of Frame
. | 324 // FIXME: Page should take care of updating focus/scrolling instead of Frame
. |
| 285 // FIXME: It's unclear as to why this is called more than once, but it is, | 325 // FIXME: It's unclear as to why this is called more than once, but it is, |
| 286 // so page() could be null. | 326 // so page() could be null. |
| 287 if (page() && page()->focusController().focusedFrame() == this) | 327 if (page() && page()->focusController().focusedFrame() == this) |
| 288 page()->focusController().setFocusedFrame(nullptr); | 328 page()->focusController().setFocusedFrame(nullptr); |
| 289 script().clearScriptObjects(); | 329 script().clearScriptObjects(); |
| 290 | 330 |
| 291 if (page() && page()->scrollingCoordinator() && m_view) | 331 if (page() && page()->scrollingCoordinator() && m_view) |
| 292 page()->scrollingCoordinator()->willDestroyScrollableArea(m_view.get()); | 332 page()->scrollingCoordinator()->willDestroyScrollableArea(m_view.get()); |
| 293 } | 333 } |
| 294 | 334 |
| 295 void LocalFrame::detachFromFrameHost() | 335 void LocalFrame::detachFromFrameHost() |
| 296 { | 336 { |
| 297 // We should never be detatching the page during a Layout. | 337 // We should never be detaching the page during a Layout. |
| 298 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); | 338 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); |
| 299 m_host = 0; | 339 m_host = nullptr; |
| 300 } | 340 } |
| 301 | 341 |
| 302 String LocalFrame::documentTypeString() const | 342 String LocalFrame::documentTypeString() const |
| 303 { | 343 { |
| 304 if (DocumentType* doctype = document()->doctype()) | 344 if (DocumentType* doctype = document()->doctype()) |
| 305 return createMarkup(doctype); | 345 return createMarkup(doctype); |
| 306 | 346 |
| 307 return String(); | 347 return String(); |
| 308 } | 348 } |
| 309 | 349 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 // Update the scroll position when doing a full page zoom, so the co
ntent stays in relatively the same position. | 546 // Update the scroll position when doing a full page zoom, so the co
ntent stays in relatively the same position. |
| 507 LayoutPoint scrollPosition = view->scrollPosition(); | 547 LayoutPoint scrollPosition = view->scrollPosition(); |
| 508 float percentDifference = (pageZoomFactor / m_pageZoomFactor); | 548 float percentDifference = (pageZoomFactor / m_pageZoomFactor); |
| 509 view->setScrollPosition(IntPoint(scrollPosition.x() * percentDiffere
nce, scrollPosition.y() * percentDifference)); | 549 view->setScrollPosition(IntPoint(scrollPosition.x() * percentDiffere
nce, scrollPosition.y() * percentDifference)); |
| 510 } | 550 } |
| 511 } | 551 } |
| 512 | 552 |
| 513 m_pageZoomFactor = pageZoomFactor; | 553 m_pageZoomFactor = pageZoomFactor; |
| 514 m_textZoomFactor = textZoomFactor; | 554 m_textZoomFactor = textZoomFactor; |
| 515 | 555 |
| 516 for (RefPtr<Frame> child = tree().firstChild(); child; child = child->tree()
.nextSibling()) { | 556 for (RefPtrWillBeRawPtr<Frame> child = tree().firstChild(); child; child = c
hild->tree().nextSibling()) { |
| 517 if (child->isLocalFrame()) | 557 if (child->isLocalFrame()) |
| 518 toLocalFrame(child.get())->setPageAndTextZoomFactors(m_pageZoomFacto
r, m_textZoomFactor); | 558 toLocalFrame(child.get())->setPageAndTextZoomFactors(m_pageZoomFacto
r, m_textZoomFactor); |
| 519 } | 559 } |
| 520 | 560 |
| 521 document->setNeedsStyleRecalc(SubtreeStyleChange); | 561 document->setNeedsStyleRecalc(SubtreeStyleChange); |
| 522 document->updateLayoutIgnorePendingStylesheets(); | 562 document->updateLayoutIgnorePendingStylesheets(); |
| 523 } | 563 } |
| 524 | 564 |
| 525 void LocalFrame::deviceOrPageScaleFactorChanged() | 565 void LocalFrame::deviceOrPageScaleFactorChanged() |
| 526 { | 566 { |
| 527 document()->mediaQueryAffectingValueChanged(); | 567 document()->mediaQueryAffectingValueChanged(); |
| 528 for (RefPtr<Frame> child = tree().firstChild(); child; child = child->tree()
.nextSibling()) { | 568 for (RefPtrWillBeRawPtr<Frame> child = tree().firstChild(); child; child = c
hild->tree().nextSibling()) { |
| 529 if (child->isLocalFrame()) | 569 if (child->isLocalFrame()) |
| 530 toLocalFrame(child.get())->deviceOrPageScaleFactorChanged(); | 570 toLocalFrame(child.get())->deviceOrPageScaleFactorChanged(); |
| 531 } | 571 } |
| 532 } | 572 } |
| 533 | 573 |
| 534 bool LocalFrame::isURLAllowed(const KURL& url) const | 574 bool LocalFrame::isURLAllowed(const KURL& url) const |
| 535 { | 575 { |
| 536 // We allow one level of self-reference because some sites depend on that, | 576 // We allow one level of self-reference because some sites depend on that, |
| 537 // but we don't allow more than one. | 577 // but we don't allow more than one. |
| 538 if (page()->subframeCount() >= Page::maxNumberOfFrames) | 578 if (page()->subframeCount() >= Page::maxNumberOfFrames) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 return 0; | 698 return 0; |
| 659 | 699 |
| 660 double ratio = m_host->deviceScaleFactor(); | 700 double ratio = m_host->deviceScaleFactor(); |
| 661 ratio *= pageZoomFactor(); | 701 ratio *= pageZoomFactor(); |
| 662 return ratio; | 702 return ratio; |
| 663 } | 703 } |
| 664 | 704 |
| 665 void LocalFrame::disconnectOwnerElement() | 705 void LocalFrame::disconnectOwnerElement() |
| 666 { | 706 { |
| 667 if (owner()) { | 707 if (owner()) { |
| 668 if (Document* doc = document()) | 708 if (Document* document = this->document()) |
| 669 doc->topDocument().clearAXObjectCache(); | 709 document->topDocument().clearAXObjectCache(); |
| 710 // Clear the FrameView and FrameLoader right here rather than |
| 711 // (as previously) during finalization. It simplifies and is |
| 712 // Oilpan friendly, as we cannot access various heap objects |
| 713 // touched here then. |
| 714 setView(nullptr); |
| 715 loader().clear(); |
| 670 } | 716 } |
| 671 Frame::disconnectOwnerElement(); | 717 Frame::disconnectOwnerElement(); |
| 672 } | 718 } |
| 673 | 719 |
| 674 LocalFrame* LocalFrame::localFrameRoot() | 720 LocalFrame* LocalFrame::localFrameRoot() |
| 675 { | 721 { |
| 676 LocalFrame* curFrame = this; | 722 LocalFrame* curFrame = this; |
| 677 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 723 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
| 678 curFrame = toLocalFrame(curFrame->tree().parent()); | 724 curFrame = toLocalFrame(curFrame->tree().parent()); |
| 679 | 725 |
| 680 return curFrame; | 726 return curFrame; |
| 681 } | 727 } |
| 682 | 728 |
| 683 void LocalFrame::setPagePopupOwner(Element& owner) | 729 void LocalFrame::setPagePopupOwner(Element& owner) |
| 684 { | 730 { |
| 685 m_pagePopupOwner = &owner; | 731 m_pagePopupOwner = &owner; |
| 686 } | 732 } |
| 687 | 733 |
| 688 } // namespace blink | 734 } // namespace blink |
| OLD | NEW |