зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1048752. Part 7: Remove mCaretWidthCSSPx. r=tn
mCaretWidthCSSPx doesn't need to be stored. We can just recompute it whenever we need it. --HG-- extra : rebase_source : 850b556651afade0da543e281e5fa54235969ab4
This commit is contained in:
Родитель
3b04ddd57d
Коммит
fb59918a6c
|
@ -141,7 +141,6 @@ nsresult nsCaret::Init(nsIPresShell *inPresShell)
|
|||
|
||||
// XXX we should just do this LookAndFeel consultation every time
|
||||
// we need these values.
|
||||
mCaretWidthCSSPx = LookAndFeel::GetInt(LookAndFeel::eIntID_CaretWidth, 1);
|
||||
mCaretAspectRatio =
|
||||
LookAndFeel::GetFloat(LookAndFeel::eFloatID_CaretAspectRatio, 0.0f);
|
||||
|
||||
|
@ -197,7 +196,8 @@ nsCaret::Metrics nsCaret::ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nsco
|
|||
{
|
||||
// Compute nominal sizes in appunits
|
||||
nscoord caretWidth = (aCaretHeight * mCaretAspectRatio) +
|
||||
nsPresContext::CSSPixelsToAppUnits(mCaretWidthCSSPx);
|
||||
nsPresContext::CSSPixelsToAppUnits(
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_CaretWidth, 1));
|
||||
|
||||
if (DrawCJKCaret(aFrame, aOffset)) {
|
||||
caretWidth += nsPresContext::CSSPixelsToAppUnits(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
|
||||
nscoord mCaretWidthCSSPx; // caret width in CSS pixels
|
||||
float mCaretAspectRatio; // caret width/height aspect ratio
|
||||
|
||||
bool mVisible; // is the caret blinking
|
||||
|
|
Загрузка…
Ссылка в новой задаче