Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 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 23 matching lines...) Expand all Loading... | |
| 34 #include "platform/geometry/LayoutSize.h" | 34 #include "platform/geometry/LayoutSize.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class RenderBlockFlow; | 38 class RenderBlockFlow; |
| 39 class RenderBox; | 39 class RenderBox; |
| 40 class FloatingObject; | 40 class FloatingObject; |
| 41 | 41 |
| 42 class ShapeOutsideInfo FINAL : public ShapeInfo<RenderBox>, public MappedInfo<Re nderBox, ShapeOutsideInfo> { | 42 class ShapeOutsideInfo FINAL : public ShapeInfo<RenderBox>, public MappedInfo<Re nderBox, ShapeOutsideInfo> { |
| 43 public: | 43 public: |
| 44 | |
|
rwlbuis
2014/03/04 14:21:13
I wouldn't do style changes in this patch.
| |
| 44 LayoutUnit leftMarginBoxDelta() const { return m_leftMarginBoxDelta; } | 45 LayoutUnit leftMarginBoxDelta() const { return m_leftMarginBoxDelta; } |
| 45 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; } | 46 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; } |
| 46 bool lineOverlapsShape() const { return m_lineOverlapsShape; } | 47 bool lineOverlapsShape() const { return m_lineOverlapsShape; } |
| 47 | 48 |
| 48 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight); | 49 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox& renderer) { return adoptPtr(new ShapeOutsideInfo(renderer)); } |
| 49 | 50 static bool isEnabledFor(const RenderBox&); |
| 50 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) { return adoptPtr(new ShapeOutsideInfo(renderer)); } | 51 void updateDeltasForContainingBlockLine(const RenderBlockFlow&, const Floati ngObject&, LayoutUnit lineTop, LayoutUnit lineHeight); |
| 51 static bool isEnabledFor(const RenderBox*); | |
| 52 | 52 |
| 53 virtual bool lineOverlapsShapeBounds() const OVERRIDE | 53 virtual bool lineOverlapsShapeBounds() const OVERRIDE |
| 54 { | 54 { |
| 55 return computedShape()->lineOverlapsShapeMarginBounds(m_shapeLineTop, m_ lineHeight); | 55 return computedShape().lineOverlapsShapeMarginBounds(m_shapeLineTop, m_l ineHeight); |
| 56 } | 56 } |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 virtual LayoutBox resolvedLayoutBox() const OVERRIDE | 59 virtual LayoutBox resolvedLayoutBox() const OVERRIDE |
| 60 { | 60 { |
| 61 if (shapeValue()->layoutBox() == BoxMissing) | 61 if (shapeValue()->layoutBox() == BoxMissing) |
| 62 return MarginBox; | 62 return MarginBox; |
| 63 return shapeValue()->layoutBox(); | 63 return shapeValue()->layoutBox(); |
| 64 } | 64 } |
| 65 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return computedShape()->shapeMarginLogicalBoundingBox(); } | 65 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return computedShape().shapeMarginLogicalBoundingBox(); } |
| 66 virtual ShapeValue* shapeValue() const OVERRIDE; | 66 virtual ShapeValue* shapeValue() const OVERRIDE; |
| 67 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment List& segments) const OVERRIDE | 67 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment List& segments) const OVERRIDE |
| 68 { | 68 { |
| 69 return computedShape()->getExcludedIntervals(lineTop, lineHeight, segmen ts); | 69 return computedShape().getExcludedIntervals(lineTop, lineHeight, segment s); |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 ShapeOutsideInfo(const RenderBox* renderer) | 73 ShapeOutsideInfo(const RenderBox& renderer) |
| 74 : ShapeInfo<RenderBox>(renderer) | 74 : ShapeInfo<RenderBox>(renderer) |
| 75 , m_lineOverlapsShape(false) | 75 , m_lineOverlapsShape(false) |
| 76 { } | 76 { } |
| 77 | 77 |
| 78 LayoutUnit m_leftMarginBoxDelta; | 78 LayoutUnit m_leftMarginBoxDelta; |
| 79 LayoutUnit m_rightMarginBoxDelta; | 79 LayoutUnit m_rightMarginBoxDelta; |
| 80 LayoutUnit m_lineTop; | 80 LayoutUnit m_lineTop; |
| 81 bool m_lineOverlapsShape; | 81 bool m_lineOverlapsShape; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } | 84 } |
| 85 #endif | 85 #endif |
| OLD | NEW |