Title: [110339] branches/subpixellayout/Source/WebCore
Revision
110339
Author
[email protected]
Date
2012-03-09 15:06:05 -0800 (Fri, 09 Mar 2012)

Log Message

Fixing integer truncation issue around contentWidth/Height, a duplicated FractionalLayoutSize.cpp reference in cmake, and unnecessary layout units in RenderEmbeddedObject.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/CMakeLists.txt (110338 => 110339)


--- branches/subpixellayout/Source/WebCore/CMakeLists.txt	2012-03-09 23:04:04 UTC (rev 110338)
+++ branches/subpixellayout/Source/WebCore/CMakeLists.txt	2012-03-09 23:06:05 UTC (rev 110339)
@@ -1121,7 +1121,6 @@
     platform/graphics/BitmapImage.cpp
     platform/graphics/Color.cpp
     platform/graphics/CrossfadeGeneratedImage.cpp
-    platform/graphics/FractionalLayoutSize.cpp
     platform/graphics/FloatPoint.cpp
     platform/graphics/FloatPoint3D.cpp
     platform/graphics/FloatQuad.cpp

Modified: branches/subpixellayout/Source/WebCore/loader/SubframeLoader.cpp (110338 => 110339)


--- branches/subpixellayout/Source/WebCore/loader/SubframeLoader.cpp	2012-03-09 23:04:04 UTC (rev 110338)
+++ branches/subpixellayout/Source/WebCore/loader/SubframeLoader.cpp	2012-03-09 23:06:05 UTC (rev 110339)
@@ -171,7 +171,7 @@
     IntSize size;
 
     if (renderer)
-        size = IntSize(renderer->contentWidth(), renderer->contentHeight());
+        size = pixelSnappedIntRect(renderer->contentBoxRect()).size();
     else if (mediaElement->isVideo())
         size = RenderVideo::defaultSize();
 
@@ -360,7 +360,7 @@
     if (!frameLoader->checkIfRunInsecureContent(document()->securityOrigin(), url))
         return false;
 
-    IntSize contentSize(renderer->contentWidth(), renderer->contentHeight());
+    IntSize contentSize = pixelSnappedIntRect(renderer->contentBoxRect()).size();
     bool loadManually = document()->isPluginDocument() && !m_containsPlugins && toPluginDocument(document())->shouldLoadPluginManually();
     RefPtr<Widget> widget = frameLoader->client()->createPlugin(contentSize,
         pluginElement, url, paramNames, paramValues, mimeType, loadManually);

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderEmbeddedObject.cpp (110338 => 110339)


--- branches/subpixellayout/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2012-03-09 23:04:04 UTC (rev 110338)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2012-03-09 23:06:05 UTC (rev 110339)
@@ -246,8 +246,8 @@
     // This is required for <object> elements whose contents are rendered by WebCore (e.g. src=""
     if (node() && widget() && widget()->isFrameView()) {
         FrameView* view = static_cast<FrameView*>(widget());
-        LayoutUnit marginWidth = -1;
-        LayoutUnit marginHeight = -1;
+        int marginWidth = -1;
+        int marginHeight = -1;
         if (node()->hasTagName(iframeTag)) {
             HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node());
             marginWidth = frame->marginWidth();

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.cpp (110338 => 110339)


--- branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.cpp	2012-03-09 23:04:04 UTC (rev 110338)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.cpp	2012-03-09 23:06:05 UTC (rev 110339)
@@ -86,13 +86,13 @@
 
 static int nodeWidth(Node* node)
 {
-    return node ? node->renderBox()->width() : zeroLayoutUnit;
+    return node ? node->renderBox()->pixelSnappedWidth() : 0;
 }
 
-LayoutUnit RenderFileUploadControl::maxFilenameWidth() const
+int RenderFileUploadControl::maxFilenameWidth() const
 {
     HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
-    return max<LayoutUnit>(0, contentWidth() - nodeWidth(uploadButton()) - afterButtonSpacing
+    return max(0, contentBoxRect().pixelSnappedWidth() - nodeWidth(uploadButton()) - afterButtonSpacing
         - (input->icon() ? iconWidth + iconFilenameSpacing : 0));
 }
 

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.h (110338 => 110339)


--- branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.h	2012-03-09 23:04:04 UTC (rev 110338)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderFileUploadControl.h	2012-03-09 23:06:05 UTC (rev 110339)
@@ -50,7 +50,7 @@
 
     virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
 
-    LayoutUnit maxFilenameWidth() const;
+    int maxFilenameWidth() const;
     
     virtual VisiblePosition positionForPoint(const LayoutPoint&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to