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

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

Issue 18601002: Add infrastructure for partial layouts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments Created 7 years, 4 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
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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 739 }
740 740
741 #ifndef NDEBUG 741 #ifndef NDEBUG
742 void RenderObject::checkBlockPositionedObjectsNeedLayout() 742 void RenderObject::checkBlockPositionedObjectsNeedLayout()
743 { 743 {
744 ASSERT(!needsLayout()); 744 ASSERT(!needsLayout());
745 745
746 if (isRenderBlock()) 746 if (isRenderBlock())
747 toRenderBlock(this)->checkPositionedObjectsNeedLayout(); 747 toRenderBlock(this)->checkPositionedObjectsNeedLayout();
748 } 748 }
749
750 void RenderObject::checkNotInPartialLayout()
751 {
752 // During partial layout, setNeedsLayout(true or false) should not be called .
753 ASSERT(!frameView()->shouldStopPartialLayout());
754 }
749 #endif 755 #endif
750 756
751 void RenderObject::setPreferredLogicalWidthsDirty(bool shouldBeDirty, MarkingBeh avior markParents) 757 void RenderObject::setPreferredLogicalWidthsDirty(bool shouldBeDirty, MarkingBeh avior markParents)
752 { 758 {
753 bool alreadyDirty = preferredLogicalWidthsDirty(); 759 bool alreadyDirty = preferredLogicalWidthsDirty();
754 m_bitfields.setPreferredLogicalWidthsDirty(shouldBeDirty); 760 m_bitfields.setPreferredLogicalWidthsDirty(shouldBeDirty);
755 if (shouldBeDirty && !alreadyDirty && markParents == MarkContainingBlockChai n && (isText() || !style()->hasOutOfFlowPosition())) 761 if (shouldBeDirty && !alreadyDirty && markParents == MarkContainingBlockChai n && (isText() || !style()->hasOutOfFlowPosition()))
756 invalidateContainerPreferredLogicalWidths(); 762 invalidateContainerPreferredLogicalWidths();
757 } 763 }
758 764
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 result.setInnerNonSharedNode(node); 2777 result.setInnerNonSharedNode(node);
2772 result.setLocalPoint(point); 2778 result.setLocalPoint(point);
2773 } 2779 }
2774 } 2780 }
2775 2781
2776 bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitT estLocation& /*locationInContainer*/, const LayoutPoint& /*accumulatedOffset*/, HitTestAction) 2782 bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitT estLocation& /*locationInContainer*/, const LayoutPoint& /*accumulatedOffset*/, HitTestAction)
2777 { 2783 {
2778 return false; 2784 return false;
2779 } 2785 }
2780 2786
2787 FrameView* RenderObject::frameView() const
eseidel 2013/08/20 21:00:39 I think we should explain why this should never be
2788 {
2789 // FIXME: Should we check isRooted()?
esprehn 2013/08/23 20:47:27 There's no reason to.
pdr. 2013/08/26 05:50:40 Done.
2790 if (RenderView* renderView = view())
esprehn 2013/08/23 20:47:27 Don't do this, just do return document()->view();
pdr. 2013/08/26 05:50:40 Done.
2791 return renderView->frameView();
2792 return 0;
2793 }
2794
2781 void RenderObject::scheduleRelayout() 2795 void RenderObject::scheduleRelayout()
2782 { 2796 {
2783 if (isRenderView()) { 2797 if (isRenderView()) {
2784 FrameView* view = toRenderView(this)->frameView(); 2798 FrameView* view = toRenderView(this)->frameView();
2785 if (view) 2799 if (view)
2786 view->scheduleRelayout(); 2800 view->scheduleRelayout();
2787 } else { 2801 } else {
2788 if (isRooted()) { 2802 if (isRooted()) {
2789 if (RenderView* renderView = view()) { 2803 if (RenderView* renderView = view()) {
2790 if (FrameView* frameView = renderView->frameView()) 2804 if (FrameView* frameView = renderView->frameView())
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3331 { 3345 {
3332 if (object1) { 3346 if (object1) {
3333 const WebCore::RenderObject* root = object1; 3347 const WebCore::RenderObject* root = object1;
3334 while (root->parent()) 3348 while (root->parent())
3335 root = root->parent(); 3349 root = root->parent();
3336 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3350 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3337 } 3351 }
3338 } 3352 }
3339 3353
3340 #endif 3354 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698