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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.h

Issue 2696653003: Avoid unnecessary cell layout on nested percent height tables (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | no next file » | 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, 2009, 2013 Apple Inc. All rights 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights
8 * reserved. 8 * 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 return m_offsetForRepeatingHeader; 325 return m_offsetForRepeatingHeader;
326 } 326 }
327 327
328 bool mapToVisualRectInAncestorSpace( 328 bool mapToVisualRectInAncestorSpace(
329 const LayoutBoxModelObject* ancestor, 329 const LayoutBoxModelObject* ancestor,
330 LayoutRect&, 330 LayoutRect&,
331 VisualRectFlags = DefaultVisualRectFlags) const override; 331 VisualRectFlags = DefaultVisualRectFlags) const override;
332 332
333 bool isRepeatingHeaderGroup() const; 333 bool isRepeatingHeaderGroup() const;
334 334
335 void layout() override;
336
335 protected: 337 protected:
336 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 338 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
337 bool nodeAtPoint(HitTestResult&, 339 bool nodeAtPoint(HitTestResult&,
338 const HitTestLocation& locationInContainer, 340 const HitTestLocation& locationInContainer,
339 const LayoutPoint& accumulatedOffset, 341 const LayoutPoint& accumulatedOffset,
340 HitTestAction) override; 342 HitTestAction) override;
341 343
342 private: 344 private:
343 bool isOfType(LayoutObjectType type) const override { 345 bool isOfType(LayoutObjectType type) const override {
344 return type == LayoutObjectTableSection || LayoutBox::isOfType(type); 346 return type == LayoutObjectTableSection || LayoutBox::isOfType(type);
345 } 347 }
346 348
347 void willBeRemovedFromTree() override; 349 void willBeRemovedFromTree() override;
348 350
349 void layout() override;
350
351 int borderSpacingForRow(unsigned row) const { 351 int borderSpacingForRow(unsigned row) const {
352 return m_grid[row].rowLayoutObject ? table()->vBorderSpacing() : 0; 352 return m_grid[row].rowLayoutObject ? table()->vBorderSpacing() : 0;
353 } 353 }
354 354
355 void ensureRows(unsigned); 355 void ensureRows(unsigned);
356 356
357 bool rowHasOnlySpanningCells(unsigned); 357 bool rowHasOnlySpanningCells(unsigned);
358 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, 358 unsigned calcRowHeightHavingOnlySpanningCells(unsigned,
359 int&, 359 int&,
360 unsigned, 360 unsigned,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 bool m_hasMultipleCellLevels; 472 bool m_hasMultipleCellLevels;
473 473
474 LayoutUnit m_offsetForRepeatingHeader; 474 LayoutUnit m_offsetForRepeatingHeader;
475 }; 475 };
476 476
477 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 477 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
478 478
479 } // namespace blink 479 } // namespace blink
480 480
481 #endif // LayoutTableSection_h 481 #endif // LayoutTableSection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698