Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin a22cb5f094 Bug 1321166 - Wrap DetailsFrame's definition and implementation in mozilla namespace. r=dholbert
MozReview-Commit-ID: 24cUKrWKRe

--HG--
extra : rebase_source : f9c1c0bc99bf77a1312fc408e4bc5c352efe0f37
2016-12-01 13:18:03 +08:00
Ting-Yu Lin 570d1f0e83 Bug 1304441 Part 3 - Insert main summary's frame construction item at front of the list. r=bz
Change the logic that moves the main summary to the front from operating
on generated frames in DetailsFrame::SetInitialChildList() to operating
on frame construction item list in AddFrameConstructionItemsInternal()
so that it will be correct when cooperating with ::first-line.

The root cause of the bug reported is because when specifying
::first-line on details element, the first frame of summary element,
which is generated due to ib-split, will be wrapped in nsFirstLineFrame.
The original code fails to find the summary frame in the wrapper frame
and triggers assertion because of the second ib-split summary frame. To
fix that, we need to descend into the child list of wrapper frames when
checking the main summary.

Add original test case as a crashtest as well as reftests to clearly
reproduce the issue.

Note that in the reftest, the blue color in ::first-line is applied
incorrectly to the second line in the summary due to bug 520605.

MozReview-Commit-ID: Bv4Vcvxp6pY
2016-10-05 14:43:32 +08:00
Ting-Yu Lin 4dc7ab9b9e Bug 1304441 Part 2 - Extract main summary checking code to a function. r=bz
* Change the assertion to non-fatal to make it easier to debug.
* Change the wording per bug 1304441 comment 11.

MozReview-Commit-ID: 1UJXhC4qkrx
2016-10-05 14:43:31 +08:00
Ting-Yu Lin 13f0d4632f 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

--HG--
extra : rebase_source : fffdd974df81a809a607491d2534aa8dd2d13ab1
2016-09-07 14:45:42 +08:00
Ting-Yu Lin 727557d79f 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

--HG--
extra : rebase_source : 8e197fa61cfcbaf066a8a510aef7c92adddd30f2
2016-04-13 13:34:14 +08:00
Ting-Yu Lin 6276d59933 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

--HG--
extra : rebase_source : 1aad3ad1d31dc277771013f92eace5cefa7d6112
2016-03-24 15:05:29 +08:00
Ting-Yu Lin d6a5df3abe Bug 1225752 - Localize the description of default summary. r=bz
--HG--
extra : commitid : 1fzJyvyuijQ
extra : rebase_source : ec39cfe4c4a147aaaa455071b9b70f008d5fbfe2
2016-02-04 01:48:00 +08:00
Ting-Yu Lin fd982b69ea 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.

--HG--
extra : commitid : ApnP20Mrr33
extra : rebase_source : 4b059f4e7fa32bac665487aa8a266ba58597b184
2016-01-20 23:20:41 +08:00
Ting-Yu Lin ea65853708 Bug 591737 - Construct details and summary in nsCSSFrameConstructor. r=bz
--HG--
extra : commitid : 7tnA5fqdD6L
extra : rebase_source : 452368859fb99183605edcf47fd48ff026bf3a50
2016-02-02 17:39:49 +08:00
Ting-Yu Lin cff36a1352 Bug 591737 - Add DetailsFrame. r=bz
--HG--
extra : commitid : C6hHNXWpwO8
extra : rebase_source : 47b37776c4f029879bd02c0477e885104b2aaed5
2016-01-20 23:20:41 +08:00