| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "core/rendering/shapes/Shape.h" | 33 #include "core/rendering/shapes/Shape.h" |
| 34 #include "core/rendering/style/RenderStyle.h" | 34 #include "core/rendering/style/RenderStyle.h" |
| 35 #include "core/rendering/style/ShapeValue.h" | 35 #include "core/rendering/style/ShapeValue.h" |
| 36 #include "platform/LayoutUnit.h" | 36 #include "platform/LayoutUnit.h" |
| 37 #include "platform/geometry/FloatRect.h" | 37 #include "platform/geometry/FloatRect.h" |
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class Document; |
| 44 |
| 43 template<class KeyType, class InfoType> | 45 template<class KeyType, class InfoType> |
| 44 class MappedInfo { | 46 class MappedInfo { |
| 45 public: | 47 public: |
| 46 static InfoType* ensureInfo(const KeyType* key) | 48 static InfoType* ensureInfo(const KeyType* key) |
| 47 { | 49 { |
| 48 InfoMap& infoMap = MappedInfo<KeyType, InfoType>::infoMap(); | 50 InfoMap& infoMap = MappedInfo<KeyType, InfoType>::infoMap(); |
| 49 if (InfoType* info = infoMap.get(key)) | 51 if (InfoType* info = infoMap.get(key)) |
| 50 return info; | 52 return info; |
| 51 typename InfoMap::AddResult result = infoMap.add(key, InfoType::createIn
fo(key)); | 53 typename InfoMap::AddResult result = infoMap.add(key, InfoType::createIn
fo(key)); |
| 52 return result.iterator->value.get(); | 54 return result.iterator->value.get(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 173 |
| 172 private: | 174 private: |
| 173 mutable OwnPtr<Shape> m_shape; | 175 mutable OwnPtr<Shape> m_shape; |
| 174 LayoutSize m_shapeLogicalSize; | 176 LayoutSize m_shapeLogicalSize; |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 bool checkShapeImageOrigin(Document&, ImageResource&); | 179 bool checkShapeImageOrigin(Document&, ImageResource&); |
| 178 | 180 |
| 179 } | 181 } |
| 180 #endif | 182 #endif |
| OLD | NEW |