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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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
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, 2010, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
10 * 10 *
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // FIXME: The optimisation below doesn't work since the internal table 582 // FIXME: The optimisation below doesn't work since the internal table
583 // layout could have changed. We need to add a flag to the table 583 // layout could have changed. We need to add a flag to the table
584 // layout that tells us if something has changed in the min max 584 // layout that tells us if something has changed in the min max
585 // calculations to do it correctly. 585 // calculations to do it correctly.
586 // if ( oldWidth != width() || columns.size() + 1 != columnPos.size() ) 586 // if ( oldWidth != width() || columns.size() + 1 != columnPos.size() )
587 m_tableLayout->layout(); 587 m_tableLayout->layout();
588 588
589 // Lay out top captions. 589 // Lay out top captions.
590 // FIXME: Collapse caption margin. 590 // FIXME: Collapse caption margin.
591 for (unsigned i = 0; i < m_captions.size(); i++) { 591 for (unsigned i = 0; i < m_captions.size(); i++) {
592 if (m_captions[i]->style()->captionSide() == ECaptionSide::Bottom) 592 if (m_captions[i]->style()->captionSide() == ECaptionSide::kBottom)
593 continue; 593 continue;
594 layoutCaption(*m_captions[i], layouter); 594 layoutCaption(*m_captions[i], layouter);
595 } 595 }
596 596
597 LayoutTableSection* topSection = this->topSection(); 597 LayoutTableSection* topSection = this->topSection();
598 LayoutTableSection* bottomSection = this->bottomSection(); 598 LayoutTableSection* bottomSection = this->bottomSection();
599 599
600 // This is the border-before edge of the "table box", relative to the "table 600 // This is the border-before edge of the "table box", relative to the "table
601 // wrapper box", i.e. right after all top captions. 601 // wrapper box", i.e. right after all top captions.
602 // https://www.w3.org/TR/2011/REC-CSS2-20110607/tables.html#model 602 // https://www.w3.org/TR/2011/REC-CSS2-20110607/tables.html#model
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 section->updateLayerTransformAfterLayout(); 706 section->updateLayerTransformAfterLayout();
707 section->addVisualEffectOverflow(); 707 section->addVisualEffectOverflow();
708 708
709 section = sectionBelow(section); 709 section = sectionBelow(section);
710 } 710 }
711 711
712 setLogicalHeight(logicalHeight() + borderAndPaddingAfter); 712 setLogicalHeight(logicalHeight() + borderAndPaddingAfter);
713 713
714 // Lay out bottom captions. 714 // Lay out bottom captions.
715 for (unsigned i = 0; i < m_captions.size(); i++) { 715 for (unsigned i = 0; i < m_captions.size(); i++) {
716 if (m_captions[i]->style()->captionSide() != ECaptionSide::Bottom) 716 if (m_captions[i]->style()->captionSide() != ECaptionSide::kBottom)
717 continue; 717 continue;
718 layoutCaption(*m_captions[i], layouter); 718 layoutCaption(*m_captions[i], layouter);
719 } 719 }
720 720
721 updateLogicalHeight(); 721 updateLogicalHeight();
722 722
723 // table can be containing block of positioned elements. 723 // table can be containing block of positioned elements.
724 bool dimensionChanged = oldLogicalWidth != logicalWidth() || 724 bool dimensionChanged = oldLogicalWidth != logicalWidth() ||
725 oldLogicalHeight != logicalHeight(); 725 oldLogicalHeight != logicalHeight();
726 layoutPositionedObjects(dimensionChanged); 726 layoutPositionedObjects(dimensionChanged);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 const LayoutPoint& paintOffset) const { 818 const LayoutPoint& paintOffset) const {
819 TablePainter(*this).paintObject(paintInfo, paintOffset); 819 TablePainter(*this).paintObject(paintInfo, paintOffset);
820 } 820 }
821 821
822 void LayoutTable::subtractCaptionRect(LayoutRect& rect) const { 822 void LayoutTable::subtractCaptionRect(LayoutRect& rect) const {
823 for (unsigned i = 0; i < m_captions.size(); i++) { 823 for (unsigned i = 0; i < m_captions.size(); i++) {
824 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() + 824 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() +
825 m_captions[i]->marginBefore() + 825 m_captions[i]->marginBefore() +
826 m_captions[i]->marginAfter(); 826 m_captions[i]->marginAfter();
827 bool captionIsBefore = 827 bool captionIsBefore =
828 (m_captions[i]->style()->captionSide() != ECaptionSide::Bottom) ^ 828 (m_captions[i]->style()->captionSide() != ECaptionSide::kBottom) ^
829 style()->isFlippedBlocksWritingMode(); 829 style()->isFlippedBlocksWritingMode();
830 if (style()->isHorizontalWritingMode()) { 830 if (style()->isHorizontalWritingMode()) {
831 rect.setHeight(rect.height() - captionLogicalHeight); 831 rect.setHeight(rect.height() - captionLogicalHeight);
832 if (captionIsBefore) 832 if (captionIsBefore)
833 rect.move(LayoutUnit(), captionLogicalHeight); 833 rect.move(LayoutUnit(), captionLogicalHeight);
834 } else { 834 } else {
835 rect.setWidth(rect.width() - captionLogicalHeight); 835 rect.setWidth(rect.width() - captionLogicalHeight);
836 if (captionIsBefore) 836 if (captionIsBefore)
837 rect.move(captionLogicalHeight, LayoutUnit()); 837 rect.move(captionLogicalHeight, LayoutUnit());
838 } 838 }
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 } 1688 }
1689 1689
1690 LayoutUnit LayoutTable::paddingRight() const { 1690 LayoutUnit LayoutTable::paddingRight() const {
1691 if (collapseBorders()) 1691 if (collapseBorders())
1692 return LayoutUnit(); 1692 return LayoutUnit();
1693 1693
1694 return LayoutBlock::paddingRight(); 1694 return LayoutBlock::paddingRight();
1695 } 1695 }
1696 1696
1697 } // namespace blink 1697 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698