 Chromium Code Reviews
 Chromium Code Reviews Issue 187813004:
  Use outlineBox if we have an outline or shadow  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk
    
  
    Issue 187813004:
  Use outlineBox if we have an outline or shadow  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk| OLD | NEW | 
|---|---|
| 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1724 Length marginLeft = child->style()->marginStartUsing(style()); | 1724 Length marginLeft = child->style()->marginStartUsing(style()); | 
| 1725 Length marginRight = child->style()->marginEndUsing(style()); | 1725 Length marginRight = child->style()->marginEndUsing(style()); | 
| 1726 LayoutUnit margin = 0; | 1726 LayoutUnit margin = 0; | 
| 1727 if (marginLeft.isFixed()) | 1727 if (marginLeft.isFixed()) | 
| 1728 margin += marginLeft.value(); | 1728 margin += marginLeft.value(); | 
| 1729 if (marginRight.isFixed()) | 1729 if (marginRight.isFixed()) | 
| 1730 margin += marginRight.value(); | 1730 margin += marginRight.value(); | 
| 1731 return margin; | 1731 return margin; | 
| 1732 } | 1732 } | 
| 1733 | 1733 | 
| 1734 void RenderBlock::layoutPositionedObjects(bool relayoutChildren, bool fixedPosit ionObjectsOnly) | 1734 void RenderBlock::layoutPositionedObjects(bool relayoutChildren, bool fixedPosit ionObjectsOnly, bool parentMoved) | 
| 
Julien - ping for review
2014/03/07 00:01:10
s/parent/containingBlock/ (positioned object is th
 
dsinclair
2014/03/07 03:18:56
Done.
 | |
| 1735 { | 1735 { | 
| 1736 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); | 1736 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); | 
| 1737 if (!positionedDescendants) | 1737 if (!positionedDescendants) | 
| 1738 return; | 1738 return; | 
| 1739 | 1739 | 
| 1740 if (hasColumns()) | 1740 if (hasColumns()) | 
| 1741 view()->layoutState()->clearPaginationInformation(); // Positioned objec ts are not part of the column flow, so they don't paginate with the columns. | 1741 view()->layoutState()->clearPaginationInformation(); // Positioned objec ts are not part of the column flow, so they don't paginate with the columns. | 
| 1742 | 1742 | 
| 1743 RenderBox* r; | 1743 RenderBox* r; | 
| 1744 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); | 1744 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1779 LayoutUnit oldLogicalTop = 0; | 1779 LayoutUnit oldLogicalTop = 0; | 
| 1780 bool needsBlockDirectionLocationSetBeforeLayout = r->needsLayout() && vi ew()->layoutState()->needsBlockDirectionLocationSetBeforeLayout(); | 1780 bool needsBlockDirectionLocationSetBeforeLayout = r->needsLayout() && vi ew()->layoutState()->needsBlockDirectionLocationSetBeforeLayout(); | 
| 1781 if (needsBlockDirectionLocationSetBeforeLayout) { | 1781 if (needsBlockDirectionLocationSetBeforeLayout) { | 
| 1782 if (isHorizontalWritingMode() == r->isHorizontalWritingMode()) | 1782 if (isHorizontalWritingMode() == r->isHorizontalWritingMode()) | 
| 1783 r->updateLogicalHeight(); | 1783 r->updateLogicalHeight(); | 
| 1784 else | 1784 else | 
| 1785 r->updateLogicalWidth(); | 1785 r->updateLogicalWidth(); | 
| 1786 oldLogicalTop = logicalTopForChild(r); | 1786 oldLogicalTop = logicalTopForChild(r); | 
| 1787 } | 1787 } | 
| 1788 | 1788 | 
| 1789 if (parentMoved) | |
| 1790 r->setNeedsLayout(); | |
| 
Julien - ping for review
2014/03/07 00:01:10
Is this guaranteed to work? We only ensure that th
 
dsinclair
2014/03/07 03:18:56
I don't know? This seemed to work for the test cas
 
Julien - ping for review
2014/03/08 01:26:53
The whole positioned hierarchy is shifted in this
 
dsinclair
2014/03/10 00:22:51
Done.
crbug.com/350756  I didn't mark the bug as
 | |
| 1791 | |
| 1789 r->layoutIfNeeded(); | 1792 r->layoutIfNeeded(); | 
| 1790 | 1793 | 
| 1791 // Lay out again if our estimate was wrong. | 1794 // Lay out again if our estimate was wrong. | 
| 1792 if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) | 1795 if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) | 
| 1793 r->forceChildLayout(); | 1796 r->forceChildLayout(); | 
| 1794 } | 1797 } | 
| 1795 | 1798 | 
| 1796 if (hasColumns()) | 1799 if (hasColumns()) | 
| 1797 view()->layoutState()->m_columnInfo = columnInfo(); // FIXME: Kind of gr oss. We just put this back into the layout state so that pop() will work. | 1800 view()->layoutState()->m_columnInfo = columnInfo(); // FIXME: Kind of gr oss. We just put this back into the layout state so that pop() will work. | 
| 1798 } | 1801 } | 
| (...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5018 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const | 5021 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const | 
| 5019 { | 5022 { | 
| 5020 showRenderObject(); | 5023 showRenderObject(); | 
| 5021 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 5024 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 
| 5022 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 5025 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 
| 5023 } | 5026 } | 
| 5024 | 5027 | 
| 5025 #endif | 5028 #endif | 
| 5026 | 5029 | 
| 5027 } // namespace WebCore | 5030 } // namespace WebCore | 
| OLD | NEW |