Changeset 123684 in webkit
- Timestamp:
- Jul 25, 2012 5:30:35 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r123678 r123684 1 2012-07-25 Dan Bernstein <mitz@apple.com> 2 3 Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column 4 https://bugs.webkit.org/show_bug.cgi?id=92311 5 6 Reviewed by Anders Carlsson. 7 8 * fast/multicol/hit-test-end-of-column-expected.txt: Added. 9 * fast/multicol/hit-test-end-of-column.html: Added. 10 * fast/multicol/hit-test-gap-block-axis-expected.txt: Added. 11 * fast/multicol/hit-test-gap-block-axis.html: Added. 12 1 13 2012-07-25 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r123683 r123684 1 2012-07-25 Dan Bernstein <mitz@apple.com> 2 3 Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column 4 https://bugs.webkit.org/show_bug.cgi?id=92311 5 6 Reviewed by Anders Carlsson. 7 8 Tests: fast/multicol/hit-test-end-of-column.html 9 fast/multicol/hit-test-gap-block-axis.html 10 11 * rendering/RenderBlock.cpp: 12 (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last 13 line on a given column from returning the next line in the next column, added a check if 14 the hit occurred within the pagination strut of a line. Covered by the first test. 15 (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the 16 block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding 17 into the top of the next column. Covered by the second test. 18 1 19 2012-07-25 David Grogan <dgrogan@chromium.org> 2 20 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r123626 r123684 4926 4926 if (!firstRootBoxWithChildren) 4927 4927 firstRootBoxWithChildren = root; 4928 4929 if (root->paginationStrut() && pointInLogicalContents.y() < root->logicalTop()) 4930 break; 4931 4928 4932 lastRootBoxWithChildren = root; 4929 4933 … … 5248 5252 LayoutRect gapAndColumnRect(colRect.x() - halfColGap, colRect.y(), colRect.width() + colGap, colRect.height()); 5249 5253 if (point.x() >= gapAndColumnRect.x() && point.x() < gapAndColumnRect.maxX()) { 5250 // FIXME: The clamping that follows is not completely right for right-to-left 5251 // content. 5252 // Clamp everything above the column to its top left. 5253 if (point.y() < gapAndColumnRect.y()) 5254 point = gapAndColumnRect.location(); 5255 // Clamp everything below the column to the next column's top left. If there is 5256 // no next column, this still maps to just after this column. 5257 else if (point.y() >= gapAndColumnRect.maxY()) { 5258 point = gapAndColumnRect.location(); 5259 point.move(0, gapAndColumnRect.height()); 5254 if (colInfo->progressionAxis() == ColumnInfo::InlineAxis) { 5255 // FIXME: The clamping that follows is not completely right for right-to-left 5256 // content. 5257 // Clamp everything above the column to its top left. 5258 if (point.y() < gapAndColumnRect.y()) 5259 point = gapAndColumnRect.location(); 5260 // Clamp everything below the column to the next column's top left. If there is 5261 // no next column, this still maps to just after this column. 5262 else if (point.y() >= gapAndColumnRect.maxY()) { 5263 point = gapAndColumnRect.location(); 5264 point.move(0, gapAndColumnRect.height()); 5265 } 5266 } else { 5267 if (point.x() < colRect.x()) 5268 point.setX(colRect.x()); 5269 else if (point.x() >= colRect.maxX()) 5270 point.setX(colRect.maxX() - 1); 5260 5271 } 5261 5272 … … 5273 5284 LayoutRect gapAndColumnRect(colRect.x(), colRect.y() - halfColGap, colRect.width(), colRect.height() + colGap); 5274 5285 if (point.y() >= gapAndColumnRect.y() && point.y() < gapAndColumnRect.maxY()) { 5275 // FIXME: The clamping that follows is not completely right for right-to-left 5276 // content. 5277 // Clamp everything above the column to its top left. 5278 if (point.x() < gapAndColumnRect.x()) 5279 point = gapAndColumnRect.location(); 5280 // Clamp everything below the column to the next column's top left. If there is 5281 // no next column, this still maps to just after this column. 5282 else if (point.x() >= gapAndColumnRect.maxX()) { 5283 point = gapAndColumnRect.location(); 5284 point.move(gapAndColumnRect.width(), 0); 5286 if (colInfo->progressionAxis() == ColumnInfo::InlineAxis) { 5287 // FIXME: The clamping that follows is not completely right for right-to-left 5288 // content. 5289 // Clamp everything above the column to its top left. 5290 if (point.x() < gapAndColumnRect.x()) 5291 point = gapAndColumnRect.location(); 5292 // Clamp everything below the column to the next column's top left. If there is 5293 // no next column, this still maps to just after this column. 5294 else if (point.x() >= gapAndColumnRect.maxX()) { 5295 point = gapAndColumnRect.location(); 5296 point.move(gapAndColumnRect.width(), 0); 5297 } 5298 } else { 5299 if (point.y() < colRect.y()) 5300 point.setY(colRect.y()); 5301 else if (point.y() >= colRect.maxY()) 5302 point.setY(colRect.maxY() - 1); 5285 5303 } 5286 5304
Note: See TracChangeset
for help on using the changeset viewer.