[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 15:35:51 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit dc2f1bf17fc27944478e1093286e1b3d4e7e01b5
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 9 00:08:53 2010 +0000
Find in Page: scrolling the page with the scrollbar while overlay is up dismisses the overlay
https://bugs.webkit.org/show_bug.cgi?id=49219
<rdar://problem/8569550>
Reviewed by John Sullivan and Dan Bernstein.
* WebProcess/WebPage/FindPageOverlay.cpp:
(WebKit::FindPageOverlay::bounds):
Return the bounds of the find page overlay, excluding any scrollbars.
(WebKit::FindPageOverlay::drawRect):
Call bounds.
(WebKit::FindPageOverlay::mouseEvent):
Only dismiss the find UI if the mouse down event happens inside the overlay bounds.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f329ae1..ebf49f4 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,23 @@
2010-11-08 Anders Carlsson <andersca at apple.com>
+ Reviewed by John Sullivan and Dan Bernstein.
+
+ Find in Page: scrolling the page with the scrollbar while overlay is up dismisses the overlay
+ https://bugs.webkit.org/show_bug.cgi?id=49219
+ <rdar://problem/8569550>
+
+ * WebProcess/WebPage/FindPageOverlay.cpp:
+ (WebKit::FindPageOverlay::bounds):
+ Return the bounds of the find page overlay, excluding any scrollbars.
+
+ (WebKit::FindPageOverlay::drawRect):
+ Call bounds.
+
+ (WebKit::FindPageOverlay::mouseEvent):
+ Only dismiss the find UI if the mouse down event happens inside the overlay bounds.
+
+2010-11-08 Anders Carlsson <andersca at apple.com>
+
Reviewed by Adam Roben.
Add the ability to send messages to DownloadProxy objects
diff --git a/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp b/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
index 6af3cad..b8f6635 100644
--- a/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
+++ b/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
@@ -85,16 +85,8 @@ Vector<IntRect> FindPageOverlay::rectsForTextMatches()
return rects;
}
-static Color overlayBackgroundColor()
-{
- return Color(overlayBackgroundRed, overlayBackgroundGreen, overlayBackgroundBlue, overlayBackgroundAlpha);
-}
-
-void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
+IntRect FindPageOverlay::bounds() const
{
- Vector<IntRect> rects = rectsForTextMatches();
- ASSERT(!rects.isEmpty());
-
FrameView* frameView = webPage()->corePage()->mainFrame()->view();
int width = frameView->width();
@@ -104,7 +96,20 @@ void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect&
if (frameView->horizontalScrollbar())
height -= frameView->horizontalScrollbar()->height();
- IntRect paintRect = intersection(dirtyRect, IntRect(0, 0, width, height));
+ return IntRect(0, 0, width, height);
+}
+
+static Color overlayBackgroundColor()
+{
+ return Color(overlayBackgroundRed, overlayBackgroundGreen, overlayBackgroundBlue, overlayBackgroundAlpha);
+}
+
+void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
+{
+ Vector<IntRect> rects = rectsForTextMatches();
+ ASSERT(!rects.isEmpty());
+
+ IntRect paintRect = intersection(dirtyRect, bounds());
if (paintRect.isEmpty())
return;
@@ -142,7 +147,8 @@ void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect&
bool FindPageOverlay::mouseEvent(const WebMouseEvent& event)
{
- if (event.type() == WebEvent::MouseDown) {
+ // If we get a mouse down event inside the page overlay we should hide the find UI.
+ if (event.type() == WebEvent::MouseDown && bounds().contains(event.position())) {
// Dismiss the overlay.
m_findController->hideFindUI();
return false;
diff --git a/WebKit2/WebProcess/WebPage/FindPageOverlay.h b/WebKit2/WebProcess/WebPage/FindPageOverlay.h
index 72fb1b4..08d1a41 100644
--- a/WebKit2/WebProcess/WebPage/FindPageOverlay.h
+++ b/WebKit2/WebProcess/WebPage/FindPageOverlay.h
@@ -43,6 +43,7 @@ private:
explicit FindPageOverlay(FindController*);
Vector<WebCore::IntRect> rectsForTextMatches();
+ WebCore::IntRect bounds() const;
// PageOverlay.
virtual void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list