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

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

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Rebaselined tests. 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
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, 2010 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // 'border-spacing' property represent spacing between columns and rows 141 // 'border-spacing' property represent spacing between columns and rows
142 // respectively, not necessarily the horizontal and vertical spacing 142 // respectively, not necessarily the horizontal and vertical spacing
143 // respectively". 143 // respectively".
144 int hBorderSpacing() const { return m_hSpacing; } 144 int hBorderSpacing() const { return m_hSpacing; }
145 int vBorderSpacing() const { return m_vSpacing; } 145 int vBorderSpacing() const { return m_vSpacing; }
146 146
147 bool collapseBorders() const { 147 bool collapseBorders() const {
148 return style()->borderCollapse() == EBorderCollapse::kCollapse; 148 return style()->borderCollapse() == EBorderCollapse::kCollapse;
149 } 149 }
150 150
151 int borderStart() const override { return m_borderStart; } 151 LayoutUnit borderStart() const override { return LayoutUnit(m_borderStart); }
152 int borderEnd() const override { return m_borderEnd; } 152 LayoutUnit borderEnd() const override { return LayoutUnit(m_borderEnd); }
153 int borderBefore() const override; 153 LayoutUnit borderBefore() const override;
154 int borderAfter() const override; 154 LayoutUnit borderAfter() const override;
155 155
156 int borderLeft() const override { 156 LayoutUnit borderLeft() const override {
157 if (style()->isHorizontalWritingMode()) 157 if (style()->isHorizontalWritingMode())
158 return style()->isLeftToRightDirection() ? borderStart() : borderEnd(); 158 return style()->isLeftToRightDirection() ? borderStart() : borderEnd();
159 return style()->isFlippedBlocksWritingMode() ? borderAfter() 159 return style()->isFlippedBlocksWritingMode() ? borderAfter()
160 : borderBefore(); 160 : borderBefore();
161 } 161 }
162 162
163 int borderRight() const override { 163 LayoutUnit borderRight() const override {
164 if (style()->isHorizontalWritingMode()) 164 if (style()->isHorizontalWritingMode())
165 return style()->isLeftToRightDirection() ? borderEnd() : borderStart(); 165 return style()->isLeftToRightDirection() ? borderEnd() : borderStart();
166 return style()->isFlippedBlocksWritingMode() ? borderBefore() 166 return style()->isFlippedBlocksWritingMode() ? borderBefore()
167 : borderAfter(); 167 : borderAfter();
168 } 168 }
169 169
170 int borderTop() const override { 170 LayoutUnit borderTop() const override {
171 if (style()->isHorizontalWritingMode()) 171 if (style()->isHorizontalWritingMode())
172 return style()->isFlippedBlocksWritingMode() ? borderAfter() 172 return style()->isFlippedBlocksWritingMode() ? borderAfter()
173 : borderBefore(); 173 : borderBefore();
174 return style()->isLeftToRightDirection() ? borderStart() : borderEnd(); 174 return style()->isLeftToRightDirection() ? borderStart() : borderEnd();
175 } 175 }
176 176
177 int borderBottom() const override { 177 LayoutUnit borderBottom() const override {
178 if (style()->isHorizontalWritingMode()) 178 if (style()->isHorizontalWritingMode())
179 return style()->isFlippedBlocksWritingMode() ? borderBefore() 179 return style()->isFlippedBlocksWritingMode() ? borderBefore()
180 : borderAfter(); 180 : borderAfter();
181 return style()->isLeftToRightDirection() ? borderEnd() : borderStart(); 181 return style()->isLeftToRightDirection() ? borderEnd() : borderStart();
182 } 182 }
183 183
184 int outerBorderBefore() const; 184 int outerBorderBefore() const;
185 int outerBorderAfter() const; 185 int outerBorderAfter() const;
186 int outerBorderStart() const; 186 int outerBorderStart() const;
187 int outerBorderEnd() const; 187 int outerBorderEnd() const;
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 if (m_firstBody) 592 if (m_firstBody)
593 return m_firstBody; 593 return m_firstBody;
594 return m_foot; 594 return m_foot;
595 } 595 }
596 596
597 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); 597 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable());
598 598
599 } // namespace blink 599 } // namespace blink
600 600
601 #endif // LayoutTable_h 601 #endif // LayoutTable_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698