diff options
author | Moonchild <moonchild@palemoon.org> | 2019-07-03 15:17:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 15:17:08 +0000 |
commit | 0e54a032624b4ce23a959454047bfd504a734cc0 (patch) | |
tree | 6e19e55c35095548177db6fb9e5fbabe2aff2310 /layout/base/ActiveLayerTracker.cpp | |
parent | 8ea1f38f9c55a076dade47eaf0daaea27590d179 (diff) | |
parent | 3051056bbb0b41b8258d91e44a4ff8ec33a98d8f (diff) | |
download | UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.gz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.lz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.xz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.zip |
Merge pull request #1151 from win7-7/FrameProperties
Attach FrameProperties to each frame instead of using a shared hashtable
Diffstat (limited to 'layout/base/ActiveLayerTracker.cpp')
-rw-r--r-- | layout/base/ActiveLayerTracker.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/layout/base/ActiveLayerTracker.cpp b/layout/base/ActiveLayerTracker.cpp index 4f60f82d7..ecee4897a 100644 --- a/layout/base/ActiveLayerTracker.cpp +++ b/layout/base/ActiveLayerTracker.cpp @@ -178,7 +178,7 @@ LayerActivityTracker::NotifyExpired(LayerActivity* aObject) f->SchedulePaint(); } f->RemoveStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY); - f->Properties().Delete(LayerActivityProperty()); + f->DeleteProperty(LayerActivityProperty()); } else { c->DeleteProperty(nsGkAtoms::LayerActivity); } @@ -190,15 +190,13 @@ GetLayerActivity(nsIFrame* aFrame) if (!aFrame->HasAnyStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)) { return nullptr; } - FrameProperties properties = aFrame->Properties(); - return properties.Get(LayerActivityProperty()); + return aFrame->GetProperty(LayerActivityProperty()); } static LayerActivity* GetLayerActivityForUpdate(nsIFrame* aFrame) { - FrameProperties properties = aFrame->Properties(); - LayerActivity* layerActivity = properties.Get(LayerActivityProperty()); + LayerActivity* layerActivity = aFrame->GetProperty(LayerActivityProperty()); if (layerActivity) { gLayerActivityTracker->MarkUsed(layerActivity); } else { @@ -208,7 +206,7 @@ GetLayerActivityForUpdate(nsIFrame* aFrame) layerActivity = new LayerActivity(aFrame); gLayerActivityTracker->AddObject(layerActivity); aFrame->AddStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY); - properties.Set(LayerActivityProperty(), layerActivity); + aFrame->SetProperty(LayerActivityProperty(), layerActivity); } return layerActivity; } @@ -225,8 +223,7 @@ ActiveLayerTracker::TransferActivityToContent(nsIFrame* aFrame, nsIContent* aCon if (!aFrame->HasAnyStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)) { return; } - FrameProperties properties = aFrame->Properties(); - LayerActivity* layerActivity = properties.Remove(LayerActivityProperty()); + LayerActivity* layerActivity = aFrame->RemoveProperty(LayerActivityProperty()); aFrame->RemoveStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY); if (!layerActivity) { return; @@ -248,7 +245,7 @@ ActiveLayerTracker::TransferActivityToFrame(nsIContent* aContent, nsIFrame* aFra layerActivity->mContent = nullptr; layerActivity->mFrame = aFrame; aFrame->AddStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY); - aFrame->Properties().Set(LayerActivityProperty(), layerActivity); + aFrame->SetProperty(LayerActivityProperty(), layerActivity); } static void |