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

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp

Issue 2782343002: Store local border box property cache outside ObjectPaintProperties (Closed)
Patch Set: Rebase Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/ObjectPaintProperties.h" 5 #include "core/paint/ObjectPaintProperties.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 void ObjectPaintProperties::updateContentsProperties() const { 9 std::unique_ptr<PropertyTreeState> ObjectPaintProperties::contentsProperties(
10 DCHECK(m_localBorderBoxProperties); 10 PropertyTreeState* localBorderBoxProperties,
11 DCHECK(!m_contentsProperties); 11 ObjectPaintProperties* paintProperties) {
12 if (!localBorderBoxProperties)
13 return nullptr;
12 14
13 m_contentsProperties = 15 std::unique_ptr<PropertyTreeState> contents =
14 WTF::makeUnique<PropertyTreeState>(*m_localBorderBoxProperties); 16 WTF::makeUnique<PropertyTreeState>(*localBorderBoxProperties);
15 17
16 if (scrollTranslation()) 18 if (paintProperties) {
17 m_contentsProperties->setTransform(scrollTranslation()); 19 if (paintProperties->scrollTranslation())
18 if (overflowClip()) 20 contents->setTransform(paintProperties->scrollTranslation());
19 m_contentsProperties->setClip(overflowClip()); 21 if (paintProperties->overflowClip())
20 else if (cssClip()) 22 contents->setClip(paintProperties->overflowClip());
21 m_contentsProperties->setClip(cssClip()); 23 else if (paintProperties->cssClip())
24 contents->setClip(paintProperties->cssClip());
25 }
22 26
23 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. 27 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
28
29 return contents;
24 } 30 }
25 31
26 } // namespace blink 32 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698