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

Side by Side Diff: Source/core/rendering/style/ShadowData.cpp

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: all working! Created 7 years, 1 month 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
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 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 23 matching lines...) Expand all
34 && m_style == o.m_style 34 && m_style == o.m_style
35 && m_color == o.m_color; 35 && m_color == o.m_color;
36 } 36 }
37 37
38 ShadowData ShadowData::blend(const ShadowData& from, double progress) const 38 ShadowData ShadowData::blend(const ShadowData& from, double progress) const
39 { 39 {
40 if (style() != from.style()) 40 if (style() != from.style())
41 return *this; 41 return *this;
42 42
43 return ShadowData(WebCore::blend(from.location(), location(), progress), 43 return ShadowData(WebCore::blend(from.location(), location(), progress),
44 clampTo<int>(WebCore::blend(from.blur(), blur(), progress), 0), 44 std::max(LayoutUnit(0), WebCore::blend(from.blur(), blur(), progress)),
45 WebCore::blend(from.spread(), spread(), progress), 45 WebCore::blend(from.spread(), spread(), progress),
46 style(), 46 style(),
47 WebCore::blend(from.color(), color(), progress)); 47 WebCore::blend(from.color(), color(), progress));
48 } 48 }
49 49
50 } // namespace WebCore 50 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698