зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1048752. Part 8: Remove mCaretAspectRatio. r=tn
mCaretAspectRatio doesn't need to be stored. We can recompute it whenever we need it. --HG-- extra : rebase_source : 065a6996e920800edf5cbcc7f072f0439ef84553
This commit is contained in:
Родитель
fb59918a6c
Коммит
84b6888d62
|
@ -139,11 +139,6 @@ nsresult nsCaret::Init(nsIPresShell *inPresShell)
|
|||
mPresShell = do_GetWeakReference(inPresShell); // the presshell owns us, so no addref
|
||||
NS_ASSERTION(mPresShell, "Hey, pres shell should support weak refs");
|
||||
|
||||
// XXX we should just do this LookAndFeel consultation every time
|
||||
// we need these values.
|
||||
mCaretAspectRatio =
|
||||
LookAndFeel::GetFloat(LookAndFeel::eFloatID_CaretAspectRatio, 0.0f);
|
||||
|
||||
mBlinkRate = static_cast<uint32_t>(
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_CaretBlinkTime, mBlinkRate));
|
||||
mShowDuringSelection =
|
||||
|
@ -195,7 +190,8 @@ DrawCJKCaret(nsIFrame* aFrame, int32_t aOffset)
|
|||
nsCaret::Metrics nsCaret::ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nscoord aCaretHeight)
|
||||
{
|
||||
// Compute nominal sizes in appunits
|
||||
nscoord caretWidth = (aCaretHeight * mCaretAspectRatio) +
|
||||
nscoord caretWidth =
|
||||
(aCaretHeight * LookAndFeel::GetFloat(LookAndFeel::eFloatID_CaretAspectRatio, 0.0f)) +
|
||||
nsPresContext::CSSPixelsToAppUnits(
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_CaretWidth, 1));
|
||||
|
||||
|
|
|
@ -202,7 +202,6 @@ protected:
|
|||
// XXX these fields should go away and the values be acquired as needed,
|
||||
// probably by ComputeMetrics.
|
||||
uint32_t mBlinkRate; // time for one cyle (on then off), in milliseconds
|
||||
float mCaretAspectRatio; // caret width/height aspect ratio
|
||||
|
||||
bool mVisible; // is the caret blinking
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче