| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return WebBlendModeNormal; | 53 return WebBlendModeNormal; |
| 54 } | 54 } |
| 55 #undef MAP_BLEND_MODE | 55 #undef MAP_BLEND_MODE |
| 56 } | 56 } |
| 57 | 57 |
| 58 template <> | 58 template <> |
| 59 const SVGEnumerationStringEntries& | 59 const SVGEnumerationStringEntries& |
| 60 getStaticStringEntries<SVGFEBlendElement::Mode>() { | 60 getStaticStringEntries<SVGFEBlendElement::Mode>() { |
| 61 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 61 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
| 62 if (entries.isEmpty()) { | 62 if (entries.isEmpty()) { |
| 63 entries.append(std::make_pair(SVGFEBlendElement::ModeNormal, "normal")); | 63 entries.push_back(std::make_pair(SVGFEBlendElement::ModeNormal, "normal")); |
| 64 entries.append(std::make_pair(SVGFEBlendElement::ModeMultiply, "multiply")); | 64 entries.push_back( |
| 65 entries.append(std::make_pair(SVGFEBlendElement::ModeScreen, "screen")); | 65 std::make_pair(SVGFEBlendElement::ModeMultiply, "multiply")); |
| 66 entries.append(std::make_pair(SVGFEBlendElement::ModeDarken, "darken")); | 66 entries.push_back(std::make_pair(SVGFEBlendElement::ModeScreen, "screen")); |
| 67 entries.append(std::make_pair(SVGFEBlendElement::ModeLighten, "lighten")); | 67 entries.push_back(std::make_pair(SVGFEBlendElement::ModeDarken, "darken")); |
| 68 entries.append(std::make_pair(SVGFEBlendElement::ModeOverlay, "overlay")); | 68 entries.push_back( |
| 69 entries.append( | 69 std::make_pair(SVGFEBlendElement::ModeLighten, "lighten")); |
| 70 entries.push_back( |
| 71 std::make_pair(SVGFEBlendElement::ModeOverlay, "overlay")); |
| 72 entries.push_back( |
| 70 std::make_pair(SVGFEBlendElement::ModeColorDodge, "color-dodge")); | 73 std::make_pair(SVGFEBlendElement::ModeColorDodge, "color-dodge")); |
| 71 entries.append( | 74 entries.push_back( |
| 72 std::make_pair(SVGFEBlendElement::ModeColorBurn, "color-burn")); | 75 std::make_pair(SVGFEBlendElement::ModeColorBurn, "color-burn")); |
| 73 entries.append( | 76 entries.push_back( |
| 74 std::make_pair(SVGFEBlendElement::ModeHardLight, "hard-light")); | 77 std::make_pair(SVGFEBlendElement::ModeHardLight, "hard-light")); |
| 75 entries.append( | 78 entries.push_back( |
| 76 std::make_pair(SVGFEBlendElement::ModeSoftLight, "soft-light")); | 79 std::make_pair(SVGFEBlendElement::ModeSoftLight, "soft-light")); |
| 77 entries.append( | 80 entries.push_back( |
| 78 std::make_pair(SVGFEBlendElement::ModeDifference, "difference")); | 81 std::make_pair(SVGFEBlendElement::ModeDifference, "difference")); |
| 79 entries.append( | 82 entries.push_back( |
| 80 std::make_pair(SVGFEBlendElement::ModeExclusion, "exclusion")); | 83 std::make_pair(SVGFEBlendElement::ModeExclusion, "exclusion")); |
| 81 entries.append(std::make_pair(SVGFEBlendElement::ModeHue, "hue")); | 84 entries.push_back(std::make_pair(SVGFEBlendElement::ModeHue, "hue")); |
| 82 entries.append( | 85 entries.push_back( |
| 83 std::make_pair(SVGFEBlendElement::ModeSaturation, "saturation")); | 86 std::make_pair(SVGFEBlendElement::ModeSaturation, "saturation")); |
| 84 entries.append(std::make_pair(SVGFEBlendElement::ModeColor, "color")); | 87 entries.push_back(std::make_pair(SVGFEBlendElement::ModeColor, "color")); |
| 85 entries.append( | 88 entries.push_back( |
| 86 std::make_pair(SVGFEBlendElement::ModeLuminosity, "luminosity")); | 89 std::make_pair(SVGFEBlendElement::ModeLuminosity, "luminosity")); |
| 87 } | 90 } |
| 88 return entries; | 91 return entries; |
| 89 } | 92 } |
| 90 | 93 |
| 91 template <> | 94 template <> |
| 92 unsigned short getMaxExposedEnumValue<SVGFEBlendElement::Mode>() { | 95 unsigned short getMaxExposedEnumValue<SVGFEBlendElement::Mode>() { |
| 93 return SVGFEBlendElement::ModeLighten; | 96 return SVGFEBlendElement::ModeLighten; |
| 94 } | 97 } |
| 95 | 98 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 FilterEffect* input1 = filterBuilder->getEffectById( | 151 FilterEffect* input1 = filterBuilder->getEffectById( |
| 149 AtomicString(m_in1->currentValue()->value())); | 152 AtomicString(m_in1->currentValue()->value())); |
| 150 FilterEffect* input2 = filterBuilder->getEffectById( | 153 FilterEffect* input2 = filterBuilder->getEffectById( |
| 151 AtomicString(m_in2->currentValue()->value())); | 154 AtomicString(m_in2->currentValue()->value())); |
| 152 ASSERT(input1 && input2); | 155 ASSERT(input1 && input2); |
| 153 | 156 |
| 154 FilterEffect* effect = FEBlend::create( | 157 FilterEffect* effect = FEBlend::create( |
| 155 filter, toWebBlendMode(m_mode->currentValue()->enumValue())); | 158 filter, toWebBlendMode(m_mode->currentValue()->enumValue())); |
| 156 FilterEffectVector& inputEffects = effect->inputEffects(); | 159 FilterEffectVector& inputEffects = effect->inputEffects(); |
| 157 inputEffects.reserveCapacity(2); | 160 inputEffects.reserveCapacity(2); |
| 158 inputEffects.append(input1); | 161 inputEffects.push_back(input1); |
| 159 inputEffects.append(input2); | 162 inputEffects.push_back(input2); |
| 160 return effect; | 163 return effect; |
| 161 } | 164 } |
| 162 | 165 |
| 163 } // namespace blink | 166 } // namespace blink |
| OLD | NEW |