mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef: Update due to underlying chromium changes.
- Printing fix was committed as Chromium rev 23338, so the patches are no longer required. - Add a patch for plugin loading support that was broken in Chromium rev 23501. - NPAPI::PluginList static methods are replaced with methods provided by the singleton instance. - WebPreferences now has an Apply() method. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@35 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
Index: public/WebFrame.h
|
||||
===================================================================
|
||||
--- public/WebFrame.h (revision 23266)
|
||||
+++ public/WebFrame.h (working copy)
|
||||
@@ -332,6 +332,11 @@
|
||||
// given page size.
|
||||
virtual int printBegin(const WebSize& pageSize) = 0;
|
||||
|
||||
+ // Returns the page shrinking factor calculated by webkit (usually
|
||||
+ // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or
|
||||
+ // not in printing mode.
|
||||
+ virtual float getPrintPageShrink(int page) = 0;
|
||||
+
|
||||
// Prints one page, and returns the calculated page shrinking factor
|
||||
// (usually between 1/1.25 and 1/2). Returns 0 if the page number is
|
||||
// invalid or not in printing mode.
|
@@ -1,33 +0,0 @@
|
||||
Index: webframe_impl.cc
|
||||
===================================================================
|
||||
--- webframe_impl.cc (revision 23266)
|
||||
+++ webframe_impl.cc (working copy)
|
||||
@@ -1045,6 +1045,16 @@
|
||||
return print_context_->pageCount();
|
||||
}
|
||||
|
||||
+float WebFrameImpl::getPrintPageShrink(int page) {
|
||||
+ // Ensure correct state.
|
||||
+ if (!print_context_.get() || page < 0) {
|
||||
+ NOTREACHED();
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return print_context_->getPageShrink(page);
|
||||
+}
|
||||
+
|
||||
float WebFrameImpl::printPage(int page, WebCanvas* canvas) {
|
||||
// Ensure correct state.
|
||||
if (!print_context_.get() || page < 0 || !frame() || !frame()->document()) {
|
||||
Index: webframe_impl.h
|
||||
===================================================================
|
||||
--- webframe_impl.h (revision 23266)
|
||||
+++ webframe_impl.h (working copy)
|
||||
@@ -147,6 +147,7 @@
|
||||
virtual WebKit::WebString selectionAsMarkup() const;
|
||||
virtual int printBegin(const WebKit::WebSize& page_size);
|
||||
virtual float printPage(int page_to_print, WebKit::WebCanvas* canvas);
|
||||
+ virtual float getPrintPageShrink(int page);
|
||||
virtual void printEnd();
|
||||
virtual bool find(
|
||||
int identifier, const WebKit::WebString& search_text,
|
37
patch/patches/webkit_glue_plugins.patch
Normal file
37
patch/patches/webkit_glue_plugins.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
Index: plugin_list.cc
|
||||
===================================================================
|
||||
--- plugin_list.cc (revision 23814)
|
||||
+++ plugin_list.cc (working copy)
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
void PluginList::RegisterInternalPlugin(const PluginVersionInfo& info) {
|
||||
AutoLock lock(lock_);
|
||||
- internal_plugins_.push_back(info);
|
||||
+ internal_plugins_.insert(internal_plugins_.begin(), info);
|
||||
}
|
||||
|
||||
bool PluginList::ReadPluginInfo(const FilePath &filename,
|
||||
Index: plugin_list_win.cc
|
||||
===================================================================
|
||||
--- plugin_list_win.cc (revision 23814)
|
||||
+++ plugin_list_win.cc (working copy)
|
||||
@@ -356,10 +356,15 @@
|
||||
}
|
||||
|
||||
void PluginList::LoadInternalPlugins(std::vector<WebPluginInfo>* plugins) {
|
||||
- if (!use_internal_activex_shim_)
|
||||
- return;
|
||||
- LoadPlugin(FilePath(kActiveXShimFileName), plugins);
|
||||
- LoadPlugin(FilePath(kActiveXShimFileNameForMediaPlayer), plugins);
|
||||
+ for (size_t i = 0; i < internal_plugins_.size(); ++i) {
|
||||
+ if (!use_internal_activex_shim_ &&
|
||||
+ (internal_plugins_[i].path.value() == kActiveXShimFileName ||
|
||||
+ internal_plugins_[i].path.value() ==
|
||||
+ kActiveXShimFileNameForMediaPlayer)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ LoadPlugin(internal_plugins_[i].path, plugins);
|
||||
+ }
|
||||
}
|
||||
|
||||
} // namespace NPAPI
|
Reference in New Issue
Block a user