diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2019-06-26 01:51:45 +0300 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2019-06-26 01:51:45 +0300 |
commit | 00812e30dfa70f9b1a752cf0d09de00f6d401c85 (patch) | |
tree | e7eec9b55dd4e5825d3196f196c7f981be56e17a /layout/generic/nsFontInflationData.cpp | |
parent | d7359c38b197c221c43def1e24cb48d4aee51bba (diff) | |
download | UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.gz UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.lz UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.xz UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.zip |
Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
Diffstat (limited to 'layout/generic/nsFontInflationData.cpp')
-rw-r--r-- | layout/generic/nsFontInflationData.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/layout/generic/nsFontInflationData.cpp b/layout/generic/nsFontInflationData.cpp index 9e9a51999..831658c9e 100644 --- a/layout/generic/nsFontInflationData.cpp +++ b/layout/generic/nsFontInflationData.cpp @@ -6,7 +6,7 @@ /* Per-block-formatting-context manager of font size inflation for pan and zoom UI. */ #include "nsFontInflationData.h" -#include "FramePropertyTable.h" +#include "FrameProperties.h" #include "nsTextControlFrame.h" #include "nsListControlFrame.h" #include "nsComboboxControlFrame.h" @@ -27,7 +27,7 @@ nsFontInflationData::FindFontInflationDataFor(const nsIFrame *aFrame) NS_ASSERTION(bfc->GetStateBits() & NS_FRAME_FONT_INFLATION_FLOW_ROOT, "should have found a flow root"); - return bfc->Properties().Get(FontInflationDataProperty()); + return bfc->GetProperty(FontInflationDataProperty()); } /* static */ bool @@ -36,8 +36,7 @@ nsFontInflationData::UpdateFontInflationDataISizeFor(const ReflowInput& aReflowI nsIFrame *bfc = aReflowInput.mFrame; NS_ASSERTION(bfc->GetStateBits() & NS_FRAME_FONT_INFLATION_FLOW_ROOT, "should have been given a flow root"); - FrameProperties bfcProps(bfc->Properties()); - nsFontInflationData *data = bfcProps.Get(FontInflationDataProperty()); + nsFontInflationData *data = bfc->GetProperty(FontInflationDataProperty()); bool oldInflationEnabled; nscoord oldNCAISize; if (data) { @@ -45,7 +44,7 @@ nsFontInflationData::UpdateFontInflationDataISizeFor(const ReflowInput& aReflowI oldInflationEnabled = data->mInflationEnabled; } else { data = new nsFontInflationData(bfc); - bfcProps.Set(FontInflationDataProperty(), data); + bfc->SetProperty(FontInflationDataProperty(), data); oldNCAISize = -1; oldInflationEnabled = true; /* not relevant */ } @@ -65,8 +64,7 @@ nsFontInflationData::MarkFontInflationDataTextDirty(nsIFrame *aBFCFrame) NS_ASSERTION(aBFCFrame->GetStateBits() & NS_FRAME_FONT_INFLATION_FLOW_ROOT, "should have been given a flow root"); - FrameProperties bfcProps(aBFCFrame->Properties()); - nsFontInflationData *data = bfcProps.Get(FontInflationDataProperty()); + nsFontInflationData *data = aBFCFrame->GetProperty(FontInflationDataProperty()); if (data) { data->MarkTextDirty(); } |