| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 portionLocation = flowThreadPortionRect.location(); | 288 portionLocation = flowThreadPortionRect.location(); |
| 289 adjustedPaintOffset = roundedIntPoint(paintOffset - portionLocation); | 289 adjustedPaintOffset = roundedIntPoint(paintOffset - portionLocation); |
| 290 | 290 |
| 291 // The clipping rect for the region is set up by assuming the flowThreadPort
ionRect is going to paint offset from adjustedPaintOffset. | 291 // The clipping rect for the region is set up by assuming the flowThreadPort
ionRect is going to paint offset from adjustedPaintOffset. |
| 292 // Remember that we pixel snapped and moved the paintOffset and stored the s
napped result in adjustedPaintOffset. Now we add back in | 292 // Remember that we pixel snapped and moved the paintOffset and stored the s
napped result in adjustedPaintOffset. Now we add back in |
| 293 // the flowThreadPortionRect's location to get the spot where we expect the
portion to actually paint. This can be non-integral and | 293 // the flowThreadPortionRect's location to get the spot where we expect the
portion to actually paint. This can be non-integral and |
| 294 // that's ok. We then pixel snap the resulting clipping rect to account for
snapping that will occur when the flow thread paints. | 294 // that's ok. We then pixel snap the resulting clipping rect to account for
snapping that will occur when the flow thread paints. |
| 295 IntRect regionClippingRect = pixelSnappedIntRect(computeRegionClippingRect(a
djustedPaintOffset + portionLocation, flowThreadPortionRect, flowThreadPortionOv
erflowRect)); | 295 IntRect regionClippingRect = pixelSnappedIntRect(computeRegionClippingRect(a
djustedPaintOffset + portionLocation, flowThreadPortionRect, flowThreadPortionOv
erflowRect)); |
| 296 | 296 |
| 297 PaintInfo info(paintInfo); | 297 PaintInfo info(paintInfo); |
| 298 info.rect.intersect(regionClippingRect); | 298 info.rect().intersect(regionClippingRect); |
| 299 | 299 |
| 300 if (!info.rect.isEmpty()) { | 300 if (!info.rect().isEmpty()) { |
| 301 context->save(); | 301 context->save(); |
| 302 | 302 |
| 303 context->clip(regionClippingRect); | 303 context->clip(regionClippingRect); |
| 304 | 304 |
| 305 context->translate(adjustedPaintOffset.x(), adjustedPaintOffset.y()); | 305 context->translate(adjustedPaintOffset.x(), adjustedPaintOffset.y()); |
| 306 info.rect.moveBy(-adjustedPaintOffset); | 306 info.rect().moveBy(-adjustedPaintOffset); |
| 307 | 307 |
| 308 layer()->paint(context, info.rect, 0, 0, region, RenderLayer::PaintLayer
TemporaryClipRects); | 308 layer()->paint(context, info.rect(), 0, 0, region, RenderLayer::PaintLay
erTemporaryClipRects); |
| 309 | 309 |
| 310 context->restore(); | 310 context->restore(); |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula
tedOffset, HitTestAction hitTestAction) | 314 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula
tedOffset, HitTestAction hitTestAction) |
| 315 { | 315 { |
| 316 if (hitTestAction == HitTestBlockBackground) | 316 if (hitTestAction == HitTestBlockBackground) |
| 317 return false; | 317 return false; |
| 318 return RenderBlock::nodeAtPoint(request, result, locationInContainer, accumu
latedOffset, hitTestAction); | 318 return RenderBlock::nodeAtPoint(request, result, locationInContainer, accumu
latedOffset, hitTestAction); |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 { | 1043 { |
| 1044 if (!m_renderFlowThread) | 1044 if (!m_renderFlowThread) |
| 1045 return; | 1045 return; |
| 1046 RenderView* view = m_renderFlowThread->view(); | 1046 RenderView* view = m_renderFlowThread->view(); |
| 1047 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); | 1047 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); |
| 1048 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); | 1048 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 | 1051 |
| 1052 } // namespace WebCore | 1052 } // namespace WebCore |
| OLD | NEW |