Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 380303003: Enable resize and layout for frames with RemoteFrame ancestors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed DeferUpdatePageInfo problem Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 return nullptr; 336 return nullptr;
337 } 337 }
338 338
339 void LocalFrame::createView(const IntSize& viewportSize, const Color& background Color, bool transparent, 339 void LocalFrame::createView(const IntSize& viewportSize, const Color& background Color, bool transparent,
340 ScrollbarMode horizontalScrollbarMode, bool horizontalLock, 340 ScrollbarMode horizontalScrollbarMode, bool horizontalLock,
341 ScrollbarMode verticalScrollbarMode, bool verticalLock) 341 ScrollbarMode verticalScrollbarMode, bool verticalLock)
342 { 342 {
343 ASSERT(this); 343 ASSERT(this);
344 ASSERT(page()); 344 ASSERT(page());
345 345
346 bool isMainFrame = this->isMainFrame(); 346 bool isLocalRoot = this->isLocalRoot();
347 347
348 if (isMainFrame && view()) 348 if (isLocalRoot && view())
349 view()->setParentVisible(false); 349 view()->setParentVisible(false);
350 350
351 setView(nullptr); 351 setView(nullptr);
352 352
353 RefPtr<FrameView> frameView; 353 RefPtr<FrameView> frameView;
354 if (isMainFrame) { 354 if (isLocalRoot) {
355 frameView = FrameView::create(this, viewportSize); 355 frameView = FrameView::create(this, viewportSize);
356 356
357 // The layout size is set by WebViewImpl to support @viewport 357 // The layout size is set by WebViewImpl to support @viewport
358 frameView->setLayoutSizeFixedToFrameSize(false); 358 frameView->setLayoutSizeFixedToFrameSize(false);
359 } else 359 } else
360 frameView = FrameView::create(this); 360 frameView = FrameView::create(this);
361 361
362 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode, horizontalLock, verticalLock); 362 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode, horizontalLock, verticalLock);
363 363
364 setView(frameView); 364 setView(frameView);
365 365
366 frameView->updateBackgroundRecursively(backgroundColor, transparent); 366 frameView->updateBackgroundRecursively(backgroundColor, transparent);
367 367
368 if (isMainFrame) 368 if (isLocalRoot)
369 frameView->setParentVisible(true); 369 frameView->setParentVisible(true);
370 370
371 // FIXME: Not clear what the right thing for OOPI is here. 371 // FIXME: Not clear what the right thing for OOPI is here.
372 if (ownerRenderer()) { 372 if (ownerRenderer()) {
373 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); 373 HTMLFrameOwnerElement* owner = deprecatedLocalOwner();
374 ASSERT(owner); 374 ASSERT(owner);
375 owner->setWidget(frameView); 375 owner->setWidget(frameView);
376 } 376 }
377 377
378 if (HTMLFrameOwnerElement* owner = deprecatedLocalOwner()) 378 if (HTMLFrameOwnerElement* owner = deprecatedLocalOwner())
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 LocalFrame* LocalFrame::localFrameRoot() 621 LocalFrame* LocalFrame::localFrameRoot()
622 { 622 {
623 LocalFrame* curFrame = this; 623 LocalFrame* curFrame = this;
624 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 624 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
625 curFrame = toLocalFrame(curFrame->tree().parent()); 625 curFrame = toLocalFrame(curFrame->tree().parent());
626 626
627 return curFrame; 627 return curFrame;
628 } 628 }
629 629
630 } // namespace WebCore 630 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698