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

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

Issue 1212893005: Add position: sticky as supported position value when CSSStickyPosition is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 // 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 "config.h" 5 #include "config.h"
6 #include "core/layout/TracedLayoutObject.h" 6 #include "core/layout/TracedLayoutObject.h"
7 7
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutTableCell.h" 9 #include "core/layout/LayoutTableCell.h"
10 #include "core/layout/LayoutText.h" 10 #include "core/layout/LayoutText.h"
(...skipping 12 matching lines...) Expand all
23 StringBuilder builder; 23 StringBuilder builder;
24 RefPtr<JSONObject> json(toJSON()); 24 RefPtr<JSONObject> json(toJSON());
25 json->writeJSON(&builder); 25 json->writeJSON(&builder);
26 return builder.toString(); 26 return builder.toString();
27 } 27 }
28 28
29 TracedLayoutObject::TracedLayoutObject(const LayoutObject& object) 29 TracedLayoutObject::TracedLayoutObject(const LayoutObject& object)
30 : m_address((unsigned long) &object) 30 : m_address((unsigned long) &object)
31 , m_isAnonymous(object.isAnonymous()) 31 , m_isAnonymous(object.isAnonymous())
32 , m_isPositioned(object.isOutOfFlowPositioned()) 32 , m_isPositioned(object.isOutOfFlowPositioned())
33 , m_isRelPositioned(object.isRelPositioned()) 33 , m_isInFlowPositioned(object.isInFlowPositioned())
34 , m_isFloating(object.isFloating()) 34 , m_isFloating(object.isFloating())
35 , m_selfNeeds(object.selfNeedsLayout()) 35 , m_selfNeeds(object.selfNeedsLayout())
36 , m_positionedMovement(object.needsPositionedMovementLayout()) 36 , m_positionedMovement(object.needsPositionedMovementLayout())
37 , m_childNeeds(object.normalChildNeedsLayout()) 37 , m_childNeeds(object.normalChildNeedsLayout())
38 , m_posChildNeeds(object.posChildNeedsLayout()) 38 , m_posChildNeeds(object.posChildNeedsLayout())
39 , m_isTableCell(object.isTableCell()) 39 , m_isTableCell(object.isTableCell())
40 , m_name(String(object.name()).isolatedCopy()) 40 , m_name(String(object.name()).isolatedCopy())
41 , m_absRect(object.absoluteBoundingBoxRect()) 41 , m_absRect(object.absoluteBoundingBoxRect())
42 { 42 {
43 if (Node* node = object.node()) { 43 if (Node* node = object.node()) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (m_isTableCell) { 116 if (m_isTableCell) {
117 json->setNumber("row", m_row); 117 json->setNumber("row", m_row);
118 json->setNumber("col", m_col); 118 json->setNumber("col", m_col);
119 if (m_rowSpan != 1) 119 if (m_rowSpan != 1)
120 json->setNumber("rowSpan", m_rowSpan); 120 json->setNumber("rowSpan", m_rowSpan);
121 if (m_colSpan != 1) 121 if (m_colSpan != 1)
122 json->setNumber("colSpan", m_colSpan); 122 json->setNumber("colSpan", m_colSpan);
123 } 123 }
124 if (m_isAnonymous) 124 if (m_isAnonymous)
125 json->setBoolean("anonymous", m_isAnonymous); 125 json->setBoolean("anonymous", m_isAnonymous);
126 if (m_isRelPositioned) 126 if (m_isInFlowPositioned)
127 json->setBoolean("relativePositioned", m_isRelPositioned); 127 json->setBoolean("relativePositioned", m_isInFlowPositioned);
128 if (m_isFloating) 128 if (m_isFloating)
129 json->setBoolean("float", m_isFloating); 129 json->setBoolean("float", m_isFloating);
130 if (m_children.size()) { 130 if (m_children.size()) {
131 RefPtr<JSONArray> children(JSONArray::create()); 131 RefPtr<JSONArray> children(JSONArray::create());
132 for (const auto& child : m_children) { 132 for (const auto& child : m_children) {
133 children->pushObject(child->toJSON()); 133 children->pushObject(child->toJSON());
134 } 134 }
135 json->setArray("children", children); 135 json->setArray("children", children);
136 } 136 }
137 return json.release(); 137 return json.release();
138 } 138 }
139 139
140 } // namespace blink 140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698