зеркало из https://github.com/mozilla/pjs.git
use line-layout's pres-context as a ref not a pointer
This commit is contained in:
Родитель
f13e461396
Коммит
6ccd415fc4
|
@ -84,7 +84,7 @@ nsPlaceholderFrame::InlineReflow(nsLineLayout& aLineLayout,
|
|||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState)
|
||||
{
|
||||
nsIPresContext& presContext = *aLineLayout.mPresContext;
|
||||
nsIPresContext& presContext = aLineLayout.mPresContext;
|
||||
|
||||
// Get the floater container in which we're inserted
|
||||
nsIFrame* containingBlock;
|
||||
|
|
|
@ -133,7 +133,7 @@ SpacerFrame::InlineReflow(nsLineLayout& aLineLayout,
|
|||
NS_RELEASE(hc);
|
||||
}
|
||||
|
||||
float p2t = aLineLayout.mPresContext->GetPixelsToTwips();
|
||||
float p2t = aLineLayout.mPresContext.GetPixelsToTwips();
|
||||
switch (type) {
|
||||
case TYPE_WORD:
|
||||
if (0 != width) {
|
||||
|
|
|
@ -1387,7 +1387,7 @@ TextFrame::ReflowNormal(nsLineLayout& aLineLayout,
|
|||
const PRUnichar* cpStart = cp;
|
||||
mContentOffset = aStartingOffset;
|
||||
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext->GetMetricsFor(aFont.mFont);
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext.GetMetricsFor(aFont.mFont);
|
||||
PRInt32 spaceWidth;
|
||||
fm->GetWidth(' ', spaceWidth);
|
||||
PRBool wrapping = PR_TRUE;
|
||||
|
@ -1562,7 +1562,7 @@ TextFrame::ReflowPre(nsLineLayout& aLineLayout,
|
|||
const PRUnichar* end = cp + textLength - aStartingOffset;
|
||||
|
||||
mFlags |= TEXT_IS_PRE;
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext->GetMetricsFor(aFont.mFont);
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext.GetMetricsFor(aFont.mFont);
|
||||
PRInt32 width = 0;
|
||||
PRBool hasMultibyte = PR_FALSE;
|
||||
PRUint16 tabs = 0;
|
||||
|
|
|
@ -84,7 +84,7 @@ nsPlaceholderFrame::InlineReflow(nsLineLayout& aLineLayout,
|
|||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState)
|
||||
{
|
||||
nsIPresContext& presContext = *aLineLayout.mPresContext;
|
||||
nsIPresContext& presContext = aLineLayout.mPresContext;
|
||||
|
||||
// Get the floater container in which we're inserted
|
||||
nsIFrame* containingBlock;
|
||||
|
|
|
@ -133,7 +133,7 @@ SpacerFrame::InlineReflow(nsLineLayout& aLineLayout,
|
|||
NS_RELEASE(hc);
|
||||
}
|
||||
|
||||
float p2t = aLineLayout.mPresContext->GetPixelsToTwips();
|
||||
float p2t = aLineLayout.mPresContext.GetPixelsToTwips();
|
||||
switch (type) {
|
||||
case TYPE_WORD:
|
||||
if (0 != width) {
|
||||
|
|
|
@ -1387,7 +1387,7 @@ TextFrame::ReflowNormal(nsLineLayout& aLineLayout,
|
|||
const PRUnichar* cpStart = cp;
|
||||
mContentOffset = aStartingOffset;
|
||||
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext->GetMetricsFor(aFont.mFont);
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext.GetMetricsFor(aFont.mFont);
|
||||
PRInt32 spaceWidth;
|
||||
fm->GetWidth(' ', spaceWidth);
|
||||
PRBool wrapping = PR_TRUE;
|
||||
|
@ -1562,7 +1562,7 @@ TextFrame::ReflowPre(nsLineLayout& aLineLayout,
|
|||
const PRUnichar* end = cp + textLength - aStartingOffset;
|
||||
|
||||
mFlags |= TEXT_IS_PRE;
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext->GetMetricsFor(aFont.mFont);
|
||||
nsIFontMetrics* fm = aLineLayout.mPresContext.GetMetricsFor(aFont.mFont);
|
||||
PRInt32 width = 0;
|
||||
PRBool hasMultibyte = PR_FALSE;
|
||||
PRUint16 tabs = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче