зеркало из https://github.com/mozilla/gecko-dev.git
Bug 590302 - Crash [@ nsTextControlFrame::CalcIntrinsicSize] on print preview with textarea, position:fixed; r=roc a=blocking2.0:final+
This commit is contained in:
Родитель
7d9c209973
Коммит
193ba9958c
|
@ -0,0 +1,4 @@
|
|||
<html class="reftest-print" xmlns="http://www.w3.org/1999/xhtml" style=" float: left; white-space: pre; ">
|
||||
<div style="page-break-before: always;"></div>
|
||||
<textarea style="position: fixed;"></textarea>
|
||||
</html>
|
|
@ -42,3 +42,4 @@ load 513113-1.html
|
|||
load 570624-1.html
|
||||
load 498698-1.html
|
||||
asserts(1) load 578604-1.html # bug 584564
|
||||
asserts(5) load 590302-1.xhtml # bug 584564
|
||||
|
|
|
@ -299,7 +299,8 @@ nsTextControlFrame::CalcIntrinsicSize(nsIRenderingContext* aRenderingContext,
|
|||
// been reflowed yet, so we can't get its used padding, but it shouldn't be
|
||||
// using percentage padding anyway.
|
||||
nsMargin childPadding;
|
||||
if (GetFirstChild(nsnull)->GetStylePadding()->GetPadding(childPadding)) {
|
||||
nsIFrame* firstChild = GetFirstChild(nsnull);
|
||||
if (firstChild && firstChild->GetStylePadding()->GetPadding(childPadding)) {
|
||||
aIntrinsicSize.width += childPadding.LeftRight();
|
||||
} else {
|
||||
NS_ERROR("Percentage padding on value div?");
|
||||
|
@ -328,12 +329,14 @@ nsTextControlFrame::CalcIntrinsicSize(nsIRenderingContext* aRenderingContext,
|
|||
nsIScrollableFrame *scrollableFrame = do_QueryFrame(first);
|
||||
NS_ASSERTION(scrollableFrame, "Child must be scrollable");
|
||||
|
||||
nsMargin scrollbarSizes =
|
||||
if (scrollableFrame) {
|
||||
nsMargin scrollbarSizes =
|
||||
scrollableFrame->GetDesiredScrollbarSizes(PresContext(), aRenderingContext);
|
||||
|
||||
aIntrinsicSize.width += scrollbarSizes.LeftRight();
|
||||
|
||||
aIntrinsicSize.height += scrollbarSizes.TopBottom();;
|
||||
aIntrinsicSize.width += scrollbarSizes.LeftRight();
|
||||
|
||||
aIntrinsicSize.height += scrollbarSizes.TopBottom();;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче