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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.h

Issue 2884763003: Combine and simplify LayoutTableSection::DirtiedRows() and DirtiedEffectiveColumns() (Closed)
Patch Set: Rebase on origin/master Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTableSection.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.h b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
index 72b16c3f6f01470baf2552e775cd2e4c40c4dbc9..8ff2023691d2d66cbccff14fe388ccd92f8bac9f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
@@ -39,10 +39,11 @@ class CellSpan {
STACK_ALLOCATED();
public:
+ CellSpan() : start_(0), end_(0) {}
CellSpan(unsigned start, unsigned end) : start_(start), end_(end) {}
unsigned Start() const { return start_; }
- unsigned end() const { return end_; }
+ unsigned End() const { return end_; }
void DecreaseStart() { --start_; }
void IncreaseEnd() { ++end_; }
@@ -55,7 +56,7 @@ class CellSpan {
};
inline bool operator==(const CellSpan& s1, const CellSpan& s2) {
- return s1.Start() == s2.Start() && s1.end() == s2.end();
+ return s1.Start() == s2.Start() && s1.End() == s2.End();
}
inline bool operator!=(const CellSpan& s1, const CellSpan& s2) {
return !(s1 == s2);
@@ -260,10 +261,11 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
// columnPos vectors.
LayoutRect LogicalRectForWritingModeAndDirection(const LayoutRect&) const;
- // Returns a row or column span covering all grid slots from each of which
- // a primary cell intersecting |visualRect| originates.
- CellSpan DirtiedRows(const LayoutRect& visual_rect) const;
- CellSpan DirtiedEffectiveColumns(const LayoutRect& visual_rect) const;
+ // Sets |rows| and |columns| to cover all cells needing repaint in
+ // |damage_rect|.
+ void DirtiedRowsAndEffectiveColumns(const LayoutRect& damage_rect,
+ CellSpan& rows,
+ CellSpan& columns) const;
const HashSet<const LayoutTableCell*>& OverflowingCells() const {
return overflowing_cells_;

Powered by Google App Engine
This is Rietveld 408576698