| OLD | NEW |
| 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 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
| 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #include "config.h" | 24 #include "config.h" |
| 25 | 25 |
| 26 #include "core/rendering/svg/RenderSVGInlineText.h" | 26 #include "core/rendering/svg/RenderSVGInlineText.h" |
| 27 | 27 |
| 28 #include "core/css/CSSFontSelector.h" | 28 #include "core/css/CSSFontSelector.h" |
| 29 #include "core/css/resolver/StyleResolver.h" | 29 #include "core/css/resolver/StyleResolver.h" |
| 30 #include "core/editing/VisiblePosition.h" | 30 #include "core/editing/VisiblePosition.h" |
| 31 #include "core/page/Settings.h" | |
| 32 #include "core/platform/FloatConversion.h" | |
| 33 #include "core/platform/graphics/FloatQuad.h" | |
| 34 #include "core/rendering/RenderBlock.h" | |
| 35 #include "core/rendering/svg/RenderSVGRoot.h" | |
| 36 #include "core/rendering/svg/RenderSVGText.h" | 31 #include "core/rendering/svg/RenderSVGText.h" |
| 37 #include "core/rendering/svg/SVGInlineTextBox.h" | 32 #include "core/rendering/svg/SVGInlineTextBox.h" |
| 38 #include "core/rendering/svg/SVGRenderingContext.h" | 33 #include "core/rendering/svg/SVGRenderingContext.h" |
| 39 #include "core/rendering/svg/SVGRootInlineBox.h" | |
| 40 | 34 |
| 41 namespace WebCore { | 35 namespace WebCore { |
| 42 | 36 |
| 43 static PassRefPtr<StringImpl> applySVGWhitespaceRules(PassRefPtr<StringImpl> str
ing, bool preserveWhiteSpace) | 37 static PassRefPtr<StringImpl> applySVGWhitespaceRules(PassRefPtr<StringImpl> str
ing, bool preserveWhiteSpace) |
| 44 { | 38 { |
| 45 if (preserveWhiteSpace) { | 39 if (preserveWhiteSpace) { |
| 46 // Spec: When xml:space="preserve", the SVG user agent will do the follo
wing using a | 40 // Spec: When xml:space="preserve", the SVG user agent will do the follo
wing using a |
| 47 // copy of the original character data content. It will convert all newl
ine and tab | 41 // copy of the original character data content. It will convert all newl
ine and tab |
| 48 // characters into space characters. Then, it will draw all space charac
ters, including | 42 // characters into space characters. Then, it will draw all space charac
ters, including |
| 49 // leading, trailing and multiple contiguous space characters. | 43 // leading, trailing and multiple contiguous space characters. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 FontDescription fontDescription(style->fontDescription()); | 235 FontDescription fontDescription(style->fontDescription()); |
| 242 | 236 |
| 243 // FIXME: We need to better handle the case when we compute very small fonts
below (below 1pt). | 237 // FIXME: We need to better handle the case when we compute very small fonts
below (below 1pt). |
| 244 fontDescription.setComputedSize(StyleResolver::getComputedSizeFromSpecifiedS
ize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.c
omputedSize(), DoNotUseSmartMinimumForFontSize)); | 238 fontDescription.setComputedSize(StyleResolver::getComputedSizeFromSpecifiedS
ize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.c
omputedSize(), DoNotUseSmartMinimumForFontSize)); |
| 245 | 239 |
| 246 scaledFont = Font(fontDescription, 0, 0); | 240 scaledFont = Font(fontDescription, 0, 0); |
| 247 scaledFont.update(styleResolver->fontSelector()); | 241 scaledFont.update(styleResolver->fontSelector()); |
| 248 } | 242 } |
| 249 | 243 |
| 250 } | 244 } |
| OLD | NEW |