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

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

Issue 2589143003: Add 'get' prefix for Settings.in generated code. (Closed)
Patch Set: Only get prefix and no capitalization. Created 3 years, 11 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
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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * Copyright (C) 2015 Collabora Ltd. All rights reserved. 6 * Copyright (C) 2015 Collabora Ltd. 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // size was unspecified. We want to scale our font size as appropriate. 276 // size was unspecified. We want to scale our font size as appropriate.
277 // If the font uses a keyword size, then we refetch from the table rather than 277 // If the font uses a keyword size, then we refetch from the table rather than
278 // multiplying by our scale factor. 278 // multiplying by our scale factor.
279 float size; 279 float size;
280 if (newDescription.keywordSize()) { 280 if (newDescription.keywordSize()) {
281 size = fontSizeForKeyword(newDescription.keywordSize(), 281 size = fontSizeForKeyword(newDescription.keywordSize(),
282 newDescription.isMonospace()); 282 newDescription.isMonospace());
283 } else { 283 } else {
284 Settings* settings = m_document->settings(); 284 Settings* settings = m_document->settings();
285 float fixedScaleFactor = 285 float fixedScaleFactor =
286 (settings && settings->defaultFixedFontSize() && 286 (settings && settings->getDefaultFixedFontSize() &&
287 settings->defaultFontSize()) 287 settings->getDefaultFontSize())
288 ? static_cast<float>(settings->defaultFixedFontSize()) / 288 ? static_cast<float>(settings->getDefaultFixedFontSize()) /
289 settings->defaultFontSize() 289 settings->getDefaultFontSize()
290 : 1; 290 : 1;
291 size = oldDescription.isMonospace() 291 size = oldDescription.isMonospace()
292 ? newDescription.specifiedSize() / fixedScaleFactor 292 ? newDescription.specifiedSize() / fixedScaleFactor
293 : newDescription.specifiedSize() * fixedScaleFactor; 293 : newDescription.specifiedSize() * fixedScaleFactor;
294 } 294 }
295 295
296 newDescription.setSpecifiedSize(size); 296 newDescription.setSpecifiedSize(size);
297 } 297 }
298 298
299 void FontBuilder::updateSpecifiedSize(FontDescription& fontDescription, 299 void FontBuilder::updateSpecifiedSize(FontDescription& fontDescription,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 FontDescription::Size(FontSize::initialKeywordSize(), 0.0f, false)); 417 FontDescription::Size(FontSize::initialKeywordSize(), 0.0f, false));
418 updateSpecifiedSize(fontDescription, documentStyle); 418 updateSpecifiedSize(fontDescription, documentStyle);
419 updateComputedSize(fontDescription, documentStyle); 419 updateComputedSize(fontDescription, documentStyle);
420 420
421 updateOrientation(fontDescription, documentStyle); 421 updateOrientation(fontDescription, documentStyle);
422 documentStyle.setFontDescription(fontDescription); 422 documentStyle.setFontDescription(fontDescription);
423 documentStyle.font().update(fontSelector); 423 documentStyle.font().update(fontSelector);
424 } 424 }
425 425
426 } // namespace blink 426 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698