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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2764883004: No default value for AncestorSearchConstraint in locateFlowThreadContainingBlockOf(). (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | no next file » | 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) 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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } 680 }
681 681
682 return nullptr; 682 return nullptr;
683 } 683 }
684 684
685 LayoutFlowThread* LayoutObject::locateFlowThreadContainingBlock() const { 685 LayoutFlowThread* LayoutObject::locateFlowThreadContainingBlock() const {
686 ASSERT(isInsideFlowThread()); 686 ASSERT(isInsideFlowThread());
687 687
688 // See if we have the thread cached because we're in the middle of layout. 688 // See if we have the thread cached because we're in the middle of layout.
689 if (LayoutState* layoutState = view()->layoutState()) { 689 if (LayoutState* layoutState = view()->layoutState()) {
690 // TODO(mstensho): We should really just return whatever
691 // layoutState->flowThread() returns here, also if the value is nullptr.
690 if (LayoutFlowThread* flowThread = layoutState->flowThread()) 692 if (LayoutFlowThread* flowThread = layoutState->flowThread())
691 return flowThread; 693 return flowThread;
692 } 694 }
693 695
694 // Not in the middle of layout so have to find the thread the slow way. 696 // Not in the middle of layout so have to find the thread the slow way.
695 return LayoutFlowThread::locateFlowThreadContainingBlockOf(*this); 697 return LayoutFlowThread::locateFlowThreadContainingBlockOf(
698 *this, LayoutFlowThread::AnyAncestor);
696 } 699 }
697 700
698 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) { 701 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) {
699 // FIXME: In future it may be possible to broaden these conditions in order to 702 // FIXME: In future it may be possible to broaden these conditions in order to
700 // improve performance. 703 // improve performance.
701 if (object->isTextControl()) 704 if (object->isTextControl())
702 return true; 705 return true;
703 706
704 if (object->isSVGRoot()) 707 if (object->isSVGRoot())
705 return true; 708 return true;
(...skipping 2919 matching lines...) Expand 10 before | Expand all | Expand 10 after
3625 const blink::LayoutObject* root = object1; 3628 const blink::LayoutObject* root = object1;
3626 while (root->parent()) 3629 while (root->parent())
3627 root = root->parent(); 3630 root = root->parent();
3628 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3631 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3629 } else { 3632 } else {
3630 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3633 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3631 } 3634 }
3632 } 3635 }
3633 3636
3634 #endif 3637 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698