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

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

Issue 1786513002: Fix paint invalidation of paintInvalidationContainer itself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida tionState); 360 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida tionState);
361 return r; 361 return r;
362 } 362 }
363 363
364 void LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject * ancestor, LayoutRect& r, const PaintInvalidationState* paintInvalidationState) const 364 void LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject * ancestor, LayoutRect& r, const PaintInvalidationState* paintInvalidationState) const
365 { 365 {
366 if (ancestor == this) 366 if (ancestor == this)
367 return; 367 return;
368 r.setY(r.y()); 368 r.setY(r.y());
369 if ((!paintInvalidationState || !paintInvalidationState->canMapToContainer(a ncestor)) && parent()) 369 if ((!paintInvalidationState || !paintInvalidationState->canMapToAncestor(an cestor)) && parent())
370 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s pace, so don't add their offset in. 370 r.moveBy(-parentBox()->location()); // Rows are in the same coordinate s pace, so don't add their offset in.
371 LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r, paintInvalidat ionState); 371 LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r, paintInvalidat ionState);
372 } 372 }
373 373
374 int LayoutTableCell::cellBaselinePosition() const 374 int LayoutTableCell::cellBaselinePosition() const
375 { 375 {
376 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>: The baseline of a cell is the baseline of 376 // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>: The baseline of a cell is the baseline of
377 // the first in-flow line box in the cell, or the first in-flow table-row in the cell, whichever comes first. If there 377 // the first in-flow line box in the cell, or the first in-flow table-row in the cell, whichever comes first. If there
378 // is no such line box or table-row, the baseline is the bottom of content e dge of the cell box. 378 // is no such line box or table-row, the baseline is the bottom of content e dge of the cell box.
379 int firstLineBaseline = firstLineBoxBaseline(); 379 int firstLineBaseline = firstLineBoxBaseline();
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const 1017 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const
1018 { 1018 {
1019 // If this object has layer, the area of collapsed borders should be transpa rent 1019 // If this object has layer, the area of collapsed borders should be transpa rent
1020 // to expose the collapsed borders painted on the underlying layer. 1020 // to expose the collapsed borders painted on the underlying layer.
1021 if (hasLayer() && table()->collapseBorders()) 1021 if (hasLayer() && table()->collapseBorders())
1022 return false; 1022 return false;
1023 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); 1023 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect);
1024 } 1024 }
1025 1025
1026 } // namespace blink 1026 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698