Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; | 73 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; |
| 74 String m_viewTargetString; | 74 String m_viewTargetString; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 template <typename T> | 77 template <typename T> |
| 78 void SVGViewSpec::inheritViewAttributesFromElement(T* inheritFromElement) | 78 void SVGViewSpec::inheritViewAttributesFromElement(T* inheritFromElement) |
| 79 { | 79 { |
| 80 if (inheritFromElement->hasAttribute(SVGNames::viewBoxAttr)) | 80 if (inheritFromElement->hasAttribute(SVGNames::viewBoxAttr)) |
| 81 viewBox()->baseValue()->setValue(inheritFromElement->viewBox()->currentV alue()->value()); | 81 viewBox()->baseValue()->setValue(inheritFromElement->viewBox()->currentV alue()->value()); |
| 82 | 82 |
| 83 if (inheritFromElement->hasAttribute(SVGNames::preserveAspectRatioAttr)) { | 83 if (inheritFromElement->preserveAspectRatio()->currentValue()->align() != SV GPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN && inheritFromElement->pre serveAspectRatio()->currentValue()->meetOrSlice() != SVGPreserveAspectRatio::SVG _MEETORSLICE_UNKNOWN) { |
|
fs
2015/04/23 08:30:32
I believe what you want here is inheritFromElement
| |
| 84 preserveAspectRatio()->baseValue()->setAlign(inheritFromElement->preserv eAspectRatio()->currentValue()->align()); | 84 preserveAspectRatio()->baseValue()->setAlign(inheritFromElement->preserv eAspectRatio()->currentValue()->align()); |
| 85 preserveAspectRatio()->baseValue()->setMeetOrSlice(inheritFromElement->p reserveAspectRatio()->currentValue()->meetOrSlice()); | 85 preserveAspectRatio()->baseValue()->setMeetOrSlice(inheritFromElement->p reserveAspectRatio()->currentValue()->meetOrSlice()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 if (inheritFromElement->hasAttribute(SVGNames::zoomAndPanAttr)) | 88 if (inheritFromElement->hasAttribute(SVGNames::zoomAndPanAttr)) |
| 89 setZoomAndPan(inheritFromElement->zoomAndPan()); | 89 setZoomAndPan(inheritFromElement->zoomAndPan()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif // SVGViewSpec_h | 94 #endif // SVGViewSpec_h |
| OLD | NEW |