Closed Bug 60289 Opened 24 years ago Closed 20 years ago

::first-letter doesn't get margin-right applied

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: ian, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: css1, testcase, Whiteboard: [CSS1-2.4][CSS1-5.5.2])

Attachments

(3 files)

STEPS TO REPRODUCE Try to apply margin-right to the ::first-letter pseudo-element. ACTUAL RESULTS T'is ignored. Tested with Win32 Netscape commercial trunk build 2000111120.
Priority: P3 → P5
QA Contact: petersen → ian
Please triage.
Assignee: clayton → joki
We'll start with the style system.
Assignee: joki → pierre
Component: Layout → Style System
QA Contact: ian → chrisd
Netscape's standard compliance QA team reorganised itself once again, so taking remaining non-tables style bugs. Sorry about the spam. I tried to get this done directly at the database level, but apparently that is "not easy because of the shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
The style data is correct. Reassigned to Layout. Note: margin-left works fine, which is more important than margin-right for the first-letter. Low priority.
Component: Style System → Layout
Really reassigning to Layout...
Assignee: pierre → attinasi
QA Contact: ian → petersen
Target Milestone: --- → mozilla1.0.1
Moving Mozilla 1.01 bugs to 'future' milestone with priority P1 I will be pulling bugs from 'future' milestones when scheduling later work.
Priority: P5 → P1
Target Milestone: mozilla1.0.1 → Future
Whiteboard: [CSS1-2.2][CSS1-5.5.2]
Whiteboard: [CSS1-2.2][CSS1-5.5.2] → [CSS1-2.4][CSS1-5.5.2]
Confirming problem using FizzillaCFM/2002061014. Marking All/All.
OS: Windows 2000 → All
Hardware: PC → All
Blocks: 153699
Summary: ::first-letter doesn't get margin-right applied → :first-letter doesn't get margin-right applied
Still occurs in the OS X 2002-07-31-05 NB.
Assignee: attinasi → nobody
Keywords: mozilla1.0
QA Contact: chrispetersen → ian
Summary: :first-letter doesn't get margin-right applied → ::first-letter doesn't get margin-right applied
Assignee: nobody → mats.palmgren
Component: Layout → Layout: Block and Inline
Priority: P1 → P3
Target Milestone: Future → ---
Attached patch Patch rev. 1Splinter Review
Attachment #166639 - Flags: superreview?(dbaron)
Attachment #166639 - Flags: review?(bzbarsky)
I'm not sure why this is correct... is there a reason first-letter frames claim to be incomplete?
Comment on attachment 166639 [details] [diff] [review] Patch rev. 1 Patch looks ok. r=rbs if you instead test |pfd->GetFlag(PFD_ISLETTERFRAME)| which is a quick flag set in that circumstance. ----------- The reason why first-letter claims to be incomplete is because it indeed chops just the first letter, and so only accounts for that part of the text content. What worried me at first was why the patch wouldn't mess the other continuations (since all of them are letterframes... but styled with the parent context per nsFirstLetterFrame::Init)? I was expecting this test: if (NS_FRAME_IS_NOT_COMPLETE(aStatus) && !pfd->GetFlag(PFD_ISLETTERFRAME) && !HasPrevInFlow(pfd->mFrame) { But inspection showed that |ApplyStartMargin| (already) zeroes the margin of the continutations if need be. So the patch looks fine to me.
Attachment #166639 - Flags: review?(bzbarsky) → review+
Comment on attachment 166639 [details] [diff] [review] Patch rev. 1 sr=dbaron (with rbs's PFD_ISLETTERFRAME comment fixed)
Attachment #166639 - Flags: superreview?(dbaron) → superreview+
(In reply to comment #12) > But inspection showed that |ApplyStartMargin| (already) zeroes the margin of > the continutations if need be. So the patch looks fine to me. Note that this is unnecessary in the case of a first-letter continuation though, since it has a different style context which never has a margin AFAIK. (i.e. ResolveStyleForNonElement(parentStyleContext)) FWIW, I have also checked that it works fine with bug 45091, where a ::first-letter element may be comprised of several independant first-letter frames (each with continuations) and only the last "owns" the right margin. In this case the "intermediate" margins are killed off in the reflow state. I'm unsure if it will work when ::first-letters eventually will be nested as well (bug 214004), but I will not worry about that now...
Checked in 2004-11-27 18:17 PDT. -> FIXED
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: