| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 if (m_firstInteger->value() == m_secondInteger->value()) { | 72 if (m_firstInteger->value() == m_secondInteger->value()) { |
| 73 return String::number(m_firstInteger->value()); | 73 return String::number(m_firstInteger->value()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 return String::number(m_firstInteger->value()) + " " + String::number(m_seco
ndInteger->value()); | 76 return String::number(m_firstInteger->value()) + " " + String::number(m_seco
ndInteger->value()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 SVGParsingError SVGIntegerOptionalInteger::setValueAsString(const String& value) | 79 SVGParsingError SVGIntegerOptionalInteger::setValueAsString(const String& value) |
| 80 { | 80 { |
| 81 float x, y; | 81 float x, y; |
| 82 SVGParsingError parseStatus = NoError; | 82 SVGParsingError parseStatus; |
| 83 if (!parseNumberOptionalNumber(value, x, y)) { | 83 if (!parseNumberOptionalNumber(value, x, y)) { |
| 84 parseStatus = ParsingAttributeFailedError; | 84 parseStatus = SVGParseStatus::ParsingFailed; |
| 85 x = y = 0; | 85 x = y = 0; |
| 86 } | 86 } |
| 87 | 87 |
| 88 m_firstInteger->setValue(x); | 88 m_firstInteger->setValue(x); |
| 89 m_secondInteger->setValue(y); | 89 m_secondInteger->setValue(y); |
| 90 return parseStatus; | 90 return parseStatus; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SVGIntegerOptionalInteger::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> othe
r, SVGElement*) | 93 void SVGIntegerOptionalInteger::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> othe
r, SVGElement*) |
| 94 { | 94 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 114 m_secondInteger->setValue(static_cast<int>(roundf(y))); | 114 m_secondInteger->setValue(static_cast<int>(roundf(y))); |
| 115 } | 115 } |
| 116 | 116 |
| 117 float SVGIntegerOptionalInteger::calculateDistance(PassRefPtrWillBeRawPtr<SVGPro
pertyBase> other, SVGElement*) | 117 float SVGIntegerOptionalInteger::calculateDistance(PassRefPtrWillBeRawPtr<SVGPro
pertyBase> other, SVGElement*) |
| 118 { | 118 { |
| 119 // FIXME: Distance calculation is not possible for SVGIntegerOptionalInteger
right now. We need the distance for every single value. | 119 // FIXME: Distance calculation is not possible for SVGIntegerOptionalInteger
right now. We need the distance for every single value. |
| 120 return -1; | 120 return -1; |
| 121 } | 121 } |
| 122 | 122 |
| 123 } | 123 } |
| OLD | NEW |