| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 { | 274 { |
| 275 return size * 1.2f; | 275 return size * 1.2f; |
| 276 } | 276 } |
| 277 | 277 |
| 278 static float smallerFontSize(float size) | 278 static float smallerFontSize(float size) |
| 279 { | 279 { |
| 280 return size / 1.2f; | 280 return size / 1.2f; |
| 281 } | 281 } |
| 282 | 282 |
| 283 // FIXME: Have to pass RenderStyles here for calc/computed values. This shouldn'
t be neecessary. | 283 // FIXME: Have to pass RenderStyles here for calc/computed values. This shouldn'
t be neecessary. |
| 284 void FontBuilder::setFontSizeValue(CSSValue* value, RenderStyle* parentStyle, Re
nderStyle* rootElementStyle, float effectiveZoom) | 284 void FontBuilder::setFontSizeValue(CSSValue* value, RenderStyle* parentStyle, co
nst RenderStyle* rootElementStyle, float effectiveZoom) |
| 285 { | 285 { |
| 286 if (!value->isPrimitiveValue()) | 286 if (!value->isPrimitiveValue()) |
| 287 return; | 287 return; |
| 288 | 288 |
| 289 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 289 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 290 | 290 |
| 291 FontDescriptionChangeScope scope(this); | 291 FontDescriptionChangeScope scope(this); |
| 292 | 292 |
| 293 scope.fontDescription().setKeywordSize(0); | 293 scope.fontDescription().setKeywordSize(0); |
| 294 float parentSize = 0; | 294 float parentSize = 0; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 FontOrientation fontOrientation; | 663 FontOrientation fontOrientation; |
| 664 NonCJKGlyphOrientation glyphOrientation; | 664 NonCJKGlyphOrientation glyphOrientation; |
| 665 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; | 665 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation)
; |
| 666 fontDescription.setOrientation(fontOrientation); | 666 fontDescription.setOrientation(fontOrientation); |
| 667 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); | 667 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); |
| 668 documentStyle->setFontDescription(fontDescription); | 668 documentStyle->setFontDescription(fontDescription); |
| 669 documentStyle->font().update(fontSelector); | 669 documentStyle->font().update(fontSelector); |
| 670 } | 670 } |
| 671 | 671 |
| 672 } | 672 } |
| OLD | NEW |