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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 691223003: Remove some more assorted code from RenderBox. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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 | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBox.h » ('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) 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // Add overflow from children. 959 // Add overflow from children.
960 addOverflowFromChildren(); 960 addOverflowFromChildren();
961 961
962 // Add in the overflow from positioned objects. 962 // Add in the overflow from positioned objects.
963 addOverflowFromPositionedObjects(); 963 addOverflowFromPositionedObjects();
964 964
965 if (hasOverflowClip()) { 965 if (hasOverflowClip()) {
966 // When we have overflow clip, propagate the original spillout since it will include collapsed bottom margins 966 // When we have overflow clip, propagate the original spillout since it will include collapsed bottom margins
967 // and bottom padding. Set the axis we don't care about to be 1, since we want this overflow to always 967 // and bottom padding. Set the axis we don't care about to be 1, since we want this overflow to always
968 // be considered reachable. 968 // be considered reachable.
969 LayoutRect clientRect(noOverflowRect()); 969 LayoutRect clientRect(paddingBoxRect());
970 LayoutRect rectToApply; 970 LayoutRect rectToApply;
971 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max<Lay outUnit>(0, oldClientAfterEdge - clientRect.y())); 971 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max<Lay outUnit>(0, oldClientAfterEdge - clientRect.y()));
972 addLayoutOverflow(rectToApply); 972 addLayoutOverflow(rectToApply);
973 if (hasRenderOverflow()) 973 if (hasRenderOverflow())
974 m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge); 974 m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
975 } 975 }
976 976
977 addVisualEffectOverflow(); 977 addVisualEffectOverflow();
978 } 978 }
979 979
(...skipping 14 matching lines...) Expand all
994 RenderBox* positionedObject; 994 RenderBox* positionedObject;
995 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); 995 TrackedRendererListHashSet::iterator end = positionedDescendants->end();
996 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin( ); it != end; ++it) { 996 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin( ); it != end; ++it) {
997 positionedObject = *it; 997 positionedObject = *it;
998 addOverflowFromChild(positionedObject, LayoutSize(positionedObject->x(), positionedObject->y())); 998 addOverflowFromChild(positionedObject, LayoutSize(positionedObject->x(), positionedObject->y()));
999 } 999 }
1000 } 1000 }
1001 1001
1002 bool RenderBlock::createsBlockFormattingContext() const 1002 bool RenderBlock::createsBlockFormattingContext() const
1003 { 1003 {
1004 return isInlineBlock() || isFloatingOrOutOfFlowPositioned() || hasOverflowCl ip() || isFlexItemIncludingDeprecated() || isDocumentElement(); 1004 return isInlineBlock() || isFloatingOrOutOfFlowPositioned() || hasOverflowCl ip() || isFlexItem() || isDocumentElement();
1005 } 1005 }
1006 1006
1007 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R enderBox* child) 1007 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R enderBox* child)
1008 { 1008 {
1009 // FIXME: Technically percentage height objects only need a relayout if thei r percentage isn't going to be turned into 1009 // FIXME: Technically percentage height objects only need a relayout if thei r percentage isn't going to be turned into
1010 // an auto value. Add a method to determine this, so that we can avoid the r elayout. 1010 // an auto value. Add a method to determine this, so that we can avoid the r elayout.
1011 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView( ))) 1011 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView( )))
1012 child->setChildNeedsLayout(MarkOnlyThis); 1012 child->setChildNeedsLayout(MarkOnlyThis);
1013 1013
1014 // If relayoutChildren is set and the child has percentage padding or an emb edded content box, we also need to invalidate the childs pref widths. 1014 // If relayoutChildren is set and the child has percentage padding or an emb edded content box, we also need to invalidate the childs pref widths.
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 } 1447 }
1448 1448
1449 bool RenderBlock::isSelectionRoot() const 1449 bool RenderBlock::isSelectionRoot() const
1450 { 1450 {
1451 ASSERT(node() || isAnonymous()); 1451 ASSERT(node() || isAnonymous());
1452 1452
1453 if (isDocumentElement() || hasOverflowClip() 1453 if (isDocumentElement() || hasOverflowClip()
1454 || isPositioned() 1454 || isPositioned()
1455 || isInlineBlock() 1455 || isInlineBlock()
1456 || hasTransform() || hasMask() 1456 || hasTransform() || hasMask()
1457 || isFlexItemIncludingDeprecated()) 1457 || isFlexItem())
1458 return true; 1458 return true;
1459 1459
1460 if (view() && view()->selectionStart()) { 1460 if (view() && view()->selectionStart()) {
1461 Node* startElement = view()->selectionStart()->node(); 1461 Node* startElement = view()->selectionStart()->node();
1462 if (startElement && startElement->rootEditableElement() == node()) 1462 if (startElement && startElement->rootEditableElement() == node())
1463 return true; 1463 return true;
1464 } 1464 }
1465 1465
1466 return false; 1466 return false;
1467 } 1467 }
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 2919 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
2920 { 2920 {
2921 showRenderObject(); 2921 showRenderObject();
2922 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2922 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2923 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2923 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2924 } 2924 }
2925 2925
2926 #endif 2926 #endif
2927 2927
2928 } // namespace blink 2928 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698