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

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

Issue 1269123002: Preparation for combining paths of focus rings and outlines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove debug from fast/css/focus-ring-recursive-continuations.html Created 5 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
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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI nvalidationState) const 315 LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI nvalidationState) const
316 { 316 {
317 // If the table grid is dirty, we cannot get reliable information about adjo ining cells, 317 // If the table grid is dirty, we cannot get reliable information about adjo ining cells,
318 // so we ignore outside borders. This should not be a problem because it mea ns that 318 // so we ignore outside borders. This should not be a problem because it mea ns that
319 // the table is going to recalculate the grid, relayout and issue a paint in validation of its current rect, which 319 // the table is going to recalculate the grid, relayout and issue a paint in validation of its current rect, which
320 // includes any outside borders of this cell. 320 // includes any outside borders of this cell.
321 if (!table()->collapseBorders() || table()->needsSectionRecalc()) 321 if (!table()->collapseBorders() || table()->needsSectionRecalc())
322 return LayoutBlockFlow::clippedOverflowRectForPaintInvalidation(paintInv alidationContainer, paintInvalidationState); 322 return LayoutBlockFlow::clippedOverflowRectForPaintInvalidation(paintInv alidationContainer, paintInvalidationState);
323 323
324 bool rtl = !styleForCellFlow().isLeftToRightDirection(); 324 bool rtl = !styleForCellFlow().isLeftToRightDirection();
325 int outlineSize = style()->outlineSize(); 325 int outlineOutset = style()->outlineOutsetExtent();
326 int left = std::max(borderHalfLeft(true), outlineSize); 326 int left = std::max(borderHalfLeft(true), outlineOutset);
327 int right = std::max(borderHalfRight(true), outlineSize); 327 int right = std::max(borderHalfRight(true), outlineOutset);
328 int top = std::max(borderHalfTop(true), outlineSize); 328 int top = std::max(borderHalfTop(true), outlineOutset);
329 int bottom = std::max(borderHalfBottom(true), outlineSize); 329 int bottom = std::max(borderHalfBottom(true), outlineOutset);
330 if ((left && !rtl) || (right && rtl)) { 330 if ((left && !rtl) || (right && rtl)) {
331 if (LayoutTableCell* before = table()->cellBefore(this)) { 331 if (LayoutTableCell* before = table()->cellBefore(this)) {
332 top = std::max(top, before->borderHalfTop(true)); 332 top = std::max(top, before->borderHalfTop(true));
333 bottom = std::max(bottom, before->borderHalfBottom(true)); 333 bottom = std::max(bottom, before->borderHalfBottom(true));
334 } 334 }
335 } 335 }
336 if ((left && rtl) || (right && !rtl)) { 336 if ((left && rtl) || (right && !rtl)) {
337 if (LayoutTableCell* after = table()->cellAfter(this)) { 337 if (LayoutTableCell* after = table()->cellAfter(this)) {
338 top = std::max(top, after->borderHalfTop(true)); 338 top = std::max(top, after->borderHalfTop(true));
339 bottom = std::max(bottom, after->borderHalfBottom(true)); 339 bottom = std::max(bottom, after->borderHalfBottom(true));
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1029
1030 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent) 1030 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent)
1031 { 1031 {
1032 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t()); 1032 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t());
1033 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL); 1033 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL);
1034 newCell->setStyle(newStyle.release()); 1034 newCell->setStyle(newStyle.release());
1035 return newCell; 1035 return newCell;
1036 } 1036 }
1037 1037
1038 } // namespace blink 1038 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698