| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef LayoutItem_h | 5 #ifndef LayoutItem_h |
| 6 #define LayoutItem_h | 6 #define LayoutItem_h |
| 7 | 7 |
| 8 #include "core/inspector/InspectorTraceEvents.h" | 8 #include "core/inspector/InspectorTraceEvents.h" |
| 9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void updateStyleAndLayout() | 171 void updateStyleAndLayout() |
| 172 { | 172 { |
| 173 return m_layoutObject->document().updateStyleAndLayout(); | 173 return m_layoutObject->document().updateStyleAndLayout(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 const ComputedStyle& styleRef() const | 176 const ComputedStyle& styleRef() const |
| 177 { | 177 { |
| 178 return m_layoutObject->styleRef(); | 178 return m_layoutObject->styleRef(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 ComputedStyle* mutableStyle() const |
| 182 { |
| 183 return m_layoutObject->mutableStyle(); |
| 184 } |
| 185 |
| 181 ComputedStyle& mutableStyleRef() const | 186 ComputedStyle& mutableStyleRef() const |
| 182 { | 187 { |
| 183 return m_layoutObject->mutableStyleRef(); | 188 return m_layoutObject->mutableStyleRef(); |
| 184 } | 189 } |
| 185 | 190 |
| 191 void setStyle(PassRefPtr<ComputedStyle> style) |
| 192 { |
| 193 m_layoutObject->setStyle(style); |
| 194 } |
| 195 |
| 186 LayoutSize offsetFromContainer(const LayoutItem& item) const | 196 LayoutSize offsetFromContainer(const LayoutItem& item) const |
| 187 { | 197 { |
| 188 return m_layoutObject->offsetFromContainer(item.layoutObject()); | 198 return m_layoutObject->offsetFromContainer(item.layoutObject()); |
| 189 } | 199 } |
| 190 | 200 |
| 191 FrameView* frameView() const | 201 FrameView* frameView() const |
| 192 { | 202 { |
| 193 return m_layoutObject->document().view(); | 203 return m_layoutObject->document().view(); |
| 194 } | 204 } |
| 195 | 205 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng reason, MarkingBehavior behavior = MarkContainerChain, SubtreeLayoutScope* sc
ope = nullptr) | 246 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng reason, MarkingBehavior behavior = MarkContainerChain, SubtreeLayoutScope* sc
ope = nullptr) |
| 237 { | 247 { |
| 238 m_layoutObject->setNeedsLayoutAndFullPaintInvalidation(reason, behavior,
scope); | 248 m_layoutObject->setNeedsLayoutAndFullPaintInvalidation(reason, behavior,
scope); |
| 239 } | 249 } |
| 240 | 250 |
| 241 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) | 251 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) |
| 242 { | 252 { |
| 243 m_layoutObject->setNeedsLayoutAndPrefWidthsRecalc(reason); | 253 m_layoutObject->setNeedsLayoutAndPrefWidthsRecalc(reason); |
| 244 } | 254 } |
| 245 | 255 |
| 256 bool wasNotifiedOfSubtreeChange() const |
| 257 { |
| 258 return m_layoutObject->wasNotifiedOfSubtreeChange(); |
| 259 } |
| 260 |
| 261 void handleSubtreeModifications() |
| 262 { |
| 263 m_layoutObject->handleSubtreeModifications(); |
| 264 } |
| 265 |
| 246 bool needsOverflowRecalcAfterStyleChange() const | 266 bool needsOverflowRecalcAfterStyleChange() const |
| 247 { | 267 { |
| 248 return m_layoutObject->needsOverflowRecalcAfterStyleChange(); | 268 return m_layoutObject->needsOverflowRecalcAfterStyleChange(); |
| 249 } | 269 } |
| 250 | 270 |
| 251 void invalidateTreeIfNeeded(const PaintInvalidationState& state) | 271 void invalidateTreeIfNeeded(const PaintInvalidationState& state) |
| 252 { | 272 { |
| 253 m_layoutObject->invalidateTreeIfNeeded(state); | 273 m_layoutObject->invalidateTreeIfNeeded(state); |
| 254 } | 274 } |
| 255 | 275 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 279 | 299 |
| 280 private: | 300 private: |
| 281 LayoutObject* m_layoutObject; | 301 LayoutObject* m_layoutObject; |
| 282 | 302 |
| 283 friend class LayoutAPIShim; | 303 friend class LayoutAPIShim; |
| 284 }; | 304 }; |
| 285 | 305 |
| 286 } // namespace blink | 306 } // namespace blink |
| 287 | 307 |
| 288 #endif // LayoutItem_h | 308 #endif // LayoutItem_h |
| OLD | NEW |