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

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

Issue 1317143005: [WIP] do something :-) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutText.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, 2008, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 18 matching lines...) Expand all
29 #include "core/css/StylePropertySet.h" 29 #include "core/css/StylePropertySet.h"
30 #include "core/html/HTMLTableCellElement.h" 30 #include "core/html/HTMLTableCellElement.h"
31 #include "core/layout/LayoutAnalyzer.h" 31 #include "core/layout/LayoutAnalyzer.h"
32 #include "core/layout/LayoutTableCol.h" 32 #include "core/layout/LayoutTableCol.h"
33 #include "core/layout/LayoutView.h" 33 #include "core/layout/LayoutView.h"
34 #include "core/layout/SubtreeLayoutScope.h" 34 #include "core/layout/SubtreeLayoutScope.h"
35 #include "core/paint/TableCellPainter.h" 35 #include "core/paint/TableCellPainter.h"
36 #include "core/style/CollapsedBorderValue.h" 36 #include "core/style/CollapsedBorderValue.h"
37 #include "platform/geometry/FloatQuad.h" 37 #include "platform/geometry/FloatQuad.h"
38 #include "platform/geometry/TransformState.h" 38 #include "platform/geometry/TransformState.h"
39 #include "wtf/SizeAssertions.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 using namespace HTMLNames; 43 using namespace HTMLNames;
43 44
44 struct SameSizeAsLayoutTableCell : public LayoutBlockFlow { 45 ASSERT_SIZE(LayoutTableCell, sizeof(LayoutBlockFlow) + 12, sizeof(LayoutBlockFlo w) + 16);
45 unsigned bitfields; 46 ASSERT_SIZE(CollapsedBorderValue, 8, 8);
46 int paddings[2];
47 };
48
49 static_assert(sizeof(LayoutTableCell) == sizeof(SameSizeAsLayoutTableCell), "Lay outTableCell should stay small");
50 static_assert(sizeof(CollapsedBorderValue) == 8, "CollapsedBorderValue should st ay small");
51 47
52 LayoutTableCell::LayoutTableCell(Element* element) 48 LayoutTableCell::LayoutTableCell(Element* element)
53 : LayoutBlockFlow(element) 49 : LayoutBlockFlow(element)
54 , m_column(unsetColumnIndex) 50 , m_column(unsetColumnIndex)
55 , m_cellWidthChanged(false) 51 , m_cellWidthChanged(false)
56 , m_intrinsicPaddingBefore(0) 52 , m_intrinsicPaddingBefore(0)
57 , m_intrinsicPaddingAfter(0) 53 , m_intrinsicPaddingAfter(0)
58 { 54 {
59 // We only update the flags when notified of DOM changes in colSpanOrRowSpan Changed() 55 // We only update the flags when notified of DOM changes in colSpanOrRowSpan Changed()
60 // so we need to set their initial values here in case something asks for co lSpan()/rowSpan() before then. 56 // so we need to set their initial values here in case something asks for co lSpan()/rowSpan() before then.
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1027
1032 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent) 1028 LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* parent)
1033 { 1029 {
1034 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t()); 1030 LayoutTableCell* newCell = LayoutTableCell::createAnonymous(&parent->documen t());
1035 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL); 1031 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_CELL);
1036 newCell->setStyle(newStyle.release()); 1032 newCell->setStyle(newStyle.release());
1037 return newCell; 1033 return newCell;
1038 } 1034 }
1039 1035
1040 } // namespace blink 1036 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698