Changeset 107303 in webkit
- Timestamp:
- Feb 9, 2012, 4:21:31 PM (15 years ago)
- Location:
- branches/chromium/1025
- Files:
-
- 7 edited
- 4 copied
-
LayoutTests/fast/regions/flexbox-in-region-crash-expected.txt (copied) (copied from trunk/LayoutTests/fast/regions/flexbox-in-region-crash-expected.txt )
-
LayoutTests/fast/regions/flexbox-in-region-crash.html (copied) (copied from trunk/LayoutTests/fast/regions/flexbox-in-region-crash.html )
-
LayoutTests/fast/regions/select-in-region-crash-expected.txt (copied) (copied from trunk/LayoutTests/fast/regions/select-in-region-crash-expected.txt )
-
LayoutTests/fast/regions/select-in-region-crash.html (copied) (copied from trunk/LayoutTests/fast/regions/select-in-region-crash.html )
-
Source/WebCore/rendering/RenderBlock.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/RenderBlock.h (modified) (2 diffs)
-
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderFlexibleBox.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderFlowThread.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/RenderRegion.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/RenderRegion.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/chromium/1025/Source/WebCore/rendering/RenderBlock.cpp
r106228 r107303 1208 1208 } 1209 1209 1210 void RenderBlock::computeInitialRegionRangeForBlock() 1211 { 1212 if (inRenderFlowThread()) { 1213 // Set our start and end regions. No regions above or below us will be considered by our children. They are 1214 // effectively clamped to our region range. 1215 LayoutUnit oldHeight = logicalHeight(); 1216 LayoutUnit oldLogicalTop = logicalTop(); 1217 setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2); 1218 computeLogicalHeight(); 1219 enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); 1220 setLogicalHeight(oldHeight); 1221 setLogicalTop(oldLogicalTop); 1222 } 1223 } 1224 1225 void RenderBlock::computeRegionRangeForBlock() 1226 { 1227 if (inRenderFlowThread()) 1228 enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); 1229 } 1230 1210 1231 void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight, BlockLayoutPass layoutPass) 1211 1232 { … … 1267 1288 RenderStyle* styleToUse = style(); 1268 1289 LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || styleToUse->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo); 1269 1290 1270 1291 if (inRenderFlowThread()) { 1271 1292 // Regions changing widths can force us to relayout our children. 1272 1293 if (logicalWidthChangedInRegions()) 1273 1294 relayoutChildren = true; 1274 1275 // Set our start and end regions. No regions above or below us will be considered by our children. They are 1276 // effectively clamped to our region range. 1277 LayoutUnit oldHeight = logicalHeight(); 1278 LayoutUnit oldLogicalTop = logicalTop(); 1279 setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2); 1280 computeLogicalHeight(); 1281 enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); 1282 setLogicalHeight(oldHeight); 1283 setLogicalTop(oldLogicalTop); 1284 } 1295 } 1296 computeInitialRegionRangeForBlock(); 1285 1297 1286 1298 // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track … … 1360 1372 bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isRoot()); 1361 1373 1362 if (inRenderFlowThread()) 1363 enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); 1374 computeRegionRangeForBlock(); 1364 1375 1365 1376 // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway). -
branches/chromium/1025/Source/WebCore/rendering/RenderBlock.h
r106150 r107303 449 449 #endif 450 450 451 void computeInitialRegionRangeForBlock(); 452 void computeRegionRangeForBlock(); 451 453 private: 452 454 virtual RenderObjectChildList* virtualChildren() { return children(); } … … 469 471 void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild); 470 472 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild); 473 471 474 virtual void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild = 0); 472 475 -
branches/chromium/1025/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r103209 r107303 229 229 LayoutStateMaintainer statePusher(view(), this, LayoutSize(x(), y()), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode()); 230 230 231 if (inRenderFlowThread()) { 232 // Regions changing widths can force us to relayout our children. 233 if (logicalWidthChangedInRegions()) 234 relayoutChildren = true; 235 } 236 computeInitialRegionRangeForBlock(); 237 231 238 LayoutSize previousSize = size(); 232 239 … … 267 274 268 275 bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isRoot()); 276 277 computeRegionRangeForBlock(); 269 278 270 279 if (!isFloatingOrPositioned() && height() == 0) { -
branches/chromium/1025/Source/WebCore/rendering/RenderFlexibleBox.cpp
r106129 r107303 167 167 LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode()); 168 168 169 if (inRenderFlowThread()) { 170 // Regions changing widths can force us to relayout our children. 171 if (logicalWidthChangedInRegions()) 172 relayoutChildren = true; 173 } 174 computeInitialRegionRangeForBlock(); 175 169 176 IntSize previousSize = size(); 170 177 … … 193 200 194 201 layoutPositionedObjects(relayoutChildren || isRoot()); 202 203 computeRegionRangeForBlock(); 195 204 196 205 // FIXME: css3/flexbox/repaint-rtl-column.html seems to repaint more overflow than it needs to. -
branches/chromium/1025/Source/WebCore/rendering/RenderFlowThread.cpp
r106281 r107303 205 205 { 206 206 ASSERT(renderRegion); 207 207 208 m_regionRangeMap.clear(); 208 209 m_regionList.remove(renderRegion); … … 629 630 RenderRegion* endRegion; 630 631 getRegionRangeForBox(box, startRegion, endRegion); 631 632 632 633 for (RenderRegionList::iterator iter = m_regionList.find(startRegion); iter != m_regionList.end(); ++iter) { 633 634 RenderRegion* region = *iter; … … 638 639 break; 639 640 } 640 641 642 #ifndef NDEBUG 643 // We have to make sure we did not left any boxes with region info attached in regions. 644 for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) { 645 RenderRegion* region = *iter; 646 if (!region->isValid()) 647 continue; 648 ASSERT(!region->renderBoxRegionInfo(box)); 649 } 650 #endif 651 641 652 m_regionRangeMap.remove(box); 642 653 } -
branches/chromium/1025/Source/WebCore/rendering/RenderRegion.cpp
r106291 r107303 14 14 * provided with the distribution. 15 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS”AND ANY16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY 17 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR … … 48 48 , m_isValid(false) 49 49 , m_hasCustomRegionStyle(false) 50 #ifndef NDEBUG51 , m_insideRegionPaint(false)52 #endif53 50 { 54 51 } … … 135 132 return; 136 133 137 #ifndef NDEBUG138 m_insideRegionPaint = true;139 #endif140 141 134 setRegionBoxesRegionStyle(); 142 135 m_flowThread->paintIntoRegion(paintInfo, this, LayoutPoint(paintOffset.x() + borderLeft() + paddingLeft(), paintOffset.y() + borderTop() + paddingTop())); 143 136 restoreRegionBoxesOriginalStyle(); 144 145 #ifndef NDEBUG146 m_insideRegionPaint = false;147 #endif148 137 } 149 138 -
branches/chromium/1025/Source/WebCore/rendering/RenderRegion.h
r106281 r107303 110 110 bool m_isValid; 111 111 bool m_hasCustomRegionStyle; 112 113 #ifndef NDEBUG114 bool m_insideRegionPaint;115 #endif116 112 }; 117 113
Note:
See TracChangeset
for help on using the changeset viewer.