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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2430813002: Switch to shorter names for property tree storage and updates (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 5722b405e44838391a8e6e32d754ad22c5059cf0..c2e66c140e1aafd06879ed2bb6b01b2d20980e83 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -137,14 +137,12 @@ static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject),
bool LayoutObject::s_affectsParentBlock = false;
// The pointer to paint properties is implemented as a global hash map
-// temporarily,
-// to avoid memory regression during the transition towards SPv2.
+// temporarily, to avoid memory regression during the transition towards SPv2.
typedef HashMap<const LayoutObject*, std::unique_ptr<ObjectPaintProperties>>
- ObjectPaintPropertiesMap;
-static ObjectPaintPropertiesMap& objectPaintPropertiesMap() {
- DEFINE_STATIC_LOCAL(ObjectPaintPropertiesMap, staticObjectPaintPropertiesMap,
- ());
- return staticObjectPaintPropertiesMap;
+ PaintPropertiesMap;
+static PaintPropertiesMap& paintPropertiesMap() {
+ DEFINE_STATIC_LOCAL(PaintPropertiesMap, staticPaintPropertiesMap, ());
+ return staticPaintPropertiesMap;
}
void* LayoutObject::operator new(size_t sz) {
@@ -2566,7 +2564,7 @@ void LayoutObject::willBeDestroyed() {
ObjectPaintInvalidator::objectWillBeDestroyed(*this);
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- objectPaintPropertiesMap().remove(this);
+ paintPropertiesMap().remove(this);
clearLayoutRootIfNeeded();
@@ -3488,14 +3486,14 @@ void LayoutObject::setIsBackgroundAttachmentFixedObject(
frameView()->removeBackgroundAttachmentFixedObject(this);
}
-const ObjectPaintProperties* LayoutObject::objectPaintProperties() const {
+const ObjectPaintProperties* LayoutObject::paintProperties() const {
DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
- return objectPaintPropertiesMap().get(this);
+ return paintPropertiesMap().get(this);
}
-ObjectPaintProperties& LayoutObject::ensureObjectPaintProperties() {
+ObjectPaintProperties& LayoutObject::ensurePaintProperties() {
DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
- auto addResult = objectPaintPropertiesMap().add(this, nullptr);
+ auto addResult = paintPropertiesMap().add(this, nullptr);
if (addResult.isNewEntry)
addResult.storedValue->value = ObjectPaintProperties::create();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/api/LayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698