Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: Source/core/rendering/RenderFlowThread.cpp

Issue 23494007: Implement getter/setter in PaintInfo::rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No signed off. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderDetailsMarker.cpp ('k') | Source/core/rendering/RenderFrameSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderDetailsMarker.cpp ('k') | Source/core/rendering/RenderFrameSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698