Closed
Bug 232780
Opened 21 years ago
Closed 21 years ago
nsViewManager::CreateDisplayList parameters aX/aY used inconsistently
Categories
(Core :: Web Painting, defect, P1)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(1 file)
2.28 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
The aX and aY parameters to nsViweManager::CreateDisplayList are used
inconsistently. Sometimes we add them to the result of aView->GetBounds(), or
add them to the result of the old nsView::GetClippedRect (which returned a rect
relative to the origin of aView's parent) --- indicating that they should be an
offset to the origin of aView's parent. However, it's clear that in the call to
CreateDisplayList from BuildDisplayList, aX and aY are the offset from the
topmost root view (the view with no parent) to displayRoot (NOT displayRoot's
parent). In fact there's code "if (aTopView == aView)" in CreateDisplayList that
compensates for this fact by adjusting "bounds" and "pos". But this code does
not correct aX and aY so errors can still creep in later (as it turns out, only
if displayRoot is not the topmost root view, i.e., only when we're painting a
floating view or handling event capturing).
This is why the "if (!clipped) clipRect = aClipRect;" code is 'needed' in
AddToDisplayList ... it wipes out the incorrect clipRect computed by this bug.
Assignee | ||
Updated•21 years ago
|
Summary: nsViweManager::CreateDisplayList parameters aX/aY used inconsistently → nsViewManager::CreateDisplayList parameters aX/aY used inconsistently
Assignee | ||
Comment 1•21 years ago
|
||
This patch makes aX/aY consistently represent an offset to the origin of
aView's parent. It also adds some much needed comments.
With this patch, the offensive code in AddToDisplayList can be deleted.
Assignee | ||
Updated•21 years ago
|
Attachment #140346 -
Flags: superreview?(dbaron)
Attachment #140346 -
Flags: review?(dbaron)
Comment on attachment 140346 [details] [diff] [review]
fix
r+sr=dbaron, but why not remove the |aTopView| parameter entirely?
Attachment #140346 -
Flags: superreview?(dbaron)
Attachment #140346 -
Flags: superreview+
Attachment #140346 -
Flags: review?(dbaron)
Attachment #140346 -
Flags: review+
Assignee | ||
Comment 3•21 years ago
|
||
the other patch I just submitted to you adds a new use of aTopView in the body
of CreateDisplayList.
Assignee | ||
Comment 4•21 years ago
|
||
But in general CreateDisplayList could use some cleanup, yeah.
Priority: -- → P1
Assignee | ||
Comment 5•21 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•