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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1688053003: Avoid overwrite of existing PaintLayerReflectionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 895daeef48f0d1fa51a5d3e6030c529f6ee116a5..15602b8ed1110683ec5b4201dc5b937ccfb063cc 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1423,7 +1423,8 @@ void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)
{
ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldStyle));
if (layoutObject()->hasReflection()) {
- ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo(*layoutBox()));
+ if (!ensureRareData().reflectionInfo)
+ m_rareData->reflectionInfo = adoptPtr(new PaintLayerReflectionInfo(*layoutBox()));
m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle);
} else if (m_rareData && m_rareData->reflectionInfo) {
m_rareData->reflectionInfo->destroy();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698