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

Side by Side Diff: Source/core/layout/svg/LayoutSVGShape.h

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 8 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | Source/core/layout/svg/LayoutSVGShape.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO); 97 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO);
98 bool strokeContains(const FloatPoint&, bool requiresStroke = true); 98 bool strokeContains(const FloatPoint&, bool requiresStroke = true);
99 99
100 virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform ? *m_localTransform : LayoutSVGModelObject::localToPa rentTransform(); } 100 virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform ? *m_localTransform : LayoutSVGModelObject::localToPa rentTransform(); }
101 101
102 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGShape || LayoutSVGModelObject::isOfType(type); } 102 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGShape || LayoutSVGModelObject::isOfType(type); }
103 virtual void layout() override final; 103 virtual void layout() override final;
104 virtual void paint(const PaintInfo&, const LayoutPoint&) override final; 104 virtual void paint(const PaintInfo&, const LayoutPoint&) override final;
105 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final; 105 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final;
106 106
107 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) override final; 107 virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParen t, HitTestAction) override final;
108 108
109 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; } 109 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; }
110 FloatRect calculateObjectBoundingBox() const; 110 FloatRect calculateObjectBoundingBox() const;
111 FloatRect calculateStrokeBoundingBox() const; 111 FloatRect calculateStrokeBoundingBox() const;
112 void updatePaintInvalidationBoundingBox(); 112 void updatePaintInvalidationBoundingBox();
113 void updateLocalTransform(); 113 void updateLocalTransform();
114 114
115 private: 115 private:
116 OwnPtr<AffineTransform> m_localTransform; 116 OwnPtr<AffineTransform> m_localTransform;
117 OwnPtr<Path> m_path; 117 OwnPtr<Path> m_path;
118 118
119 bool m_needsBoundariesUpdate : 1; 119 bool m_needsBoundariesUpdate : 1;
120 bool m_needsShapeUpdate : 1; 120 bool m_needsShapeUpdate : 1;
121 bool m_needsTransformUpdate : 1; 121 bool m_needsTransformUpdate : 1;
122 }; 122 };
123 123
124 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape()); 124 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape());
125 125
126 } 126 }
127 127
128 #endif 128 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | Source/core/layout/svg/LayoutSVGShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698