mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841192. Part 1: Make <frame> elements behave more like <iframe>s, in particular supporting padding and borders (but not border-radius). r=mats
--HG-- extra : rebase_source : b49a430b7a54bc0579f4f109afa001634a2b8930
This commit is contained in:
parent
c1b80ca9a0
commit
6651accbe4
@ -750,6 +750,8 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
|
||||
{
|
||||
// reflow the child
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
|
||||
reflowState.SetComputedWidth(std::max(0, aSize.width - reflowState.mComputedBorderPadding.LeftRight()));
|
||||
reflowState.SetComputedHeight(std::max(0, aSize.height - reflowState.mComputedBorderPadding.TopBottom()));
|
||||
nsHTMLReflowMetrics metrics;
|
||||
metrics.width = aSize.width;
|
||||
metrics.height= aSize.height;
|
||||
|
@ -677,28 +677,19 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(mContent->GetPrimaryFrame() == this,
|
||||
"Shouldn't happen");
|
||||
|
||||
// "offset" is the offset of our content area from our frame's
|
||||
// top-left corner.
|
||||
nsPoint offset(0, 0);
|
||||
|
||||
if (IsInline()) {
|
||||
// XUL <iframe> or <browser>, or HTML <iframe>, <object> or <embed>
|
||||
nsresult rv = nsLeafFrame::DoReflow(aPresContext, aDesiredSize, aReflowState,
|
||||
aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
offset = nsPoint(aReflowState.mComputedBorderPadding.left,
|
||||
// "offset" is the offset of our content area from our frame's
|
||||
// top-left corner.
|
||||
nsPoint offset = nsPoint(aReflowState.mComputedBorderPadding.left,
|
||||
aReflowState.mComputedBorderPadding.top);
|
||||
} else {
|
||||
// HTML <frame>
|
||||
SizeToAvailSize(aReflowState, aDesiredSize);
|
||||
}
|
||||
|
||||
nsSize innerSize(aDesiredSize.width, aDesiredSize.height);
|
||||
if (IsInline()) {
|
||||
innerSize.width -= aReflowState.mComputedBorderPadding.LeftRight();
|
||||
innerSize.height -= aReflowState.mComputedBorderPadding.TopBottom();
|
||||
}
|
||||
|
||||
if (mInnerView) {
|
||||
nsViewManager* vm = mInnerView->GetViewManager();
|
||||
|
6
layout/reftests/bugs/841192-1-ref.html
Normal file
6
layout/reftests/bugs/841192-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="margin:0; position:absolute; left:0; top:0; right:0; bottom:0; padding:10px; border:5px solid lime;">
|
||||
<div style="height:100%; background:yellow;"></div>
|
||||
</body>
|
||||
</html>
|
5
layout/reftests/bugs/841192-1.html
Normal file
5
layout/reftests/bugs/841192-1.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE HTML>
|
||||
<frameset>
|
||||
<frame style="padding:10px; border:5px solid lime; border-radius:20px"
|
||||
src="data:text/html,<body style='background:yellow'>">
|
||||
</frame>
|
@ -1748,7 +1748,8 @@ skip-if(B2G) == 818276-1.html 818276-1-ref.html
|
||||
== 827577-1b.html 827577-1-ref.html
|
||||
== 827799-1.html about:blank
|
||||
== 836844-1.html 836844-1-ref.html
|
||||
== 848421-1.html 848421-1-ref.html
|
||||
== 847850-1.html 847850-1-ref.html
|
||||
== 841192-1.html 841192-1-ref.html
|
||||
== 846144-1.html 846144-1-ref.html
|
||||
== 847850-1.html 847850-1-ref.html
|
||||
== 848421-1.html 848421-1-ref.html
|
||||
test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html
|
||||
|
@ -659,7 +659,7 @@ frameset {
|
||||
}
|
||||
|
||||
frame {
|
||||
border: none ! important;
|
||||
border-radius: 0 ! important;
|
||||
}
|
||||
|
||||
iframe {
|
||||
|
Loading…
Reference in New Issue
Block a user