Closed Bug 96264 Opened 24 years ago Closed 1 year ago

Background image is misaligned in Composer (Normal vs Preview mode)

Categories

(Core :: DOM: Editor, defect, P5)

defect

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: TucsonTester2, Unassigned)

References

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (Win98; U) BuildID: 20010726 After putting a background into Composer, the background is misaligned as compared to the rest of the page. This misalignment is divided by how far down the page content has been added. Below the content the background image is aligned differently. The biggest change is in the horizontal alignment. There is some change in the vertical alignment where the image is actually cut off. Reproducible: Always Steps to Reproduce: 1.Open composer 2.add any background where a change in the horizontal alignment can easily be seen, such as boxes or text.(it is still noticeable in "seamless" backgrounds but not as easy to spot) 3.hit enter a 2 or 3 times. Actual Results: The background image appeared to be missing some of the vertical pixels and misaligned horizontaly. The background does not display properly in Preview or Normal view mode, but when opened in the netscape browser the page appears to be fine. Expected Results: the background image should be aligned properly throughout the entire document regardless of content placement.
With the new build I noticed that the misalignment only happens when you switch from the Normal view to the Preview view and back to the Normal view again.
With the new build I noticed that the misalignment only happens when you switch from the Normal view to the Preview view and back to the Normal view again. So the steps to reproduce this bug have changed. Steps to Reproduce: 1.Open composer 2.add any background where a change in the horizontal alignment can easily be seen, such as boxes or text.(it is still noticeable in "seamless" backgrounds but not as easy to spot) 3.Switch from the "Normal" view to the "Preview" view and then back to "Normal" view 3.hit enter a 2 or 3 times.
Disregard the above 2 posts, the first post I made is still correct.
This time with the new build (20010821) the steps have changed back to the second steps that I listed. At first the background is properly aligned but if you switch to the preview mode after adding a background the bug reappears. With the new build I noticed that the misalignment only happens when you switch from the Normal view to the Preview view and back to the Normal view again. So the steps to reproduce this bug have changed. Steps to Reproduce: 1.Open composer 2.add any background where a change in the horizontal alignment can easily be seen, such as boxes or text.(it is still noticeable in "seamless" backgrounds but not as easy to spot) 3.Switch from the "Normal" view to the "Preview" view and then back to "Normal" view 3.hit enter a 2 or 3 times.
Confirming using Mac/2001090508, although reporter's third step wasn't necessary to produce the results illustrated in the screenshot to be attached hereon shortly. I think this is a more serious problem than the reporter first indicated; upgrading severity.
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is probably the same problem as 96265, but simply reached using a different method.
-->cmanske Charley--is this something to do with our style sheets? Can we generate a testcase that shows the bad background image in the browser? Please investigate and reassign as appropriate.
Assignee: brade → cmanske
Summary: Background image is misaglinged in Composer. Misaligned for Normal and Preview mode → Background image is misaligned in Composer (Normal vs Preview mode)
Target Milestone: --- → mozilla0.9.5
All we are doing to go from "Normal" to "Preview" is removing 2 style sheets, and then adding them back when switching back to "Normal". Must be a layout/CSS issue. I bet Daniel can figure it out.
Assignee: cmanske → glazman
hyatt--do you have any ideas/comments about this bug? Is the bug in "BodyFixupRule"?
*** Bug 96476 has been marked as a duplicate of this bug. ***
*** Bug 97327 has been marked as a duplicate of this bug. ***
*** Bug 99632 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla0.9.5 → mozilla0.9.6
bulk milestone change
Target Milestone: mozilla0.9.6 → mozilla0.9.7
ah, I think I have detected the root of the problem, even if I don't understand the reason yet. Document inspector shows a difference in computed style values for backgroun-image property before switch to preview and back to normal. Still investigating.
Target Milestone: mozilla0.9.7 → mozilla0.9.8
more clues : when the bug is visible in Normal view, it is still NOT visible when switching to Preview...
Guess what ? When Kathy and Charley told me about this bug two months ago, I said "yet another BodyFixupRule bug". I was right.... I now know where the problem comes from, working on it.
Attached patch patch v1.0Splinter Review
fix for this bug. Hyatt, can you please review it and verifies it does the correct thing ? It's clearly a BodyFixupRule issue quite similar to the one I fixed for 88681. Thanks.
I tested "patch v1.0" and it did seem to fix this problem. However, when starting Composer, I get an assert when loading an override style sheet: nsDebug::Assertion(const char * 0x023fe5f0, const char * 0x023fe5bc, const char * 0x023fe590, int 1470) line 290 + 13 bytes nsRuleNode::WalkRuleTree(nsStyleStructID eStyleStruct_Background, nsIStyleContext * 0x02e22838, nsRuleData * 0x0012e98c, nsCSSStruct * 0x0012e9cc, int 1) line 1470 + 45 bytes nsRuleNode::GetBackgroundData(nsIStyleContext * 0x02e22838, int 1) line 1254 + 29 bytes nsRuleNode::GetStyleData(nsStyleStructID eStyleStruct_Background, nsIStyleContext * 0x02e22838, int 1) line 4710 + 20 bytes nsStyleContext::GetStyleData(nsStyleStructID eStyleStruct_Background) line 366 nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext * 0x0383f4b0, nsIFrame * 0x02e229e8, nsIStyleContext * 0x02e22838, nsIFrame * 0x00000000, int 0) line 462 + 13 bytes nsCSSFrameConstructor::ConstructBlock(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, const nsStyleDisplay * 0x02e22988, nsIContent * 0x037cb0e0, nsIFrame * 0x02e227b8, nsIStyleContext * 0x02e22838, nsIFrame * 0x02e229e8) line 12990 + 21 bytes nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, const nsStyleDisplay * 0x02e22988, nsIContent * 0x037cb0e0, nsIFrame * 0x02e227b8, nsIStyleContext * 0x02e22838, nsFrameItems & {...}) line 6330 + 43 bytes nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, nsIContent * 0x037cb0e0, nsIFrame * 0x02e227b8, nsIAtom * 0x01b4bfd0, int 3, nsIStyleContext * 0x02e22838, nsFrameItems & {...}, int 0) line 7169 + 45 bytes nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, nsIContent * 0x037cb0e0, nsIFrame * 0x02e227b8, nsFrameItems & {...}) line 7034 + 56 bytes nsCSSFrameConstructor::ProcessChildren(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, nsIContent * 0x0383e140, nsIFrame * 0x02e227b8, int 1, nsFrameItems & {...}, int 1, nsTableCreator * 0x00000000) line 11894 + 66 bytes nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell * 0x03884070, nsIPresContext * 0x0383f4b0, nsFrameConstructorState & {...}, nsIContent * 0x0383e140, nsIFrame * 0x02e17b70, nsIStyleContext * 0x02e22610, nsIFrame * & 0x02e227b8) line 3379 nsCSSFrameConstructor::ReconstructDocElementHierarchy(nsCSSFrameConstructor * const 0x03884420, nsIPresContext * 0x0383f4b0) line 7286 + 63 bytes StyleSetImpl::ReconstructDocElementHierarchy(StyleSetImpl * const 0x038844f0, nsIPresContext * 0x0383f4b0) line 1407 PresShell::ReconstructFrames() line 5218 + 41 bytes PresShell::StyleSheetDisabledStateChanged(PresShell * const 0x03884078, nsIDocument * 0x0383c070, nsIStyleSheet * 0x038fe8a0, int 0) line 5257 nsDocument::SetStyleSheetDisabledState(nsIStyleSheet * 0x038fe8a0, int 0) line 1436 nsHTMLEditor::ApplyDocumentOrOverrideStyleSheet(const nsAString & {...}, int 1, nsICSSStyleSheet * * 0x033b895c) line 3316 nsHTMLEditor::ApplyOverrideStyleSheet(nsHTMLEditor * const 0x0389c8a4, const nsAString & {...}, nsICSSStyleSheet * * 0x033b895c) line 3250 nsEditorShell::SetDisplayMode(nsEditorShell * const 0x033b8920, int 1) line 1439 + 76 bytes nsEditorShell::PrepareDocumentForEditing(nsIDOMWindow * 0x033e3aa4, nsIURI * 0x03827b20) line 586 and a crash when using Messenger Composer (once when starting a mail message from a Composer window that had a background image applied; a 2nd time when closing message Composer and answering "No" to "Save this message" query [The Composer window from which I launched mail didn't have a background image]): RuleValue::~RuleValue() line 295 + 15 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes RuleValue::~RuleValue() line 296 + 31 bytes RuleValue::`scalar deleting destructor'(unsigned int 1) + 15 bytes DeleteValue(nsHashKey * 0x045faa70, void * 0x045faab0, void * 0x00000000) line 394 + 28 bytes _hashEnumerate(PLHashEntry * 0x045faa30, int 0, void * 0x0012d118) line 198 + 26 bytes PL_HashTableEnumerateEntries(PLHashTable * 0x04612f78, int (PLHashEntry *, int, void *)* 0x1002c1b0 _hashEnumerate(PLHashEntry *, int, void *), void * 0x0012d118) line 429 + 15 bytes nsHashtable::Enumerate(int (nsHashKey *, void *, void *)* 0x021c8120 DeleteValue(nsHashKey *, void *, void *), void * 0x00000000) line 361 + 21 bytes RuleHash::~RuleHash() line 436 RuleCascadeData::~RuleCascadeData() line 688 + 40 bytes RuleCascadeData::`scalar deleting destructor'(unsigned int 1) + 15 bytes CSSRuleProcessor::ClearRuleCascades(CSSRuleProcessor * const 0x04614320) line 4201 + 28 bytes CSSRuleProcessor::~CSSRuleProcessor() line 3170 CSSRuleProcessor::`scalar deleting destructor'(unsigned int 1) + 15 bytes CSSRuleProcessor::Release(CSSRuleProcessor * const 0x04614320) line 3173 + 154 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x046011c0) line 600 + 54 bytes nsSupportsArray::DeleteArray() line 304 nsSupportsArray::~nsSupportsArray() line 147 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x046011c0) line 238 + 133 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 491 StyleSetImpl::~StyleSetImpl() line 361 + 66 bytes StyleSetImpl::`scalar deleting destructor'(unsigned int 1) + 15 bytes StyleSetImpl::Release(StyleSetImpl * const 0x0459b760) line 364 + 157 bytes nsCOMPtr<nsIStyleSet>::assign_assuming_AddRef(nsIStyleSet * 0x00000000) line 473 nsCOMPtr<nsIStyleSet>::assign_with_AddRef(nsISupports * 0x00000000) line 965 nsCOMPtr<nsIStyleSet>::operator=(nsIStyleSet * 0x00000000) line 585 PresShell::Destroy(PresShell * const 0x0459b290) line 1710 DocumentViewerImpl::Destroy(DocumentViewerImpl * const 0x04595100) line 1335 nsDocShell::Destroy(nsDocShell * const 0x0411e0f4) line 2478 nsWebShell::Destroy(nsWebShell * const 0x0411e0f4) line 1462 nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame() line 703 nsHTMLFrameInnerFrame::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsFrame::Destroy(nsFrame * const 0x02e8635c, nsIPresContext * 0x03409670) line 467 + 34 bytes nsFrameList::DestroyFrames(nsIPresContext * 0x03409670) line 131 nsContainerFrame::Destroy(nsContainerFrame * const 0x02e8631c, nsIPresContext * 0x03409670) line 140 nsFrameList::DestroyFrames(nsIPresContext * 0x03409670) line 131 nsContainerFrame::Destroy(nsContainerFrame * const 0x02e40ed4, nsIPresContext * 0x03409670) line 140
=> 1.0
Target Milestone: mozilla0.9.8 → mozilla1.0
Moving to future. P2
Priority: -- → P2
Target Milestone: mozilla1.0 → Future
QA Contact: sujay → editor
This bug is not dead?
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: daniel → nobody
Severity: normal → S3

This does not affect to Firefox users, so lowering the priority.

Priority: P3 → P5

This issue was about Editor Composer APP, which is different from the current scope of the DOM:Editor component.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: