Last Comment Bug 158457 - Transformation of Universal MathML Stylesheet doesn't complete
: Transformation of Universal MathML Stylesheet doesn't complete
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: XSLT (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking) No longer reading bugmail consistently
: Keith Visco
: Andrew Overholt [:overholt]
Mentors:
http://www.w3.org/Math/testsuite/test...
: 161087 173034 174353 187502 (view as bug list)
Depends on:
Blocks: 184159 205778
  Show dependency treegraph
 
Reported: 2002-07-20 01:25 PDT by rbs
Modified: 2003-05-21 08:01 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase with pmathml.xsl (bug here) (234 bytes, application/xhtml+xml)
2002-07-20 01:32 PDT, rbs
no flags Details
testcase with mathml.xsl (no bug here) (231 bytes, application/xhtml+xml)
2002-07-20 01:34 PDT, rbs
no flags Details
patch to fix (7.03 KB, patch)
2002-10-19 04:03 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
peterv: superreview+
Details | Diff | Splinter Review
sync to tip and set the refferer (7.02 KB, patch)
2002-10-21 15:52 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
harishd: review+
Details | Diff | Splinter Review
fix harishs comment (7.34 KB, patch)
2002-10-21 17:14 PDT, Jonas Sicking (:sicking) No longer reading bugmail consistently
jonas: review+
jonas: superreview+
asa: approval+
Details | Diff | Splinter Review
pmathml.xsl with <script> (18.52 KB, text/xml)
2002-11-22 16:19 PST, rbs
no flags Details
pmathml.xsl with <SCRIPT> (18.52 KB, text/xml)
2002-11-22 16:21 PST, rbs
no flags Details
testcase that uses pmathml.xsl with <script> (bug here) (523 bytes, text/xml)
2002-11-22 16:24 PST, rbs
no flags Details
testcase that uses pmathml.xsl with <SCRIPT> (no bug here) (544 bytes, text/xml)
2002-11-22 16:38 PST, rbs
no flags Details

Description rbs 2002-07-20 01:25:51 PDT
With the first testcase which invokes "pmathml.xsl", the transfromation never
completes, and so "Hello to pmathml.xsl" is never displayed on the page.
I used a printf() in nsXSLContentSink::DidBuildModel() and it didn't show up.
This means onTransformDone() is never called.

With the second testcase which invokes "mathml.xsl", the transformation completes
successfully. The paradox to note is that "mathml.xsl" is including "pmathml.xsl"
as can seen with the view-source protocol here (copy the full "v-s:URL" into the
URL bar to see the syntax-higlighted source of the XSLT stylesheet):
view-source:http://www.w3.org/Math/XSL/mathml.xsl
view-source:http://www.w3.org/Math/XSL/pmathml.xsl

First testcase with pmathml.xsl (bug here)
==========================================
<?xml-stylesheet type="text/xsl"
                 href="http://www.w3.org/Math/XSL/pmathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>pmathml.xsl</title></head>
<body>
Hello to pmathml.xsl
</body>
</html>

Second testcase with mathml.xsl (no bug here)
=============================================
<?xml-stylesheet type="text/xsl"
                 href="http://www.w3.org/Math/XSL/mathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>mathml.xsl</title></head>
<body>
Hello to mathml.xsl
</body>
</html>

I will attach these testcases. 

During testing, note that the title of the window is set properly in either
case, but the content area isn't updated in the the first testcase due to the
fact that the transformation is not completing as I mentioned above.
Comment 1 rbs 2002-07-20 01:32:21 PDT
Created attachment 92086 [details]
testcase with pmathml.xsl (bug here)
Comment 2 rbs 2002-07-20 01:34:10 PDT
Created attachment 92087 [details]
testcase with mathml.xsl (no bug here)
Comment 3 Peter Van der Beken [:peterv] 2002-07-20 08:04:21 PDT
This seems to have something to do with scriptloading. It looks like we're
blocking the parser for a script load in the stylesheet but never unblock it.
Reassigning to sicking for now.
Comment 4 rbs 2002-07-23 11:31:10 PDT
Nominating for 1.0.1 and 1.1 since this bug is an impediment to using all
flavors of the Universal MathML stylesheet.
Comment 5 rbs 2002-08-23 16:21:17 PDT
sicking, perhaps this bug might be fixed by what you said in bug 132844 comment 22?
Comment 6 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-08-23 18:04:04 PDT
no, that shouldn't affect this. I think it whould be fixed if we didn't create
nsHTMLScriptElements for <script>s in the stylesheet document (which we
shouldn't do anyway). However I need to do some reshuffeling in the contentsink
to be able to do that. I will hopefully get time to look at this really soon
Comment 7 Axel Hecht 2002-08-26 09:30:23 PDT
note that a 
<meta content="0;URL=../{/redirect/url}.{$ext}" http-equiv="Refresh"/>
with a xhtml namespace triggers a redirect from the stylesheet, so it doesn't
matter if the meta actually makes it into the content, or if there are AVTs to
be applied.
Comment 8 David Carlisle 2002-09-18 16:50:54 PDT
The test cases that have been attatched refer to the public copy of
pmathml.xsl at w3c.org
Note I am about to update that copy to use <SCRIPT rather than <script
so that enables the stylesheet to work again in mozilla1.1 and NS 1.0
(note the old code worked in mozilla 1.0 and NS 7 pre-release)

so this is to note that the test cases should refer to local copies of the 
stylesheet that use <script otherwise they will no longer demonstrate the 
problem.

The <script in question is not activated at all in mozilla it is in conditional 
code only used in IE (the page still does not display if you surround the 
<script> element with <xsl:if test="false()">...
Comment 9 rbs 2002-09-23 02:07:13 PDT
*** Bug 161087 has been marked as a duplicate of this bug. ***
Comment 10 Axel Hecht 2002-10-14 12:29:48 PDT
*** Bug 174353 has been marked as a duplicate of this bug. ***
Comment 11 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-19 04:03:01 PDT
Created attachment 103446 [details] [diff] [review]
patch to fix

The problem was that the XSL sink unregistered itself as nsIScriptLoadObserver,
this caused us to not get the neccesary notification leaving the parser
blocked. Note that we need to get (and do get if we are an observer) this
notification even if the scriptloader is disabled.

So the fix is to simply remove the line that unregisters ourself and it should
work. However that was way too easy :), so the patch does the following:

* Cleaning up the initialization of stylesheet loading in the xml-contentsink
by
  making it properly call nsIDocument::StartDocumentLoad.
* Rely on the fix from bug 172372 to stop stylesheet and script loads.
* Remove the manual disabling of stylesheet and script loads in the
  xsl-contentsink.

(obsoleting the testcases since they no longer work)
Comment 12 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-19 04:04:20 PDT
as always when i'm attaching patches at this hour there are some quirks in them.
Ignore the empty files please, they are part of other fixes
Comment 13 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-19 04:18:16 PDT
*** Bug 173034 has been marked as a duplicate of this bug. ***
Comment 14 Peter Van der Beken [:peterv] 2002-10-21 06:52:31 PDT
Comment on attachment 103446 [details] [diff] [review]
patch to fix

sr=peterv. While you're tweaking things in there you might want to set the
referrer on the channel for the stylesheet (see the comment just below your
change in nsXMLContentSink.cpp).
Comment 15 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-21 15:52:17 PDT
Created attachment 103632 [details] [diff] [review]
sync to tip and set the refferer

fixes petervs comment and sync the patch to the tip
Comment 16 harishd 2002-10-21 16:43:50 PDT
Comment on attachment 103632 [details] [diff] [review]
sync to tip and set the refferer

> 
>   nsCOMPtr<nsIChannel> channel;
>   rv = NS_NewChannel(getter_AddRefs(channel), aUrl);
>   if (NS_FAILED(rv)) return rv;
> 
>+  nsCOMPtr<nsILoadGroup> loadGroup;
>+  rv = mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
>+  NS_ENSURE_SUCCESS(rv, rv);
>+
>+  channel->SetLoadGroup(loadGroup);
>+

Nit: Can't you delay the channel creation until a load group is available?
Comment 17 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-21 17:14:57 PDT
Created attachment 103646 [details] [diff] [review]
fix harishs comment
Comment 18 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-21 18:50:18 PDT
Comment on attachment 103646 [details] [diff] [review]
fix harishs comment

moving forward reviews
Comment 19 Asa Dotzler [:asa] 2002-10-22 12:25:30 PDT
Comment on attachment 103646 [details] [diff] [review]
fix harishs comment

a=asa for checkin to 1.2 (on behalf of drivers)
Comment 20 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-22 16:21:22 PDT
fix checked in
Comment 21 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-10-22 16:22:50 PDT
wrong button :)
Comment 22 rbs 2002-11-22 16:16:49 PST
Re-opening, I am still experiencing the bug.
Comment 23 rbs 2002-11-22 16:19:48 PST
Created attachment 107189 [details]
pmathml.xsl with <script>
Comment 24 rbs 2002-11-22 16:21:37 PST
Created attachment 107190 [details]
pmathml.xsl with <SCRIPT>
Comment 25 rbs 2002-11-22 16:24:40 PST
Created attachment 107191 [details]
testcase that uses pmathml.xsl with <script> (bug here)
Comment 26 rbs 2002-11-22 16:38:51 PST
Created attachment 107194 [details]
testcase that uses pmathml.xsl with <SCRIPT> (no bug here)

I have set the background color of the working testcase to green. To clearly
see the bug, click on either of the testcases, and then go and then go forward.

The working testcase (with its green background color) will appear properly,
whereas the other one (with its white background color) is still not rendered.
Comment 27 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-12-07 18:22:15 PST
*** Bug 184159 has been marked as a duplicate of this bug. ***
Comment 28 Max Alekseyev 2002-12-07 18:34:59 PST
Adding URL from bug 184159
OS: Windows -> All
Shouldn't severity be increased due to browser hang?
Comment 29 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-12-07 18:54:52 PST
Still don't fully understand why this wasn't fixed by my last checkin (i do
think it fixed my local testcase i had). However this should be fixed now along
with bug 169124
Comment 30 Boris Zbarsky [:bz] (still a bit busy) 2002-12-07 18:57:51 PST
The url in the URL field hangs build 2002-11-07-21, but not 2002-11-06-22 on
Linux.. anything in that range look suspicious?
Comment 31 Boris Zbarsky [:bz] (still a bit busy) 2002-12-07 18:59:27 PST
Sorry, man.  Look at the build date in bug 184159.  And I'm using 2002-12-04-22
on Linux and hanging... (169124 was checked in on the second).
Comment 32 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-12-07 19:04:48 PST
looks like bug 184159 is something different, this one is fixed.
Comment 33 Jonas Sicking (:sicking) No longer reading bugmail consistently 2002-12-09 22:20:37 PST
regarding my comment 29. The reason why this wasn't fixed by my first patch
didn't fix attachment 107191 [details] is that that stylesheet contains <script
for="...">. Normal scripts got fixed, but the for-attribute still messed up
things. They still do when they are in an included stylesheet, which is what bug
184159 is about.
Comment 34 Brant Gurganus 2003-01-02 22:39:15 PST
*** Bug 187502 has been marked as a duplicate of this bug. ***
Comment 35 Axel Hecht 2003-05-21 08:01:11 PDT
mass verifying

Note You need to log in before you can comment on or make changes to this bug.