зеркало из https://github.com/mozilla/gecko-dev.git
Bug 423436. Elements embedding SVG by reference don't resize if they depend on intrinsic percentage width/height. r+sr=dbaron@mozilla.com, blocking1.9=me
This commit is contained in:
Родитель
12d3737257
Коммит
db01626178
|
@ -143,6 +143,7 @@ public:
|
|||
virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
|
||||
|
||||
virtual IntrinsicSize GetIntrinsicSize();
|
||||
virtual nsSize GetIntrinsicRatio();
|
||||
|
||||
virtual nsSize ComputeAutoSize(nsIRenderingContext *aRenderingContext,
|
||||
|
@ -443,6 +444,16 @@ nsSubDocumentFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
|
|||
return result;
|
||||
}
|
||||
|
||||
/* virtual */ nsIFrame::IntrinsicSize
|
||||
nsSubDocumentFrame::GetIntrinsicSize()
|
||||
{
|
||||
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
|
||||
if (subDocRoot) {
|
||||
return subDocRoot->GetIntrinsicSize();
|
||||
}
|
||||
return nsLeafFrame::GetIntrinsicSize();
|
||||
}
|
||||
|
||||
/* virtual */ nsSize
|
||||
nsSubDocumentFrame::GetIntrinsicRatio()
|
||||
{
|
||||
|
|
|
@ -409,7 +409,8 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext)
|
|||
mStylePosition->mOffset.GetTopUnit() == eStyleUnit_Percent ||
|
||||
mStylePosition->mOffset.GetBottomUnit() != eStyleUnit_Auto ||
|
||||
frame->IsBoxFrame() ||
|
||||
frame->GetIntrinsicSize().height.GetUnit() == eStyleUnit_Percent;
|
||||
(mStylePosition->mHeight.GetUnit() == eStyleUnit_Auto &&
|
||||
frame->GetIntrinsicSize().height.GetUnit() == eStyleUnit_Percent);
|
||||
|
||||
// If we're the descendant of a table cell that performs special height
|
||||
// reflows and we could be the child that requires them, always set
|
||||
|
|
Загрузка…
Ссылка в новой задаче