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

Side by Side Diff: Source/core/rendering/shapes/ShapeOutsideInfo.h

Issue 185393015: Rename shapeSize and others to make ShapeInfo and friends easier to understand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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 | Annotate | Revision Log
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; } 45 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; }
46 bool lineOverlapsShape() const { return m_lineOverlapsShape; } 46 bool lineOverlapsShape() const { return m_lineOverlapsShape; }
47 47
48 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight); 48 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight);
49 49
50 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) { return adoptPtr(new ShapeOutsideInfo(renderer)); } 50 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) { return adoptPtr(new ShapeOutsideInfo(renderer)); }
51 static bool isEnabledFor(const RenderBox*); 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_referenceBoxLine Top, m_lineHeight);
56 } 56 }
57 57
58 protected: 58 protected:
59 virtual LayoutBox resolvedLayoutBox() const OVERRIDE 59 virtual LayoutBox referenceBox() 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, segmen ts);
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_borderBoxLineTop;
81 bool m_lineOverlapsShape; 81 bool m_lineOverlapsShape;
82 }; 82 };
83 83
84 } 84 }
85 #endif 85 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698