mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916751: Do not use nsIFrame::MovePositionBy from nsLineLayout. r=dholbert
Since bug 916751 is hard (for me) to test, I haven't confirmed for sure that this fixes the bug. However, it fixes the assertions that bug 911786 part 3 triggers in layout/base/crashtests/317934-1.html through this codepath.
This commit is contained in:
parent
ef01bdd9f2
commit
4d640839e9
@ -870,6 +870,12 @@ public:
|
||||
* Move the frame, accounting for relative positioning. Use this when
|
||||
* adjusting the frame's position by a known amount, to properly update its
|
||||
* saved normal position (see GetNormalPosition below).
|
||||
*
|
||||
* This must be used only when moving a frame *after*
|
||||
* nsHTMLReflowState::ApplyRelativePositioning is called. When moving
|
||||
* a frame during the reflow process prior to calling
|
||||
* nsHTMLReflowState::ApplyRelativePositioning, the position should
|
||||
* simply be adjusted directly (e.g., using SetPosition()).
|
||||
*/
|
||||
void MovePositionBy(const nsPoint& aTranslation);
|
||||
|
||||
|
@ -2196,7 +2196,13 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
||||
|
||||
static void SlideSpanFrameRect(nsIFrame* aFrame, nscoord aDeltaWidth)
|
||||
{
|
||||
aFrame->MovePositionBy(nsPoint(-aDeltaWidth, 0));
|
||||
// This should not use nsIFrame::MovePositionBy because it happens
|
||||
// prior to relative positioning. In particular, because
|
||||
// nsBlockFrame::PlaceLine calls aLineLayout.TrimTrailingWhiteSpace()
|
||||
// prior to calling aLineLayout.RelativePositionFrames().
|
||||
nsPoint p = aFrame->GetPosition();
|
||||
p.x -= aDeltaWidth;
|
||||
aFrame->SetPosition(p);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user