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

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

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/RenderFlowThread.cpp ('k') | Source/core/rendering/RenderFullScreen.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 result.setAllowBorder(BottomFrameEdge, m_rows.m_allowBorder[rows]); 432 result.setAllowBorder(BottomFrameEdge, m_rows.m_allowBorder[rows]);
433 } 433 }
434 434
435 return result; 435 return result;
436 } 436 }
437 437
438 void RenderFrameSet::layout() 438 void RenderFrameSet::layout()
439 { 439 {
440 ASSERT(needsLayout()); 440 ASSERT(needsLayout());
441 441
442 bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout(); 442 bool doFullRepaint = selfNeedsLayout() && checkForPaintInvalidationDuringLay out();
443 LayoutRect oldBounds; 443 LayoutRect oldBounds;
444 const RenderLayerModelObject* repaintContainer = 0; 444 const RenderLayerModelObject* repaintContainer = 0;
445 if (doFullRepaint) { 445 if (doFullRepaint) {
446 repaintContainer = containerForRepaint(); 446 repaintContainer = containerForPaintInvalidation();
447 oldBounds = boundsRectForRepaint(repaintContainer); 447 oldBounds = boundsRectForPaintInvalidation(repaintContainer);
448 } 448 }
449 449
450 if (!parent()->isFrameSet() && !document().printing()) { 450 if (!parent()->isFrameSet() && !document().printing()) {
451 setWidth(view()->viewWidth()); 451 setWidth(view()->viewWidth());
452 setHeight(view()->viewHeight()); 452 setHeight(view()->viewHeight());
453 } 453 }
454 454
455 unsigned cols = frameSet()->totalCols(); 455 unsigned cols = frameSet()->totalCols();
456 unsigned rows = frameSet()->totalRows(); 456 unsigned rows = frameSet()->totalRows();
457 457
458 if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) { 458 if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) {
459 m_rows.resize(rows); 459 m_rows.resize(rows);
460 m_cols.resize(cols); 460 m_cols.resize(cols);
461 } 461 }
462 462
463 LayoutUnit borderThickness = frameSet()->border(); 463 LayoutUnit borderThickness = frameSet()->border();
464 layOutAxis(m_rows, frameSet()->rowLengths(), height() - (rows - 1) * borderT hickness); 464 layOutAxis(m_rows, frameSet()->rowLengths(), height() - (rows - 1) * borderT hickness);
465 layOutAxis(m_cols, frameSet()->colLengths(), width() - (cols - 1) * borderTh ickness); 465 layOutAxis(m_cols, frameSet()->colLengths(), width() - (cols - 1) * borderTh ickness);
466 466
467 positionFrames(); 467 positionFrames();
468 468
469 RenderBox::layout(); 469 RenderBox::layout();
470 470
471 computeEdgeInfo(); 471 computeEdgeInfo();
472 472
473 updateLayerTransform(); 473 updateLayerTransform();
474 474
475 if (doFullRepaint) { 475 if (doFullRepaint) {
476 invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldB ounds), InvalidationSelfLayout); 476 invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldB ounds), InvalidationSelfLayout);
477 LayoutRect newBounds = boundsRectForRepaint(repaintContainer); 477 LayoutRect newBounds = boundsRectForPaintInvalidation(repaintContainer);
478 if (newBounds != oldBounds) 478 if (newBounds != oldBounds)
479 invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRect( newBounds), InvalidationSelfLayout); 479 invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRect( newBounds), InvalidationSelfLayout);
480 } 480 }
481 481
482 clearNeedsLayout(); 482 clearNeedsLayout();
483 } 483 }
484 484
485 static void clearNeedsLayoutOnHiddenFrames(RenderBox* frame) 485 static void clearNeedsLayoutOnHiddenFrames(RenderBox* frame)
486 { 486 {
487 for (; frame; frame = frame->nextSiblingBox()) { 487 for (; frame; frame = frame->nextSiblingBox()) {
(...skipping 19 matching lines...) Expand all
507 int xPos = 0; 507 int xPos = 0;
508 int height = m_rows.m_sizes[r]; 508 int height = m_rows.m_sizes[r];
509 for (int c = 0; c < cols; c++) { 509 for (int c = 0; c < cols; c++) {
510 child->setLocation(IntPoint(xPos, yPos)); 510 child->setLocation(IntPoint(xPos, yPos));
511 int width = m_cols.m_sizes[c]; 511 int width = m_cols.m_sizes[c];
512 512
513 // has to be resized and itself resize its contents 513 // has to be resized and itself resize its contents
514 if (width != child->width() || height != child->height()) { 514 if (width != child->width() || height != child->height()) {
515 child->setWidth(width); 515 child->setWidth(width);
516 child->setHeight(height); 516 child->setHeight(height);
517 child->setNeedsLayoutAndFullRepaint(); 517 child->setNeedsLayoutAndFullPaintInvalidation();
518 child->layout(); 518 child->layout();
519 } 519 }
520 520
521 xPos += width + borderThickness; 521 xPos += width + borderThickness;
522 522
523 child = child->nextSiblingBox(); 523 child = child->nextSiblingBox();
524 if (!child) 524 if (!child)
525 return; 525 return;
526 } 526 }
527 yPos += height + borderThickness; 527 yPos += height + borderThickness;
(...skipping 19 matching lines...) Expand all
547 if (needsLayout()) 547 if (needsLayout())
548 return; 548 return;
549 if (axis.m_splitBeingResized == noSplit) 549 if (axis.m_splitBeingResized == noSplit)
550 return; 550 return;
551 int currentSplitPosition = splitPosition(axis, axis.m_splitBeingResized); 551 int currentSplitPosition = splitPosition(axis, axis.m_splitBeingResized);
552 int delta = (position - currentSplitPosition) - axis.m_splitResizeOffset; 552 int delta = (position - currentSplitPosition) - axis.m_splitResizeOffset;
553 if (!delta) 553 if (!delta)
554 return; 554 return;
555 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; 555 axis.m_deltas[axis.m_splitBeingResized - 1] += delta;
556 axis.m_deltas[axis.m_splitBeingResized] -= delta; 556 axis.m_deltas[axis.m_splitBeingResized] -= delta;
557 setNeedsLayoutAndFullRepaint(); 557 setNeedsLayoutAndFullPaintInvalidation();
558 } 558 }
559 559
560 bool RenderFrameSet::userResize(MouseEvent* evt) 560 bool RenderFrameSet::userResize(MouseEvent* evt)
561 { 561 {
562 if (!m_isResizing) { 562 if (!m_isResizing) {
563 if (needsLayout()) 563 if (needsLayout())
564 return false; 564 return false;
565 if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftBut ton) { 565 if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftBut ton) {
566 FloatPoint localPos = absoluteToLocal(evt->absoluteLocation(), UseTr ansforms); 566 FloatPoint localPos = absoluteToLocal(evt->absoluteLocation(), UseTr ansforms);
567 startResizing(m_cols, localPos.x()); 567 startResizing(m_cols, localPos.x());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 return SetCursor; 661 return SetCursor;
662 } 662 }
663 if (canResizeColumn(roundedPoint)) { 663 if (canResizeColumn(roundedPoint)) {
664 cursor = columnResizeCursor(); 664 cursor = columnResizeCursor();
665 return SetCursor; 665 return SetCursor;
666 } 666 }
667 return RenderBox::getCursor(point, cursor); 667 return RenderBox::getCursor(point, cursor);
668 } 668 }
669 669
670 } // namespace WebCore 670 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlowThread.cpp ('k') | Source/core/rendering/RenderFullScreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698