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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 : m_document(0) | 63 : m_document(0) |
64 , m_useSVGZoomRules(false) | 64 , m_useSVGZoomRules(false) |
65 , m_fontSizehasViewportUnits(false) | 65 , m_fontSizehasViewportUnits(false) |
66 , m_style(0) | 66 , m_style(0) |
67 , m_fontDirty(false) | 67 , m_fontDirty(false) |
68 { | 68 { |
69 } | 69 } |
70 | 70 |
71 void FontBuilder::initForStyleResolve(const Document& document, RenderStyle* sty le, bool useSVGZoomRules) | 71 void FontBuilder::initForStyleResolve(const Document& document, RenderStyle* sty le, bool useSVGZoomRules) |
72 { | 72 { |
73 // All documents need to be in a frame (and thus have access to Settings) | 73 // bug "crbug.com/260966" is fixed so uncommenting Assert |
pdr.
2014/04/30 04:50:20
No need for this comment, lets just have the asser
| |
74 // for style-resolution to make sense. | 74 ASSERT(m_document->frame()); |
75 // Unfortunately SVG Animations currently violate this: crbug.com/260966 | |
76 // ASSERT(m_document->frame()); | |
77 m_document = &document; | 75 m_document = &document; |
78 m_useSVGZoomRules = useSVGZoomRules; | 76 m_useSVGZoomRules = useSVGZoomRules; |
79 m_style = style; | 77 m_style = style; |
80 m_fontDirty = false; | 78 m_fontDirty = false; |
81 } | 79 } |
82 | 80 |
83 inline static void setFontFamilyToStandard(FontDescription& fontDescription, con st Document* document) | 81 inline static void setFontFamilyToStandard(FontDescription& fontDescription, con st Document* document) |
84 { | 82 { |
85 if (!document || !document->settings()) | 83 if (!document || !document->settings()) |
86 return; | 84 return; |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 FontOrientation fontOrientation; | 667 FontOrientation fontOrientation; |
670 NonCJKGlyphOrientation glyphOrientation; | 668 NonCJKGlyphOrientation glyphOrientation; |
671 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ; | 669 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ; |
672 fontDescription.setOrientation(fontOrientation); | 670 fontDescription.setOrientation(fontOrientation); |
673 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); | 671 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); |
674 documentStyle->setFontDescription(fontDescription); | 672 documentStyle->setFontDescription(fontDescription); |
675 documentStyle->font().update(fontSelector); | 673 documentStyle->font().update(fontSelector); |
676 } | 674 } |
677 | 675 |
678 } | 676 } |
OLD | NEW |