Commit Graph

7 Commits

Author SHA1 Message Date
Ting-Yu Lin
b5787cd1d4 Bug 1299753 Part 2 - Create block formatting context for DetailsFrame if needed. r=bz
nsCSSFrameConstructor::ConstructNonScrollableBlock() has logic to
determine whether to create a block formatting context for a block
frame. I refactor the function to make it reusable by
nsCSSFrameConstructor::ConstructDetailsFrame().

Also, make NS_NewBlockFrame() accept two arguments as other frame
factory functions so that it could be pointed by BlockFrameCreationFunc.
NS_NewBlockFormattingContext is changed accordingly.

The construction for a scrollable DetailsFrame will be further revised
in Part 3.

MozReview-Commit-ID: 8TwG9YMyGva
2016-09-07 14:45:42 +08:00
Ting-Yu Lin
c1ae09c878 Bug 1258657 Part 2 - Remove SummaryFrame. r=bz
We can use nsBlockFrame to render summary elements.

This change undoes "Bug 591737 - Add SummaryFrame" and remove
summaryFrame usage in DetailsFrame and nsCSSFrameConstructor.

MozReview-Commit-ID: 4aJvHVPfsBb
2016-04-13 13:34:14 +08:00
Ting-Yu Lin
53e6f51184 Bug 1245424 Part 1 - Fix assert for a display:none summary on debug build. r=bz
If the main summary element has 'display: none' style, it won't
generates a summary frame as the first child of the details.

However, if a details element have two summaries and the first summary
has 'display: none', the second summary still generates a SummaryFrame
event if it isn't the main summary. So instead of checking on the
SummaryFrame as before, I check the content tree for the main summary by
using the idea in bug 1245424 comment 8. Another reason might be the
potential removal of SummaryFrame in bug 1258657.

MozReview-Commit-ID: H0evZ17zj5k
2016-03-24 15:05:29 +08:00
Ting-Yu Lin
5a27c483d6 Bug 1225752 - Localize the description of default summary. r=bz 2016-02-04 01:48:00 +08:00
Ting-Yu Lin
fa554e5546 Bug 591737 - Provide a default summary element by DetailsFrame. r=bz
If a <details> lacks a direct <summary> child, we need to construct a
default one.
2016-01-20 23:20:41 +08:00
Ting-Yu Lin
5ec9e745ba Bug 591737 - Construct details and summary in nsCSSFrameConstructor. r=bz 2016-02-02 17:39:49 +08:00
Ting-Yu Lin
9ff24b5e22 Bug 591737 - Add DetailsFrame. r=bz 2016-01-20 23:20:41 +08:00