[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:40:21 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 95a3f6f13ffeeb02691542bcf875e0ae10db1745
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue May 18 20:20:40 2004 +0000

            Reviewed by Hyatt
    
            Removed support for designMode attribute, which we will not be supporting for Tiger.
            Removed inEditMode from KHTMLPart. This cached designMode value.
            Removed KHTMLPart::isEditingAtNode function. Asking a node if it is content-editable
            is a suitable replacement.
    
            * khtml/dom/dom_misc.h: Remove TristateFlag enum that was used to track designMode values.
            * khtml/dom/html_document.cpp: Remove designMode and setDesignMode.
            * khtml/dom/html_document.h: Ditto.
            * khtml/ecma/kjs_html.cpp:
            (KJS::HTMLDocument::tryGet): Remove designMode.
            (KJS::HTMLDocument::putValue): Ditto.
            * khtml/ecma/kjs_html.lut.h:
            (KJS::): Ditto.
            * khtml/html/html_documentimpl.cpp: Remove designMode and setDesignMode.
            * khtml/html/html_documentimpl.h: Ditto.
            * khtml/khtml_part.cpp: Remove setEditMode, editMode, inEditMode, and isEditingAtNode.
            * khtml/khtml_part.h: Ditto.
            * khtml/khtmlpart_p.h: Remove m_inEditMode variable.
            (KHTMLPartPrivate::KHTMLPartPrivate):
            * khtml/khtmlview.cpp:
            (KHTMLView::focusNextPrevNode): Change over one use in tree of isEditingAtNode to use
            isContentEditable instead. isContentEditable will be modified in future patch to handle
            whether the per-part switch has been thrown to override whether something is editable or not.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 60c5dfa..50ac39a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,31 @@
+2004-05-18  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Hyatt
+
+        Removed support for designMode attribute, which we will not be supporting for Tiger.
+        Removed inEditMode from KHTMLPart. This cached designMode value.
+        Removed KHTMLPart::isEditingAtNode function. Asking a node if it is content-editable
+        is a suitable replacement.
+
+        * khtml/dom/dom_misc.h: Remove TristateFlag enum that was used to track designMode values.
+        * khtml/dom/html_document.cpp: Remove designMode and setDesignMode.
+        * khtml/dom/html_document.h: Ditto.
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLDocument::tryGet): Remove designMode.
+        (KJS::HTMLDocument::putValue): Ditto.
+        * khtml/ecma/kjs_html.lut.h:
+        (KJS::): Ditto.
+        * khtml/html/html_documentimpl.cpp: Remove designMode and setDesignMode.
+        * khtml/html/html_documentimpl.h: Ditto.
+        * khtml/khtml_part.cpp: Remove setEditMode, editMode, inEditMode, and isEditingAtNode.
+        * khtml/khtml_part.h: Ditto.
+        * khtml/khtmlpart_p.h: Remove m_inEditMode variable.
+        (KHTMLPartPrivate::KHTMLPartPrivate):
+        * khtml/khtmlview.cpp:
+        (KHTMLView::focusNextPrevNode): Change over one use in tree of isEditingAtNode to use
+        isContentEditable instead. isContentEditable will be modified in future patch to handle
+        whether the per-part switch has been thrown to override whether something is editable or not.
+
 2004-05-17  Richard Williamson   <rjw at apple.com>
 
 	Implemented new API for WebScriptObject.
diff --git a/WebCore/khtml/dom/dom_misc.h b/WebCore/khtml/dom/dom_misc.h
index b598e5a..9ebb003 100644
--- a/WebCore/khtml/dom/dom_misc.h
+++ b/WebCore/khtml/dom/dom_misc.h
@@ -53,8 +53,6 @@ protected:
     unsigned int _ref;
 };
 
-enum TristateFlag { FlagNone, FlagEnabled, FlagDisabled };
-
 }; // namespace
 
 #endif
diff --git a/WebCore/khtml/dom/html_document.cpp b/WebCore/khtml/dom/html_document.cpp
index 30ccc44..d97c258 100644
--- a/WebCore/khtml/dom/html_document.cpp
+++ b/WebCore/khtml/dom/html_document.cpp
@@ -236,16 +236,3 @@ NodeList HTMLDocument::getElementsByName( const DOMString &elementName )
     if(!impl) return 0;
     return new NameNodeListImpl(impl, elementName);
 }
-
-DOMString HTMLDocument::designMode() const
-{
-    if(!impl) return "inherit";
-    return ((HTMLDocumentImpl *)impl)->designMode();
-}
-
-void HTMLDocument::setDesignMode(const DOMString &s)
-{
-    if(impl)
-        ((HTMLDocumentImpl *)impl)->setDesignMode(s);
-}
-
diff --git a/WebCore/khtml/dom/html_document.h b/WebCore/khtml/dom/html_document.h
index 9da69e6..81c7841 100644
--- a/WebCore/khtml/dom/html_document.h
+++ b/WebCore/khtml/dom/html_document.h
@@ -293,9 +293,6 @@ public:
      */
     HTMLCollection all() const;
 
-    DOMString designMode() const;
-    void setDesignMode(const DOMString &);
-
 };
 
 }; //namespace
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index a01f81c..727df6e 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -122,7 +122,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
 const ClassInfo KJS::HTMLDocument::info =
   { "HTMLDocument", &DOMDocument::info, &HTMLDocumentTable, 0 };
 /* Source for HTMLDocumentTable. Use "make hashtables" to regenerate.
- at begin HTMLDocumentTable 32
+ at begin HTMLDocumentTable 30
   title			HTMLDocument::Title		DontDelete
   referrer		HTMLDocument::Referrer		DontDelete|ReadOnly
   domain		HTMLDocument::Domain		DontDelete
@@ -159,7 +159,6 @@ const ClassInfo KJS::HTMLDocument::info =
   height		HTMLDocument::Height		DontDelete|ReadOnly
   width			HTMLDocument::Width		DontDelete|ReadOnly
   dir			HTMLDocument::Dir		DontDelete
-  designMode            HTMLDocument::DesignMode        DontDelete
 #potentially obsolete array properties
 # layers
 # plugins
@@ -248,8 +247,6 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
     case CaptureEvents:
     case ReleaseEvents:
       return lookupOrCreateFunction<HTMLDocFunction>( exec, propertyName, this, entry->value, entry->params, entry->attr );
-    case DesignMode:
-        return String(doc.designMode());
     }
   }
   // Look for overrides
@@ -429,9 +426,6 @@ void KJS::HTMLDocument::putValue(ExecState *exec, int token, const Value& value,
   case Dir:
     body.setDir(value.toString(exec).string());
     break;
-  case DesignMode:
-    doc.setDesignMode(value.toString(exec).string());
-    break;
   default:
     kdWarning() << "HTMLDocument::putValue unhandled token " << token << endl;
   }
diff --git a/WebCore/khtml/ecma/kjs_html.lut.h b/WebCore/khtml/ecma/kjs_html.lut.h
index 29a74ca..2945565 100644
--- a/WebCore/khtml/ecma/kjs_html.lut.h
+++ b/WebCore/khtml/ecma/kjs_html.lut.h
@@ -3,51 +3,48 @@
 namespace KJS {
 
 const struct HashEntry HTMLDocumentTableEntries[] = {
-   { "width", HTMLDocument::Width, DontDelete|ReadOnly, 0, 0 },
-   { "links", HTMLDocument::Links, DontDelete|ReadOnly, 0, 0 },
-   { "title", HTMLDocument::Title, DontDelete, 0, 0 },
-   { "vlinkColor", HTMLDocument::VlinkColor, DontDelete, 0, 0 },
-   { 0, 0, 0, 0, 0 },
-   { "writeln", HTMLDocument::WriteLn, DontDelete|Function, 1, 0 },
+   { "images", HTMLDocument::Images, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[31] },
    { 0, 0, 0, 0, 0 },
-   { "forms", HTMLDocument::Forms, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[34] },
-   { "scripts", HTMLDocument::Scripts, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[38] },
-   { "captureEvents", HTMLDocument::CaptureEvents, DontDelete|Function, 0, 0 },
-   { 0, 0, 0, 0, 0 },
-   { "write", HTMLDocument::Write, DontDelete|Function, 1, 0 },
-   { "fgColor", HTMLDocument::FgColor, DontDelete, 0, 0 },
-   { "linkColor", HTMLDocument::LinkColor, DontDelete, 0, 0 },
-   { "body", HTMLDocument::Body, DontDelete, 0, &HTMLDocumentTableEntries[33] },
+   { "domain", HTMLDocument::Domain, DontDelete, 0, 0 },
+   { "URL", HTMLDocument::URL, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[37] },
+   { "cookie", HTMLDocument::Cookie, DontDelete, 0, &HTMLDocumentTableEntries[38] },
+   { "links", HTMLDocument::Links, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[33] },
+   { "title", HTMLDocument::Title, DontDelete, 0, 0 },
+   { "lastModified", HTMLDocument::LastModified, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
+   { "clear", HTMLDocument::Clear, DontDelete|Function, 0, &HTMLDocumentTableEntries[36] },
+   { "body", HTMLDocument::Body, DontDelete, 0, 0 },
+   { "applets", HTMLDocument::Applets, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[30] },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { "open", HTMLDocument::Open, DontDelete|Function, 0, 0 },
-   { "URL", HTMLDocument::URL, DontDelete|ReadOnly, 0, 0 },
+   { "write", HTMLDocument::Write, DontDelete|Function, 1, 0 },
+   { "releaseEvents", HTMLDocument::ReleaseEvents, DontDelete|Function, 0, 0 },
+   { "location", HTMLDocument::Location, DontDelete, 0, 0 },
+   { "alinkColor", HTMLDocument::AlinkColor, DontDelete, 0, 0 },
+   { "dir", HTMLDocument::Dir, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "lastModified", HTMLDocument::LastModified, DontDelete|ReadOnly, 0, 0 },
-   { "images", HTMLDocument::Images, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[35] },
+   { "referrer", HTMLDocument::Referrer, DontDelete|ReadOnly, 0, 0 },
+   { "bgColor", HTMLDocument::BgColor, DontDelete, 0, 0 },
+   { "writeln", HTMLDocument::WriteLn, DontDelete|Function, 1, 0 },
+   { "close", HTMLDocument::Close, DontDelete|Function, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "domain", HTMLDocument::Domain, DontDelete, 0, 0 },
-   { "location", HTMLDocument::Location, DontDelete, 0, &HTMLDocumentTableEntries[32] },
-   { "cookie", HTMLDocument::Cookie, DontDelete, 0, 0 },
+   { "scripts", HTMLDocument::Scripts, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[34] },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "referrer", HTMLDocument::Referrer, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "dir", HTMLDocument::Dir, DontDelete, 0, &HTMLDocumentTableEntries[41] },
-   { "applets", HTMLDocument::Applets, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[36] },
-   { "anchors", HTMLDocument::Anchors, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[39] },
-   { "clear", HTMLDocument::Clear, DontDelete|Function, 0, 0 },
-   { "close", HTMLDocument::Close, DontDelete|Function, 0, &HTMLDocumentTableEntries[37] },
-   { "getElementsByName", HTMLDocument::GetElementsByName, DontDelete|Function, 1, &HTMLDocumentTableEntries[40] },
-   { "releaseEvents", HTMLDocument::ReleaseEvents, DontDelete|Function, 0, 0 },
-   { "bgColor", HTMLDocument::BgColor, DontDelete, 0, 0 },
-   { "alinkColor", HTMLDocument::AlinkColor, DontDelete, 0, 0 },
+   { "forms", HTMLDocument::Forms, DontDelete|ReadOnly, 0, &HTMLDocumentTableEntries[32] },
+   { "anchors", HTMLDocument::Anchors, DontDelete|ReadOnly, 0, 0 },
+   { "getElementsByName", HTMLDocument::GetElementsByName, DontDelete|Function, 1, &HTMLDocumentTableEntries[35] },
+   { "captureEvents", HTMLDocument::CaptureEvents, DontDelete|Function, 0, 0 },
+   { "fgColor", HTMLDocument::FgColor, DontDelete, 0, 0 },
+   { "linkColor", HTMLDocument::LinkColor, DontDelete, 0, 0 },
+   { "vlinkColor", HTMLDocument::VlinkColor, DontDelete, 0, 0 },
    { "height", HTMLDocument::Height, DontDelete|ReadOnly, 0, 0 },
-   { "designMode", HTMLDocument::DesignMode, DontDelete, 0, 0 }
+   { "width", HTMLDocument::Width, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable HTMLDocumentTable = { 2, 42, HTMLDocumentTableEntries, 32 };
+const struct HashTable HTMLDocumentTable = { 2, 39, HTMLDocumentTableEntries, 30 };
 
 } // namespace
 
diff --git a/WebCore/khtml/html/html_documentimpl.cpp b/WebCore/khtml/html/html_documentimpl.cpp
index eeebfac..e184dd5 100644
--- a/WebCore/khtml/html/html_documentimpl.cpp
+++ b/WebCore/khtml/html/html_documentimpl.cpp
@@ -244,34 +244,6 @@ Tokenizer *HTMLDocumentImpl::createTokenizer()
 // not part of the DOM
 // --------------------------------------------------------------------------
 
-DOMString HTMLDocumentImpl::designMode() const
-{
-    TristateFlag editMode = KWQ(view()->part())->editMode();
-    // Note: case for return values intentionally matches WinIE
-    switch (editMode) {
-        default:
-        case FlagNone:
-            return "Inherit";
-        case FlagEnabled:
-            return "On";
-        case FlagDisabled:
-            return "Off";
-    }
-}
-
-void HTMLDocumentImpl::setDesignMode(const DOMString &s)
-{
-    if ( strcasecmp( s, "on" ) == 0 ) {
-        KWQ(view()->part())->setEditMode(FlagEnabled);
-    }
-    else if (strcasecmp(s, "off") == 0) {
-        KWQ(view()->part())->setEditMode(FlagDisabled);
-    }
-    else if (strcasecmp(s, "inherit") == 0 || s.isNull()) {
-        KWQ(view()->part())->setEditMode(FlagNone);
-    }
-}
-
 bool HTMLDocumentImpl::childAllowed( NodeImpl *newChild )
 {
     // ### support comments. etc as a child
diff --git a/WebCore/khtml/html/html_documentimpl.h b/WebCore/khtml/html/html_documentimpl.h
index 8ec22f1..2925d21 100644
--- a/WebCore/khtml/html/html_documentimpl.h
+++ b/WebCore/khtml/html/html_documentimpl.h
@@ -54,9 +54,6 @@ public:
     void setPolicyBaseURL(const DOMString &s) { m_policyBaseURL = s; }
 #endif
 
-    DOMString designMode() const;
-    void setDesignMode(const DOMString &);
-
     void setBody(HTMLElementImpl *_body, int& exceptioncode);
 
     virtual khtml::Tokenizer *createTokenizer();
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index afb036a..b755cf8 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2148,30 +2148,6 @@ void KHTMLPart::setOnlyLocalReferences(bool enable)
   d->m_onlyLocalReferences = enable;
 }
 
-void KHTMLPart::setEditMode(TristateFlag flag)
-{
-    d->m_inEditMode = flag;
-}
-
-TristateFlag KHTMLPart::editMode() const
-{ 
-    if (d->m_inEditMode != FlagNone)
-        return d->m_inEditMode == FlagEnabled ? FlagEnabled : FlagDisabled;
-    
-    KHTMLPart *part = parentPart();
-    while (part) {
-        if (part->d->m_inEditMode != FlagNone)
-            return part->d->m_inEditMode == FlagEnabled ? FlagEnabled : FlagDisabled;
-        part = part->parentPart();
-    }
-    return FlagNone;
-}
-
-bool KHTMLPart::inEditMode() const
-{
-    return editMode() == FlagEnabled;
-}
-
 #if !APPLE_CHANGES
 
 void KHTMLPart::findTextBegin(NodeImpl *startNode, int startPos)
@@ -4699,7 +4675,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 		d->m_selection.state() == Selection::RANGE &&
         d->m_textElement == Selection::CHARACTER) {
             Selection selection;
-            if (isEditingAtNode(d->m_selection.base().node()))
+            if (d->m_selection.base().node()->isContentEditable())
                 selection.moveTo(d->m_selection.base().node()->positionForCoordinates(event->x(), event->y()));
             setSelection(selection);
 	}
@@ -4911,14 +4887,6 @@ void KHTMLPart::selectAll()
   setSelection(selection);
 }
 
-bool KHTMLPart::isEditingAtNode(const NodeImpl *node) const
-{
-    if (inEditMode())
-        return true;
-    
-    return node && node->isContentEditable();
-}
-
 EditCommand KHTMLPart::lastEditCommand()
 {
     return d->m_lastEditCommand;
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index a7faf59..a68481b 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -64,8 +64,6 @@ namespace DOM
   class Selection;
 }
 
-using DOM::TristateFlag;
-
 namespace khtml
 {
   class CachedObject;
@@ -362,10 +360,6 @@ public:
    **/
   bool onlyLocalReferences() const;
 
-  void setEditMode(TristateFlag enable);
-  TristateFlag editMode() const;
-  bool inEditMode() const;
-
 #ifndef KDE_NO_COMPAT
   void enableJScript(bool e) { setJScriptEnabled(e); }
   void enableJava(bool e) { setJavaEnabled(e); }
@@ -635,11 +629,6 @@ public:
   void selectAll();
 
   /**
-   * Returns whether editing is enabled at the given node.
-   */
-  bool isEditingAtNode(const DOM::NodeImpl *) const;
-
-  /**
    * Returns the most recent edit command applied.
    */
   khtml::EditCommand lastEditCommand();
diff --git a/WebCore/khtml/khtmlpart_p.h b/WebCore/khtml/khtmlpart_p.h
index bb4d65f..f07f071 100644
--- a/WebCore/khtml/khtmlpart_p.h
+++ b/WebCore/khtml/khtmlpart_p.h
@@ -152,7 +152,6 @@ public:
     m_bPluginsOverride = false;
     m_onlyLocalReferences = false;
 
-    m_inEditMode = DOM::FlagNone;
     m_caretBlinkTimer = 0;
     m_caretVisible = true;
     m_caretBlinks = true;
@@ -188,7 +187,6 @@ public:
             m_ssl_in_use = part->d->m_ssl_in_use;
 #endif
             m_onlyLocalReferences = part->d->m_onlyLocalReferences;
-            m_inEditMode = part->d->m_inEditMode;
             m_zoomFactor = part->d->m_zoomFactor;
         }
     }
@@ -368,7 +366,6 @@ public:
   bool m_bSecurityInQuestion:1;
   bool m_focusNodeRestored:1;
 
-  TristateFlag m_inEditMode;
   khtml::EditCommand m_lastEditCommand;
   int m_xPosForVerticalArrowNavigation;
 
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 2745a35..48337b5 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -1283,7 +1283,7 @@ void KHTMLView::focusNextPrevNode(bool next)
     else {
         // EDIT FIXME: if it's an editable element, activate the caret
         // otherwise, hide it
-        if (!m_part->inEditMode() && newFocusNode->renderer()->isEditable()) {
+        if (newFocusNode->isContentEditable()) {
             // make caret visible
         } 
         else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list