Title: [146627] trunk/Source/WebKit/blackberry
Revision
146627
Author
[email protected]
Date
2013-03-22 10:11:53 -0700 (Fri, 22 Mar 2013)

Log Message

[BlackBerry] Selection overlay clipped incorrectly
https://bugs.webkit.org/show_bug.cgi?id=113069

Patch by Andrew Lo <[email protected]> on 2013-03-22
Reviewed by George Staikos.
Internally reviewed by Arvid Nilsson.

As a follow-up to r146278, the clip rect also needs to be
adjusted by the parent's offset when drawing the
selection overlay.

* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::paintContents):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (146626 => 146627)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-03-22 17:05:12 UTC (rev 146626)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-03-22 17:11:53 UTC (rev 146627)
@@ -1,3 +1,18 @@
+2013-03-22  Andrew Lo  <[email protected]>
+
+        [BlackBerry] Selection overlay clipped incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=113069
+
+        Reviewed by George Staikos.
+        Internally reviewed by Arvid Nilsson.
+
+        As a follow-up to r146278, the clip rect also needs to be
+        adjusted by the parent's offset when drawing the
+        selection overlay.
+
+        * WebKitSupport/SelectionOverlay.cpp:
+        (BlackBerry::WebKit::SelectionOverlay::paintContents):
+
 2013-03-22  Carlos Garcia Campos  <[email protected]>
 
         [BlackBerry] Add custom BackForwardList client implementation

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp (146626 => 146627)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp	2013-03-22 17:05:12 UTC (rev 146626)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp	2013-03-22 17:11:53 UTC (rev 146627)
@@ -87,7 +87,7 @@
     m_page->notifyFlushRequired(layer);
 }
 
-void SelectionOverlay::paintContents(const GraphicsLayer* layer, GraphicsContext& c, GraphicsLayerPaintingPhase, const IntRect& clip)
+void SelectionOverlay::paintContents(const GraphicsLayer* layer, GraphicsContext& c, GraphicsLayerPaintingPhase, const IntRect& inClip)
 {
     if (!layer->platformLayer()->superlayer())
         return;
@@ -97,10 +97,13 @@
         return;
 
     const Vector<WebCore::FloatQuad>& quads = it->value;
+    GraphicsLayer* parent = it->key;
 
+    IntRect clip(inClip);
+    clip.move(parent->offsetFromRenderer().width(), parent->offsetFromRenderer().height());
+
     c.save();
 
-    GraphicsLayer* parent = it->key;
     c.translate(-parent->offsetFromRenderer().width(), -parent->offsetFromRenderer().height());
 
     Color color = RenderTheme::defaultTheme()->activeSelectionBackgroundColor();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to