Closed Bug 295023 Opened 20 years ago Closed 19 years ago

XULRunner example app doesn't handle flat chrome

Categories

(Toolkit Graveyard :: XULRunner, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: WeirdAl, Assigned: asqueella)

Details

Attachments

(2 files)

I compiled XULRunner with my standard .mozconfig, which includes
--enable-chrome-format=flat.  I was mightily unimpressed by the results.

Basically, nothing renders in the window.

The first time through, I got a lot of messages from nsChromeProtocolHandler:
printf("Chrome file doesn't exist: %s\n", path.get());

path.get() included make-jars.pl...

The second time through (after rebuilding with jars and then switching back to
flat chrome building), I had warnings everywhere.  It looked like nothing in the
chrome:// protocol was working, including the string bundle for XML
well-formedness errors.

Steps to reproduce:
(1) Edit your .mozconfig for a fresh objdir and to add:
ac_add_options --enable-chrome-format=flat

(2) make -f client.mk build

(3) From the objdir:
./xulrunner ../xpi-stage/simple/application.ini

Expected Results:
Simple App renders.

Actual Results:
Unusable window.
Bug is still present, and I figured out why.

The chrome.manifest files are written for jarred chrome.  When I change:
http://lxr.mozilla.org/seamonkey/source/xulrunner/examples/simple/chrome.manifest

to contain:

content simple simple/content/simple/
locale simple en-US en-US/locale/en-US/simple/

Then the widget works.

This is a general problem with all the chrome.manifest files, I'm sure.

In JavaScript, if str were the contents of the file,
str.replace(/jar:(.*)\.jar!/g, "$1");
Oops.  I realized just now this applied only to the sample application.  The
generated files in dist/bin/chrome follow the right pattern.
Severity: normal → minor
Summary: XULRunner doesn't handle flat chrome → XULRunner example app doesn't handle flat chrome
Attached patch patch, v1Splinter Review
A one-line change to Makefile.in ensures the chrome is always jarred, and that
chrome.manifest will work.
Assignee: nobody → ajvincent
Status: NEW → ASSIGNED
Attachment #195105 - Flags: first-review?(benjamin)
Comment on attachment 195105 [details] [diff] [review]
patch, v1

Why don't we just support flat chrome? The only reason that we are
hand-generating the chrome.manifest right now is because we didn't have the
better jar.mn system.
If you wish.  :)  I personally don't care one way or the other; I don't know
what XULRunner does support.
Assignee: ajvincent → nobody
Status: ASSIGNED → NEW
Comment on attachment 195105 [details] [diff] [review]
patch, v1

If the chrome is registered from within jar.mn this problem goes away.
Attachment #195105 - Flags: first-review?(benjamin) → first-review-
Is this it? I'm not experienced with mozilla's build machinery.

I also dropped the last parts of "en-US(.jar)/locale/en-US/simple/" and "simple(.jar)/content/simple/" paths, since it is unnecessary for a simple example, which only has a single chrome provider of each type.
Assignee: nobody → asqueella
Status: NEW → ASSIGNED
Attachment #208141 - Flags: first-review?(benjamin)
Attachment #208141 - Flags: first-review?(benjamin) → first-review+
mozilla/xulrunner/examples/simple/Makefile.in; new revision: 1.9;
mozilla/xulrunner/examples/simple/chrome.manifest; new revision: delete;
mozilla/xulrunner/examples/simple/jar.mn; new revision: 1.3;
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha1
Version: unspecified → Trunk
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: