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

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

Issue 2842123003: Refactor LayoutTableCell::Has(Start|End)BorderAdjoinjingTable() and add test (Closed)
Patch Set: - 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableCell.cpp » ('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, 2009, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 protected: 342 protected:
343 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; 343 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override;
344 void ComputePreferredLogicalWidths() override; 344 void ComputePreferredLogicalWidths() override;
345 345
346 void AddLayerHitTestRects(LayerHitTestRects&, 346 void AddLayerHitTestRects(LayerHitTestRects&,
347 const PaintLayer* current_composited_layer, 347 const PaintLayer* current_composited_layer,
348 const LayoutPoint& layer_offset, 348 const LayoutPoint& layer_offset,
349 const LayoutRect& container_rect) const override; 349 const LayoutRect& container_rect) const override;
350 350
351 private: 351 private:
352 friend class LayoutTableCellTest;
353
352 bool IsOfType(LayoutObjectType type) const override { 354 bool IsOfType(LayoutObjectType type) const override {
353 return type == kLayoutObjectTableCell || LayoutBlockFlow::IsOfType(type); 355 return type == kLayoutObjectTableCell || LayoutBlockFlow::IsOfType(type);
354 } 356 }
355 357
356 void WillBeRemovedFromTree() override; 358 void WillBeRemovedFromTree() override;
357 359
358 void UpdateLogicalWidth() override; 360 void UpdateLogicalWidth() override;
359 361
360 void PaintBoxDecorationBackground(const PaintInfo&, 362 void PaintBoxDecorationBackground(const PaintInfo&,
361 const LayoutPoint&) const override; 363 const LayoutPoint&) const override;
(...skipping 12 matching lines...) Expand all
374 LayoutUnit BorderHalfBefore(bool outer) const; 376 LayoutUnit BorderHalfBefore(bool outer) const;
375 LayoutUnit BorderHalfAfter(bool outer) const; 377 LayoutUnit BorderHalfAfter(bool outer) const;
376 378
377 void SetIntrinsicPaddingBefore(int p) { intrinsic_padding_before_ = p; } 379 void SetIntrinsicPaddingBefore(int p) { intrinsic_padding_before_ = p; }
378 void SetIntrinsicPaddingAfter(int p) { intrinsic_padding_after_ = p; } 380 void SetIntrinsicPaddingAfter(int p) { intrinsic_padding_after_ = p; }
379 void SetIntrinsicPadding(int before, int after) { 381 void SetIntrinsicPadding(int before, int after) {
380 SetIntrinsicPaddingBefore(before); 382 SetIntrinsicPaddingBefore(before);
381 SetIntrinsicPaddingAfter(after); 383 SetIntrinsicPaddingAfter(after);
382 } 384 }
383 385
386 inline bool IsInStartColumn() const;
387 inline bool IsInEndColumn() const;
384 bool HasStartBorderAdjoiningTable() const; 388 bool HasStartBorderAdjoiningTable() const;
385 bool HasEndBorderAdjoiningTable() const; 389 bool HasEndBorderAdjoiningTable() const;
386 390
387 // Those functions implement the CSS collapsing border conflict 391 // Those functions implement the CSS collapsing border conflict
388 // resolution algorithm. 392 // resolution algorithm.
389 // http://www.w3.org/TR/CSS2/tables.html#border-conflict-resolution 393 // http://www.w3.org/TR/CSS2/tables.html#border-conflict-resolution
390 // 394 //
391 // The code is pretty complicated as it needs to handle mixed directionality 395 // The code is pretty complicated as it needs to handle mixed directionality
392 // between the table and the different table parts (cell, row, row group, 396 // between the table and the different table parts (cell, row, row group,
393 // column, column group). 397 // column, column group).
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 return ToLayoutTableCell(FirstChild()); 458 return ToLayoutTableCell(FirstChild());
455 } 459 }
456 460
457 inline LayoutTableCell* LayoutTableRow::LastCell() const { 461 inline LayoutTableCell* LayoutTableRow::LastCell() const {
458 return ToLayoutTableCell(LastChild()); 462 return ToLayoutTableCell(LastChild());
459 } 463 }
460 464
461 } // namespace blink 465 } // namespace blink
462 466
463 #endif // LayoutTableCell_h 467 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698