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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | 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. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override 165 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override
166 { 166 {
167 return createAnonymousWithParentRenderer(parent); 167 return createAnonymousWithParentRenderer(parent);
168 } 168 }
169 169
170 // This function is used to unify which table part's style we use for comput ing direction and 170 // This function is used to unify which table part's style we use for comput ing direction and
171 // writing mode. Writing modes are not allowed on row group and row but dire ction is. 171 // writing mode. Writing modes are not allowed on row group and row but dire ction is.
172 // This means we can safely use the same style in all cases to simplify our code. 172 // This means we can safely use the same style in all cases to simplify our code.
173 // FIXME: Eventually this function should replaced by style() once we suppor t direction 173 // FIXME: Eventually this function should replaced by style() once we suppor t direction
174 // on all table parts and writing-mode on cells. 174 // on all table parts and writing-mode on cells.
175 const LayoutStyle& styleForCellFlow() const 175 const ComputedStyle& styleForCellFlow() const
176 { 176 {
177 return row()->styleRef(); 177 return row()->styleRef();
178 } 178 }
179 179
180 const BorderValue& borderAdjoiningTableStart() const 180 const BorderValue& borderAdjoiningTableStart() const
181 { 181 {
182 ASSERT(isFirstOrLastCellInRow()); 182 ASSERT(isFirstOrLastCellInRow());
183 if (section()->hasSameDirectionAs(table())) 183 if (section()->hasSameDirectionAs(table()))
184 return style()->borderStart(); 184 return style()->borderStart();
185 185
(...skipping 26 matching lines...) Expand all
212 #if ENABLE(ASSERT) 212 #if ENABLE(ASSERT)
213 bool isFirstOrLastCellInRow() const 213 bool isFirstOrLastCellInRow() const
214 { 214 {
215 return !table()->cellAfter(this) || !table()->cellBefore(this); 215 return !table()->cellAfter(this) || !table()->cellBefore(this);
216 } 216 }
217 #endif 217 #endif
218 218
219 virtual const char* name() const override { return isAnonymous() ? "LayoutTa bleCell (anonymous)" : "LayoutTableCell"; } 219 virtual const char* name() const override { return isAnonymous() ? "LayoutTa bleCell (anonymous)" : "LayoutTableCell"; }
220 220
221 protected: 221 protected:
222 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 222 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
223 virtual void computePreferredLogicalWidths() override; 223 virtual void computePreferredLogicalWidths() override;
224 224
225 virtual void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintL ayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override; 225 virtual void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintL ayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override;
226 226
227 private: 227 private:
228 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableCell || LayoutBlockFlow::isOfType(type); } 228 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableCell || LayoutBlockFlow::isOfType(type); }
229 229
230 virtual void willBeRemovedFromTree() override; 230 virtual void willBeRemovedFromTree() override;
231 231
232 virtual void updateLogicalWidth() override; 232 virtual void updateLogicalWidth() override;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 inline LayoutTableCell* LayoutTableRow::lastCell() const 307 inline LayoutTableCell* LayoutTableRow::lastCell() const
308 { 308 {
309 ASSERT(children() == virtualChildren()); 309 ASSERT(children() == virtualChildren());
310 return toLayoutTableCell(children()->lastChild()); 310 return toLayoutTableCell(children()->lastChild());
311 } 311 }
312 312
313 } // namespace blink 313 } // namespace blink
314 314
315 #endif // LayoutTableCell_h 315 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/layout/LayoutTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698