Closed Bug 455725 Opened 11 years ago Closed 11 years ago

moz-border-image doesn't work in XUL elements inside of decks

Categories

(Core :: XUL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: davida, Assigned: dbaron)

References

Details

(Keywords: polish)

Attachments

(3 files, 3 obsolete files)

I've been fighting w/ -moz-border-image, trying to get it to work in XUL chrome in Thunderbird (we need nice, non-native buttons in chrome for the message reader, and it strikes me as a much, much simpler model than the alternative).

I've narrowed the problem down to some difference between Firefox and Thunderbird.  I have created a trivial extension, which I'll attach to this bug, which installs in both Firefox and Thunderbird, and in both cases adds a button to the main window chrome.  The button is styled using CSS which applies in both environments, but the moz-border-image doesn't have an effect in Thunderbird.  I'll attach a screenshot of that as well.

Note that Thunderbird _can_ render moz-border-image in content in an iframe, as can be verified by setting the "start page" URL to http://ejohn.org/files/border-image/iui/samples/music.html for example.

Any ideas?
Attached file thunderbird / firefox xul test file (obsolete) —
This is a single XUL test file that should style a button using the border-image.  This works in Firefox, but not in Thunderbird.  (note the image referenced is a remote image from resig)

./firefox -chrome thunderbirdOverlay.xul  (works)
./thunderbird -chrome thunderbirdOverlay.xul (doesn't work)
here's a screenshot of the xul file running
vlad: can you take a look at this test xul file inside Thunderbird

test file
https://bugzilla.mozilla.org/attachment.cgi?id=340024

screenshot comparison
https://bugzilla.mozilla.org/attachment.cgi?id=340025
What happens if you put the image into a data: URL?
Attached file thunderbird / firefox xul test file v2 (obsolete) —
Didn't work :(

v2 uses the data: uri scheme and produces the same results
Attachment #340024 - Attachment is obsolete: true
The attached test case helps narrow the problem.  moz-border-image fails if the element is inside a <deck> xul element.

It was affecting the thunderbird test cases because Thunderbird uses decks high up in its DOM.
Attachment #339077 - Attachment is obsolete: true
Attachment #340214 - Attachment is obsolete: true
(aside: bug 429817 was also affecting Thunderbird, but the patch there isn't enough to fix this problem.)
Component: General → XP Toolkit/Widgets: XUL
Product: Thunderbird → Core
QA Contact: general → xptoolkit.xul
Summary: moz-border-image doesn't work in XUL chrome in Thunderbird → moz-border-image doesn't work in XUL elements inside of decks
Did you test if things work if the <deck> is at coordinates (0,0) (top left)?

vlad, roc, Is there code in nsCSSRendering::DrawBorderImage that wouldn't work if we're inside a widget (which a deck creates)?
(In reply to comment #9)
> Did you test if things work if the <deck> is at coordinates (0,0) (top left)?
> 
> vlad, roc, Is there code in nsCSSRendering::DrawBorderImage that wouldn't work
> if we're inside a widget (which a deck creates)?

Hmm.. taking that testcase and nuking the first button, leaving just the deck, indeed shows a smeared thing over alf the button.  Looks like something may be incorrectly dealing with device offsets maybe?  Not sure if they're involved in child widgets, they shouldn't be.  DrawBorderImage really shouldn't be doing anything too crazy drawing-wise.
Adding status whiteboard so the Thunderbird 3 folks can track core bugs we need.  Adding wanted-1.9.1 nomination
Flags: wanted1.9.1?
Whiteboard: [tb3needs]
It wouldn't surprise me if this is related to bug 449647.
Depends on: 449647
Yeah, the patch I just stuck in bug 449647 fixes this.
Assignee: nobody → dbaron
Target Milestone: --- → mozilla1.9.1b2
Fixed by landing of bug 449647: http://hg.mozilla.org/mozilla-central/rev/a9f44a03b7d0
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [tb3needs]
Moving to Core:XUL per https://bugzilla.mozilla.org/show_bug.cgi?id=1455336
Component: XP Toolkit/Widgets: XUL → XUL
You need to log in before you can comment on or make changes to this bug.