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

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

Issue 478733002: Rename repaint to paintInvalidation for remaining methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/RenderObject.h » ('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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 LayoutUnit ruleTop = isHorizontalWritingMode() ? paintOffset.y() + b orderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleThickness / 2 + ruleAdd; 482 LayoutUnit ruleTop = isHorizontalWritingMode() ? paintOffset.y() + b orderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleThickness / 2 + ruleAdd;
483 LayoutUnit ruleBottom = isHorizontalWritingMode() ? ruleTop + conten tHeight() : ruleTop + ruleThickness; 483 LayoutUnit ruleBottom = isHorizontalWritingMode() ? ruleTop + conten tHeight() : ruleTop + ruleThickness;
484 IntRect pixelSnappedRuleRect = pixelSnappedIntRectFromEdges(ruleLeft , ruleTop, ruleRight, ruleBottom); 484 IntRect pixelSnappedRuleRect = pixelSnappedIntRectFromEdges(ruleLeft , ruleTop, ruleRight, ruleBottom);
485 drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixe lSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias); 485 drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixe lSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias);
486 } 486 }
487 487
488 ruleLogicalLeft = currLogicalLeftOffset; 488 ruleLogicalLeft = currLogicalLeftOffset;
489 } 489 }
490 } 490 }
491 491
492 void RenderMultiColumnSet::repaintFlowThreadContent(const LayoutRect& repaintRec t) const 492 void RenderMultiColumnSet::paintInvalidationForFlowThreadContent(const LayoutRec t& paintInvalidationRect) const
493 { 493 {
494 // Figure out the start and end columns and only check within that range so that we don't walk the 494 // Figure out the start and end columns and only check within that range so that we don't walk the
495 // entire column set. Put the repaint rect into flow thread coordinates by f lipping it first. 495 // entire column set. Put the paint invalidation rect into flow thread coord inates by flipping it first.
496 LayoutRect flowThreadRepaintRect(repaintRect); 496 LayoutRect flowThreadPaintInvalidationRect(paintInvalidationRect);
497 flowThread()->flipForWritingMode(flowThreadRepaintRect); 497 flowThread()->flipForWritingMode(flowThreadPaintInvalidationRect);
498 498
499 // Now we can compare this rect with the flow thread portions owned by each column. First let's 499 // Now we can compare this rect with the flow thread portions owned by each column. First let's
500 // just see if the repaint rect intersects our flow thread portion at all. 500 // just see if the paint invalidation rect intersects our flow thread portio n at all.
501 LayoutRect clippedRect(flowThreadRepaintRect); 501 LayoutRect clippedRect(flowThreadPaintInvalidationRect);
502 clippedRect.intersect(RenderRegion::flowThreadPortionOverflowRect()); 502 clippedRect.intersect(RenderRegion::flowThreadPortionOverflowRect());
503 if (clippedRect.isEmpty()) 503 if (clippedRect.isEmpty())
504 return; 504 return;
505 505
506 // Now we know we intersect at least one column. Let's figure out the logica l top and logical 506 // Now we know we intersect at least one column. Let's figure out the logica l top and logical
507 // bottom of the area we're repainting. 507 // bottom of the area in which we're issuing paint invalidations.
508 LayoutUnit repaintLogicalTop = isHorizontalWritingMode() ? flowThreadRepaint Rect.y() : flowThreadRepaintRect.x(); 508 LayoutUnit paintInvalidationLogicalTop = isHorizontalWritingMode() ? flowThr eadPaintInvalidationRect.y() : flowThreadPaintInvalidationRect.x();
509 LayoutUnit repaintLogicalBottom = (isHorizontalWritingMode() ? flowThreadRep aintRect.maxY() : flowThreadRepaintRect.maxX()) - 1; 509 LayoutUnit paintInvalidationLogicalBottom = (isHorizontalWritingMode() ? flo wThreadPaintInvalidationRect.maxY() : flowThreadPaintInvalidationRect.maxX()) - 1;
510 510
511 unsigned startColumn = columnIndexAtOffset(repaintLogicalTop); 511 unsigned startColumn = columnIndexAtOffset(paintInvalidationLogicalTop);
512 unsigned endColumn = columnIndexAtOffset(repaintLogicalBottom); 512 unsigned endColumn = columnIndexAtOffset(paintInvalidationLogicalBottom);
513 513
514 LayoutUnit colGap = columnGap(); 514 LayoutUnit colGap = columnGap();
515 unsigned colCount = actualColumnCount(); 515 unsigned colCount = actualColumnCount();
516 for (unsigned i = startColumn; i <= endColumn; i++) { 516 for (unsigned i = startColumn; i <= endColumn; i++) {
517 LayoutRect colRect = columnRectAt(i); 517 LayoutRect colRect = columnRectAt(i);
518 518
519 // Get the portion of the flow thread that corresponds to this column. 519 // Get the portion of the flow thread that corresponds to this column.
520 LayoutRect flowThreadPortion = flowThreadPortionRectAt(i); 520 LayoutRect flowThreadPortion = flowThreadPortionRectAt(i);
521 521
522 // Now get the overflow rect that corresponds to the column. 522 // Now get the overflow rect that corresponds to the column.
523 LayoutRect flowThreadOverflowPortion = flowThreadPortionOverflowRect(flo wThreadPortion, i, colCount, colGap); 523 LayoutRect flowThreadOverflowPortion = flowThreadPortionOverflowRect(flo wThreadPortion, i, colCount, colGap);
524 524
525 // Do a repaint for this specific column. 525 // Do a paint invalidation for this specific column.
526 repaintFlowThreadContentRectangle(repaintRect, flowThreadPortion, flowTh readOverflowPortion, colRect.location()); 526 paintInvalidaitonOfFlowThreadContentRectangle(paintInvalidationRect, flo wThreadPortion, flowThreadOverflowPortion, colRect.location());
527 } 527 }
528 } 528 }
529 529
530 void RenderMultiColumnSet::collectLayerFragments(LayerFragments& fragments, cons t LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) 530 void RenderMultiColumnSet::collectLayerFragments(LayerFragments& fragments, cons t LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect)
531 { 531 {
532 // The two rectangles passed to this method are physical, except that we pre tend that there's 532 // The two rectangles passed to this method are physical, except that we pre tend that there's
533 // only one long column (that's how a flow thread works). 533 // only one long column (that's how a flow thread works).
534 // 534 //
535 // Then there's the output from this method - the stuff we put into the list of fragments. The 535 // Then there's the output from this method - the stuff we put into the list of fragments. The
536 // fragment.paginationOffset point is the actual physical translation requir ed to get from a 536 // fragment.paginationOffset point is the actual physical translation requir ed to get from a
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 void RenderMultiColumnSet::detachRegion() 685 void RenderMultiColumnSet::detachRegion()
686 { 686 {
687 if (m_flowThread) { 687 if (m_flowThread) {
688 m_flowThread->removeRegionFromThread(this); 688 m_flowThread->removeRegionFromThread(this);
689 m_flowThread = 0; 689 m_flowThread = 0;
690 } 690 }
691 } 691 }
692 692
693 } 693 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698