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

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

Issue 1234463005: Don't invalidate cell when collapsed border changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 5 years, 5 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 | « LayoutTests/TestExpectations ('k') | Source/core/layout/LayoutTableSection.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) 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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 borderValues.append(borderValue); 947 borderValues.append(borderValue);
948 } 948 }
949 949
950 void LayoutTableCell::collectBorderValues(LayoutTable::CollapsedBorderValues& bo rderValues) 950 void LayoutTableCell::collectBorderValues(LayoutTable::CollapsedBorderValues& bo rderValues)
951 { 951 {
952 CollapsedBorderValue startBorder = computeCollapsedStartBorder(); 952 CollapsedBorderValue startBorder = computeCollapsedStartBorder();
953 CollapsedBorderValue endBorder = computeCollapsedEndBorder(); 953 CollapsedBorderValue endBorder = computeCollapsedEndBorder();
954 CollapsedBorderValue beforeBorder = computeCollapsedBeforeBorder(); 954 CollapsedBorderValue beforeBorder = computeCollapsedBeforeBorder();
955 CollapsedBorderValue afterBorder = computeCollapsedAfterBorder(); 955 CollapsedBorderValue afterBorder = computeCollapsedAfterBorder();
956 LayoutTableSection* section = this->section(); 956 LayoutTableSection* section = this->section();
957 bool changed = section->setCachedCollapsedBorder(this, CBSStart, startBorder ); 957 section->setCachedCollapsedBorder(this, CBSStart, startBorder);
958 changed |= section->setCachedCollapsedBorder(this, CBSEnd, endBorder); 958 section->setCachedCollapsedBorder(this, CBSEnd, endBorder);
959 changed |= section->setCachedCollapsedBorder(this, CBSBefore, beforeBorder); 959 section->setCachedCollapsedBorder(this, CBSBefore, beforeBorder);
960 changed |= section->setCachedCollapsedBorder(this, CBSAfter, afterBorder); 960 section->setCachedCollapsedBorder(this, CBSAfter, afterBorder);
961
962 // In slimming paint mode, we need to invalidate all cells with collapsed bo rder changed.
963 // FIXME: Need a way to invalidate/repaint the borders only. crbug.com/45109 0#c5.
964 if (changed && RuntimeEnabledFeatures::slimmingPaintEnabled())
965 invalidateDisplayItemClient(*this);
966 961
967 addBorderStyle(borderValues, startBorder); 962 addBorderStyle(borderValues, startBorder);
968 addBorderStyle(borderValues, endBorder); 963 addBorderStyle(borderValues, endBorder);
969 addBorderStyle(borderValues, beforeBorder); 964 addBorderStyle(borderValues, beforeBorder);
970 addBorderStyle(borderValues, afterBorder); 965 addBorderStyle(borderValues, afterBorder);
971 } 966 }
972 967
973 static int compareBorderValuesForQSort(const void* pa, const void* pb) 968 static int compareBorderValuesForQSort(const void* pa, const void* pb)
974 { 969 {
975 const CollapsedBorderValue* a = static_cast<const CollapsedBorderValue*>(pa) ; 970 const CollapsedBorderValue* a = static_cast<const CollapsedBorderValue*>(pa) ;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 1029
1035 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent) 1030 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent)
1036 { 1031 {
1037 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t()); 1032 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t());
1038 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL); 1033 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL);
1039 newCell->setStyle(newStyle.release()); 1034 newCell->setStyle(newStyle.release());
1040 return newCell; 1035 return newCell;
1041 } 1036 }
1042 1037
1043 } // namespace blink 1038 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/layout/LayoutTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698