Service overlays stay fixed when <iframe> scrolls
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Aug 2014 19:10:04 +0000 (19:10 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Aug 2014 19:10:04 +0000 (19:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135959
<rdar://problem/17957716>

Reviewed by Enrica Casucci.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::highlightsAreEquivalent):
Tiny correctness fix; highlights can only be equivalent if their
types are equivalent as well.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172639 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm

index d69b5a0..080f2c7 100644 (file)
@@ -1,3 +1,16 @@
+2014-08-15  Tim Horton  <timothy_horton@apple.com>
+
+        Service overlays stay fixed when <iframe> scrolls
+        https://bugs.webkit.org/show_bug.cgi?id=135959
+        <rdar://problem/17957716>
+
+        Reviewed by Enrica Casucci.
+
+        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
+        (WebKit::ServicesOverlayController::highlightsAreEquivalent):
+        Tiny correctness fix; highlights can only be equivalent if their
+        types are equivalent as well.
+
 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
 
         de-PLATFORM(COCOA) a couple of methods in plugin code
index e7dc1f3..cdbff58 100644 (file)
@@ -613,7 +613,7 @@ bool ServicesOverlayController::highlightsAreEquivalent(const Highlight* a, cons
     if (!a || !b)
         return false;
 
-    if (areRangesEqual(a->range(), b->range()))
+    if (a->type() == b->type() && areRangesEqual(a->range(), b->range()))
         return true;
 
     return false;