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

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: Add bug link Created 5 years, 9 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
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 Document* doc = document(); 447 Document* doc = document();
448 if (!doc) 448 if (!doc)
449 return false; 449 return false;
450 // FIXME: This check is broken in for OOPI. 450 // FIXME: This check is broken in for OOPI.
451 HTMLFrameOwnerElement* owner = doc->ownerElement(); 451 HTMLFrameOwnerElement* owner = doc->ownerElement();
452 if (!owner) 452 if (!owner)
453 return false; 453 return false;
454 return owner->treeScope() == scope; 454 return owner->treeScope() == scope;
455 } 455 }
456 456
457 void LocalFrame::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigne d& totalObjects, bool& isPartial)
458 {
459 LayoutObject* root = view()->layoutRoot();
460 isPartial = true;
461 if (!root) {
462 isPartial = false;
463 root = contentRenderer();
464 }
465
466 needsLayoutObjects = 0;
467 totalObjects = 0;
468
469 for (LayoutObject* o = root; o; o = o->nextInPreOrder(root)) {
470 ++totalObjects;
471 if (o->needsLayout())
472 ++needsLayoutObjects;
473 }
474 }
475
476 String LocalFrame::layerTreeAsText(LayerTreeFlags flags) const 457 String LocalFrame::layerTreeAsText(LayerTreeFlags flags) const
477 { 458 {
478 TextStream textStream; 459 TextStream textStream;
479 textStream << localLayerTreeAsText(flags); 460 textStream << localLayerTreeAsText(flags);
480 461
481 for (Frame* child = tree().firstChild(); child; child = child->tree().traver seNext(this)) { 462 for (Frame* child = tree().firstChild(); child; child = child->tree().traver seNext(this)) {
482 if (!child->isLocalFrame()) 463 if (!child->isLocalFrame())
483 continue; 464 continue;
484 String childLayerTree = toLocalFrame(child)->localLayerTreeAsText(flags) ; 465 String childLayerTree = toLocalFrame(child)->localLayerTreeAsText(flags) ;
485 if (!childLayerTree.length()) 466 if (!childLayerTree.length())
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // We detach the FrameView's custom scroll bars as early as 824 // We detach the FrameView's custom scroll bars as early as
844 // possible to prevent m_doc->detach() from messing with the view 825 // possible to prevent m_doc->detach() from messing with the view
845 // such that its scroll bars won't be torn down. 826 // such that its scroll bars won't be torn down.
846 // 827 //
847 // FIXME: We should revisit this. 828 // FIXME: We should revisit this.
848 if (m_view) 829 if (m_view)
849 m_view->prepareForDetach(); 830 m_view->prepareForDetach();
850 } 831 }
851 832
852 } // namespace blink 833 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698