Closed Bug 1106755 Opened 8 years ago Closed 8 years ago
When I add CSS with a :first-letter pseudo-element (even w/o declaration), Firefox 34
.0 shows scrollbars .
10.77 KB, application/zip
550 bytes, text/html
9.58 KB, patch
|Details | Diff | Splinter Review|
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 Build ID: 20141125180439 Steps to reproduce: I add CSS for first-letter selector, as shown into attached example. Actual results: Firefox 34.0 shows scrollbars. Expected results: None of the other major browsers, even the previous version of Firefox do not show scrollbars in this situation.
The scrollbar does not disappear if I empty the div.content:first-letter ruleset. It appears only if the content font-size is at least 10pt. Apparently the selector with :first-letter makes something at least seem bigger to Firefox. FWIW, MDN page about the pseudo-element: https://developer.mozilla.org/en-US/docs/Web/CSS/::first-letter
QA Whiteboard: [bugday-20141208]
Component: Untriaged → Layout
Product: Firefox → Core
Summary: When I add CSS for first-letter selector, Firefox 34.0 shows scrollbars. → When I add CSS with a :first-letter pseudo-element (even w/o declaration), Firefox 34.0 shows scrollbars.
Yes, it does not depend on the div.content:first-letter ruleset. Definitely it does not depend directly on the font-size. If you use a smaller font-size, but also use a smaller container, scrollbars appear again. Probably this means that Firefox 34.0 can not calculate correctly the size of the content, when first-letter selector is mentioned in CSS.
This problem is still not resolved in Firefox 35.0
Version: 34 Branch → 35 Branch
The testcase works in Firefox 33, but fails in 34.
Pushlog: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=156f1bee4139&tochange=e0a077aace0c Regressed by: Bug 1055865
In local build Last Good: 1e5f9b3a220e First Bad: a25d5be62042 Triggered by: a25d5be62042 L. David Baron — Bug 1055865 patch 4 - Remove bits of code that nsLineLayout takes care of. r=jfkthame
In inline layout there's no need to do anything with overflow areas since RelativePositionFrames handles it. Apparently doing some of the work messes things up somehow, so the easy fix is to make the inline ::first-letter codepath behave more like nsInlineFrame and not do any messing with overflow areas. So this moves the rest of the overflow code in nsFirstLetterFrame::Reflow into the float-only codepath. There don't appear to be any ordering issues with the movement, since the code that the FinishAndStoreOverflow call is moved across deals with creating and destroying continuations of the child. All the added tests pass with the patch, but without the patch overflow-inline-nooverflow.html fails.
Attachment #8557424 - Flags: review?(jfkthame)
Comment on attachment 8557424 [details] [diff] [review] Make more overflow area computation code apply only to floating ::first-letter Review of attachment 8557424 [details] [diff] [review]: ----------------------------------------------------------------- Looks reasonable to me. Let's nominate this for uplift, too, as soon as it's safely landed.
Attachment #8557424 - Flags: review?(jfkthame) → review+
Comment on attachment 8557424 [details] [diff] [review] Make more overflow area computation code apply only to floating ::first-letter Approval Request Comment [Feature/regressing bug #]: bug 1055865 [User impact if declined]: incorrect scrollbar extents around content with a ::first-letter pseudo-element [Describe test coverage new/current, TreeHerder]: landed on inbound; wrote some new test coverage to test some additional related cases that didn't regress [Risks and why]: moderate risk to ::first-letter, which is not a very widely used feature; no risk outside of ::first-letter [String/UUID change made/needed]: no
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment on attachment 8557424 [details] [diff] [review] Make more overflow area computation code apply only to floating ::first-letter We have this bug for a few releases and since it is not a widely used feature, let it ride the train from aurora if that it is ok with you.
You need to log in before you can comment on or make changes to this bug.