Closed Bug 135825 Opened 23 years ago Closed 23 years ago

No scrollbars in P3P summary window

Categories

(Core :: XSLT, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: hjtoi-bugzilla, Assigned: peterv)

References

Details

(Whiteboard: [ADT1] [ETA 04/26][fixed on trunk])

Attachments

(4 files, 7 obsolete files)

1. Go to www.msn.com (or any other site supporting P3P). 2. Open Page Info dialog, and go to Privacy tab. 3. Hit Summary button. Expected results: new window with scrollbars Actual results: no scrollbars present If you give focus to the window you can scroll with up/down keys. You need the patch from bug 124503 to test this.
Blocks: 124503
Keywords: nsbeta1+
Priority: -- → P1
Whiteboard: [ADT1]
Target Milestone: --- → mozilla1.0
Attached patch v1 (obsolete) — Splinter Review
Based on a patch by jst for bug 55334 to workaround bug 78070. You'll also need attachment 79249 [details] [diff] [review] from bug 56087.
Attached file Testcase - source
Attached file Testcase - style
The nsCOMPtr root conflicts with attachement 79249. I get the following assertion after scrolling a bit: ###!!! ASSERTION: different documents: 'oldAncestor == newAncestor', file /tmp/mozilla/content/events/src/nsEventStateManager.cpp, line 3474 ###!!! Break: at file /tmp/mozilla/content/events/src/nsEventStateManager.cpp, line 3474 jst says he doesn't know that one from his workaround, could someone ensure me that this ain't evil?
I saw that assertion, without peterv's patch, on regular HTML page going back/forward in history. I pulled & built today, applied peterv's patch (I needed to remove one line as patch did not work 100% correct, hopefully the patch was still ok... would be good to attach a new patch just in case), and I did not see any assertions using the testcase. I have not yet tested with P3P.
Comment on attachment 79253 [details] [diff] [review] v1 This is different than the hack in nsHTMLDocument in that it doesn't put the old root element back in the document once we're done resetting it. Whether or not we do that might not really matter (IIRC it really did matter in the nsHTMLDocument hack though), and if it doesn't, that's all nice n' good. But if we don't need to do that then I don't see why we can't just call SetRootContent(nsnull) on the document, that would end up doing the same thing that this "hack" does (although in different order), i.e. remove all children from the root content (once the root element is destroyed), you'll still need to call ContentRemoved(nsnull, root, 0) on the document though. Either way, as long as this fixes the problem I'm cool with it, it's safe n' all, so sr=jst, but you might be able to simplify this hack a bit in this case.
Attachment #79253 - Flags: superreview+
Oh, duh, with attachment 79249 [details] [diff] [review] from bug 56087 this is identical to the nsHTMLDocument hack. sr=jst
Attached patch v2 (obsolete) — Splinter Review
Do what jst said, it works too and is much simpler.
Attachment #79253 - Attachment is obsolete: true
Comment on attachment 79592 [details] [diff] [review] v2 Carrying forward sr=jst, patch was modified according to his first comments.
Attachment #79592 - Flags: superreview+
Attached patch v2.1 (obsolete) — Splinter Review
Address Pike's comment that we should use the loadgroup of the source document if available.
Attachment #79592 - Attachment is obsolete: true
Comment on attachment 79684 [details] [diff] [review] v2.1 Jst said he was fine with this change
Attachment #79684 - Flags: superreview+
Comment on attachment 79684 [details] [diff] [review] v2.1 Wrong patch
Attachment #79684 - Attachment is obsolete: true
Attached patch v2.1 (obsolete) — Splinter Review
Comment on attachment 79686 [details] [diff] [review] v2.1 Jst said he was fine with this change
Attachment #79686 - Flags: superreview+
Comment on attachment 79686 [details] [diff] [review] v2.1 one nit, make the nsresult result nsresult rv. r=axel@pike.org
Attachment #79686 - Flags: review+
When I apply this patch the summary page is completely blank!
I'm seeing the same thing. Turns out I had an additional patch to nsXMLHTPPRequest that makes this work correctly (and also fixes the "missing style" problem). I'll attach it now.
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
Attached patch Additional fix v1 (obsolete) — Splinter Review
Comment on attachment 80369 [details] [diff] [review] Additional fix v1 sr=jst
Attachment #80369 - Flags: superreview+
Comment on attachment 80369 [details] [diff] [review] Additional fix v1 This patch was written by Heikki (I think, Harish sent it to me). So r=peterv.
Attachment #80369 - Flags: review+
Please check the XMLHttpRequest patch with Mitch or someone who knows about security as well. Specifically, I am not sure if it should be GetOriginalURI() or GetURI(); what happens if there is a redirect? After testing I can confirm that I see the scrollbars, so that problem will be fixed. However, this introduces a new regression: clicking links in the summary window that point to anchors in the document is broken. I guess what is happening is that clicking the link makes us display the original P3P.xml untranformed, and we scroll in there to the anchor.
Also, inlined SCRIPTs are not executed.
Ok, I know what causes the problem for the links. We change the URL of the document, but not in the docshell, so the docshell thinks we're not scrolling but loading a document with a different URL. I'll need to figure out how to fix the style and scrollbars without regressing the scolling. :-(
Attached patch v3 (obsolete) — Splinter Review
Fixes scrollbars and scripts, scrolling to anchors still works.
Attachment #79686 - Attachment is obsolete: true
Attachment #80369 - Attachment is obsolete: true
Comment on attachment 80704 [details] [diff] [review] v3 >Index: mozilla/extensions/transformiix/source/xslt/XSLTProcessor.cpp <...> >+#include "nsIScriptGlobalObject.h" not needed. >- #ifdef PR_LOGGING >+#ifdef PR_LOGGING <..> >- #endif >+#endif why? The resulting iframe contains the right stuff, but it's completely black. I can't even see a scrollbar :-(. Not sure whos bug that is, though.
>>- #ifdef PR_LOGGING >>+#ifdef PR_LOGGING ><..> >>- #endif >>+#endif > >why? To be consistent with the rest of the code.
Attached patch v3.1 (obsolete) — Splinter Review
Need to always remove the processor as observer from the script loader now.
Attachment #80704 - Attachment is obsolete: true
Comment on attachment 80830 [details] [diff] [review] v3.1 r/sr=heikki Also regarding the move of #foo to the beginning of the line: I seem to recall that C or C++ spec stated those must start from the beginning of the line.
Attachment #80830 - Flags: superreview+
Attachment #80830 - Flags: review+
Comment on attachment 80830 [details] [diff] [review] v3.1 r=harishd
Attached patch v3.2Splinter Review
The previous code had a race condition :-(. mDocument could be set to null and then be used when an external script loaded after the transform had finished. Also, the loadgroup for the result document could be null when called from the content sink, in that case we should really use the input document's loadgroup. New patch coming up and apologies to the reviewers.
Attachment #80830 - Attachment is obsolete: true
adt1.0.0+ (on ADT's behalf) approval for checkin on the 1.0 branch, pending r/sr= on the new patch. Pls check this in today after getting drivers approval, then add the fixed1.0.0 keyword.
Keywords: adt1.0.0+
Comment on attachment 80890 [details] [diff] [review] v3.2 You need to move #include "nsIScriptLoader.h" to the header file to get this to compile on Windows and some other platforms. With that, sr=heikki
Attachment #80890 - Flags: superreview+
Comment on attachment 80890 [details] [diff] [review] v3.2 r=axel@pike.org with the moved include patch works, once you have jst's patch from bug 138012
Attachment #80890 - Flags: review+
Based on Axel Comment #34, should this bug be dependent on bug 138012, in addition to bug 56087?
Just to clarify, the fix for bug 138012 fixes the testcase attached in this bug. The P3P policy viewer is not affected by bug 138012. I'm not marking a dependency since this bug is originally about the P3P policy viewer.
Sent mail to drivers for checkin to the branch.
Whiteboard: [ADT1] → [ADT1] [ETA 04/26]
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [ADT1] [ETA 04/26] → [ADT1] [ETA 04/26][fixed on trunk]
Build: 2002-04-26-08-trunk(WIN), 2002-04-26-08-trunk(MAC 9.x/10.x), 2002-04-26-10-trunk(LINUX) We have scroll bars in Summary window. Marking Verified for TRUNK.
Status: RESOLVED → VERIFIED
QA Contact: keith → jimmylee
Keywords: fixed1.0.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: