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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 769093002: Remove FlowThreadController and relateds. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase master Created 6 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/frame/UseCounter.h" 45 #include "core/frame/UseCounter.h"
46 #include "core/html/HTMLAnchorElement.h" 46 #include "core/html/HTMLAnchorElement.h"
47 #include "core/html/HTMLElement.h" 47 #include "core/html/HTMLElement.h"
48 #include "core/html/HTMLHtmlElement.h" 48 #include "core/html/HTMLHtmlElement.h"
49 #include "core/html/HTMLTableCellElement.h" 49 #include "core/html/HTMLTableCellElement.h"
50 #include "core/html/HTMLTableElement.h" 50 #include "core/html/HTMLTableElement.h"
51 #include "core/page/AutoscrollController.h" 51 #include "core/page/AutoscrollController.h"
52 #include "core/page/EventHandler.h" 52 #include "core/page/EventHandler.h"
53 #include "core/page/Page.h" 53 #include "core/page/Page.h"
54 #include "core/paint/ObjectPainter.h" 54 #include "core/paint/ObjectPainter.h"
55 #include "core/rendering/FlowThreadController.h"
56 #include "core/rendering/HitTestResult.h" 55 #include "core/rendering/HitTestResult.h"
57 #include "core/rendering/RenderCounter.h" 56 #include "core/rendering/RenderCounter.h"
58 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 57 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
59 #include "core/rendering/RenderFlexibleBox.h" 58 #include "core/rendering/RenderFlexibleBox.h"
60 #include "core/rendering/RenderFlowThread.h" 59 #include "core/rendering/RenderFlowThread.h"
61 #include "core/rendering/RenderGeometryMap.h" 60 #include "core/rendering/RenderGeometryMap.h"
62 #include "core/rendering/RenderGrid.h" 61 #include "core/rendering/RenderGrid.h"
63 #include "core/rendering/RenderImage.h" 62 #include "core/rendering/RenderImage.h"
64 #include "core/rendering/RenderImageResourceStyleImage.h" 63 #include "core/rendering/RenderImageResourceStyleImage.h"
65 #include "core/rendering/RenderInline.h" 64 #include "core/rendering/RenderInline.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 618 }
620 619
621 return 0; 620 return 0;
622 } 621 }
623 622
624 RenderFlowThread* RenderObject::locateFlowThreadContainingBlock() const 623 RenderFlowThread* RenderObject::locateFlowThreadContainingBlock() const
625 { 624 {
626 ASSERT(flowThreadState() != NotInsideFlowThread); 625 ASSERT(flowThreadState() != NotInsideFlowThread);
627 626
628 // See if we have the thread cached because we're in the middle of layout. 627 // See if we have the thread cached because we're in the middle of layout.
629 RenderFlowThread* flowThread = view()->flowThreadController()->currentRender FlowThread(); 628 if (LayoutState* layoutState = view()->layoutState()) {
630 if (flowThread) 629 if (RenderFlowThread* flowThread = layoutState->flowThread())
631 return flowThread; 630 return flowThread;
631 }
632 632
633 // Not in the middle of layout so have to find the thread the slow way. 633 // Not in the middle of layout so have to find the thread the slow way.
634 RenderObject* curr = const_cast<RenderObject*>(this); 634 RenderObject* curr = const_cast<RenderObject*>(this);
635 while (curr) { 635 while (curr) {
636 if (curr->isRenderFlowThread()) 636 if (curr->isRenderFlowThread())
637 return toRenderFlowThread(curr); 637 return toRenderFlowThread(curr);
638 curr = curr->containingBlock(); 638 curr = curr->containingBlock();
639 } 639 }
640 return 0; 640 return 0;
641 } 641 }
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 if (documentBeingDestroyed()) { 2393 if (documentBeingDestroyed()) {
2394 destroy(); 2394 destroy();
2395 return; 2395 return;
2396 } 2396 }
2397 2397
2398 RenderObject* destroyRoot = this; 2398 RenderObject* destroyRoot = this;
2399 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) { 2399 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) {
2400 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild) 2400 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild)
2401 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation()) 2401 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation())
2402 break; 2402 break;
2403 // Render flow threads are tracked by the FlowThreadController, so we ca n't destroy them here. 2403 // Column spans are tracked elsewhere, so we can't destroy them here.
2404 // Column spans are tracked elsewhere. 2404 if (destroyRootParent->isAnonymousColumnSpanBlock())
2405 if (destroyRootParent->isRenderFlowThread() || destroyRootParent->isAnon ymousColumnSpanBlock())
2406 break; 2405 break;
2407 2406
2408 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot) 2407 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot)
2409 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer. 2408 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer.
2410 } 2409 }
2411 2410
2412 destroyRoot->destroy(); 2411 destroyRoot->destroy();
2413 2412
2414 // WARNING: |this| is deleted here. 2413 // WARNING: |this| is deleted here.
2415 } 2414 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 { 3117 {
3119 if (object1) { 3118 if (object1) {
3120 const blink::RenderObject* root = object1; 3119 const blink::RenderObject* root = object1;
3121 while (root->parent()) 3120 while (root->parent())
3122 root = root->parent(); 3121 root = root->parent();
3123 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3122 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3124 } 3123 }
3125 } 3124 }
3126 3125
3127 #endif 3126 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698