OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 FontDescription m_fontDescription; | 58 FontDescription m_fontDescription; |
59 }; | 59 }; |
60 | 60 |
61 FontBuilder::FontBuilder() | 61 FontBuilder::FontBuilder() |
62 : m_document(0) | 62 : m_document(0) |
63 , m_useSVGZoomRules(false) | 63 , m_useSVGZoomRules(false) |
64 , m_fontDirty(false) | 64 , m_fontDirty(false) |
65 { | 65 { |
66 } | 66 } |
67 | 67 |
68 void FontBuilder::initForStyleResolve(const Document* document, RenderStyle* sty
le, bool useSVGZoomRules) | 68 void FontBuilder::initForStyleResolve(const Document& document, RenderStyle* sty
le, bool useSVGZoomRules) |
69 { | 69 { |
70 // All documents need to be in a frame (and thus have access to Settings) | 70 // All documents need to be in a frame (and thus have access to Settings) |
71 // for style-resolution to make sense. | 71 // for style-resolution to make sense. |
72 // Unfortunately SVG Animations currently violate this: crbug.com/260966 | 72 // Unfortunately SVG Animations currently violate this: crbug.com/260966 |
73 // ASSERT(m_document->frame()); | 73 // ASSERT(m_document->frame()); |
74 m_document = document; | 74 m_document = &document; |
75 m_useSVGZoomRules = useSVGZoomRules; | 75 m_useSVGZoomRules = useSVGZoomRules; |
76 m_style = style; | 76 m_style = style; |
77 m_fontDirty = false; | 77 m_fontDirty = false; |
78 } | 78 } |
79 | 79 |
80 void FontBuilder::clear() | 80 void FontBuilder::clear() |
81 { | 81 { |
82 m_document = 0; | 82 m_document = 0; |
83 m_style = 0; | 83 m_style = 0; |
84 m_fontDirty = false; | 84 m_fontDirty = false; |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 FontOrientation fontOrientation; | 666 FontOrientation fontOrientation; |
667 NonCJKGlyphOrientation glyphOrientation; | 667 NonCJKGlyphOrientation glyphOrientation; |
668 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; | 668 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; |
669 fontDescription.setOrientation(fontOrientation); | 669 fontDescription.setOrientation(fontOrientation); |
670 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); | 670 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); |
671 documentStyle->setFontDescription(fontDescription); | 671 documentStyle->setFontDescription(fontDescription); |
672 documentStyle->font().update(fontSelector); | 672 documentStyle->font().update(fontSelector); |
673 } | 673 } |
674 | 674 |
675 } | 675 } |
OLD | NEW |