mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 720142 - Only calculate the border half we actally use. r=bernd
This commit is contained in:
parent
2d5655dbb6
commit
8b4cba6616
@ -6275,20 +6275,21 @@ BCPaintBorderIterator::SetDamageArea(const nsRect& aDirtyRect)
|
||||
for (colX = leftCol; colX != rightCol; colX += mColInc) {
|
||||
nsTableColFrame* colFrame = mTableFirstInFlow->GetColFrame(colX);
|
||||
if (!colFrame) ABORT1(false);
|
||||
// conservatively estimate the half border widths outside the col
|
||||
nscoord leftBorderHalf =
|
||||
nsPresContext::CSSPixelsToAppUnits(colFrame->GetLeftBorderWidth() + 1);
|
||||
nscoord rightBorderHalf =
|
||||
nsPresContext::CSSPixelsToAppUnits(colFrame->GetRightBorderWidth() + 1);
|
||||
// get the col rect relative to the table rather than the col group
|
||||
nsSize size = colFrame->GetSize();
|
||||
if (haveIntersect) {
|
||||
// conservatively estimate the left half border width outside the col
|
||||
nscoord leftBorderHalf =
|
||||
nsPresContext::CSSPixelsToAppUnits(colFrame->GetLeftBorderWidth() + 1);
|
||||
if (aDirtyRect.XMost() >= (x - leftBorderHalf)) {
|
||||
endColIndex = colX;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
else {
|
||||
// conservatively estimate the right half border width outside the col
|
||||
nscoord rightBorderHalf =
|
||||
nsPresContext::CSSPixelsToAppUnits(colFrame->GetRightBorderWidth() + 1);
|
||||
if ((x + size.width + rightBorderHalf) >= aDirtyRect.x) {
|
||||
startColIndex = endColIndex = colX;
|
||||
haveIntersect = true;
|
||||
@ -6339,7 +6340,7 @@ BCPaintBorderIterator::Reset()
|
||||
mCellData = nsnull;
|
||||
mBCData = nsnull;
|
||||
ResetVerInfo();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the iterator data to a new cellmap coordinate
|
||||
|
Loading…
Reference in New Issue
Block a user