[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml/ecma
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2008-07-08 3:35:04
Message-ID: 1215488104.092229.13346.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 829303 by ggarand:

make designMode property available from js


 M  +6 -0      kjs_html.cpp  
 M  +1 -1      kjs_html.h  


--- trunk/KDE/kdelibs/khtml/ecma/kjs_html.cpp #829302:829303
@@ -182,6 +182,7 @@
   width			HTMLDocument::Width		DontDelete|ReadOnly
   dir			HTMLDocument::Dir		DontDelete
   compatMode		HTMLDocument::CompatMode	DontDelete|ReadOnly
+  designMode            HTMLDocument::DesignMode        DontDelete
 #IE extension
   frames		HTMLDocument::Frames		DontDelete|ReadOnly
 #NS4 extension
@@ -389,6 +390,8 @@
     case CompatMode:
       return jsString(doc.parseMode()
               == DocumentImpl::Compat ? "BackCompat" : "CSS1Compat");
+    case DesignMode:
+        return jsString((doc.designMode() ? "on":"off"));
     case BgColor:
       return jsString(body->getAttribute(ATTR_BGCOLOR));
     case FgColor:
@@ -457,6 +460,9 @@
         Window::retrieveWindow(view->part())->goURL(exec, \
value->toString(exec).qstring(), false /*don't lock history*/);  return;
     }
+    case DesignMode:
+        doc.setDesignMode((value->toString(exec).qstring()=="on"));
+        break;  
   }
 
   /* The rest of the properties require a body. Note that Doc::body may be the
--- trunk/KDE/kdelibs/khtml/ecma/kjs_html.h #829302:829303
@@ -49,7 +49,7 @@
            Images, Applets, Links, Forms, Layers, Anchors, Scripts, All, Clear, \
                Open, Close,
            Write, WriteLn, GetElementsByName, GetSelection, CaptureEvents, \
                ReleaseEvents,
            BgColor, FgColor, AlinkColor, LinkColor, VlinkColor, LastModified,
-           Height, Width, Dir, Frames, CompatMode };
+           Height, Width, Dir, Frames, CompatMode, DesignMode };
     DOM::HTMLDocumentImpl* impl() const { return \
static_cast<DOM::HTMLDocumentImpl*>( m_impl.get() ); }  private:
     static JSValue *nameGetter(ExecState *exec, JSObject*, const Identifier& name, \
const PropertySlot& slot);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic