Title: [116469] trunk/Source/WebKit2
- Revision
- 116469
- Author
- [email protected]
- Date
- 2012-05-08 17:24:15 -0700 (Tue, 08 May 2012)
Log Message
Can't scroll PDF in subframe
https://bugs.webkit.org/show_bug.cgi?id=85932
<rdar://problem/11405527>
Reviewed by Sam Weinig.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::updateScrollbars):
Trigger a layout when scrollbars come and go so the non fast scrollable region gets recomputed.
(WebKit::BuiltInPDFView::scrollableAreaBoundingBox):
Implement this by calling out to the PluginView.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (116468 => 116469)
--- trunk/Source/WebKit2/ChangeLog 2012-05-09 00:02:30 UTC (rev 116468)
+++ trunk/Source/WebKit2/ChangeLog 2012-05-09 00:24:15 UTC (rev 116469)
@@ -1,3 +1,19 @@
+2012-05-08 Anders Carlsson <[email protected]>
+
+ Can't scroll PDF in subframe
+ https://bugs.webkit.org/show_bug.cgi?id=85932
+ <rdar://problem/11405527>
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/Plugins/PDF/BuiltInPDFView.h:
+ * WebProcess/Plugins/PDF/BuiltInPDFView.mm:
+ (WebKit::BuiltInPDFView::updateScrollbars):
+ Trigger a layout when scrollbars come and go so the non fast scrollable region gets recomputed.
+
+ (WebKit::BuiltInPDFView::scrollableAreaBoundingBox):
+ Implement this by calling out to the PluginView.
+
2012-05-06 Jon Lee <[email protected]>
[WK2] Push wheel events if there are too many in queue
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h (116468 => 116469)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-05-09 00:02:30 UTC (rev 116468)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-05-09 00:24:15 UTC (rev 116469)
@@ -119,6 +119,7 @@
// ScrollableArea methods.
virtual WebCore::IntRect scrollCornerRect() const;
virtual WebCore::ScrollableArea* enclosingScrollableArea() const;
+ virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
virtual void setScrollOffset(const WebCore::IntPoint&);
virtual int scrollSize(WebCore::ScrollbarOrientation) const;
virtual bool isActive() const;
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm (116468 => 116469)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm 2012-05-09 00:02:30 UTC (rev 116468)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm 2012-05-09 00:24:15 UTC (rev 116469)
@@ -196,6 +196,8 @@
void BuiltInPDFView::updateScrollbars()
{
+ bool hadScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
+
if (m_horizontalScrollbar) {
if (m_pluginSize.width() >= m_pdfDocumentSize.width())
destroyScrollbar(HorizontalScrollbar);
@@ -234,10 +236,15 @@
if (!frameView)
return;
- if (m_verticalScrollbar || m_horizontalScrollbar)
- frameView->addScrollableArea(this);
- else
- frameView->removeScrollableArea(this);
+ bool hasScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
+ if (hadScrollbars != hasScrollbars) {
+ if (hasScrollbars)
+ frameView->addScrollableArea(this);
+ else
+ frameView->removeScrollableArea(this);
+
+ frameView->setNeedsLayout();
+ }
}
PassRefPtr<Scrollbar> BuiltInPDFView::createScrollbar(ScrollbarOrientation orientation)
@@ -688,6 +695,11 @@
return 0;
}
+IntRect BuiltInPDFView::scrollableAreaBoundingBox() const
+{
+ return pluginView()->frameRect();
+}
+
void BuiltInPDFView::setScrollOffset(const IntPoint& offset)
{
m_scrollOffset = IntSize(offset.x(), offset.y());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes