Changeset 112852 in webkit


Ignore:
Timestamp:
Apr 2, 2012 3:47:36 AM (12 years ago)
Author:
leviw@chromium.org
Message:

Add rounding to Plugin creation in SubframeLoader
https://bugs.webkit.org/show_bug.cgi?id=82221

Reviewed by Eric Seidel.

Adding rounding to the LayoutSize used to construct Plugins in SubframeLoader. Plugins, which
are widgets, are always placed on integer boundaries, which means their sizes can be rounded
without considering their location. See https://trac.webkit.org/wiki/LayoutUnit for details.

No new tests. No change in behavior.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadPlugin):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112851 r112852  
     12012-04-02  Levi Weintraub  <leviw@chromium.org>
     2
     3        Add rounding to Plugin creation in SubframeLoader
     4        https://bugs.webkit.org/show_bug.cgi?id=82221
     5
     6        Reviewed by Eric Seidel.
     7
     8        Adding rounding to the LayoutSize used to construct Plugins in SubframeLoader. Plugins, which
     9        are widgets, are always placed on integer boundaries, which means their sizes can be rounded
     10        without considering their location. See https://trac.webkit.org/wiki/LayoutUnit for details.
     11
     12        No new tests. No change in behavior.
     13
     14        * loader/SubframeLoader.cpp:
     15        (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
     16        (WebCore::SubframeLoader::createJavaAppletWidget):
     17        (WebCore::SubframeLoader::loadPlugin):
     18
    1192012-04-02  Mario Sanchez Prada  <msanchez@igalia.com>
    220
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r106884 r112852  
    172172
    173173    if (renderer)
    174         size = IntSize(renderer->contentWidth(), renderer->contentHeight());
     174        size = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
    175175    else if (mediaElement->isVideo())
    176176        size = RenderVideo::defaultSize();
     
    225225    RefPtr<Widget> widget;
    226226    if (allowPlugins(AboutToInstantiatePlugin))
    227         widget = m_frame->loader()->client()->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
     227        widget = m_frame->loader()->client()->createJavaAppletWidget(roundedIntSize(size), element, baseURL, paramNames, paramValues);
    228228    if (!widget)
    229229        return 0;
     
    361361        return false;
    362362
    363     IntSize contentSize(renderer->contentWidth(), renderer->contentHeight());
     363    IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
    364364    bool loadManually = document()->isPluginDocument() && !m_containsPlugins && toPluginDocument(document())->shouldLoadPluginManually();
    365365    RefPtr<Widget> widget = frameLoader->client()->createPlugin(contentSize,
Note: See TracChangeset for help on using the changeset viewer.