Changeset 121441 in webkit


Ignore:
Timestamp:
Jun 28, 2012 11:00:42 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK][Win]: Fix plugin drawing to an offscreen buffer
https://bugs.webkit.org/show_bug.cgi?id=89499

Patch by Kalev Lember <kalevlember@gmail.com> on 2012-06-28
Reviewed by Brent Fulgham.

Take into account that the GTK+ port draws to a backing store and adjust
the target rectangle calculation accordingly.

  • plugins/win/PluginViewWin.cpp:

(WebCore::PluginView::paint):
(WebCore::PluginView::setNPWindowRect):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121439 r121441  
     12012-06-28  Kalev Lember  <kalevlember@gmail.com>
     2
     3        [GTK][Win]: Fix plugin drawing to an offscreen buffer
     4        https://bugs.webkit.org/show_bug.cgi?id=89499
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Take into account that the GTK+ port draws to a backing store and adjust
     9        the target rectangle calculation accordingly.
     10
     11        * plugins/win/PluginViewWin.cpp:
     12        (WebCore::PluginView::paint):
     13        (WebCore::PluginView::setNPWindowRect):
     14
    1152012-06-28  Kentaro Hara  <haraken@chromium.org>
    216
  • trunk/Source/WebCore/plugins/win/PluginViewWin.cpp

    r121381 r121441  
    649649
    650650    ASSERT(parent()->isFrameView());
     651
     652    // In the GTK port we draw in an offscreen buffer and don't want to use the window
     653    // coordinates.
     654#if PLATFORM(GTK)
     655    IntRect rectInWindow(rect);
     656    rectInWindow.intersect(frameRect());
     657#else
    651658    IntRect rectInWindow = static_cast<FrameView*>(parent())->contentsToWindow(frameRect());
     659#endif
    652660    LocalWindowsContext windowsContext(context, rectInWindow, m_isTransparent);
    653661
     
    833841    m_npWindow.clipRect.bottom = r.height();
    834842#else
     843    // In the GTK port we draw in an offscreen buffer and don't want to use the window
     844    // coordinates.
     845# if PLATFORM(GTK)
     846    IntPoint p = rect.location();
     847# else
    835848    IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(rect.location());
     849# endif
    836850    m_npWindow.x = p.x();
    837851    m_npWindow.y = p.y();
Note: See TracChangeset for help on using the changeset viewer.