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

Side by Side Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 20112002: Have const StyleResolverState return const RenderStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/FontBuilder.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/css/resolver/FontBuilder.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698