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

Side by Side Diff: Source/core/rendering/svg/RenderSVGShape.h

Issue 810343003: Fix pointer-events:all when stroke="none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove line uniting m_hitTestStrokeBoundingBox with markerRect Created 5 years, 11 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2006 Apple Computer, Inc 5 * Copyright (C) 2006 Apple Computer, Inc
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
8 * Copyright (C) 2011 University of Szeged 8 * Copyright (C) 2011 University of Szeged
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 protected: 82 protected:
83 virtual void updateShapeFromElement(); 83 virtual void updateShapeFromElement();
84 virtual bool shapeDependentStrokeContains(const FloatPoint&); 84 virtual bool shapeDependentStrokeContains(const FloatPoint&);
85 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst; 85 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst;
86 86
87 // Give RenderSVGPath a hook for updating markers in updateShapeFromElement. 87 // Give RenderSVGPath a hook for updating markers in updateShapeFromElement.
88 virtual void processMarkerPositions() { }; 88 virtual void processMarkerPositions() { };
89 89
90 FloatRect m_fillBoundingBox; 90 FloatRect m_fillBoundingBox;
91 FloatRect m_strokeBoundingBox; 91 FloatRect m_strokeBoundingBox;
92 FloatRect m_hitTestStrokeBoundingBox;
92 93
93 private: 94 private:
94 // Hit-detection separated for the fill and the stroke 95 // Hit-detection separated for the fill and the stroke
95 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO); 96 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO);
96 bool strokeContains(const FloatPoint&, bool requiresStroke = true); 97 bool strokeContains(const FloatPoint&, bool requiresStroke = true);
97 98
98 virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform ? *m_localTransform : RenderSVGModelObject::localToPa rentTransform(); } 99 virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform ? *m_localTransform : RenderSVGModelObject::localToPa rentTransform(); }
99 100
100 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGShape || RenderSVGModelObject::isOfType(type); } 101 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGShape || RenderSVGModelObject::isOfType(type); }
101 virtual const char* renderName() const override { return "RenderSVGShape"; } 102 virtual const char* renderName() const override { return "RenderSVGShape"; }
102 103
103 virtual void layout() override final; 104 virtual void layout() override final;
104 virtual void paint(const PaintInfo&, const LayoutPoint&) override final; 105 virtual void paint(const PaintInfo&, const LayoutPoint&) override final;
105 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final; 106 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final;
106 107
107 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) override final; 108 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) override final;
108 109
109 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; } 110 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; }
111 FloatRect hitTestStrokeBoundingBox() const { return m_hitTestStrokeBoundingB ox; }
110 FloatRect calculateObjectBoundingBox() const; 112 FloatRect calculateObjectBoundingBox() const;
111 FloatRect calculateStrokeBoundingBox() const; 113 FloatRect calculateHitTestStrokeBoundingBox() const;
112 void updatePaintInvalidationBoundingBox(); 114 void updatePaintInvalidationBoundingBox();
113 void updateLocalTransform(); 115 void updateLocalTransform();
114 116
115 private: 117 private:
116 OwnPtr<AffineTransform> m_localTransform; 118 OwnPtr<AffineTransform> m_localTransform;
117 OwnPtr<Path> m_path; 119 OwnPtr<Path> m_path;
118 120
119 bool m_needsBoundariesUpdate : 1; 121 bool m_needsBoundariesUpdate : 1;
120 bool m_needsShapeUpdate : 1; 122 bool m_needsShapeUpdate : 1;
121 bool m_needsTransformUpdate : 1; 123 bool m_needsTransformUpdate : 1;
122 }; 124 };
123 125
124 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); 126 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape());
125 127
126 } 128 }
127 129
128 #endif 130 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRect.cpp ('k') | Source/core/rendering/svg/RenderSVGShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698