Closed
Bug 333922
Opened 19 years ago
Closed 19 years ago
Setting designMode doesn't work with enhanced privileges on a frame with a different domain
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
Details
(Keywords: fixed1.8.1, testcase)
Attachments
(3 files, 1 obsolete file)
2.03 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
sicking
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
663 bytes,
text/html
|
Details | |
1.94 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
See upcoming testcase.
I've used
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
for it, so I was hoping I could set designMode for documents at a different domain.
However, that doesn't work currently.
Assignee | ||
Comment 1•19 years ago
|
||
Assignee | ||
Comment 2•19 years ago
|
||
This fixes it for me.
Not sure if this is enough.
I got a js error message some time before with this patch, but now I'm not seeing that js error message anymore.
Currently undo is not working anymore, so I have something screwed up.
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 218358 [details] [diff] [review]
patch
Ok, tested this again.
It doesn't cause any problems mentioned in comment 2.
It doesn't solve this bug, though.
But it is necessary to solve the regression as mentioned in bug 197305, comment 7.
I've tested that this makes it at least possible for chrome code to set designMode.
Attachment #218358 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•19 years ago
|
||
I probably should morph this bug into the more general problem that with UniversalBrowserWrite privileges, you still aren't allowed to access window/document properties from other domains.
Assignee | ||
Comment 5•19 years ago
|
||
Ah, sorry, I just need to do netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite"); for it to work, so there is no 'general problem' as mentioned in comment 4.
Status: NEW → ASSIGNED
Assignee | ||
Updated•19 years ago
|
Assignee: mozeditor → martijn.martijn
Status: ASSIGNED → NEW
Assignee | ||
Comment 6•19 years ago
|
||
This is a correct testcase, using netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite");
Attachment #218355 -
Attachment is obsolete: true
![]() |
||
Comment 7•19 years ago
|
||
Comment on attachment 218358 [details] [diff] [review]
patch
Makes sense. Thanks for fixing this!
r+sr=bzbarsky
Attachment #218358 -
Flags: superreview+
Attachment #218358 -
Flags: review?(bzbarsky)
Attachment #218358 -
Flags: review+
Assignee | ||
Comment 8•19 years ago
|
||
Checking in content/html/document/src/nsHTMLDocument.cpp;
/cvsroot/mozilla/content/html/document/src/nsHTMLDocument.cpp,v <-- nsHTMLDocu
ment.cpp
new revision: 3.682; previous revision: 3.681
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•19 years ago
|
||
Comment on attachment 218358 [details] [diff] [review]
patch
Brendan asked approval for the patch in bug 197305, in that case, this bug needs also be approved.
Attachment #218358 -
Flags: approval-branch-1.8.1?(bugmail)
Attachment #218358 -
Flags: approval-branch-1.8.1?(bugmail) → approval-branch-1.8.1+
![]() |
||
Comment 10•19 years ago
|
||
This is going to need some merging to land on branch...
Flags: blocking1.8.1?
Assignee | ||
Comment 11•19 years ago
|
||
Ok, this is a combined patch for this bug and for bug 197305.
It is a bit different from the original patch on trunk, because NodePrincipal() does't exist on 1.8.1 branch.
Boris already took a look on it, but just to be sure, I'm asking review on him. I've checked that this fixes the two bugs.
Attachment #226413 -
Flags: review?(bzbarsky)
![]() |
||
Comment 12•19 years ago
|
||
Comment on attachment 226413 [details] [diff] [review]
1.8.1 branch patch
Yeah, looks great
Attachment #226413 -
Flags: superreview+
Attachment #226413 -
Flags: review?(bzbarsky)
Attachment #226413 -
Flags: review+
Assignee | ||
Comment 13•19 years ago
|
||
Checking in nsHTMLDocument.cpp;
/cvsroot/mozilla/content/html/document/src/nsHTMLDocument.cpp,v <-- nsHTMLDocu
ment.cpp
new revision: 3.615.2.20; previous revision: 3.615.2.19
done
Fixed on 1.8.1 branch.
Keywords: fixed1.8.1
![]() |
||
Updated•19 years ago
|
Flags: blocking1.8.1?
You need to log in
before you can comment on or make changes to this bug.
Description
•