| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. | 7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 if (!objectProperties) | 58 if (!objectProperties) |
| 59 return; | 59 return; |
| 60 if (object.isSVGRoot()) { | 60 if (object.isSVGRoot()) { |
| 61 // If a transform exists, we can rely on a layer existing to app
ly it. | 61 // If a transform exists, we can rely on a layer existing to app
ly it. |
| 62 DCHECK(!objectProperties || !objectProperties->transform() || ob
ject.hasLayer()); | 62 DCHECK(!objectProperties || !objectProperties->transform() || ob
ject.hasLayer()); |
| 63 if (objectProperties->svgLocalToBorderBoxTransform()) { | 63 if (objectProperties->svgLocalToBorderBoxTransform()) { |
| 64 DCHECK(objectProperties->svgLocalToBorderBoxTransform()->mat
rix() == transform.toTransformationMatrix()); | 64 DCHECK(objectProperties->svgLocalToBorderBoxTransform()->mat
rix() == transform.toTransformationMatrix()); |
| 65 auto& paintController = context.getPaintController(); | 65 auto& paintController = context.getPaintController(); |
| 66 PaintChunkProperties properties(paintController.currentPaint
ChunkProperties()); | 66 PaintChunkProperties properties(paintController.currentPaint
ChunkProperties()); |
| 67 properties.transform = objectProperties->svgLocalToBorderBox
Transform(); | 67 properties.transform = objectProperties->svgLocalToBorderBox
Transform(); |
| 68 m_transformPropertyScope.emplace(paintController, properties
); | 68 m_transformPropertyScope.emplace(paintController, object, pr
operties); |
| 69 } | 69 } |
| 70 } else { | 70 } else { |
| 71 DCHECK(object.isSVG()); | 71 DCHECK(object.isSVG()); |
| 72 // Should only be used by LayoutSVGRoot. | 72 // Should only be used by LayoutSVGRoot. |
| 73 DCHECK(!objectProperties->svgLocalToBorderBoxTransform()); | 73 DCHECK(!objectProperties->svgLocalToBorderBoxTransform()); |
| 74 | 74 |
| 75 if (objectProperties->transform()) { | 75 if (objectProperties->transform()) { |
| 76 DCHECK(objectProperties->transform()->matrix() == transform.
toTransformationMatrix()); | 76 DCHECK(objectProperties->transform()->matrix() == transform.
toTransformationMatrix()); |
| 77 auto& paintController = context.getPaintController(); | 77 auto& paintController = context.getPaintController(); |
| 78 PaintChunkProperties properties(paintController.currentPaint
ChunkProperties()); | 78 PaintChunkProperties properties(paintController.currentPaint
ChunkProperties()); |
| 79 properties.transform = objectProperties->transform(); | 79 properties.transform = objectProperties->transform(); |
| 80 m_transformPropertyScope.emplace(paintController, properties
); | 80 m_transformPropertyScope.emplace(paintController, object, pr
operties); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 private: | 85 private: |
| 86 Optional<ScopedPaintChunkProperties> m_transformPropertyScope; | 86 Optional<ScopedPaintChunkProperties> m_transformPropertyScope; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 class SVGPaintContext { | 89 class SVGPaintContext { |
| 90 STACK_ALLOCATED(); | 90 STACK_ALLOCATED(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 std::unique_ptr<ClipPathRecorder> m_clipPathRecorder; | 139 std::unique_ptr<ClipPathRecorder> m_clipPathRecorder; |
| 140 std::unique_ptr<SVGFilterRecordingContext> m_filterRecordingContext; | 140 std::unique_ptr<SVGFilterRecordingContext> m_filterRecordingContext; |
| 141 #if ENABLE(ASSERT) | 141 #if ENABLE(ASSERT) |
| 142 bool m_applyClipMaskAndFilterIfNecessaryCalled; | 142 bool m_applyClipMaskAndFilterIfNecessaryCalled; |
| 143 #endif | 143 #endif |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace blink | 146 } // namespace blink |
| 147 | 147 |
| 148 #endif // SVGPaintContext_h | 148 #endif // SVGPaintContext_h |
| OLD | NEW |