~ubuntu-branches/ubuntu/feisty/firefox/feisty-updates

« back to all changes in this revision

Viewing changes to content/xul/content/src/nsXULElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack
  • Date: 2008-06-23 15:08:12 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20080623150812-sxdwhn3dz9pmapvf
Tags: 2.0.0.15+0nobinonly-0ubuntu0.7.4
[ Alexander Sack ]
* New security/stability upstream release (v2.0.0.15)
  - see USN-619-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
 
594
594
    nsIContent *root = doc->GetRootContent();
595
595
    nsCOMPtr<nsIContent> content(do_QueryInterface(NS_STATIC_CAST(nsIStyledContent*, this)));
596
 
    if ((!root || root == content) && !mNodeInfo->Equals(nsXULAtoms::overlay)) {
597
 
        nsIScriptGlobalObject *global = doc->GetScriptGlobalObject();
598
 
 
 
596
 
 
597
    nsIScriptGlobalObject *global = doc->GetScriptGlobalObject();
 
598
    nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(global));
 
599
 
 
600
    if (window && window->IsInnerWindow() && (!root || root == content) &&
 
601
        !mNodeInfo->Equals(nsXULAtoms::overlay)) {
599
602
        nsCOMPtr<nsIDOMEventReceiver> receiver = do_QueryInterface(global);
600
603
        if (! receiver)
601
604
            return NS_ERROR_UNEXPECTED;
3690
3693
 
3691
3694
    // Use the enclosing document's principal
3692
3695
    // XXX is this right? or should we use the protodoc's?
 
3696
    // If we start using the protodoc's, make sure
 
3697
    // the DowngradePrincipalIfNeeded stuff in
 
3698
    // nsXULDocument::OnStreamComplete still works!
3693
3699
    nsIPrincipal *principal = aDocument->GetPrincipal();
3694
3700
    if (!principal)
3695
3701
        return NS_ERROR_FAILURE;