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

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

Issue 2503163003: Trace table cell position indicies accurately. (Closed)
Patch Set: logic Created 4 years, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/TracedLayoutObject.h" 5 #include "core/layout/TracedLayoutObject.h"
6 6
7 #include "core/layout/LayoutInline.h" 7 #include "core/layout/LayoutInline.h"
8 #include "core/layout/LayoutTableCell.h" 8 #include "core/layout/LayoutTableCell.h"
9 #include "core/layout/LayoutText.h" 9 #include "core/layout/LayoutText.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 tracedValue->setBoolean("positioned", object.isOutOfFlowPositioned()); 60 tracedValue->setBoolean("positioned", object.isOutOfFlowPositioned());
61 if (object.selfNeedsLayout()) 61 if (object.selfNeedsLayout())
62 tracedValue->setBoolean("selfNeeds", object.selfNeedsLayout()); 62 tracedValue->setBoolean("selfNeeds", object.selfNeedsLayout());
63 if (object.needsPositionedMovementLayout()) 63 if (object.needsPositionedMovementLayout())
64 tracedValue->setBoolean("positionedMovement", 64 tracedValue->setBoolean("positionedMovement",
65 object.needsPositionedMovementLayout()); 65 object.needsPositionedMovementLayout());
66 if (object.normalChildNeedsLayout()) 66 if (object.normalChildNeedsLayout())
67 tracedValue->setBoolean("childNeeds", object.normalChildNeedsLayout()); 67 tracedValue->setBoolean("childNeeds", object.normalChildNeedsLayout());
68 if (object.posChildNeedsLayout()) 68 if (object.posChildNeedsLayout())
69 tracedValue->setBoolean("posChildNeeds", object.posChildNeedsLayout()); 69 tracedValue->setBoolean("posChildNeeds", object.posChildNeedsLayout());
70
70 if (object.isTableCell()) { 71 if (object.isTableCell()) {
71 const LayoutTableCell& c = toLayoutTableCell(object); 72 // Table layout might be dirty if traceGeometry is false.
72 tracedValue->setDouble("row", c.rowIndex()); 73 // See https://crbug.com/664271 .
73 tracedValue->setDouble("col", c.absoluteColumnIndex()); 74 if (traceGeometry) {
74 if (c.rowSpan() != 1) 75 const LayoutTableCell& c = toLayoutTableCell(object);
75 tracedValue->setDouble("rowSpan", c.rowSpan()); 76 tracedValue->setDouble("row", c.rowIndex());
76 if (c.colSpan() != 1) 77 tracedValue->setDouble("col", c.absoluteColumnIndex());
77 tracedValue->setDouble("colSpan", c.colSpan()); 78 if (c.rowSpan() != 1)
79 tracedValue->setDouble("rowSpan", c.rowSpan());
80 if (c.colSpan() != 1)
81 tracedValue->setDouble("colSpan", c.colSpan());
82 } else {
83 // At least indicate that object is a table cell.
84 tracedValue->setDouble("row", 0);
85 tracedValue->setDouble("col", 0);
86 }
78 } 87 }
88
79 if (object.isAnonymous()) 89 if (object.isAnonymous())
80 tracedValue->setBoolean("anonymous", object.isAnonymous()); 90 tracedValue->setBoolean("anonymous", object.isAnonymous());
81 if (object.isRelPositioned()) 91 if (object.isRelPositioned())
82 tracedValue->setBoolean("relativePositioned", object.isRelPositioned()); 92 tracedValue->setBoolean("relativePositioned", object.isRelPositioned());
83 if (object.isStickyPositioned()) 93 if (object.isStickyPositioned())
84 tracedValue->setBoolean("stickyPositioned", object.isStickyPositioned()); 94 tracedValue->setBoolean("stickyPositioned", object.isStickyPositioned());
85 if (object.isFloating()) 95 if (object.isFloating())
86 tracedValue->setBoolean("float", object.isFloating()); 96 tracedValue->setBoolean("float", object.isFloating());
87 97
88 if (object.slowFirstChild()) { 98 if (object.slowFirstChild()) {
(...skipping 11 matching lines...) Expand all
100 } // namespace 110 } // namespace
101 111
102 std::unique_ptr<TracedValue> TracedLayoutObject::create(const LayoutView& view, 112 std::unique_ptr<TracedValue> TracedLayoutObject::create(const LayoutView& view,
103 bool traceGeometry) { 113 bool traceGeometry) {
104 std::unique_ptr<TracedValue> tracedValue = TracedValue::create(); 114 std::unique_ptr<TracedValue> tracedValue = TracedValue::create();
105 dumpToTracedValue(view, traceGeometry, tracedValue.get()); 115 dumpToTracedValue(view, traceGeometry, tracedValue.get());
106 return tracedValue; 116 return tracedValue;
107 } 117 }
108 118
109 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698