| 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 28 matching lines...) Expand all Loading... |
| 39 typedef Vector<LayerFragment, 1> LayerFragments; | 39 typedef Vector<LayerFragment, 1> LayerFragments; |
| 40 class RenderBox; | 40 class RenderBox; |
| 41 class RenderBoxRegionInfo; | 41 class RenderBoxRegionInfo; |
| 42 class RenderFlowThread; | 42 class RenderFlowThread; |
| 43 class RenderNamedFlowThread; | 43 class RenderNamedFlowThread; |
| 44 | 44 |
| 45 class RenderRegion : public RenderBlockFlow { | 45 class RenderRegion : public RenderBlockFlow { |
| 46 public: | 46 public: |
| 47 explicit RenderRegion(Element*, RenderFlowThread*); | 47 explicit RenderRegion(Element*, RenderFlowThread*); |
| 48 | 48 |
| 49 virtual bool isRenderRegion() const OVERRIDE { return true; } | 49 virtual bool isRenderRegion() const OVERRIDE FINAL { return true; } |
| 50 | 50 |
| 51 bool hitTestFlowThreadContents(const HitTestRequest&, HitTestResult&, const
HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitT
estAction); | 51 bool hitTestFlowThreadContents(const HitTestRequest&, HitTestResult&, const
HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitT
estAction); |
| 52 | 52 |
| 53 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 53 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
| 54 | 54 |
| 55 void setFlowThreadPortionRect(const LayoutRect& rect) { m_flowThreadPortionR
ect = rect; } | 55 void setFlowThreadPortionRect(const LayoutRect& rect) { m_flowThreadPortionR
ect = rect; } |
| 56 LayoutRect flowThreadPortionRect() const { return m_flowThreadPortionRect; } | 56 LayoutRect flowThreadPortionRect() const { return m_flowThreadPortionRect; } |
| 57 LayoutRect flowThreadPortionOverflowRect() const; | 57 LayoutRect flowThreadPortionOverflowRect() const; |
| 58 | 58 |
| 59 void attachRegion(); | 59 void attachRegion(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 virtual void expandToEncompassFlowThreadContentsIfNeeded() { }; | 133 virtual void expandToEncompassFlowThreadContentsIfNeeded() { }; |
| 134 | 134 |
| 135 // Whether or not this region is a set. | 135 // Whether or not this region is a set. |
| 136 virtual bool isRenderRegionSet() const { return false; } | 136 virtual bool isRenderRegionSet() const { return false; } |
| 137 | 137 |
| 138 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const; | 138 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const; |
| 139 | 139 |
| 140 virtual void collectLayerFragments(LayerFragments&, const LayoutRect&, const
LayoutRect&) { } | 140 virtual void collectLayerFragments(LayerFragments&, const LayoutRect&, const
LayoutRect&) { } |
| 141 | 141 |
| 142 virtual bool canHaveChildren() const OVERRIDE { return false; } | 142 virtual bool canHaveChildren() const OVERRIDE FINAL { return false; } |
| 143 virtual bool canHaveGeneratedChildren() const OVERRIDE { return true; } | 143 virtual bool canHaveGeneratedChildren() const OVERRIDE FINAL { return true;
} |
| 144 | 144 |
| 145 bool isElementBasedRegion() const; | 145 bool isElementBasedRegion() const; |
| 146 | 146 |
| 147 Node* nodeForRegion() const; | 147 Node* nodeForRegion() const; |
| 148 Node* generatingNodeForRegion() const; | 148 Node* generatingNodeForRegion() const; |
| 149 | 149 |
| 150 virtual const char* renderName() const OVERRIDE { return "RenderRegion"; } | 150 virtual const char* renderName() const OVERRIDE { return "RenderRegion"; } |
| 151 | 151 |
| 152 protected: | 152 protected: |
| 153 void setRegionObjectsRegionStyle(); | 153 void setRegionObjectsRegionStyle(); |
| 154 void restoreRegionObjectsOriginalStyle(); | 154 void restoreRegionObjectsOriginalStyle(); |
| 155 | 155 |
| 156 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE; | 156 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; |
| 157 | 157 |
| 158 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort
ionRect, bool isFirstPortion, bool isLastPortion) const; | 158 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort
ionRect, bool isFirstPortion, bool isLastPortion) const; |
| 159 void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const
LayoutRect& flowThreadPortionRect, | 159 void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const
LayoutRect& flowThreadPortionRect, |
| 160 const LayoutRect& flowThreadPortionOverflowRect, const LayoutPoint& regi
onLocation) const; | 160 const LayoutRect& flowThreadPortionOverflowRect, const LayoutPoint& regi
onLocation) const; |
| 161 | 161 |
| 162 virtual bool shouldHaveAutoLogicalHeight() const; | 162 virtual bool shouldHaveAutoLogicalHeight() const; |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 virtual void insertedIntoTree() OVERRIDE; | 165 virtual void insertedIntoTree() OVERRIDE FINAL; |
| 166 virtual void willBeRemovedFromTree() OVERRIDE; | 166 virtual void willBeRemovedFromTree() OVERRIDE FINAL; |
| 167 | 167 |
| 168 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight
= 0) OVERRIDE; | 168 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight
= 0) OVERRIDE FINAL; |
| 169 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 169 virtual bool supportsPartialLayout() const OVERRIDE FINAL { return false; } |
| 170 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; | 170 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 171 | 171 |
| 172 virtual void updateLogicalHeight() OVERRIDE; | 172 virtual void updateLogicalHeight() OVERRIDE FINAL; |
| 173 | 173 |
| 174 virtual void installFlowThread(); | 174 virtual void installFlowThread(); |
| 175 | 175 |
| 176 PassRefPtr<RenderStyle> computeStyleInRegion(const RenderObject*); | 176 PassRefPtr<RenderStyle> computeStyleInRegion(const RenderObject*); |
| 177 void computeChildrenStyleInRegion(const RenderObject*); | 177 void computeChildrenStyleInRegion(const RenderObject*); |
| 178 void setObjectStyleInRegion(RenderObject*, PassRefPtr<RenderStyle>, bool obj
ectRegionStyleCached); | 178 void setObjectStyleInRegion(RenderObject*, PassRefPtr<RenderStyle>, bool obj
ectRegionStyleCached); |
| 179 | 179 |
| 180 void checkRegionStyle(); | 180 void checkRegionStyle(); |
| 181 void updateRegionHasAutoLogicalHeightFlag(); | 181 void updateRegionHasAutoLogicalHeightFlag(); |
| 182 | 182 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 bool m_isValid : 1; | 220 bool m_isValid : 1; |
| 221 bool m_hasCustomRegionStyle : 1; | 221 bool m_hasCustomRegionStyle : 1; |
| 222 bool m_hasAutoLogicalHeight : 1; | 222 bool m_hasAutoLogicalHeight : 1; |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderRegion, isRenderRegion()); | 225 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderRegion, isRenderRegion()); |
| 226 | 226 |
| 227 } // namespace WebCore | 227 } // namespace WebCore |
| 228 | 228 |
| 229 #endif // RenderRegion_h | 229 #endif // RenderRegion_h |
| OLD | NEW |