RESOLVED FIXED 22056
Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt
https://bugs.webkit.org/show_bug.cgi?id=22056
Summary Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt
Holger Freyther
Reported 2008-11-03 14:47:19 PST
Currently we need to copy and paste code from the windows port to get fixes, sometimes a port lags behind... Change it by sharing the implementation.
Attachments
Define the Color::transparent in the cpp file to fix link errors (1.96 KB, patch)
2008-11-03 14:50 PST, Holger Freyther
no flags
Move recursively setting a background color and toggling transparency to the FrameView (2.72 KB, patch)
2008-11-03 14:51 PST, Holger Freyther
no flags
Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt (14.39 KB, patch)
2008-11-03 14:54 PST, Holger Freyther
no flags
Kill FrameLoaderClient.cpp and move the code to Frame (13.30 KB, patch)
2008-11-18 08:08 PST, Holger Freyther
hausmann: review+
Holger Freyther
Comment 1 2008-11-03 14:50:45 PST
Created attachment 24868 [details] Define the Color::transparent in the cpp file to fix link errors Link fix required to use Color::transparent from within WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp. Some how my gcc only inlines that or such, any comment to find the real cause to resolve my link error would be welcome.
Holger Freyther
Comment 2 2008-11-03 14:51:58 PST
Created attachment 24869 [details] Move recursively setting a background color and toggling transparency to the FrameView Move the code from WebFrame to WebCore::FrameView to be able to use from the Gtk+ and the Qt build.
Holger Freyther
Comment 3 2008-11-03 14:54:10 PST
Created attachment 24870 [details] Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt Create a FrameLoaderClient.cpp and provide a helper function to implement transitionToCommittedForNewPage in a cross port way. The mac port can not be switched to this implementation but this copy reduction is helping both the Qt and Gtk+ port.
Darin Adler
Comment 4 2008-11-09 10:15:35 PST
Comment on attachment 24868 [details] Define the Color::transparent in the cpp file to fix link errors This change isn't right. We do need to define these in the .cpp file; it was an error to have definitions in the header only. But the values should stay in the .h file. This is how C++ static const data members work. I'll land a corrected version.
Darin Adler
Comment 5 2008-11-09 10:22:12 PST
(In reply to comment #1) > Define the Color::transparent in the cpp file to fix link errors Landed in http://trac.webkit.org/changeset/38242
Holger Freyther
Comment 6 2008-11-15 16:17:06 PST
Comment on attachment 24868 [details] Define the Color::transparent in the cpp file to fix link errors Clearing review as Darin landed a patch which is using static const as of the various C++ FAQs.
Holger Freyther
Comment 7 2008-11-15 16:18:33 PST
The Share FrameLoaderClient::tra... patch has two build failures on Qt. One in qwebpage.cpp (calling a removed method) one in FrameLoaderClientQt.cpp (not declaring a variable name). I would fix it before landing the patch, the spirit/substance is still the same.
Simon Hausmann
Comment 8 2008-11-17 07:27:56 PST
Comment on attachment 24869 [details] Move recursively setting a background color and toggling transparency to the FrameView > +++ b/WebCore/page/FrameView.h > @@ -101,6 +101,7 @@ public: > > Color baseBackgroundColor() const; > void setBaseBackgroundColor(Color); > + void updateBackgroundRecursively(const Color&, bool); My feeling is that the second argument should have a name. But that's a minor detail. Otherwise the patch looks good.
Simon Hausmann
Comment 9 2008-11-17 07:53:42 PST
Comment on attachment 24870 [details] Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt Nice cleanup! > + FrameView* frameView; > + if (isMainFrame) { > + frameView = new FrameView(frame, size); > + } else Minor coding style issue with the braces there. r+ and please fix the braces when landing :)
Alexey Proskuryakov
Comment 10 2008-11-18 04:59:44 PST
I think it's a little sad that we now have code (even if a static function) in an interface class, which FrameLoaderClient is.
Holger Freyther
Comment 11 2008-11-18 08:06:29 PST
Comment on attachment 24869 [details] Move recursively setting a background color and toggling transparency to the FrameView Clear review, it got landed.
Holger Freyther
Comment 12 2008-11-18 08:06:47 PST
Comment on attachment 24870 [details] Share FrameLoaderClient::transitionToCommittedForNewPage between Win/Gtk+/Qt Clear review.
Holger Freyther
Comment 13 2008-11-18 08:08:46 PST
Created attachment 25236 [details] Kill FrameLoaderClient.cpp and move the code to Frame As suggested by Maciej, move the code to Frame. I picked the name createView.
Holger Freyther
Comment 14 2009-01-30 17:57:54 PST
Landed in r40435.
Note You need to log in before you can comment on or make changes to this bug.