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

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

Issue 305173003: Heap-use-after-free in WebCore::GraphicsContext::drawImage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed a spurious .get() Created 6 years, 6 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 FloatSize shapeToRendererSize(FloatSize) const; 94 FloatSize shapeToRendererSize(FloatSize) const;
95 const Shape& computedShape() const; 95 const Shape& computedShape() const;
96 96
97 protected: 97 protected:
98 ShapeOutsideInfo(const RenderBox& renderer) 98 ShapeOutsideInfo(const RenderBox& renderer)
99 : m_renderer(renderer) 99 : m_renderer(renderer)
100 , m_lineOverlapsShape(false) 100 , m_lineOverlapsShape(false)
101 { } 101 { }
102 102
103 private: 103 private:
104 PassOwnPtr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold , WritingMode, float margin) const;
105
104 LayoutUnit logicalTopOffset() const; 106 LayoutUnit logicalTopOffset() const;
105 LayoutUnit logicalLeftOffset() const; 107 LayoutUnit logicalLeftOffset() const;
106 108
107 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap; 109 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap;
108 static InfoMap& infoMap() 110 static InfoMap& infoMap()
109 { 111 {
110 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ()); 112 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
111 return staticInfoMap; 113 return staticInfoMap;
112 } 114 }
113 115
114 LayoutUnit m_referenceBoxLineTop; 116 LayoutUnit m_referenceBoxLineTop;
115 LayoutUnit m_lineHeight; 117 LayoutUnit m_lineHeight;
116 118
117 const RenderBox& m_renderer; 119 const RenderBox& m_renderer;
118 mutable OwnPtr<Shape> m_shape; 120 mutable OwnPtr<Shape> m_shape;
119 LayoutSize m_referenceBoxLogicalSize; 121 LayoutSize m_referenceBoxLogicalSize;
120 LayoutUnit m_leftMarginBoxDelta; 122 LayoutUnit m_leftMarginBoxDelta;
121 LayoutUnit m_rightMarginBoxDelta; 123 LayoutUnit m_rightMarginBoxDelta;
122 LayoutUnit m_borderBoxLineTop; 124 LayoutUnit m_borderBoxLineTop;
123 bool m_lineOverlapsShape; 125 bool m_lineOverlapsShape;
124 }; 126 };
125 127
126 } 128 }
127 #endif 129 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698