Changeset 93728 in webkit
- Timestamp:
- Aug 24, 2011 1:20:57 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 11 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93726 r93728 1 2011-08-24 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSSRegions] Fix Element::getBoundingClientRect and Element::getClientRects for content flow 4 https://bugs.webkit.org/show_bug.cgi?id=66641 5 6 Original author of the patch is Mihnea Ovidenie <mihnea@adobe.com>. 7 8 Reviewed by David Hyatt. 9 10 * fast/regions/flowed-content-bounding-client-rect-expected.txt: Added. 11 * fast/regions/flowed-content-bounding-client-rect-horizontal-bt-expected.txt: Added. 12 * fast/regions/flowed-content-bounding-client-rect-horizontal-bt.html: Added. 13 * fast/regions/flowed-content-bounding-client-rect-vertical-expected.txt: Added. 14 * fast/regions/flowed-content-bounding-client-rect-vertical-rl-expected.txt: Added. 15 * fast/regions/flowed-content-bounding-client-rect-vertical-rl.html: Added. 16 * fast/regions/flowed-content-bounding-client-rect-vertical.html: Added. 17 * fast/regions/flowed-content-bounding-client-rect.html: Added. 18 * fast/regions/flowed-content-transform-bounding-client-rect-expected.txt: Added. 19 * fast/regions/flowed-content-transform-bounding-client-rect.html: Added. 20 * fast/regions/resources/helper.js: Added. 21 (rectToArray): 22 (areEqualNumbers): 23 (areEqualRects): 24 (assertEqualRects): 25 (testBoundingRects): 26 1 27 2011-08-24 Nate Chapin <japhet@chromium.org> 2 28 -
trunk/Source/WebCore/ChangeLog
r93727 r93728 1 2011-08-24 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSSRegions] Fix Element::getBoundingClientRect and Element::getClientRects for content flow 4 https://bugs.webkit.org/show_bug.cgi?id=66641 5 6 Original author of the patch is Mihnea Ovidenie <mihnea@adobe.com>. 7 8 Redirected the mapLocalToContainer method to the appropriate RenderRegion. 9 10 Note: RenderObject::absoluteQuads method needs some refactor to support multiple regions, 11 will do that in a separate bug. 12 13 Reviewed by David Hyatt. 14 15 Tests: fast/regions/flowed-content-bounding-client-rect-horizontal-bt.html 16 fast/regions/flowed-content-bounding-client-rect-vertical-rl.html 17 fast/regions/flowed-content-bounding-client-rect-vertical.html 18 fast/regions/flowed-content-bounding-client-rect.html 19 fast/regions/flowed-content-transform-bounding-client-rect.html 20 21 * rendering/RenderBox.cpp: 22 (WebCore::RenderBox::mapLocalToContainer): 23 * rendering/RenderFlowThread.cpp: 24 (WebCore::RenderFlowThread::renderRegionForLine): 25 (WebCore::RenderFlowThread::mapFromFlowToRegion): 26 * rendering/RenderFlowThread.h: 27 1 28 2011-08-24 Alok Priyadarshi <alokp@chromium.org> 2 29 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r93547 r93728 42 42 #include "PaintInfo.h" 43 43 #include "RenderArena.h" 44 #include "RenderFlowThread.h" 44 45 #include "RenderInline.h" 45 46 #include "RenderLayer.h" 46 47 #include "RenderPart.h" 48 #include "RenderRegion.h" 47 49 #include "RenderTableCell.h" 48 50 #include "RenderTheme.h" … … 1259 1261 return; 1260 1262 } 1261 1263 1264 if (o->isRenderFlowThread()) { 1265 // Transform from render flow coordinates into region coordinates. 1266 RenderRegion* region = toRenderFlowThread(o)->mapFromFlowToRegion(transformState); 1267 if (region) 1268 region->mapLocalToContainer(region->containerForRepaint(), fixed, useTransforms, transformState, wasFixed); 1269 return; 1270 } 1271 1262 1272 o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, wasFixed); 1263 1273 } -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r93708 r93728 39 39 #include "RenderRegion.h" 40 40 #include "RenderView.h" 41 #include "TransformState.h" 41 42 42 43 namespace WebCore { … … 472 473 ASSERT(!m_regionsInvalidated); 473 474 474 // All the regions should start at 0.475 ASSERT(position >= 0);476 477 475 // If no region matches the position and extendLastRegion is true, it will return 478 476 // the last valid region. It is similar to auto extending the size of the last region. … … 486 484 continue; 487 485 486 if (position <= 0) 487 return region; 488 488 489 LayoutRect regionRect = region->regionRect(); 489 490 … … 515 516 516 517 518 RenderRegion* RenderFlowThread::mapFromFlowToRegion(TransformState& transformState) const 519 { 520 if (!hasValidRegions()) 521 return 0; 522 523 LayoutRect boxRect = transformState.mappedQuad().enclosingBoundingBox(); 524 flipForWritingMode(boxRect); 525 526 // FIXME: We need to refactor RenderObject::absoluteQuads to be able to split the quads across regions, 527 // for now we just take the center of the mapped enclosing box and map it to a region. 528 // Note: Using the center in order to avoid rounding errors. 529 530 const bool extendLastRegion = true; 531 LayoutPoint center = boxRect.center(); 532 RenderRegion* renderRegion = renderRegionForLine(isHorizontalWritingMode() ? center.y() : center.x(), extendLastRegion); 533 if (!renderRegion) 534 return 0; 535 536 LayoutRect flippedRegionRect(renderRegion->regionRect()); 537 flipForWritingMode(flippedRegionRect); 538 539 transformState.move(renderRegion->contentBoxRect().location() - flippedRegionRect.location()); 540 541 return renderRegion; 542 } 543 517 544 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r93708 r93728 104 104 void enableRegionFitting() { ASSERT(m_regionFittingDisableCount > 0); m_regionFittingDisableCount--; } 105 105 106 RenderRegion* mapFromFlowToRegion(TransformState&) const; 107 106 108 private: 107 109 virtual const char* renderName() const { return "RenderFlowThread"; }
Note: See TracChangeset
for help on using the changeset viewer.