Closed
Bug 1144905
Opened 9 years ago
Closed 9 years ago
Update comment on SortByZOrder to reflect the code
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
Details
Attachments
(1 file)
4.16 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
This comment is from nsFrame.cpp: // This z-order sort also sorts secondarily by content order. We need to do // this so that boxes produced by the same element are placed together // in the sort. Consider a position:relative inline element that breaks // across lines and has absolutely positioned children; all the abs-pos // children should be z-ordered after all the boxes for the position:relative // element itself. set.PositionedDescendants()->SortByZOrder(aBuilder, GetContent()); The SortByZOrder code from nsDisplayList.cpp: static bool IsZOrderLEQ(nsDisplayItem* aItem1, nsDisplayItem* aItem2, void* aClosure) { // Note that we can't just take the difference of the two // z-indices here, because that might overflow a 32-bit int. return aItem1->ZIndex() <= aItem2->ZIndex(); } void nsDisplayList::SortByZOrder(nsDisplayListBuilder* aBuilder, nsIContent* aCommonAncestor) { Sort(aBuilder, IsZOrderLEQ, aCommonAncestor); } so I think the comment is obsolete and that we now assume that the PositionedDescendants list is already sorted in content document order, right?
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(roc)
Yes.
Flags: needinfo?(roc)
Assignee | ||
Comment 2•9 years ago
|
||
Fixed the documentation and removed the unused param.
Attachment #8585050 -
Flags: review?(roc)
Attachment #8585050 -
Flags: review?(roc) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/df0b52334a1d
Flags: in-testsuite-
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/df0b52334a1d
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•