+2012-04-02 Levi Weintraub <leviw@chromium.org>
+
+ 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):
+
2012-04-02 Mario Sanchez Prada <msanchez@igalia.com>
in page anchor and keyboard navigation
IntSize size;
if (renderer)
- size = IntSize(renderer->contentWidth(), renderer->contentHeight());
+ size = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
else if (mediaElement->isVideo())
size = RenderVideo::defaultSize();
RefPtr<Widget> widget;
if (allowPlugins(AboutToInstantiatePlugin))
- widget = m_frame->loader()->client()->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
+ widget = m_frame->loader()->client()->createJavaAppletWidget(roundedIntSize(size), element, baseURL, paramNames, paramValues);
if (!widget)
return 0;
if (!frameLoader->checkIfRunInsecureContent(document()->securityOrigin(), url))
return false;
- IntSize contentSize(renderer->contentWidth(), renderer->contentHeight());
+ IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
bool loadManually = document()->isPluginDocument() && !m_containsPlugins && toPluginDocument(document())->shouldLoadPluginManually();
RefPtr<Widget> widget = frameLoader->client()->createPlugin(contentSize,
pluginElement, url, paramNames, paramValues, mimeType, loadManually);