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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h

Issue 2479873002: Descendants may become or cease to be spanners when an ancestor changes style. (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 void flowThreadDescendantWasInserted(LayoutObject*) final; 303 void flowThreadDescendantWasInserted(LayoutObject*) final;
304 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; 304 void flowThreadDescendantWillBeRemoved(LayoutObject*) final;
305 void flowThreadDescendantStyleWillChange( 305 void flowThreadDescendantStyleWillChange(
306 LayoutBox*, 306 LayoutBox*,
307 StyleDifference, 307 StyleDifference,
308 const ComputedStyle& newStyle) override; 308 const ComputedStyle& newStyle) override;
309 void flowThreadDescendantStyleDidChange( 309 void flowThreadDescendantStyleDidChange(
310 LayoutBox*, 310 LayoutBox*,
311 StyleDifference, 311 StyleDifference,
312 const ComputedStyle& oldStyle) override; 312 const ComputedStyle& oldStyle) override;
313 void toggleSpannersInSubtree(LayoutBox*);
313 void computePreferredLogicalWidths() override; 314 void computePreferredLogicalWidths() override;
314 void computeLogicalHeight(LayoutUnit logicalHeight, 315 void computeLogicalHeight(LayoutUnit logicalHeight,
315 LayoutUnit logicalTop, 316 LayoutUnit logicalTop,
316 LogicalExtentComputedValues&) const override; 317 LogicalExtentComputedValues&) const override;
317 void updateLogicalWidth() override; 318 void updateLogicalWidth() override;
318 void contentWasLaidOut( 319 void contentWasLaidOut(
319 LayoutUnit logicalBottomInFlowThreadAfterPagination) override; 320 LayoutUnit logicalBottomInFlowThreadAfterPagination) override;
320 bool canSkipLayout(const LayoutBox&) const override; 321 bool canSkipLayout(const LayoutBox&) const override;
321 MultiColumnLayoutState multiColumnLayoutState() const override; 322 MultiColumnLayoutState multiColumnLayoutState() const override;
322 void restoreMultiColumnLayoutState(const MultiColumnLayoutState&) override; 323 void restoreMultiColumnLayoutState(const MultiColumnLayoutState&) override;
323 324
324 // The last set we worked on. It's not to be used as the "current set". The 325 // The last set we worked on. It's not to be used as the "current set". The
325 // concept of a "current set" is difficult, since layout may jump back and 326 // concept of a "current set" is difficult, since layout may jump back and
326 // forth in the tree, due to wrong top location estimates (due to e.g. margin 327 // forth in the tree, due to wrong top location estimates (due to e.g. margin
327 // collapsing), and possibly for other reasons. 328 // collapsing), and possibly for other reasons.
328 LayoutMultiColumnSet* m_lastSetWorkedOn; 329 LayoutMultiColumnSet* m_lastSetWorkedOn;
329 330
331 #if DCHECK_IS_ON()
332 // Used to check consistency between calls to
333 // flowThreadDescendantStyleWillChange() and
334 // flowThreadDescendantStyleDidChange().
335 static const LayoutBox* s_styleChangedBox;
336 #endif
337
330 // The used value of column-count 338 // The used value of column-count
331 unsigned m_columnCount; 339 unsigned m_columnCount;
332 // Total height available to columns, or 0 if auto. 340 // Total height available to columns, or 0 if auto.
333 LayoutUnit m_columnHeightAvailable; 341 LayoutUnit m_columnHeightAvailable;
334 342
335 // Cached block offset from this flow thread to the enclosing fragmentation 343 // Cached block offset from this flow thread to the enclosing fragmentation
336 // context, if any. In 344 // context, if any. In
337 // the coordinate space of the enclosing fragmentation context. 345 // the coordinate space of the enclosing fragmentation context.
338 LayoutUnit m_blockOffsetInEnclosingFragmentationContext; 346 LayoutUnit m_blockOffsetInEnclosingFragmentationContext;
339 347
340 // Set when column heights are out of sync with actual layout. 348 // Set when column heights are out of sync with actual layout.
341 bool m_columnHeightsChanged; 349 bool m_columnHeightsChanged;
350
342 // Always true for regular multicol. False for paged-y overflow. 351 // Always true for regular multicol. False for paged-y overflow.
343 bool m_progressionIsInline; 352 bool m_progressionIsInline;
353
344 bool m_isBeingEvacuated; 354 bool m_isBeingEvacuated;
355
356 // Specifies whether the the descendant whose style is about to change could
357 // contain spanners or not. The flag is set in
358 // flowThreadDescendantStyleWillChange(), and then checked in
359 // flowThreadDescendantStyleDidChange().
360 static bool s_couldContainSpanners;
361
362 static bool s_toggleSpannersIfNeeded;
345 }; 363 };
346 364
347 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because 365 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because
348 // isMultiColumnFlowThread() is defined in LayoutFlowThread, not in 366 // isMultiColumnFlowThread() is defined in LayoutFlowThread, not in
349 // LayoutObject. 367 // LayoutObject.
350 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, 368 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread,
351 LayoutFlowThread, 369 LayoutFlowThread,
352 object, 370 object,
353 object->isLayoutMultiColumnFlowThread(), 371 object->isLayoutMultiColumnFlowThread(),
354 object.isLayoutMultiColumnFlowThread()); 372 object.isLayoutMultiColumnFlowThread());
355 373
356 } // namespace blink 374 } // namespace blink
357 375
358 #endif // LayoutMultiColumnFlowThread_h 376 #endif // LayoutMultiColumnFlowThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698