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

Side by Side Diff: Source/WebCore/css/StyleResolver.cpp

Issue 11280303: Merge 136074 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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
« no previous file with comments | « LayoutTests/fast/css/font-size-nan-expected.txt ('k') | no next file » | 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 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 3949 matching lines...) Expand 10 before | Expand all | Expand 10 after
3960 3960
3961 // We know the parent is monospace or the child is monospace, and that font 3961 // We know the parent is monospace or the child is monospace, and that font
3962 // size was unspecified. We want to scale our font size as appropriate. 3962 // size was unspecified. We want to scale our font size as appropriate.
3963 // If the font uses a keyword size, then we refetch from the table rather th an 3963 // If the font uses a keyword size, then we refetch from the table rather th an
3964 // multiplying by our scale factor. 3964 // multiplying by our scale factor.
3965 float size; 3965 float size;
3966 if (childFont.keywordSize()) 3966 if (childFont.keywordSize())
3967 size = fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + childF ont.keywordSize() - 1, childFont.useFixedDefaultSize()); 3967 size = fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + childF ont.keywordSize() - 1, childFont.useFixedDefaultSize());
3968 else { 3968 else {
3969 Settings* settings = documentSettings(); 3969 Settings* settings = documentSettings();
3970 float fixedScaleFactor = settings 3970 float fixedScaleFactor = (settings && settings->defaultFixedFontSize() & & settings->defaultFontSize())
3971 ? static_cast<float>(settings->defaultFixedFontSize()) / settings->d efaultFontSize() 3971 ? static_cast<float>(settings->defaultFixedFontSize()) / settings->d efaultFontSize()
3972 : 1; 3972 : 1;
3973 size = parentFont.useFixedDefaultSize() ? 3973 size = parentFont.useFixedDefaultSize() ?
3974 childFont.specifiedSize() / fixedScaleFactor : 3974 childFont.specifiedSize() / fixedScaleFactor :
3975 childFont.specifiedSize() * fixedScaleFactor; 3975 childFont.specifiedSize() * fixedScaleFactor;
3976 } 3976 }
3977 3977
3978 FontDescription newFontDescription(childFont); 3978 FontDescription newFontDescription(childFont);
3979 setFontSize(newFontDescription, size); 3979 setFontSize(newFontDescription, size);
3980 style->setFontDescription(newFontDescription); 3980 style->setFontDescription(newFontDescription);
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
5182 info.addMember(m_scopeResolver); 5182 info.addMember(m_scopeResolver);
5183 5183
5184 // FIXME: move this to a place where it would be called only once? 5184 // FIXME: move this to a place where it would be called only once?
5185 info.addMember(defaultStyle); 5185 info.addMember(defaultStyle);
5186 info.addMember(defaultQuirksStyle); 5186 info.addMember(defaultQuirksStyle);
5187 info.addMember(defaultPrintStyle); 5187 info.addMember(defaultPrintStyle);
5188 info.addMember(defaultViewSourceStyle); 5188 info.addMember(defaultViewSourceStyle);
5189 } 5189 }
5190 5190
5191 } // namespace WebCore 5191 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/font-size-nan-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698