mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 590302 - Crash [@ nsTextControlFrame::CalcIntrinsicSize] on print preview with textarea, position:fixed; r=roc a=blocking2.0:final+
This commit is contained in:
parent
07de814ba1
commit
669cfe263b
4
layout/forms/crashtests/590302-1.xhtml
Normal file
4
layout/forms/crashtests/590302-1.xhtml
Normal file
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user