summaryrefslogtreecommitdiffstats
path: root/layout/base/nsCSSFrameConstructor.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-07-03 15:17:08 +0000
committerGitHub <noreply@github.com>2019-07-03 15:17:08 +0000
commit0e54a032624b4ce23a959454047bfd504a734cc0 (patch)
tree6e19e55c35095548177db6fb9e5fbabe2aff2310 /layout/base/nsCSSFrameConstructor.cpp
parent8ea1f38f9c55a076dade47eaf0daaea27590d179 (diff)
parent3051056bbb0b41b8258d91e44a4ff8ec33a98d8f (diff)
downloadUXP-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/nsCSSFrameConstructor.cpp')
-rw-r--r--layout/base/nsCSSFrameConstructor.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index 07a5b80e7..ec676ca92 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -492,9 +492,8 @@ static nsContainerFrame* GetIBSplitSibling(nsIFrame* aFrame)
// We only store the "ib-split sibling" annotation with the first
// frame in the continuation chain. Walk back to find that frame now.
- return static_cast<nsContainerFrame*>
- (aFrame->FirstContinuation()->
- Properties().Get(nsIFrame::IBSplitSibling()));
+ return aFrame->FirstContinuation()->
+ GetProperty(nsIFrame::IBSplitSibling());
}
static nsContainerFrame* GetIBSplitPrevSibling(nsIFrame* aFrame)
@@ -503,9 +502,8 @@ static nsContainerFrame* GetIBSplitPrevSibling(nsIFrame* aFrame)
// We only store the ib-split sibling annotation with the first
// frame in the continuation chain. Walk back to find that frame now.
- return static_cast<nsContainerFrame*>
- (aFrame->FirstContinuation()->
- Properties().Get(nsIFrame::IBSplitPrevSibling()));
+ return aFrame->FirstContinuation()->
+ GetProperty(nsIFrame::IBSplitPrevSibling());
}
static nsContainerFrame*
@@ -526,7 +524,7 @@ GetLastIBSplitSibling(nsIFrame* aFrame, bool aReturnEmptyTrailingInline)
}
static void
-SetFrameIsIBSplit(nsContainerFrame* aFrame, nsIFrame* aIBSplitSibling)
+SetFrameIsIBSplit(nsContainerFrame* aFrame, nsContainerFrame* aIBSplitSibling)
{
NS_PRECONDITION(aFrame, "bad args!");
@@ -547,9 +545,8 @@ SetFrameIsIBSplit(nsContainerFrame* aFrame, nsIFrame* aIBSplitSibling)
// Store the ib-split sibling (if we were given one) with the
// first frame in the flow.
- FramePropertyTable* props = aFrame->PresContext()->PropertyTable();
- props->Set(aFrame, nsIFrame::IBSplitSibling(), aIBSplitSibling);
- props->Set(aIBSplitSibling, nsIFrame::IBSplitPrevSibling(), aFrame);
+ aFrame->SetProperty(nsIFrame::IBSplitSibling(), aIBSplitSibling);
+ aIBSplitSibling->SetProperty(nsIFrame::IBSplitPrevSibling(), aFrame);
}
}
@@ -6075,11 +6072,11 @@ AddGenConPseudoToFrame(nsIFrame* aOwnerFrame, nsIContent* aContent)
NS_ASSERTION(nsLayoutUtils::IsFirstContinuationOrIBSplitSibling(aOwnerFrame),
"property should only be set on first continuation/ib-sibling");
- FrameProperties props = aOwnerFrame->Properties();
- nsIFrame::ContentArray* value = props.Get(nsIFrame::GenConProperty());
+ nsIFrame::ContentArray* value =
+ aOwnerFrame->GetProperty(nsIFrame::GenConProperty());
if (!value) {
value = new nsIFrame::ContentArray;
- props.Set(nsIFrame::GenConProperty(), value);
+ aOwnerFrame->SetProperty(nsIFrame::GenConProperty(), value);
}
value->AppendElement(aContent);
}