Closed Bug 931460 Opened 11 years ago Closed 11 years ago

"ASSERTION: Scroll frame should be an ancestor of the containing block" with sticky, fieldset

Categories

(Core :: Layout, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jruderman, Assigned: roc)

References

Details

(Keywords: assertion, regression, testcase, Whiteboard: [qa-])

Attachments

(4 files)

Attached file testcase (deleted) β€”
###!!! ASSERTION: Scroll frame should be an ancestor of the containing block: 'cbFrame == scrolledFrame || nsLayoutUtils::IsProperAncestorFrame(scrolledFrame, cbFrame)', file layout/generic/StickyScrollContainer.cpp, line 155
Attached file stack (deleted) β€”
Regression window on m-c:  2013-10-25 -- 2013-10-26
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=186e834d87dc&tochange=ef3f5669b53e
contains bug 261037 which seems the most likely candidate given that the test has
<fieldset style="overflow: hidden;">
Blocks: 261037
Keywords: regression
OS: Mac OS X → All
Hardware: x86_64 → All
Priority: -- → P4
Blocks: 916315
Blocks: 935765
Attached patch part 1: fix assertions (deleted) β€” β€” Splinter Review
Assignee: nobody → roc
Attachment #8334330 - Flags: review?(matspal)
Attachment #8334331 - Flags: review?(matspal)
Comment on attachment 8334330 [details] [diff] [review]
part 1: fix assertions

r=mats, with a couple of nits (fix as you see fit).

>layout/generic/StickyScrollContainer.cpp
>+  StickyScrollContainer* s = static_cast<StickyScrollContainer*>

Renaming 's' to 'oldSSC' would make the code clearer IMO.

>+  for (int32_t i = s->mFrames.Length() - 1; i >= 0; --i) {

In general, I would prefer this pattern:

    auto i = s->mFrames.Length();
    while (i--) {

because:
1. it allows the full range of values that Length() can return
2. it's less to read
Attachment #8334330 - Flags: review?(matspal) → review+
Comment on attachment 8334331 [details] [diff] [review]
part 2: support relative and sticky positioning on legends

> layout/reftests/forms/fieldset/relpos-legend-1.html

Please add a rel.pos. inline legend to this test

<fieldset>
  <legend style="display:inline; position:relative; top:20px">Legend</legend>
</fieldset>
Attachment #8334331 - Flags: review?(matspal) → review+
... or, if you want to keep it on one line:

    for (auto i = s->mFrames.Length(); i-- ;)

(I'm assuming it's OK to use c++11 auto now.)
https://hg.mozilla.org/mozilla-central/rev/be8c4d516bda
https://hg.mozilla.org/mozilla-central/rev/29f004e4fa77
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Depends on: 946235
No longer depends on: 946235
Depends on: 950418
Flags: in-testsuite+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: