summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
Commit message (Collapse)AuthorAgeFilesLines
* Push the native canvas into the plugin implementation. On Windows, this meansbrettw@chromium.org2009-10-232-133/+61
| | | | | | | | | | | | | | | using SkCanvas instead of an HDC. This way, the pepper implementation can use the more advanced blending of SkCanvas and avoid the Windows API. I did some refactoring in the standard plugin implementation to support this and make it as clean as I could. Hopefully the code is slightly clearer than before. TEST=none BUG=none Review URL: http://codereview.chromium.org/306027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29897 0039d316-1c4b-4281-b951-d872f2087c98
* Potential fix for the PluginChannel::CleanUp crash. This will go out on ↵jam@chromium.org2009-10-221-2/+6
| | | | | | | | | | | tomorrow's dev channel build and we can see if the crashes go away while I try to write a repro. The only scenario that I can think of is that an NPObject in the plugin process has a deallocate function which releases an npobject from the renderer. That would cause the corresponding NPObjectProxy to go away, but since PluginChannel has in_remove_route_ set, the list won't get updated and in the future iteration of the loop we'll call the method on a deleted object. BUG=25439 Review URL: http://codereview.chromium.org/327003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29839 0039d316-1c4b-4281-b951-d872f2087c98
* Invoke the right method (invokeDefault) if a plugin calls NPN_InvokeDefault ↵jam@chromium.org2009-10-151-1/+5
| | | | | | | | | on its own object. BUG=5110 Review URL: http://codereview.chromium.org/282010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29200 0039d316-1c4b-4281-b951-d872f2087c98
* Move native_widget_types and gtk_native_view_id_manager from base/gfx tobrettw@chromium.org2009-10-113-7/+7
| | | | | | | | | | | | app/gfx in preparation for removing the base_gfx project. This also moves base/window_impl.cc to app/win/window_impl because this file shouldn't be in base. TEST=none BUG=none Review URL: http://codereview.chromium.org/273017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28691 0039d316-1c4b-4281-b951-d872f2087c98
* Move classes depending on Skia out of base/gfx and into app/gfx. Renamebrettw@chromium.org2009-10-071-5/+2
| | | | | | | | | | native_theme to native_theme_win since its Windows-specific. BUG=none TEST=none Review URL: http://codereview.chromium.org/259047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28300 0039d316-1c4b-4281-b951-d872f2087c98
* Fix double delete in NPObjectStub that I introduced.jam@chromium.org2009-10-061-1/+3
| | | | | | | | TBR=ananta BUG=23713, 23706 Review URL: http://codereview.chromium.org/251105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28147 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scripting during NPP_Destroy. Note that if the plugin is making a call ↵jam@chromium.org2009-10-065-32/+37
| | | | | | | | | | to the renderer so this instance is in the callstack, destruction will have to be asynchronous and so scripting still won't work. This change also fixes use of PluginChannel after it's deleted (if this was the last instance). BUG=23713, 23706 TEST=added ui test Review URL: http://codereview.chromium.org/258026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28141 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Free the loaded sandbox test module library.jhawkins@chromium.org2009-10-021-1/+2
| | | | | | | | | CID=778 BUG=none TEST=none Review URL: http://codereview.chromium.org/255044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27855 0039d316-1c4b-4281-b951-d872f2087c98
* Fix several issues around fullscreen Mac plugins:amanda@chromium.org2009-10-012-0/+52
| | | | | | | | | | * Keystrokes are now properly sent to plugins in fullscreen mode * When a plugin creates a fullscreen window, we hide the menu bar and restore it when the window is closed BUG=19534,21020 TEST=Open a page with plugins that can go full screen (example: flash video players). Enter full screen mode and verify that esc, arrow keys, spacebar, etc. work as expected. Verify that the menu bar is hidden when the plugin goes fullscreen and is restored when it exits fullscreen mode. Review URL: http://codereview.chromium.org/257008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27755 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of the need for cross process events in order to get plugin ↵jam@chromium.org2009-09-2914-121/+226
| | | | | | | | | | processes to run nested message loops when a dialog is shown. Instead use an async message that's broadcast from the renderer to all plugin processes that are connected to it, and which is dispatched on the plugin IO thread to set a process-local waitable event. This fixes showModalDialog on Linux/Mac. BUG=15891 TEST=covered by UI tests, undef's them for POSIX Review URL: http://codereview.chromium.org/242043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27456 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the deadlock when Flash tries to make WMP full screen. This is a ↵jam@chromium.org2009-09-173-6/+29
| | | | | | | | | one-off solution that detects this case and returns the reply to the sync message before calling WMP. I don't think this is a generic problem, since we haven't seen it before, and the generic solutions have too many side-effects. BUG=15985 Review URL: http://codereview.chromium.org/210004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26521 0039d316-1c4b-4281-b951-d872f2087c98
* Gears File Drag Dropmichaeln@google.com2009-09-166-21/+31
| | | | | | | | | | | | | | | | | r24899 now keys the child security policy database based on renderer id, rather than renderer process id. Update gears drag drop to use the renderer id for the file policy access checks. This is a clone for submission of of noel's original CL http://codereview.chromium.org/195079 BUG=7995 Review URL: http://codereview.chromium.org/196145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26397 0039d316-1c4b-4281-b951-d872f2087c98
* This changelist fixes some issues with the NPAPI WMP plugin work in Chrome. ↵jam@chromium.org2009-09-044-41/+22
| | | | | | | | | | | | The first is that we need to disable windowless mode since it doesn't work in the NPAPI plugin (Safari does this as well, and sites don't use windowless for Firefox). The second is to make UpdateGeometry message synchronous for WMP. The problem I saw was that while handling that message, the plugin might disaptch a NPObject Invoke method to play a video, which WMP doesn't expect and it leads to the video never playing. While touching these files, I made some small cleanup by reverting the change that made WebPluginProxy not have a WebPluginDelegateImpl pointer, which added a bunch of unnecessary methods to WebPluginDelegate. BUG=20259 TEST=use --no-activex and try playing the videos on http://www.nana10.co.il/Section/?SectionID=10847&sid=235 Review URL: http://codereview.chromium.org/196012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25433 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust color spaces so that Mac Chrome renders colors properly.amanda@chromium.org2009-09-031-4/+5
| | | | | | | | | | | BUG=19951,20552 TEST=compare pages rendered in Chromium and Safari. They should appear the same. mark: review jrg/brettw: FYI Review URL: http://codereview.chromium.org/194013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25380 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate remaining WebCore dependencies from webplugin_impl.ccdarin@chromium.org2009-09-024-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces WebPluginPageDelegate to hold the methods that only existed on WebViewDelegate to allow WebPluginImpl to talk to the RenderView. This enables us to eliminate those methods from WebViewDelegate, which eliminates the last dependency on gfx/ native_widget_types.h in our WebKit interface! WebViewDelegate grows a CreatePlugin method that returns a WebKit::WebPlugin. It loses its CreatePluginDelegate method, which now lives on WebPluginPageDelegate. This change makes RenderView use WeakPtr when it hands itself to each WebPluginDelegateProxy and WebPluginImpl instance. This makes the memory management simpler. This change also moves various WebPlugin* interfaces defined in webkit/glue into the webkit_glue namespace. This was to help reduce confusion with similarly named types in the WebKit namespace. WebKit::WebPluginParams is added to contain the set of parameters used to construct a plugin. WebPluginContainer gets a couple more methods to allow us to avoid WebCore dependencies in WebPluginImpl. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/181014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25184 0039d316-1c4b-4281-b951-d872f2087c98
* linux: disable querying the page window for windowless pluginspiman@chromium.org2009-08-311-2/+6
| | | | | | | | | | | | | | The problem is that the XID of the page window can change at arbitrary times (e.g. when the tab is detached then reattached), so we need to be able to track these changes, and let the PluginInstance know. BUG=17110 TEST=go to www.nvidia.com, detach then reattach the tab, move the mouse, verify no crash Review URL: http://codereview.chromium.org/180019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24916 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the RenderProcessHost.PID function that returns the OS-generatedbrettw@chromium.org2009-08-313-11/+13
| | | | | | | | | | | | | | | | | | | | process ID with an internally-generated id() function. This allows us the guarantee that the IDs are unique over the entire run of the application. This also cleans up some code associated with managing the PID. The main potentially interesting change is now the PID is set uniquely for every creation of RenderProcessHost. It used to be set cleared if the process went away, and re-set if the process was re-created. The ID generation is in ChildProcesInfo so it is also unique between workers and plugins. I had to change some significant things in resource_dispatcher_host_unittest to take into account this new generation of IDs. BUG=17828 TEST=none Review URL: http://codereview.chromium.org/160203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-2/+2
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-2/+2
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* More refactoring for WebPlugin.darin@chromium.org2009-08-272-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL eliminates direct calls to WebPluginDelegate::DidFinishLoadWithReason from WebFrameLoaderClient. This CL also moves WebDataSourceImpl into webkit/api/src. That change was needed so that WebPluginContainerImpl can add a WebPluginLoadObserver to it, which WebFrameLoaderClient uses to communicate back to the WebPlugin upon completion of the frame load. WebViewDelegate::DidFinishLoadWithReason is modified to include url and notify_data parameters, eliminating the URLRequestRouted method. This is done so that we can support overlapping NPN_GetURLNotify targetting different frames. WebPluginContainer grows an executeScriptURL method to deal with javascript: URLs. NOTE: I'm working on some UI tests to better cover the case of overlapping NPN_GetURLNotify calls. R=jam BUG=10036 TEST=none yet Review URL: http://codereview.chromium.org/174514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24655 0039d316-1c4b-4281-b951-d872f2087c98
* Fix invalidates from off-screen plugins on the Mac.stuartmorgan@chromium.org2009-08-271-2/+12
| | | | | | | | | BUG=20234 TEST=Flash plugins that start offscreen should look correct when scrolled into view. Review URL: http://codereview.chromium.org/173552 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24621 0039d316-1c4b-4281-b951-d872f2087c98
* linux: new socket/plug code for windowed pluginspiman@chromium.org2009-08-252-62/+1
| | | | | | | | | | | | | | | | | | | | | | | | This CL reworks the GtkSocket/GtkPlug code for windowed plugins on linux. Instead of having the plugin ask the browser to create a socket to plug into, it simply creates a plug and sends it to the browser. The browser creates a socket and attaches the plug when the socket becomes realized This fixes 2 main issues: - we can create windowed plugins in background tabs (Issue 16125) - we can detach tabs with windowed plugins and reattach them (Issue 17110) I reworked the IPCs, so it removes some amount of linux-specific things. We also need less synchronous IPCs to create/destroy plugins, so that should be a bit faster. In particular, I removed the plugin pid map, and instead made sure the renderer always destroys the plugin containers if the plugin process crashes - they will be destroyed if the renderer process crashes. Let me know if you have an issue with that. Also, the intermediate plug/socket creation now happens in webplugin_delegate_impl_gtk. That means test_shell uses it as well. It made the code a lot simpler, and means we're testing it as well, albeit with a bit of extra overhead. Bonus: I found a big bad bug in the GtkPluginContainer that made its width/height alias with some internal gtk structures. That was certainly causing some amounts of bugs. Bonus 2: scrolling now looks more in sync with the rest of the page, though I'm not exactly sure which part caused that. BUG=16125,17110 TEST=a lot of manual testing involving YouTube videos Review URL: http://codereview.chromium.org/174295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24309 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 24266 - This CL ensures that plugins always peek in the context of ↵ananta@chromium.org2009-08-251-19/+0
| | | | | | | | | | | | | | | | | | | | | outgoing sync calls. I will be watching the reliability test runs closely for any crashes which creep in due to reentrancies into plugins caused by this CL. This fixes bug http://code.google.com/p/chromium/issues/detail?id=15985 It is a touch tricky to implement a test case for this. Will add one hopefully in a subsequent CL Bug=15985 Test=Covered by UI test Review URL: http://codereview.chromium.org/173211 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/173384 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24296 0039d316-1c4b-4281-b951-d872f2087c98
* This CL ensures that plugins always peek in the context of outgoing sync calls. ananta@chromium.org2009-08-251-0/+19
| | | | | | | | | | | | | | | I will be watching the reliability test runs closely for any crashes which creep in due to reentrancies into plugins caused by this CL. This fixes bug http://code.google.com/p/chromium/issues/detail?id=15985 It is a touch tricky to implement a test case for this. Will add one hopefully in a subsequent CL Bug=15985 Test=Covered by UI test Review URL: http://codereview.chromium.org/173211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24266 0039d316-1c4b-4281-b951-d872f2087c98
* linux: call g_thread_init() at relevant startup pointsevan@chromium.org2009-08-251-0/+1
| | | | | | | | | | | | | | | | | | According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. Rather than explicitly depending on gthread all over the place, just put it in with the GTK dep (since anywhere we're using GTK we ought to init gthread). (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24207 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: call g_thread_init() at relevant startup points"evan@chromium.org2009-08-251-1/+0
| | | | | | This reverts commit r24203, Mac breakage. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24204 0039d316-1c4b-4281-b951-d872f2087c98
* linux: call g_thread_init() at relevant startup pointsevan@chromium.org2009-08-251-0/+1
| | | | | | | | | | | | | | | | | | According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. Rather than explicitly depending on gthread all over the place, just put it in with the GTK dep (since anywhere we're using GTK we ought to init gthread). (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24203 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: call g_thread_init() at relevant startup points"tony@chromium.org2009-08-241-1/+0
| | | | | | | | | | | This reverts commit r24148 because the FDRemapping unittest is failing. TBR=evanm Review URL: http://codereview.chromium.org/173309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24168 0039d316-1c4b-4281-b951-d872f2087c98
* linux: call g_thread_init() at relevant startup pointsevan@chromium.org2009-08-241-0/+1
| | | | | | | | | | | | | | | | | | According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. Rather than explicitly depending on gthread all over the place, just put it in with the GTK dep (since anywhere we're using GTK we ought to init gthread). (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24148 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r24043, "linux: call g_thread_init() at relevant startup points"evan@chromium.org2009-08-211-1/+0
| | | | | | Build failures. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24044 0039d316-1c4b-4281-b951-d872f2087c98
* linux: call g_thread_init() at relevant startup pointsevan@chromium.org2009-08-211-0/+1
| | | | | | | | | | | | | | According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24043 0039d316-1c4b-4281-b951-d872f2087c98
* Retrofit the pre-existing appache message dispatching with the new WebKit ↵michaeln@google.com2009-08-211-2/+2
| | | | | | | | | | | | | APIs and concrete classes defined in our new appcache library, and get rid of the old files. There are many files in the CL, mostly to pickup constant values now defined in our new appcache library, and to reflect a terminilogy change (from 'context' to 'host'). TEST=some existing unit tests apply BUG=none Review URL: http://codereview.chromium.org/170003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24022 0039d316-1c4b-4281-b951-d872f2087c98
* More removal of WebCore usage from webplugin_impl.ccdarin@chromium.org2009-08-212-2/+2
| | | | | | | | | | | | Adds a few helper methods on WebFrame. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/173152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23956 0039d316-1c4b-4281-b951-d872f2087c98
* linux/mac: fix another race condition with the plugin channelpiman@chromium.org2009-08-182-1/+14
| | | | | | | | | | | | | http://codereview.chromium.org/165280 helped a lot, but it turns out that the ResourceClientProxy keep a reference to the channel, and it's hard to clean those in time. To be on the safe side, remove the name->FD mapping when the channel is removed from the name->channel map. Also remove it when a channel error occurs. Again, to be on the safe side, the channel is unusable at this point (the other side may have closed it already), so it's better to drop it. BUG=18521 Review URL: http://codereview.chromium.org/171100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23666 0039d316-1c4b-4281-b951-d872f2087c98
* Add an UpdateContext call to WebPluginDelegateImpl on the Mac.stuartmorgan@google.com2009-08-131-0/+4
| | | | | | | | | | | On the Mac, Flash appears to cache the CGContextRef provided in NPP_SetWindow until the next NPP_SetWindow call, so we need to call it sometime before the next plugin paint. This allows us to call NPP_SetWindow before telling the plugin to paint, but not from the Paint function itself (where it could have bad side-effects). BUG=18894,18980 TEST=Switch to HQ on a YouTube video; Flash should not crash. Review URL: http://codereview.chromium.org/165344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23322 0039d316-1c4b-4281-b951-d872f2087c98
* Remove all direct calls to NPN_ functions in WebCore. The replacement for ↵jorlow@chromium.org2009-08-111-2/+5
| | | | | | | | | | | | | these is the WebKit::WebBindings API. This will be a 2 sided commit with https://bugs.webkit.org/show_bug.cgi?id=28089 TEST=none BUG=none Review URL: http://codereview.chromium.org/164214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23012 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix race in TransportDIB passingpiman@chromium.org2009-08-101-1/+7
| | | | | | | | | | | | | | | | There was a race condition when the renderer passes a TransportDIB to the plugin process. It is possible that the renderer destroys the TransportDIB before the plugin handles the message, in which case the plugin will fail to map the shm handle. This also cleans up a couple of things. BUG=18320 Review URL: http://codereview.chromium.org/164226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22949 0039d316-1c4b-4281-b951-d872f2087c98
* Delay releasing plugin process for 10s.cmp@google.com2009-08-071-1/+12
| | | | | | | | | | | | | | | | Change plugin process release from immediately after we navigate away from our last plugin reference to a task that is run 10s later. Original patch by John Abd-El-Malek (jam@chromium.org). BUG=11341 TEST=Open Chrome, load youtube.com, click Videos, verify all pages load correctly. Review URL: http://codereview.chromium.org/164157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22818 0039d316-1c4b-4281-b951-d872f2087c98
* Set up a interposing library for Carbon calls made by plugins.stuartmorgan@google.com2009-08-071-0/+41
| | | | | | | | | | | | | This gives us a library that's inserted into plugin process via DYLD_INSERT_LIBRARIES to intercept Carbon calls, and moves the window/process activation handling into that library (based on Carbon window activation/deactivation calls, rather than polling the front window). Over time we'll interpose more, but this gives us the foundation. This fixes both the "window loses focus when loading a page with plugins" and "can't click on YouTube controls" bugs. BUG=18203,18553 TEST=Clicking on Flash plugins should work much more reliably, opening a page with a plugin shouldn't cause the window to lose focus. Review URL: http://codereview.chromium.org/164100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22799 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix windowless Flash when scrollingpiman@chromium.org2009-08-071-0/+6
| | | | | | | | | | | | | Apparently on linux windowless Flash needs a paint after a NPP_SetWindow, otherwise it cancels its timer to do InvalidateRect. Also in this change: WebKit calls WebPluginImpl::setFrameRect at each paint, even if the rects haven't changed. That used to always send a message to the plugin process, which is unnecessary (that case is always a no-op in the WebPluginDelegateImpl), so I fixed that too. BUG=18423 Review URL: http://codereview.chromium.org/159907 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22702 0039d316-1c4b-4281-b951-d872f2087c98
* Another attempt at landing this patch.ananta@chromium.org2009-08-044-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The reliability tests regressions caused by this patch have been addressed by the upstream bug fix https://bugs.webkit.org/show_bug.cgi?id=27769 The IPCs for carrying data requested by plugins have been changed from synchronous IPCs to asynchronous IPCs. This fixes bug http://code.google.com/p/chromium/issues/detail?id=14323, where the Flash plugin would not render content on the page if these IPCs were processed while the plugin waited for sync calls like NPN_Evaluate to return. This CL also fixes the following bugs, which were crashes in reliability test runs when this patch was landed last time. http://code.google.com/p/chromium/issues/detail?id=18058 http://code.google.com/p/chromium/issues/detail?id=18059 The crash happens because of NPP_Write calls issued to the plugin while it is waiting for an NPN_Invoke call to return in the context of NPP_NewStream. Inspecting the safari plugin implementation revealed that they defer the resource load before calling the plugin and restore it on return. We emulate this behavior via an IPC sent from the plugin which serves as an acknowledgement. Test=covered by UI tests. Bug=14323,18058,18059 Review URL: http://codereview.chromium.org/159746 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22369 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 22041 as it caused plugin crashes in reliability test runs.ananta@chromium.org2009-07-303-6/+7
| | | | | | | | | | Also reverting 22065/22046/22041 which are changes to knowncrashes.txt. TBR=huanr Review URL: http://codereview.chromium.org/160418 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22109 0039d316-1c4b-4281-b951-d872f2087c98
* linux: add a GtkPlug / GtkSocket pair in the plugin processpiman@chromium.org2009-07-302-4/+56
| | | | | | | | | | | | Some plugins assume that the GtkSocket container is in the same process as the plugin, so we give them one. This fixes bug 16928 and the gdk_window_get_origin issue. BUG=16928 Review URL: http://codereview.chromium.org/160380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22083 0039d316-1c4b-4281-b951-d872f2087c98
* Add plumbing for allowing the renderer to intercept and cancel redirects beforedarin@chromium.org2009-07-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they are sent. A good portion of this CL is to support the new UI test. The IPC to notify the renderer of a redirect now includes a ResponseInfo struct allowing WebURLLoaderImpl to provide detailed response info (including response headers) to WebKit. This isn't strictly necessary, but I thought I'd include this to make the code more future proof. A cross origin restriction is added to SyncResourceHandler::OnRequestRedirected that mimics the code in WebCore/platform/network/cf/ResourceHandleCFNet.cpp. This is most unfortunate, and I filed a bug at bugs.webkit.org about the similar duplication of logic in WebCore. There seemed to be enough code paths leading to request cancellation at the ResourceDispatcher level that I couldn't easily ensure that a request only gets cancelled once. So, I added an is_cancelled flag to record if it is not necessary to send a ViewHostMsg_CancelRequest IPC. This avoids some warnings in the ResourceDispatcherHost. To support my UI test, I needed to change URLRequestMockHttpJob to know how to serve redirects. I moved URLRequestHttpJob::IsRedirectResponse to its base class, URLRequestJob so that the implementation could be shared. This revealed a minor bug in URLRequest. We were never resetting response_info_ upon following a redirect. I added this code consolidated similar code from URLRequest::Redirect and URLRequest::RestartWithJob into a new PrepareToRestart method. To support my UI test, I added a "hit count" field to URLRequestFilter, and I added an associated automation IPC to query the value. The test was a bit challenging to write because there is no way to tell the difference from JS. Before and after, it appears to JS as though the cross-origin redirect failed. However, the server can see the extra redirect request. So, I simply record the number of hits against URLs of the form http://mock.http/foo, and use that to observe if any extra requests were made. I implemented the new IPC message by extending the AutomationResourceMessageFilter. This allowed me to trap the IPC message on the IO thread where it is safe to probe the URLRequestFilter. I then changed the implementation of AutomationMsg_SetFilteredInet to work similarly. I revised URLRequestMockHTTPJob::GetOnDiskPath to support ports. This actually allowed me to reuse URLRequestMockHTTPJob to service URLs in different security origins. My test redirects from http://mock.http/ to http://mock.http:4000/. Please see the comments in cross-origin-redirect-blocked.html for details about how the test functions. R=brettw,wtc BUG=16413 TEST=covered by resource_dispatcher_host_uitest.cc Review URL: http://codereview.chromium.org/159370 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22067 0039d316-1c4b-4281-b951-d872f2087c98
* Another attempt at landing this patch. ananta@chromium.org2009-07-303-7/+6
| | | | | | | | | | | | | | | | | | | | | | The reliability tests regressions caused by this patch have been addressed by the upstream bug fix https://bugs.webkit.org/show_bug.cgi?id=27769 The IPCs for carrying data requested by plugins have been changed from synchronous IPCs to asynchronous IPCs. This fixes bug http://code.google.com/p/chromium/issues/detail?id=14323, where the Flash plugin would not render content on the page if these IPCs were processed while the plugin waited for sync calls like NPN_Evaluate to return. Test=covered by UI tests. Bug=14323 Review URL: http://codereview.chromium.org/160338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22041 0039d316-1c4b-4281-b951-d872f2087c98
* Continue eliminating direct NPN_ function calls that go from Chromium code ↵jorlow@chromium.org2009-07-304-21/+31
| | | | | | | | | | | to WebKit code. The long-term goal is to be able to link WebKit as a DLL. TEST=none BUG=none Review URL: http://codereview.chromium.org/160310 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22031 0039d316-1c4b-4281-b951-d872f2087c98
* Update the Mac plugin dummy window code for the new coordinate system.stuartmorgan@google.com2009-07-291-7/+3
| | | | | | | | | | | Fixes the location of the dummy window, cleans up some duplicate window-handling code, and tries to keep the window activation status more in sync with what it would be in a single-process system. The net result is that event handling in plugins works better, although there are still activation issues. BUG=none TEST=Clicks on plugins should register in the right place (assuming they register at all; there are still bugs in having them handled). Review URL: http://codereview.chromium.org/159525 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21987 0039d316-1c4b-4281-b951-d872f2087c98
* Fix partial plugin invalidate repainting on Mac.stuartmorgan@google.com2009-07-271-1/+0
| | | | | | | | | | | The transport canvas and the backing store canvas are upside down relative to eachother, so the rects need some massaging. BUG=none TEST=YouTube videos should play without sections drawing in the wrong place, and plugins scrolled partially offscreen should draw the right section. Review URL: http://codereview.chromium.org/159423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21681 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r21548 and r21559 due to crash spike.huanr@chromium.org2009-07-253-6/+7
| | | | | | Review URL: http://codereview.chromium.org/159383 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21614 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor blits to be more cross-platform.piman@chromium.org2009-07-241-6/+5
| | | | | | | Review URL: http://codereview.chromium.org/159190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21565 0039d316-1c4b-4281-b951-d872f2087c98