Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: Source/core/layout/svg/ReferenceFilterBuilder.cpp

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All rights reserved. 4 * Copyright (C) 2011 Apple Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/Element.h" 35 #include "core/dom/Element.h"
36 #include "core/dom/ElementTraversal.h" 36 #include "core/dom/ElementTraversal.h"
37 #include "core/fetch/DocumentResource.h" 37 #include "core/fetch/DocumentResource.h"
38 #include "core/layout/svg/LayoutSVGResourceFilter.h" 38 #include "core/layout/svg/LayoutSVGResourceFilter.h"
39 #include "core/svg/SVGDocumentExtensions.h" 39 #include "core/svg/SVGDocumentExtensions.h"
40 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" 40 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h"
41 #include "core/svg/graphics/filters/SVGFilterBuilder.h" 41 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 HashMap<const FilterOperation*, OwnPtr<DocumentResourceReference>>* ReferenceFil terBuilder::documentResourceReferences = 0; 45 HashMap<const FilterOperation*, OwnPtr<DocumentResourceReference>>* ReferenceFil terBuilder::documentResourceReferences = nullptr;
46 46
47 DocumentResourceReference* ReferenceFilterBuilder::documentResourceReference(con st FilterOperation* filterOperation) 47 DocumentResourceReference* ReferenceFilterBuilder::documentResourceReference(con st FilterOperation* filterOperation)
48 { 48 {
49 if (!documentResourceReferences) 49 if (!documentResourceReferences)
50 return 0; 50 return nullptr;
51 51
52 return documentResourceReferences->get(filterOperation); 52 return documentResourceReferences->get(filterOperation);
53 } 53 }
54 54
55 void ReferenceFilterBuilder::setDocumentResourceReference(const FilterOperation* filterOperation, PassOwnPtr<DocumentResourceReference> documentResourceReferenc e) 55 void ReferenceFilterBuilder::setDocumentResourceReference(const FilterOperation* filterOperation, PassOwnPtr<DocumentResourceReference> documentResourceReferenc e)
56 { 56 {
57 if (!documentResourceReferences) 57 if (!documentResourceReferences)
58 documentResourceReferences = new HashMap<const FilterOperation*, OwnPtr< DocumentResourceReference>>; 58 documentResourceReferences = new HashMap<const FilterOperation*, OwnPtr< DocumentResourceReference>>;
59 documentResourceReferences->add(filterOperation, documentResourceReference); 59 documentResourceReferences->add(filterOperation, documentResourceReference);
60 } 60 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 effectElement->setStandardAttributes(effect.get()); 133 effectElement->setStandardAttributes(effect.get());
134 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->curr entValue()->enumValue(), parentFilter->sourceImageRect())); 134 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->curr entValue()->enumValue(), parentFilter->sourceImageRect()));
135 EColorInterpolation colorInterpolation = colorInterpolationForElement(*e ffectElement, filterColorInterpolation); 135 EColorInterpolation colorInterpolation = colorInterpolationForElement(*e ffectElement, filterColorInterpolation);
136 effect->setOperatingColorSpace(colorInterpolation == CI_LINEARRGB ? Colo rSpaceLinearRGB : ColorSpaceDeviceRGB); 136 effect->setOperatingColorSpace(colorInterpolation == CI_LINEARRGB ? Colo rSpaceLinearRGB : ColorSpaceDeviceRGB);
137 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); 137 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect);
138 } 138 }
139 return builder->lastEffect(); 139 return builder->lastEffect();
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGTransformableContainer.cpp ('k') | Source/core/layout/svg/SVGLayoutSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698