This checkin enables mozilla to support the printing of selection, the printing of page ranges, and
the printing of headers and footers. Printing of selection is implemented by the frames figuring out if they are in the selection and painting if they or not they they don't paint. This also only allows the printing of the first page of selections, alothough it is well documented where this is implemeted so it can be removed. Bugs 63426, 31218, 61075 r=dcone,kmcclusk,erik,buster sr=waterson git-svn-id: svn://10.0.0.236/trunk@85624 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -99,6 +99,19 @@ nsIsIndexFrame::~nsIsIndexFrame()
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIsIndexFrame::Paint(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
PRBool isVisible;
|
||||
if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_TRUE, &isVisible)) && !isVisible) {
|
||||
return NS_OK;
|
||||
}
|
||||
return nsAreaFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIsIndexFrame::UpdatePromptLabel()
|
||||
{
|
||||
@@ -125,7 +138,8 @@ nsIsIndexFrame::UpdatePromptLabel()
|
||||
// We can't make any assumption as to what the default would be
|
||||
// because the value is localized for non-english platforms, thus
|
||||
// it might not be the string "This is a searchable index. Enter search keywords: "
|
||||
result = nsFormControlHelper::GetLocalizedString("IsIndexPrompt", prompt);
|
||||
result = nsFormControlHelper::GetLocalizedString(nsFormControlHelper::GetHTMLPropertiesFileName(),
|
||||
"IsIndexPrompt", prompt);
|
||||
}
|
||||
nsCOMPtr<nsITextContent> text = do_QueryInterface(mTextContent);
|
||||
result = text->SetText(prompt.GetUnicode(), prompt.Length(), PR_TRUE);
|
||||
|
||||
Reference in New Issue
Block a user