Title: [109405] trunk/Source/WebKit2
- Revision
- 109405
- Author
- [email protected]
- Date
- 2012-03-01 13:26:50 -0800 (Thu, 01 Mar 2012)
Log Message
Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs
https://bugs.webkit.org/show_bug.cgi?id=80044
<rdar://problem/10919940>
Reviewed by Brady Eidson.
Remove the code that would add and remove wheel event handlers since that's not what we want to track.
Instead, dynamically add and remove the view as its scrollbars come and go.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::updateScrollbars):
(WebKit::BuiltInPDFView::initialize):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (109404 => 109405)
--- trunk/Source/WebKit2/ChangeLog 2012-03-01 21:16:09 UTC (rev 109404)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-01 21:26:50 UTC (rev 109405)
@@ -1,3 +1,20 @@
+2012-03-01 Anders Carlsson <[email protected]>
+
+ Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs
+ https://bugs.webkit.org/show_bug.cgi?id=80044
+ <rdar://problem/10919940>
+
+ Reviewed by Brady Eidson.
+
+ Remove the code that would add and remove wheel event handlers since that's not what we want to track.
+ Instead, dynamically add and remove the view as its scrollbars come and go.
+
+ * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
+ (WebKit::BuiltInPDFView::updateScrollbars):
+ (WebKit::BuiltInPDFView::initialize):
+ * WebProcess/Plugins/PDF/BuiltInPDFView.h:
+ (BuiltInPDFView):
+
2012-03-01 Kangil Han <[email protected]>
[DRT] Remove all PlainTextController usages in existing tests by adding internal API
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp (109404 => 109405)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2012-03-01 21:16:09 UTC (rev 109404)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2012-03-01 21:26:50 UTC (rev 109405)
@@ -227,36 +227,17 @@
scrollbarRect.contract(0, m_horizontalScrollbar->height());
m_verticalScrollbar->setFrameRect(scrollbarRect);
}
-}
+
+ FrameView* frameView = m_frame->coreFrame()->view();
+ if (!frameView)
+ return;
-void BuiltInPDFView::didAddHorizontalScrollbar(Scrollbar* scrollbar)
-{
- pluginView()->frame()->document()->didAddWheelEventHandler();
- ScrollableArea::didAddHorizontalScrollbar(scrollbar);
+ if (m_verticalScrollbar || m_horizontalScrollbar)
+ frameView->addScrollableArea(this);
+ else
+ frameView->removeScrollableArea(this);
}
-void BuiltInPDFView::willRemoveHorizontalScrollbar(Scrollbar* scrollbar)
-{
- ScrollableArea::willRemoveHorizontalScrollbar(scrollbar);
- // FIXME: Maybe need a separate ScrollableArea::didRemoveHorizontalScrollbar callback?
- if (PluginView* pluginView = this->pluginView())
- pluginView->frame()->document()->didRemoveWheelEventHandler();
-}
-
-void BuiltInPDFView::didAddVerticalScrollbar(Scrollbar* scrollbar)
-{
- pluginView()->frame()->document()->didAddWheelEventHandler();
- ScrollableArea::didAddVerticalScrollbar(scrollbar);
-}
-
-void BuiltInPDFView::willRemoveVerticalScrollbar(Scrollbar* scrollbar)
-{
- ScrollableArea::willRemoveVerticalScrollbar(scrollbar);
- // FIXME: Maybe need a separate ScrollableArea::didRemoveHorizontalScrollbar callback?
- if (PluginView* pluginView = this->pluginView())
- pluginView->frame()->document()->didRemoveWheelEventHandler();
-}
-
PassRefPtr<Scrollbar> BuiltInPDFView::createScrollbar(ScrollbarOrientation orientation)
{
RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
@@ -348,8 +329,6 @@
bool BuiltInPDFView::initialize(const Parameters& parameters)
{
- m_frame->coreFrame()->view()->addScrollableArea(this);
-
// Load the src URL if needed.
m_sourceURL = parameters.url;
if (!parameters.loadManually && !parameters.url.isEmpty())
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h (109404 => 109405)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-03-01 21:16:09 UTC (rev 109404)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-03-01 21:26:50 UTC (rev 109405)
@@ -58,10 +58,6 @@
const PluginView* pluginView() const;
void updateScrollbars();
- void didAddHorizontalScrollbar(WebCore::Scrollbar*);
- void willRemoveHorizontalScrollbar(WebCore::Scrollbar*);
- void didAddVerticalScrollbar(WebCore::Scrollbar*);
- void willRemoveVerticalScrollbar(WebCore::Scrollbar*);
PassRefPtr<WebCore::Scrollbar> createScrollbar(WebCore::ScrollbarOrientation);
void destroyScrollbar(WebCore::ScrollbarOrientation);
void addArchiveResource();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes