Title: [117120] branches/safari-536-branch/Source/WebKit2
Diff
Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (117119 => 117120)
--- branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-15 19:45:07 UTC (rev 117119)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-15 19:46:12 UTC (rev 117120)
@@ -1,5 +1,25 @@
2012-05-15 Lucas Forschler <[email protected]>
+ Merge 116469
+
+ 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-15 Lucas Forschler <[email protected]>
+
Merge 116466
2012-05-06 Jon Lee <[email protected]>
Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h (117119 => 117120)
--- branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-05-15 19:45:07 UTC (rev 117119)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h 2012-05-15 19:46:12 UTC (rev 117120)
@@ -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: branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm (117119 => 117120)
--- branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm 2012-05-15 19:45:07 UTC (rev 117119)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm 2012-05-15 19:46:12 UTC (rev 117120)
@@ -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