~ubuntu-branches/ubuntu/jaunty/kde4libs/jaunty-updates

« back to all changes in this revision

Viewing changes to khtml/ecma/kjs_dom.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-12-11 18:26:08 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20081211182608-tsu6p8ncbw1gnqxt
Tags: 4:4.1.85-0ubuntu1
* New upstream release
* Patches:
  + Removed 15_kfreebsd_support.diff from patches/series (doesn't apply and
    has no use for Ubuntu)
  + Redid 20_use_dejavu_as_default_font.diff
  + Completely removed kubuntu_09_fix_application_menu.diff (applied upstream)
  + Refreshed kubuntu_54_use_xdg_menu_prefix.diff
  + Dropped plasma/widgets/toolbutton.cpp from kubuntu_qt_ftbfs.diff (applied
    upstream)
  + Global quilt refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
980
980
    return getDOMStyleSheetList(exec, doc.styleSheets(), &doc);
981
981
  case DOMDocument::DefaultView: // DOM2
982
982
    {
983
 
    KHTMLView *view = doc.view();
984
 
    if (view)
985
 
        return Window::retrieve(view->part());
 
983
    KHTMLPart *part = doc.part();
 
984
    if (part)
 
985
        return Window::retrieve(part);
986
986
    return getDOMAbstractView(exec, doc.defaultView());
987
987
    }
988
988
  case PreferredStylesheetSet:
991
991
    return jsString(doc.selectedStylesheetSet());
992
992
  case ReadyState:
993
993
    {
994
 
    if ( doc.view() )
 
994
    if ( KHTMLPart* part = doc.part() )
995
995
    {
996
 
      KHTMLPart* part = doc.view()->part();
997
 
      if ( part ) {
998
 
        if (part->d->m_bComplete) return jsString("complete");
 
996
        if (part->d->m_bComplete) return jsString("complete");
999
997
        if (doc.parsing()) return jsString("loading");
1000
998
        return jsString("loaded");
1001
999
        // What does the interactive value mean ?
1002
1000
        // Missing support for "uninitialized"
1003
 
      }
1004
1001
    }
1005
1002
    return jsUndefined();
1006
1003
    }
1696
1693
  // Check to see if the currently executing interpreter is allowed to access the specified node
1697
1694
  if (!n)
1698
1695
    return true;
1699
 
  KHTMLView *view = n->document()->view();
1700
 
  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
 
1696
  KHTMLPart* part = n->document()->part();
 
1697
  Window* win = part ? Window::retrieveWindow(part) : 0L;
1701
1698
  if ( !win || !win->isSafeScript(exec) )
1702
1699
    return false;
1703
1700
  return true;