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

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

Issue 112633004: Use a bitmask for SVG render object types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor cleanups Created 7 years 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/rendering/svg/RenderSVGInline.h ('k') | Source/core/rendering/svg/RenderSVGPath.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) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2008 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 28 matching lines...) Expand all
39 float scalingFactor() const { return m_scalingFactor; } 39 float scalingFactor() const { return m_scalingFactor; }
40 const Font& scaledFont() const { return m_scaledFont; } 40 const Font& scaledFont() const { return m_scaledFont; }
41 void updateScaledFont(); 41 void updateScaledFont();
42 static void computeNewScaledFontForStyle(RenderObject*, const RenderStyle*, float& scalingFactor, Font& scaledFont); 42 static void computeNewScaledFontForStyle(RenderObject*, const RenderStyle*, float& scalingFactor, Font& scaledFont);
43 43
44 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect. 44 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect.
45 FloatRect floatLinesBoundingBox() const; 45 FloatRect floatLinesBoundingBox() const;
46 46
47 private: 47 private:
48 virtual const char* renderName() const { return "RenderSVGInlineText"; } 48 virtual const char* renderName() const { return "RenderSVGInlineText"; }
49 virtual SVGType getSVGType() const OVERRIDE { return IsSVGInlineText; }
49 50
50 virtual void setTextInternal(PassRefPtr<StringImpl>); 51 virtual void setTextInternal(PassRefPtr<StringImpl>);
51 virtual void styleDidChange(StyleDifference, const RenderStyle*); 52 virtual void styleDidChange(StyleDifference, const RenderStyle*);
52 53
53 virtual FloatRect objectBoundingBox() const { return floatLinesBoundingBox() ; } 54 virtual FloatRect objectBoundingBox() const { return floatLinesBoundingBox() ; }
54 55
55 virtual bool isSVGInlineText() const { return true; }
56
57 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F INAL; 56 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F INAL;
58 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0); 57 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0);
59 virtual IntRect linesBoundingBox() const; 58 virtual IntRect linesBoundingBox() const;
60 virtual InlineTextBox* createTextBox(); 59 virtual InlineTextBox* createTextBox();
61 60
62 float m_scalingFactor; 61 float m_scalingFactor;
63 Font m_scaledFont; 62 Font m_scaledFont;
64 SVGTextLayoutAttributes m_layoutAttributes; 63 SVGTextLayoutAttributes m_layoutAttributes;
65 }; 64 };
66 65
67 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGInlineText, isSVGInlineText()); 66 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGInlineText, isSVGInlineText());
68 67
69 } 68 }
70 69
71 #endif // RenderSVGInlineText_h 70 #endif // RenderSVGInlineText_h
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGInline.h ('k') | Source/core/rendering/svg/RenderSVGPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698