Changeset 87305 in webkit


Ignore:
Timestamp:
May 25, 2011 10:22:23 AM (13 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
https://bugs.webkit.org/show_bug.cgi?id=61448

Reviewed by Anders Carlsson.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
after intersecting the two rectangles.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r87275 r87305  
     12011-05-25  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        <rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
     6        https://bugs.webkit.org/show_bug.cgi?id=61448
     7
     8        * WebProcess/Plugins/PluginView.cpp:
     9        (WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
     10        after intersecting the two rectangles.
     11
    1122011-05-24  Timothy Hatcher  <timothy@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r86851 r87305  
    660660IntRect PluginView::clipRectInWindowCoordinates() const
    661661{
    662     ASSERT(parent());
    663 
    664662    // Get the frame rect in window coordinates.
    665663    IntRect frameRectInWindowCoordinates = parent()->contentsToWindow(frameRect());
    666     frameRectInWindowCoordinates.scale(1 / frame()->pageScaleFactor());
     664
     665    Frame* frame = this->frame();
    667666
    668667    // Get the window clip rect for the enclosing layer (in window coordinates).
    669668    RenderLayer* layer = m_pluginElement->renderer()->enclosingLayer();
    670     FrameView* parentView = m_pluginElement->document()->frame()->view();
    671     IntRect windowClipRect = parentView->windowClipRectForLayer(layer, true);
     669    IntRect windowClipRect = frame->view()->windowClipRectForLayer(layer, true);
    672670
    673671    // Intersect the two rects to get the view clip rect in window coordinates.
    674     return intersection(frameRectInWindowCoordinates, windowClipRect);
     672    frameRectInWindowCoordinates.intersect(windowClipRect);
     673
     674    frameRectInWindowCoordinates.scale(1 / frame->pageScaleFactor());
     675    return frameRectInWindowCoordinates;
    675676}
    676677
Note: See TracChangeset for help on using the changeset viewer.