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

Side by Side Diff: Source/core/style/ComputedStyle.cpp

Issue 1194733002: Adding the 'filter' context attribute to 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: applied corrections Created 5 years, 6 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
« no previous file with comments | « Source/core/style/ComputedStyle.h ('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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 1247
1248 bool ComputedStyle::setFontDescription(const FontDescription& v) 1248 bool ComputedStyle::setFontDescription(const FontDescription& v)
1249 { 1249 {
1250 if (inherited->font.fontDescription() != v) { 1250 if (inherited->font.fontDescription() != v) {
1251 inherited.access()->font = Font(v); 1251 inherited.access()->font = Font(v);
1252 return true; 1252 return true;
1253 } 1253 }
1254 return false; 1254 return false;
1255 } 1255 }
1256 1256
1257 void ComputedStyle::setFont(const Font& font)
1258 {
1259 inherited.access()->font = font;
1260 }
1261
1257 const Length& ComputedStyle::specifiedLineHeight() const { return inherited->lin e_height; } 1262 const Length& ComputedStyle::specifiedLineHeight() const { return inherited->lin e_height; }
1258 Length ComputedStyle::lineHeight() const 1263 Length ComputedStyle::lineHeight() const
1259 { 1264 {
1260 const Length& lh = inherited->line_height; 1265 const Length& lh = inherited->line_height;
1261 // Unlike fontDescription().computedSize() and hence fontSize(), this is 1266 // Unlike fontDescription().computedSize() and hence fontSize(), this is
1262 // recalculated on demand as we only store the specified line height. 1267 // recalculated on demand as we only store the specified line height.
1263 // FIXME: Should consider scaling the fixed part of any calc expressions 1268 // FIXME: Should consider scaling the fixed part of any calc expressions
1264 // too, though this involves messily poking into CalcExpressionLength. 1269 // too, though this involves messily poking into CalcExpressionLength.
1265 float multiplier = textAutosizingMultiplier(); 1270 float multiplier = textAutosizingMultiplier();
1266 if (multiplier > 1 && lh.isFixed()) 1271 if (multiplier > 1 && lh.isFixed())
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 } 1765 }
1761 1766
1762 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) 1767 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other)
1763 { 1768 {
1764 setEmptyState(other.emptyState()); 1769 setEmptyState(other.emptyState());
1765 if (other.hasExplicitlyInheritedProperties()) 1770 if (other.hasExplicitlyInheritedProperties())
1766 setHasExplicitlyInheritedProperties(); 1771 setHasExplicitlyInheritedProperties();
1767 } 1772 }
1768 1773
1769 } // namespace blink 1774 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698