[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kevino at webkit.org kevino at webkit.org
Wed Dec 22 11:34:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 79ca94b31d374a420a69609861d2f5e93b3b8680
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 29 16:55:32 2010 +0000

    [wx] Build fix, add file missing from DOM bindings commit.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 2195112..af7fcd7 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-29  Kevin Ollivier  <kevino at theolliviers.com>
+
+        [wx] Build fix, add file missing from DOM bindings commit.
+        
+        * WebEdit.cpp: Added.
+        (WebCore::):
+        (wxWebEditCommand::wxWebEditCommand):
+        (wxWebEditCommand::~wxWebEditCommand):
+        (wxWebEditCommand::SetNodeAttribute):
+        (wxWebEditCommand::Apply):
+
 2010-07-28  Kevin Ollivier  <kevino at theolliviers.com>
 
         [wx] wxPython build fix that was missed in last commit.
diff --git a/WebKit/wx/WebEdit.cpp b/WebKit/wx/WebEdit.cpp
new file mode 100644
index 0000000..ed2d0d4
--- /dev/null
+++ b/WebKit/wx/WebEdit.cpp
@@ -0,0 +1,65 @@
+
+
+#include "config.h"
+#include "WebEdit.h"
+
+#include "AtomicString.h"
+#include "CompositeEditCommand.h"
+#include "Document.h"
+#include "Frame.h"
+#include "HTMLNames.h"
+#include "QualifiedName.h"
+#include "StringImpl.h"
+
+#include "WebFrame.h"
+#include "WebDOMElement.h"
+
+namespace WebCore {
+
+class WebCoreEditCommand: public CompositeEditCommand
+{
+public:
+    WebCoreEditCommand(WebCore::Document* document)
+        : CompositeEditCommand(document)
+        { }
+        
+    void setElementAttribute(PassRefPtr<Element> element, const QualifiedName& attribute, const AtomicString& value) 
+    { 
+        setNodeAttribute(element, attribute, value); 
+    }
+    // composite commands are applied as they are added, so we don't
+    // need doApply to do anything.
+    virtual void doApply() {}
+};
+
+}
+
+wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe)
+{
+    if (webframe) {
+        WebCore::Frame* frame = webframe->GetFrame();
+        if (frame && frame->document())
+            m_impl = new WebCore::WebCoreEditCommand(frame->document());
+            m_impl->ref();
+    }
+}
+
+wxWebEditCommand::~wxWebEditCommand()
+{
+    // the impl. is ref-counted, so don't delete it as it may be in an undo/redo stack
+    if (m_impl)
+        m_impl->deref();
+    m_impl = 0;
+}
+
+void wxWebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value)
+{
+    if (m_impl)
+        m_impl->setElementAttribute(element->impl(), WebCore::QualifiedName(WebCore::nullAtom, WebCore::String(name), WebCore::nullAtom), WebCore::String(value));
+}
+
+void wxWebEditCommand::Apply()
+{
+    if (m_impl)
+        m_impl->apply();
+}
\ No newline at end of file

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list