Title: [148892] trunk/Source/WebCore
- Revision
- 148892
- Author
- [email protected]
- Date
- 2013-04-22 10:02:25 -0700 (Mon, 22 Apr 2013)
Log Message
Scrollbar should not depend on EventHandler, Frame and FrameView
https://bugs.webkit.org/show_bug.cgi?id=114941
Reviewed by Darin Adler.
It's a layering violation that Scrollbar uses EventHandler, Frame
and FrameView. Frame is used to get the EventHandler that is used
to set mousePressed to false after a Scrollbar::mouseUp(). This is
not really needed, since EventHandler already sets m_mousePressed
to false when calling Scrollbar::mouseUp(). The PopupMenu windows
implementation also calls Scrollbar::mouseUp(), but that scrollbar
is not inside a FrameView.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::isScrollViewScrollbar):
isScrollViewScrollbar() is a method of ScrollView so we don't need
to cast to FrameView.
(WebCore::Scrollbar::mouseUp): Remove EventHandler ussage.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148891 => 148892)
--- trunk/Source/WebCore/ChangeLog 2013-04-22 17:00:17 UTC (rev 148891)
+++ trunk/Source/WebCore/ChangeLog 2013-04-22 17:02:25 UTC (rev 148892)
@@ -1,3 +1,24 @@
+2013-04-22 Carlos Garcia Campos <[email protected]>
+
+ Scrollbar should not depend on EventHandler, Frame and FrameView
+ https://bugs.webkit.org/show_bug.cgi?id=114941
+
+ Reviewed by Darin Adler.
+
+ It's a layering violation that Scrollbar uses EventHandler, Frame
+ and FrameView. Frame is used to get the EventHandler that is used
+ to set mousePressed to false after a Scrollbar::mouseUp(). This is
+ not really needed, since EventHandler already sets m_mousePressed
+ to false when calling Scrollbar::mouseUp(). The PopupMenu windows
+ implementation also calls Scrollbar::mouseUp(), but that scrollbar
+ is not inside a FrameView.
+
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::isScrollViewScrollbar):
+ isScrollViewScrollbar() is a method of ScrollView so we don't need
+ to cast to FrameView.
+ (WebCore::Scrollbar::mouseUp): Remove EventHandler ussage.
+
2013-04-22 Andreas Kling <[email protected]>
Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
Modified: trunk/Source/WebCore/platform/Scrollbar.cpp (148891 => 148892)
--- trunk/Source/WebCore/platform/Scrollbar.cpp 2013-04-22 17:00:17 UTC (rev 148891)
+++ trunk/Source/WebCore/platform/Scrollbar.cpp 2013-04-22 17:02:25 UTC (rev 148892)
@@ -29,6 +29,7 @@
#include "GraphicsContext.h"
#include "PlatformMouseEvent.h"
#include "ScrollAnimator.h"
+#include "ScrollView.h"
#include "ScrollableArea.h"
#include "ScrollbarTheme.h"
#include <algorithm>
@@ -37,11 +38,6 @@
#include "PlatformGestureEvent.h"
#endif
-// FIXME: The following #includes are a layering violation and should be removed.
-#include "EventHandler.h"
-#include "Frame.h"
-#include "FrameView.h"
-
using namespace std;
#if PLATFORM(GTK)
@@ -130,7 +126,7 @@
bool Scrollbar::isScrollViewScrollbar() const
{
- return parent() && parent()->isFrameView() && toFrameView(parent())->isScrollViewScrollbar(this);
+ return parent() && parent()->isScrollViewScrollbar(this);
}
void Scrollbar::offsetDidChange()
@@ -458,9 +454,6 @@
m_scrollableArea->mouseExitedScrollbar(this);
}
- if (parent() && parent()->isFrameView())
- toFrameView(parent())->frame()->eventHandler()->setMousePressed(false);
-
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes