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

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

Issue 927773002: Keep track of multiple layout roots (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address concerns. Created 5 years, 10 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
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 Document* doc = document(); 442 Document* doc = document();
443 if (!doc) 443 if (!doc)
444 return false; 444 return false;
445 // FIXME: This check is broken in for OOPI. 445 // FIXME: This check is broken in for OOPI.
446 HTMLFrameOwnerElement* owner = doc->ownerElement(); 446 HTMLFrameOwnerElement* owner = doc->ownerElement();
447 if (!owner) 447 if (!owner)
448 return false; 448 return false;
449 return owner->treeScope() == scope; 449 return owner->treeScope() == scope;
450 } 450 }
451 451
452 void LocalFrame::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigne d& totalObjects, bool& isPartial)
453 {
454 LayoutObject* root = view()->layoutRoot();
455 isPartial = true;
456 if (!root) {
457 isPartial = false;
458 root = contentRenderer();
459 }
460
461 needsLayoutObjects = 0;
462 totalObjects = 0;
463
464 for (LayoutObject* o = root; o; o = o->nextInPreOrder(root)) {
465 ++totalObjects;
466 if (o->needsLayout())
467 ++needsLayoutObjects;
468 }
469 }
470
471 String LocalFrame::layerTreeAsText(LayerTreeFlags flags) const 452 String LocalFrame::layerTreeAsText(LayerTreeFlags flags) const
472 { 453 {
473 TextStream textStream; 454 TextStream textStream;
474 textStream << localLayerTreeAsText(flags); 455 textStream << localLayerTreeAsText(flags);
475 456
476 for (Frame* child = tree().firstChild(); child; child = child->tree().traver seNext(this)) { 457 for (Frame* child = tree().firstChild(); child; child = child->tree().traver seNext(this)) {
477 if (!child->isLocalFrame()) 458 if (!child->isLocalFrame())
478 continue; 459 continue;
479 String childLayerTree = toLocalFrame(child)->localLayerTreeAsText(flags) ; 460 String childLayerTree = toLocalFrame(child)->localLayerTreeAsText(flags) ;
480 if (!childLayerTree.length()) 461 if (!childLayerTree.length())
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // We detach the FrameView's custom scroll bars as early as 817 // We detach the FrameView's custom scroll bars as early as
837 // possible to prevent m_doc->detach() from messing with the view 818 // possible to prevent m_doc->detach() from messing with the view
838 // such that its scroll bars won't be torn down. 819 // such that its scroll bars won't be torn down.
839 // 820 //
840 // FIXME: We should revisit this. 821 // FIXME: We should revisit this.
841 if (m_view) 822 if (m_view)
842 m_view->prepareForDetach(); 823 m_view->prepareForDetach();
843 } 824 }
844 825
845 } // namespace blink 826 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698