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

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

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | Source/core/layout/svg/LayoutSVGPath.h » ('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) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 38
39 // Most layoutObjects in the SVG layout tree will inherit from this class 39 // Most layoutObjects in the SVG layout tree will inherit from this class
40 // but not all. (e.g. LayoutSVGForeignObject, LayoutSVGBlock) thus methods 40 // but not all. (e.g. LayoutSVGForeignObject, LayoutSVGBlock) thus methods
41 // required by SVG layoutObjects need to be declared on LayoutObject, but shared 41 // required by SVG layoutObjects need to be declared on LayoutObject, but shared
42 // logic can go in this class or in SVGLayoutSupport. 42 // logic can go in this class or in SVGLayoutSupport.
43 43
44 class LayoutSVGModelObject : public LayoutObject { 44 class LayoutSVGModelObject : public LayoutObject {
45 public: 45 public:
46 explicit LayoutSVGModelObject(SVGElement*); 46 explicit LayoutSVGModelObject(SVGElement*);
47 47
48 virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const overr ide; 48 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
49 49
50 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const override; 50 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov erride;
51 51
52 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override f inal { return m_paintInvalidationBoundingBox; } 52 FloatRect paintInvalidationRectInLocalCoordinates() const final { return m_p aintInvalidationBoundingBox; }
53 53
54 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override final; 54 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c onst final;
55 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e; 55 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
56 56
57 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa sFixed = nullptr, const PaintInvalidationState* = nullptr) const override final; 57 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const final;
58 virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObjec t* ancestorToStopAt, LayoutGeometryMap&) const override final; 58 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances torToStopAt, LayoutGeometryMap&) const final;
59 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 59 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
60 60
61 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override fin al; 61 void computeLayerHitTestRects(LayerHitTestRects&) const final;
62 62
63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); } 63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); }
64 64
65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || LayoutObject::isOfType(type); } 65 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectSVG || LayoutObject::isOfType(type); }
66 66
67 protected: 67 protected:
68 virtual void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintL ayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override final; 68 void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintLayer* cu rrentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containe rRect) const final;
69 virtual void willBeDestroyed() override; 69 void willBeDestroyed() override;
70 70
71 private: 71 private:
72 // LayoutSVGModelObject subclasses should use element() instead. 72 // LayoutSVGModelObject subclasses should use element() instead.
73 void node() const = delete; 73 void node() const = delete;
74 74
75 // This method should never be called, SVG uses a different nodeAtPoint meth od 75 // This method should never be called, SVG uses a different nodeAtPoint meth od
76 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo ntainer, const LayoutPoint& accumulatedOffset, HitTestAction) override final; 76 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) final;
77 virtual IntRect absoluteFocusRingBoundingBoxRect() const override final; 77 IntRect absoluteFocusRingBoundingBoxRect() const final;
78 78
79 virtual void invalidateTreeIfNeeded(PaintInvalidationState&) override final; 79 void invalidateTreeIfNeeded(PaintInvalidationState&) final;
80 80
81 protected: 81 protected:
82 FloatRect m_paintInvalidationBoundingBox; 82 FloatRect m_paintInvalidationBoundingBox;
83 }; 83 };
84 84
85 } 85 }
86 86
87 #endif 87 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | Source/core/layout/svg/LayoutSVGPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698