| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // object. Each LayoutMultiColumnSet will actually be a viewPort of the LayoutFl
owThread. | 47 // object. Each LayoutMultiColumnSet will actually be a viewPort of the LayoutFl
owThread. |
| 48 class CORE_EXPORT LayoutFlowThread: public LayoutBlockFlow { | 48 class CORE_EXPORT LayoutFlowThread: public LayoutBlockFlow { |
| 49 public: | 49 public: |
| 50 LayoutFlowThread(); | 50 LayoutFlowThread(); |
| 51 ~LayoutFlowThread() override { } | 51 ~LayoutFlowThread() override { } |
| 52 | 52 |
| 53 bool isLayoutFlowThread() const final { return true; } | 53 bool isLayoutFlowThread() const final { return true; } |
| 54 virtual bool isLayoutMultiColumnFlowThread() const { return false; } | 54 virtual bool isLayoutMultiColumnFlowThread() const { return false; } |
| 55 virtual bool isLayoutPagedFlowThread() const { return false; } | 55 virtual bool isLayoutPagedFlowThread() const { return false; } |
| 56 | 56 |
| 57 bool supportsPaintInvalidationStateCachedOffsets() const override { return f
alse; } | |
| 58 | |
| 59 static LayoutFlowThread* locateFlowThreadContainingBlockOf(const LayoutObjec
t&); | 57 static LayoutFlowThread* locateFlowThreadContainingBlockOf(const LayoutObjec
t&); |
| 60 | 58 |
| 61 void layout() override; | 59 void layout() override; |
| 62 | 60 |
| 63 // Always create a Layer for the LayoutFlowThread so that we | 61 // Always create a Layer for the LayoutFlowThread so that we |
| 64 // can easily avoid drawing the children directly. | 62 // can easily avoid drawing the children directly. |
| 65 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; } | 63 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; } |
| 66 | 64 |
| 67 virtual void flowThreadDescendantWasInserted(LayoutObject*) { } | 65 virtual void flowThreadDescendantWasInserted(LayoutObject*) { } |
| 68 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) { } | 66 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) { } |
| 69 virtual void flowThreadDescendantStyleWillChange(LayoutBox*, StyleDifference
, const ComputedStyle& newStyle) { } | 67 virtual void flowThreadDescendantStyleWillChange(LayoutBox*, StyleDifference
, const ComputedStyle& newStyle) { } |
| 70 virtual void flowThreadDescendantStyleDidChange(LayoutBox*, StyleDifference,
const ComputedStyle& oldStyle) { } | 68 virtual void flowThreadDescendantStyleDidChange(LayoutBox*, StyleDifference,
const ComputedStyle& oldStyle) { } |
| 71 | 69 |
| 72 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) final; | 70 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) final; |
| 73 | 71 |
| 74 virtual void addColumnSetToThread(LayoutMultiColumnSet*) = 0; | 72 virtual void addColumnSetToThread(LayoutMultiColumnSet*) = 0; |
| 75 virtual void removeColumnSetFromThread(LayoutMultiColumnSet*); | 73 virtual void removeColumnSetFromThread(LayoutMultiColumnSet*); |
| 76 | 74 |
| 77 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; | 75 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L
ogicalExtentComputedValues&) const override; |
| 78 | 76 |
| 79 bool hasColumnSets() const { return m_multiColumnSetList.size(); } | 77 bool hasColumnSets() const { return m_multiColumnSetList.size(); } |
| 80 | 78 |
| 81 void validateColumnSets(); | 79 void validateColumnSets(); |
| 82 void invalidateColumnSets(); | 80 void invalidateColumnSets(); |
| 83 bool hasValidColumnSetInfo() const { return !m_columnSetsInvalidated && !m_m
ultiColumnSetList.isEmpty(); } | 81 bool hasValidColumnSetInfo() const { return !m_columnSetsInvalidated && !m_m
ultiColumnSetList.isEmpty(); } |
| 84 | 82 |
| 85 bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L
ayoutRect&, const PaintInvalidationState*, VisibleRectFlags = DefaultVisibleRect
Flags) const override; | 83 bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L
ayoutRect&, VisibleRectFlags = DefaultVisibleRectFlags) const override; |
| 86 | 84 |
| 87 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 85 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
| 88 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
; | 86 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
; |
| 89 | 87 |
| 90 virtual void contentWasLaidOut(LayoutUnit logicalBottomInFlowThreadAfterPagi
nation) = 0; | 88 virtual void contentWasLaidOut(LayoutUnit logicalBottomInFlowThreadAfterPagi
nation) = 0; |
| 91 virtual bool canSkipLayout(const LayoutBox&) const = 0; | 89 virtual bool canSkipLayout(const LayoutBox&) const = 0; |
| 92 | 90 |
| 93 // Find and return the next logical top after |flowThreadOffset| that can fi
t unbreakable | 91 // Find and return the next logical top after |flowThreadOffset| that can fi
t unbreakable |
| 94 // content as tall as |contentLogicalHeight|. |flowThreadOffset| is expected
to be at the exact | 92 // content as tall as |contentLogicalHeight|. |flowThreadOffset| is expected
to be at the exact |
| 95 // top of a column that's known to not have enough space for |contentLogical
Height|. This method | 93 // top of a column that's known to not have enough space for |contentLogical
Height|. This method |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // These structures are used by PODIntervalTree for debugging. | 154 // These structures are used by PODIntervalTree for debugging. |
| 157 #ifndef NDEBUG | 155 #ifndef NDEBUG |
| 158 template <> struct ValueToString<LayoutMultiColumnSet*> { | 156 template <> struct ValueToString<LayoutMultiColumnSet*> { |
| 159 static String toString(const LayoutMultiColumnSet* value) { return String::f
ormat("%p", value); } | 157 static String toString(const LayoutMultiColumnSet* value) { return String::f
ormat("%p", value); } |
| 160 }; | 158 }; |
| 161 #endif | 159 #endif |
| 162 | 160 |
| 163 } // namespace blink | 161 } // namespace blink |
| 164 | 162 |
| 165 #endif // LayoutFlowThread_h | 163 #endif // LayoutFlowThread_h |
| OLD | NEW |