Changeset 143467 in webkit
- Timestamp:
- Feb 20, 2013 8:59:53 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143463 r143467 1 2013-02-19 David Hyatt <hyatt@apple.com> 2 3 [New Multicolumn] Make layers paint properly in columns. 4 https://bugs.webkit.org/show_bug.cgi?id=110296. 5 6 Reviewed by Sam Weinig. 7 8 * fast/multicol/newmulticol/layers-in-multicol-expected.html: Added. 9 * fast/multicol/newmulticol/layers-in-multicol.html: Added. 10 1 11 2013-02-20 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 12 -
trunk/LayoutTests/platform/chromium/TestExpectations
r143450 r143467 1589 1589 webkit.org/b/110203 [ Mac ] fast/multicol/seamless-flowed-through-columns.html [ Failure ] 1590 1590 1591 # Test fails for some reason. 1592 webkit.org/b/110296 fast/multicol/newmulticol/column-rules-fixed-height.html [ ImageOnlyFailure ] 1593 1591 1594 # ----------------------------------------------------------------- 1592 1595 # MAC PORT TESTS -
trunk/Source/WebCore/ChangeLog
r143465 r143467 1 2013-02-19 David Hyatt <hyatt@apple.com> 2 3 [New Multicolumn] Make layers paint properly in columns. 4 https://bugs.webkit.org/show_bug.cgi?id=110296. 5 6 Reviewed by Sam Weinig. 7 8 Construct the style for the RenderMultiColumnFlowThread such that it 9 establishes a stacking context (by being position:relative 10 with a z-index of 0). This causes the layer collection code 11 to correctly ignore the RenderFlowThread layers during normal 12 painting. 13 14 Fix more clipping bugs to eliminate subpixel layout differences 15 between old and new multicolumn. 16 17 Test: fast/multicol/newmulticol/layers-in-multicol.html 18 19 * rendering/RenderMultiColumnBlock.cpp: 20 (WebCore::createMultiColumnFlowThreadStyle): 21 (WebCore): 22 (WebCore::RenderMultiColumnBlock::addChild): 23 Use a custom style (similar to what normal RenderFlowThreads do) 24 for the RenderMultiColumnFlowThread that makes it a stacking 25 context. 26 27 * rendering/RenderMultiColumnSet.cpp: 28 (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect): 29 Fix the overflow calculations out the leftmost and rightmost 30 columns to actually look at the physical placement of the columns. 31 The old code was backwards for RTL. 32 33 * rendering/RenderRegion.cpp: 34 (WebCore::RenderRegion::overflowRectForFlowThreadPortion): 35 Fix the clipping done by overflowRectForFlowThreadPortion to min 36 and max with the passed-in portion rect so that subclasses that 37 inflate the rect prior to passing it into the method don't have that 38 inflation discarded. 39 1 40 2013-02-20 Alexander Pavlov <apavlov@chromium.org> 2 41 -
trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
r140244 r143467 104 104 } 105 105 106 static PassRefPtr<RenderStyle> createMultiColumnFlowThreadStyle(RenderStyle* parentStyle) 107 { 108 RefPtr<RenderStyle> newStyle(RenderStyle::create()); 109 newStyle->inheritFrom(parentStyle); 110 newStyle->setDisplay(BLOCK); 111 newStyle->setPosition(RelativePosition); 112 newStyle->setZIndex(0); 113 newStyle->font().update(0); 114 return newStyle.release(); 115 } 116 106 117 void RenderMultiColumnBlock::addChild(RenderObject* newChild, RenderObject* beforeChild) 107 118 { 108 119 if (!m_flowThread) { 109 120 m_flowThread = new (renderArena()) RenderMultiColumnFlowThread(document()); 110 m_flowThread->setStyle( RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK));121 m_flowThread->setStyle(createMultiColumnFlowThreadStyle(style())); 111 122 RenderBlock::addChild(m_flowThread); // Always put the flow thread at the end. 112 123 } -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r143395 r143467 171 171 bool isFirstColumn = !index; 172 172 bool isLastColumn = index == colCount - 1; 173 bool isLeftmostColumn = style()->isLeftToRightDirection() ? isFirstColumn : isLastColumn; 174 bool isRightmostColumn = style()->isLeftToRightDirection() ? isLastColumn : isFirstColumn; 173 175 LayoutRect overflowRect(portionRect); 174 176 if (isHorizontalWritingMode()) { 175 if (is FirstColumn) {177 if (isLeftmostColumn) { 176 178 // Shift to the logical left overflow of the flow thread to make sure it's all covered. 177 179 overflowRect.shiftXEdgeTo(min(flowThread()->visualOverflowRect().x(), portionRect.x())); … … 180 182 overflowRect.shiftXEdgeTo(portionRect.x() - colGap / 2); 181 183 } 182 if (is LastColumn) {184 if (isRightmostColumn) { 183 185 // Shift to the logical right overflow of the flow thread to ensure content can spill out of the column. 184 186 overflowRect.shiftMaxXEdgeTo(max(flowThread()->visualOverflowRect().maxX(), portionRect.maxX())); … … 188 190 } 189 191 } else { 190 if (is FirstColumn) {192 if (isLeftmostColumn) { 191 193 // Shift to the logical left overflow of the flow thread to make sure it's all covered. 192 194 overflowRect.shiftYEdgeTo(min(flowThread()->visualOverflowRect().y(), portionRect.y())); … … 195 197 overflowRect.shiftYEdgeTo(portionRect.y() - colGap / 2); 196 198 } 197 if (is LastColumn) {199 if (isRightmostColumn) { 198 200 // Shift to the logical right overflow of the flow thread to ensure content can spill out of the column. 199 201 overflowRect.shiftMaxYEdgeTo(max(flowThread()->visualOverflowRect().maxY(), portionRect.maxY())); -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r142984 r143467 43 43 #include "StyleResolver.h" 44 44 45 using namespace std; 46 45 47 namespace WebCore { 46 48 … … 106 108 LayoutUnit minY = isFirstPortion ? (flowThreadOverflow.y() - outlineSize) : flowThreadPortionRect.y(); 107 109 LayoutUnit maxY = isLastPortion ? max(flowThreadPortionRect.maxY(), flowThreadOverflow.maxY()) + outlineSize : flowThreadPortionRect.maxY(); 108 LayoutUnit minX = clipX ? flowThreadPortionRect.x() : (flowThreadOverflow.x() - outlineSize);109 LayoutUnit maxX = clipX ? flowThreadPortionRect.maxX() : (flowThreadOverflow.maxX() + outlineSize);110 LayoutUnit minX = clipX ? flowThreadPortionRect.x() : min(flowThreadPortionRect.x(), flowThreadOverflow.x() - outlineSize); 111 LayoutUnit maxX = clipX ? flowThreadPortionRect.maxX() : max(flowThreadPortionRect.maxX(), (flowThreadOverflow.maxX() + outlineSize)); 110 112 clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); 111 113 } else { 112 114 LayoutUnit minX = isFirstPortion ? (flowThreadOverflow.x() - outlineSize) : flowThreadPortionRect.x(); 113 115 LayoutUnit maxX = isLastPortion ? max(flowThreadPortionRect.maxX(), flowThreadOverflow.maxX()) + outlineSize : flowThreadPortionRect.maxX(); 114 LayoutUnit minY = clipY ? flowThreadPortionRect.y() : (flowThreadOverflow.y() - outlineSize);115 LayoutUnit maxY = clipY ? flowThreadPortionRect.maxY() : (flowThreadOverflow.maxY() + outlineSize);116 LayoutUnit minY = clipY ? flowThreadPortionRect.y() : min(flowThreadPortionRect.y(), (flowThreadOverflow.y() - outlineSize)); 117 LayoutUnit maxY = clipY ? flowThreadPortionRect.maxY() : max(flowThreadPortionRect.y(), (flowThreadOverflow.maxY() + outlineSize)); 116 118 clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); 117 119 }
Note: See TracChangeset
for help on using the changeset viewer.