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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (Closed)
Patch Set: - Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o) const { 393 LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o) const {
394 ASSERT(o == container()); 394 ASSERT(o == container());
395 395
396 LayoutSize offset = LayoutBlockFlow::offsetFromContainer(o); 396 LayoutSize offset = LayoutBlockFlow::offsetFromContainer(o);
397 if (parent()) 397 if (parent())
398 offset -= parentBox()->locationOffset(); 398 offset -= parentBox()->locationOffset();
399 399
400 return offset; 400 return offset;
401 } 401 }
402 402
403 LayoutRect LayoutTableCell::localOverflowRectForPaintInvalidation() const { 403 LayoutRect LayoutTableCell::localVisualRect() const {
404 // If the table grid is dirty, we cannot get reliable information about 404 // If the table grid is dirty, we cannot get reliable information about
405 // adjoining cells, so we ignore outside borders. This should not be a problem 405 // adjoining cells, so we ignore outside borders. This should not be a problem
406 // because it means that the table is going to recalculate the grid, relayout 406 // because it means that the table is going to recalculate the grid, relayout
407 // and issue a paint invalidation of its current rect, which includes any 407 // and issue a paint invalidation of its current rect, which includes any
408 // outside borders of this cell. 408 // outside borders of this cell.
409 if (!table()->collapseBorders() || table()->needsSectionRecalc()) 409 if (!table()->collapseBorders() || table()->needsSectionRecalc())
410 return LayoutBlockFlow::localOverflowRectForPaintInvalidation(); 410 return LayoutBlockFlow::localVisualRect();
411 411
412 bool rtl = !styleForCellFlow().isLeftToRightDirection(); 412 bool rtl = !styleForCellFlow().isLeftToRightDirection();
413 int outlineOutset = style()->outlineOutsetExtent(); 413 int outlineOutset = style()->outlineOutsetExtent();
414 int left = std::max(borderHalfLeft(true), outlineOutset); 414 int left = std::max(borderHalfLeft(true), outlineOutset);
415 int right = std::max(borderHalfRight(true), outlineOutset); 415 int right = std::max(borderHalfRight(true), outlineOutset);
416 int top = std::max(borderHalfTop(true), outlineOutset); 416 int top = std::max(borderHalfTop(true), outlineOutset);
417 int bottom = std::max(borderHalfBottom(true), outlineOutset); 417 int bottom = std::max(borderHalfBottom(true), outlineOutset);
418 if ((left && !rtl) || (right && rtl)) { 418 if ((left && !rtl) || (right && rtl)) {
419 if (LayoutTableCell* before = table()->cellBefore(this)) { 419 if (LayoutTableCell* before = table()->cellBefore(this)) {
420 top = std::max(top, before->borderHalfTop(true)); 420 top = std::max(top, before->borderHalfTop(true));
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 cb->adjustChildDebugRect(rect); 1452 cb->adjustChildDebugRect(rect);
1453 1453
1454 return rect; 1454 return rect;
1455 } 1455 }
1456 1456
1457 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { 1457 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const {
1458 r.move(0, -intrinsicPaddingBefore()); 1458 r.move(0, -intrinsicPaddingBefore());
1459 } 1459 }
1460 1460
1461 } // namespace blink 1461 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCellTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698