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

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. Add PartialLayoutState and PartialLayoutDisabler Created 7 years, 3 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()->partialLayout().shouldStop());
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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 result.setInnerNonSharedNode(node); 2776 result.setInnerNonSharedNode(node);
2771 result.setLocalPoint(point); 2777 result.setLocalPoint(point);
2772 } 2778 }
2773 } 2779 }
2774 2780
2775 bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitT estLocation& /*locationInContainer*/, const LayoutPoint& /*accumulatedOffset*/, HitTestAction) 2781 bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitT estLocation& /*locationInContainer*/, const LayoutPoint& /*accumulatedOffset*/, HitTestAction)
2776 { 2782 {
2777 return false; 2783 return false;
2778 } 2784 }
2779 2785
2786 FrameView* RenderObject::frameView() const
2787 {
2788 return document()->view();
2789 }
2790
2780 void RenderObject::scheduleRelayout() 2791 void RenderObject::scheduleRelayout()
2781 { 2792 {
2782 if (isRenderView()) { 2793 if (isRenderView()) {
2783 FrameView* view = toRenderView(this)->frameView(); 2794 FrameView* view = toRenderView(this)->frameView();
2784 if (view) 2795 if (view)
2785 view->scheduleRelayout(); 2796 view->scheduleRelayout();
2786 } else { 2797 } else {
2787 if (isRooted()) { 2798 if (isRooted()) {
2788 if (RenderView* renderView = view()) { 2799 if (RenderView* renderView = view()) {
2789 if (FrameView* frameView = renderView->frameView()) 2800 if (FrameView* frameView = renderView->frameView())
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3327 { 3338 {
3328 if (object1) { 3339 if (object1) {
3329 const WebCore::RenderObject* root = object1; 3340 const WebCore::RenderObject* root = object1;
3330 while (root->parent()) 3341 while (root->parent())
3331 root = root->parent(); 3342 root = root->parent();
3332 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3343 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3333 } 3344 }
3334 } 3345 }
3335 3346
3336 #endif 3347 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698