Diff
Modified: trunk/Source/WebKit/wx/ChangeLog (106089 => 106090)
--- trunk/Source/WebKit/wx/ChangeLog 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/ChangeLog 2012-01-27 07:02:18 UTC (rev 106090)
@@ -1,3 +1,25 @@
+2012-01-26 Kevin Ollivier <kev...@theolliviers.com>
+
+ [wx] Unreviewed.
+ Build fixes after UndoStep and ChromeClient changes.
+
+ * WebFrame.cpp:
+ (wxWebFrame::RunScript):
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore):
+ (WebCore::ChromeClientWx::hasOpenedPopup):
+ * WebKitSupport/ChromeClientWx.h:
+ (ChromeClientWx):
+ * WebKitSupport/EditorClientWx.cpp:
+ (WebCore::EditorClientWx::registerUndoStep):
+ (WebCore::EditorClientWx::registerRedoStep):
+ (WebCore::EditorClientWx::undo):
+ (WebCore::EditorClientWx::redo):
+ * WebKitSupport/EditorClientWx.h:
+ (EditorClientWx):
+ * WebViewPrivate.h:
+ (WebViewPrivate):
+
2011-12-16 Ryosuke Niwa <rn...@webkit.org>
Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
Modified: trunk/Source/WebKit/wx/WebFrame.cpp (106089 => 106090)
--- trunk/Source/WebKit/wx/WebFrame.cpp 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebFrame.cpp 2012-01-27 07:02:18 UTC (rev 106090)
@@ -384,8 +384,10 @@
wxASSERT_MSG(jsEnabled, wxT("RunScript requires _javascript_ to be enabled."));
if (jsEnabled) {
JSC::JSValue result = controller->executeScript(_javascript_, true).jsValue();
- if (result)
- returnValue = wxString(result.toString(m_impl->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec()).utf8().data(), wxConvUTF8);
+ if (result) {
+ JSC::ExecState* exec = m_impl->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec();
+ returnValue = wxString(result.toString(exec)->value(exec).utf8().data(), wxConvUTF8);
+ }
}
}
}
Modified: trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp (106089 => 106090)
--- trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp 2012-01-27 07:02:18 UTC (rev 106090)
@@ -490,5 +490,11 @@
{
return adoptRef(new SearchPopupMenuWx(client));
}
+
+bool ChromeClientWx::hasOpenedPopup() const
+{
+ notImplemented();
+ return false;
+}
}
Modified: trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h (106089 => 106090)
--- trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h 2012-01-27 07:02:18 UTC (rev 106090)
@@ -151,6 +151,8 @@
virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
virtual void numWheelEventHandlersChanged(unsigned) { }
+
+ virtual bool hasOpenedPopup() const;
private:
wxWebView* m_webView;
Modified: trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp (106089 => 106090)
--- trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp 2012-01-27 07:02:18 UTC (rev 106090)
@@ -276,27 +276,25 @@
notImplemented();
}
-void EditorClientWx::registerUndoStep(PassRefPtr<EditCommand> command)
+void EditorClientWx::registerUndoStep(PassRefPtr<UndoStep> step)
{
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
- if (webKitWin) {
- webKitWin->m_impl->undoStack.append(EditCommandWx(command));
- }
+ if (webKitWin)
+ webKitWin->m_impl->undoStack.append(step);
}
}
-void EditorClientWx::registerRedoStep(PassRefPtr<EditCommand> command)
+void EditorClientWx::registerRedoStep(PassRefPtr<UndoStep> step)
{
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
- if (webKitWin) {
- webKitWin->m_impl->redoStack.insert(0, EditCommandWx(command));
- }
+ if (webKitWin)
+ webKitWin->m_impl->redoStack.append(step);
}
}
@@ -356,8 +354,8 @@
if (frame) {
wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
- webKitWin->m_impl->undoStack.last().editCommand()->unapply();
- webKitWin->m_impl->undoStack.removeLast();
+ webKitWin->m_impl->undoStack.last()->unapply();
+ webKitWin->m_impl->undoStack.remove(--webKitWin->m_impl->undoStack.end());
}
}
}
@@ -369,8 +367,8 @@
if (frame) {
wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
- webKitWin->m_impl->redoStack.last().editCommand()->reapply();
- webKitWin->m_impl->redoStack.removeLast();
+ webKitWin->m_impl->redoStack.last()->reapply();
+ webKitWin->m_impl->redoStack.remove(--webKitWin->m_impl->redoStack.end());
}
}
}
Modified: trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.h (106089 => 106090)
--- trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.h 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.h 2012-01-27 07:02:18 UTC (rev 106090)
@@ -77,8 +77,8 @@
virtual void didWriteSelectionToPasteboard();
virtual void didSetSelectionTypesForPasteboard();
- virtual void registerUndoStep(PassRefPtr<EditCommand>);
- virtual void registerRedoStep(PassRefPtr<EditCommand>);
+ virtual void registerUndoStep(PassRefPtr<UndoStep>);
+ virtual void registerRedoStep(PassRefPtr<UndoStep>);
virtual void clearUndoRedoOperations();
virtual bool canCopyCut(Frame*, bool defaultValue) const;
Modified: trunk/Source/WebKit/wx/WebViewPrivate.h (106089 => 106090)
--- trunk/Source/WebKit/wx/WebViewPrivate.h 2012-01-27 06:28:38 UTC (rev 106089)
+++ trunk/Source/WebKit/wx/WebViewPrivate.h 2012-01-27 07:02:18 UTC (rev 106090)
@@ -30,10 +30,10 @@
#define WXWEBVIEWPRIVATE_H
#include "config.h"
-#include "EditCommand.h"
-#include "EditCommandWx.h"
+#include "UndoStep.h"
#include "Page.h"
-#include "wtf/Vector.h"
+#include "wtf/Deque.h"
+#include "wtf/RefPtr.h"
#include <wx/timer.h>
@@ -49,8 +49,8 @@
wxTimer tripleClickTimer;
wxPoint tripleClickPos;
- WTF::Vector<EditCommandWx> undoStack;
- WTF::Vector<EditCommandWx> redoStack;
+ WTF::Deque<WTF::RefPtr<WebCore::UndoStep> > undoStack;
+ WTF::Deque<WTF::RefPtr<WebCore::UndoStep> > redoStack;
};
#endif