Title: [131514] trunk/Source/WebKit/chromium
- Revision
- 131514
- Author
- [email protected]
- Date
- 2012-10-16 15:08:36 -0700 (Tue, 16 Oct 2012)
Log Message
Fix a bug that we are using scaled damage rect for plugins inside an iframe
https://bugs.webkit.org/show_bug.cgi?id=99488
Patch by Min Qin <[email protected]> on 2012-10-16
Reviewed by Adam Barth.
There is a bug with a previous webkit patch: https://bugs.webkit.org/show_bug.cgi?id=98468
In that patch, we incorrectly applied the main frame's scale factor to inner iframes.
However, the damageRect is not scaled inside an iFrame. So doing the intersect will retrieve wrong result here.
In WebPluginContainerImpl::calculateGeometry, the windowRect also does not apply main frame's scale factor.
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::paint):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (131513 => 131514)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-10-16 22:05:47 UTC (rev 131513)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-10-16 22:08:36 UTC (rev 131514)
@@ -1,3 +1,18 @@
+2012-10-16 Min Qin <[email protected]>
+
+ Fix a bug that we are using scaled damage rect for plugins inside an iframe
+ https://bugs.webkit.org/show_bug.cgi?id=99488
+
+ Reviewed by Adam Barth.
+
+ There is a bug with a previous webkit patch: https://bugs.webkit.org/show_bug.cgi?id=98468
+ In that patch, we incorrectly applied the main frame's scale factor to inner iframes.
+ However, the damageRect is not scaled inside an iFrame. So doing the intersect will retrieve wrong result here.
+ In WebPluginContainerImpl::calculateGeometry, the windowRect also does not apply main frame's scale factor.
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::paint):
+
2012-10-16 Xianzhu Wang <[email protected]>
[Chromium] Android: Need a way to get appropriate font for some specific characters.
Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (131513 => 131514)
--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-10-16 22:05:47 UTC (rev 131513)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-10-16 22:08:36 UTC (rev 131514)
@@ -118,7 +118,7 @@
return;
FloatRect scaledDamageRect = damageRect;
- float frameScaleFactor = m_element->document()->page()->mainFrame()->frameScaleFactor();
+ float frameScaleFactor = m_element->document()->frame()->frameScaleFactor();
scaledDamageRect.scale(frameScaleFactor);
scaledDamageRect.move(-frameRect().x() * (frameScaleFactor - 1), -frameRect().y() * (frameScaleFactor - 1));
@@ -139,7 +139,7 @@
WebCanvas* canvas = gc->platformContext()->canvas();
IntRect windowRect =
- IntRect(view->contentsToWindow(enclosingIntRect(scaledDamageRect)));
+ IntRect(view->contentsToWindow(enclosingIntRect(scaledDamageRect).location()), enclosingIntRect(scaledDamageRect).size());
m_webPlugin->paint(canvas, windowRect);
gc->restore();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes