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

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

Issue 2503163003: Trace table cell position indicies accurately. (Closed)
Patch Set: 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 if (object.isTableCell()) { 70
71 // Table layout might be dirty if traceGeometry is false.
72 // See https://crbug.com/664271 .
73 if (traceGeometry && object.isTableCell()) {
kouhei (in TOK) 2016/11/17 22:40:01 Should we really dump the row/col to 0 if traceGeo
kraynov 2016/11/17 22:52:14 Thanks! Fixed.
71 const LayoutTableCell& c = toLayoutTableCell(object); 74 const LayoutTableCell& c = toLayoutTableCell(object);
72 tracedValue->setDouble("row", c.rowIndex()); 75 tracedValue->setDouble("row", c.rowIndex());
73 tracedValue->setDouble("col", c.absoluteColumnIndex()); 76 tracedValue->setDouble("col", c.absoluteColumnIndex());
74 if (c.rowSpan() != 1) 77 if (c.rowSpan() != 1)
75 tracedValue->setDouble("rowSpan", c.rowSpan()); 78 tracedValue->setDouble("rowSpan", c.rowSpan());
76 if (c.colSpan() != 1) 79 if (c.colSpan() != 1)
77 tracedValue->setDouble("colSpan", c.colSpan()); 80 tracedValue->setDouble("colSpan", c.colSpan());
81 } else {
82 tracedValue->setDouble("row", 0);
83 tracedValue->setDouble("col", 0);
78 } 84 }
85
79 if (object.isAnonymous()) 86 if (object.isAnonymous())
80 tracedValue->setBoolean("anonymous", object.isAnonymous()); 87 tracedValue->setBoolean("anonymous", object.isAnonymous());
81 if (object.isRelPositioned()) 88 if (object.isRelPositioned())
82 tracedValue->setBoolean("relativePositioned", object.isRelPositioned()); 89 tracedValue->setBoolean("relativePositioned", object.isRelPositioned());
83 if (object.isStickyPositioned()) 90 if (object.isStickyPositioned())
84 tracedValue->setBoolean("stickyPositioned", object.isStickyPositioned()); 91 tracedValue->setBoolean("stickyPositioned", object.isStickyPositioned());
85 if (object.isFloating()) 92 if (object.isFloating())
86 tracedValue->setBoolean("float", object.isFloating()); 93 tracedValue->setBoolean("float", object.isFloating());
87 94
88 if (object.slowFirstChild()) { 95 if (object.slowFirstChild()) {
(...skipping 11 matching lines...) Expand all
100 } // namespace 107 } // namespace
101 108
102 std::unique_ptr<TracedValue> TracedLayoutObject::create(const LayoutView& view, 109 std::unique_ptr<TracedValue> TracedLayoutObject::create(const LayoutView& view,
103 bool traceGeometry) { 110 bool traceGeometry) {
104 std::unique_ptr<TracedValue> tracedValue = TracedValue::create(); 111 std::unique_ptr<TracedValue> tracedValue = TracedValue::create();
105 dumpToTracedValue(view, traceGeometry, tracedValue.get()); 112 dumpToTracedValue(view, traceGeometry, tracedValue.get());
106 return tracedValue; 113 return tracedValue;
107 } 114 }
108 115
109 } // namespace blink 116 } // 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