Changeset 190249 in webkit


Ignore:
Timestamp:
Sep 25, 2015 12:13:49 PM (9 years ago)
Author:
peavo@outlook.com
Message:

[WinCairo] Incorrect position for windowless plugins.
https://bugs.webkit.org/show_bug.cgi?id=149524

Reviewed by Alex Christensen.

Source/WebCore:

Added method to get graphics context HDC.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::getWindowsContext):
(WebCore::GraphicsContext::hdc):
(WebCore::GraphicsContextPlatformPrivate::save):

Source/WebKit/win:

Only perform the device context transformation if the plugin is painting
directly into the GraphicsContext HDC. The previous check was not correct
in all cases.

  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r190248 r190249  
     12015-09-25  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [WinCairo] Incorrect position for windowless plugins.
     4        https://bugs.webkit.org/show_bug.cgi?id=149524
     5
     6        Reviewed by Alex Christensen.
     7
     8        Added method to get graphics context HDC.
     9
     10        * platform/graphics/GraphicsContext.h:
     11        * platform/graphics/win/GraphicsContextWin.cpp:
     12        (WebCore::GraphicsContext::getWindowsContext):
     13        (WebCore::GraphicsContext::hdc):
     14        (WebCore::GraphicsContextPlatformPrivate::save):
     15
    1162015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    217
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r190124 r190249  
    453453        HDC getWindowsContext(const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in rect is used to create a bitmap for compositing inside transparency layers.
    454454        void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in HDC should be the one handed back by getWindowsContext.
     455        HDC hdc() const;
    455456#if PLATFORM(WIN)
    456457#if USE(WINGDI)
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp

    r177787 r190249  
    137137}
    138138
     139HDC GraphicsContext::hdc() const
     140{
     141    if (!m_data)
     142        return nullptr;
     143
     144    return m_data->m_hdc;
     145}
     146
    139147#if PLATFORM(WIN)
    140148void GraphicsContextPlatformPrivate::save()
  • trunk/Source/WebKit/win/ChangeLog

    r190235 r190249  
     12015-09-25  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [WinCairo] Incorrect position for windowless plugins.
     4        https://bugs.webkit.org/show_bug.cgi?id=149524
     5
     6        Reviewed by Alex Christensen.
     7
     8        Only perform the device context transformation if the plugin is painting
     9        directly into the GraphicsContext HDC. The previous check was not correct
     10        in all cases.
     11
     12        * Plugins/PluginViewWin.cpp:
     13        (WebCore::PluginView::paint):
     14
    1152015-09-24  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/Source/WebKit/win/Plugins/PluginViewWin.cpp

    r189919 r190249  
    565565    // On Safari/Windows without transparency layers the GraphicsContext returns the HDC
    566566    // of the window and the plugin expects that the passed in DC has window coordinates.
    567     if (!context.isInTransparencyLayer()) {
     567    if (context.hdc() == windowsContext.hdc()) {
    568568        XFORM transform;
    569569        GetWorldTransform(windowsContext.hdc(), &transform);
Note: See TracChangeset for help on using the changeset viewer.