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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h

Issue 1861013003: Separate metrics update and layout attribute resolving (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify-layoutattr-invalidation
Patch Set: Rebase Created 4 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
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 25 matching lines...) Expand all
36 bool characterStartsNewTextChunk(int position) const; 36 bool characterStartsNewTextChunk(int position) const;
37 SVGTextLayoutAttributes* layoutAttributes() { return &m_layoutAttributes; } 37 SVGTextLayoutAttributes* layoutAttributes() { return &m_layoutAttributes; }
38 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; } 38 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; }
39 39
40 Vector<SVGTextMetrics>& metricsList() { return m_metrics; } 40 Vector<SVGTextMetrics>& metricsList() { return m_metrics; }
41 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; } 41 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; }
42 42
43 float scalingFactor() const { return m_scalingFactor; } 43 float scalingFactor() const { return m_scalingFactor; }
44 const Font& scaledFont() const { return m_scaledFont; } 44 const Font& scaledFont() const { return m_scaledFont; }
45 void updateScaledFont(); 45 void updateScaledFont();
46 void updateMetricsList(bool& lastCharacterWasWhiteSpace);
46 static void computeNewScaledFontForStyle(LayoutObject*, float& scalingFactor , Font& scaledFont); 47 static void computeNewScaledFontForStyle(LayoutObject*, float& scalingFactor , Font& scaledFont);
47 48
48 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect. 49 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect.
49 FloatRect floatLinesBoundingBox() const; 50 FloatRect floatLinesBoundingBox() const;
50 51
51 PassRefPtr<StringImpl> originalText() const override; 52 PassRefPtr<StringImpl> originalText() const override;
52 53
53 const char* name() const override { return "LayoutSVGInlineText"; } 54 const char* name() const override { return "LayoutSVGInlineText"; }
54 55
55 private: 56 private:
(...skipping 16 matching lines...) Expand all
72 Font m_scaledFont; 73 Font m_scaledFont;
73 SVGTextLayoutAttributes m_layoutAttributes; 74 SVGTextLayoutAttributes m_layoutAttributes;
74 Vector<SVGTextMetrics> m_metrics; 75 Vector<SVGTextMetrics> m_metrics;
75 }; 76 };
76 77
77 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); 78 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText());
78 79
79 } // namespace blink 80 } // namespace blink
80 81
81 #endif // LayoutSVGInlineText_h 82 #endif // LayoutSVGInlineText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698