Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: third_party/WebKit/crp

Issue 376009: WebKit 29167 30517 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/crp
===================================================================
--- third_party/WebKit/crp (revision 0)
+++ third_party/WebKit/crp (revision 0)
@@ -0,0 +1,168 @@
+Index: WebCore/WebCore.base.exp
+===================================================================
+--- WebCore/WebCore.base.exp (revision 50516)
++++ WebCore/WebCore.base.exp (working copy)
+@@ -688,6 +688,7 @@
+ __ZN7WebCore9FrameView21scrollPositionChangedEv
+ __ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
+ __ZN7WebCore9FrameView23layoutIfNeededRecursiveEv
++__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
+ __ZN7WebCore9FrameView29forceLayoutWithPageWidthRangeEffb
+ __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
+ __ZN7WebCore9FrameView29syncCompositingStateRecursiveEv
+Index: WebCore/page/FrameView.h
+===================================================================
+--- WebCore/page/FrameView.h (revision 50516)
++++ WebCore/page/FrameView.h (working copy)
+@@ -72,6 +72,9 @@
+ void setMarginWidth(int);
+ void setMarginHeight(int);
+
++ virtual void setCanHaveScrollbars(bool);
++ void updateCanHaveScrollbars();
++
+ virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
+
+ virtual void setContentsSize(const IntSize&);
+@@ -258,6 +261,7 @@
+
+ bool m_doFullRepaint;
+
++ bool m_canHaveScrollbars;
+ bool m_useSlowRepaints;
+ bool m_isOverlapped;
+ bool m_contentIsOpaque;
+Index: WebCore/page/FrameView.cpp
+===================================================================
+--- WebCore/page/FrameView.cpp (revision 50516)
++++ WebCore/page/FrameView.cpp (working copy)
+@@ -105,6 +105,7 @@
+
+ FrameView::FrameView(Frame* frame)
+ : m_frame(frame)
++ , m_canHaveScrollbars(true)
+ , m_slowRepaintObjectCount(0)
+ , m_layoutTimer(this, &FrameView::layoutTimerFired)
+ , m_layoutRoot(0)
+@@ -219,7 +220,10 @@
+ // Reset the document's scrollbars back to our defaults before we yield the floor.
+ m_firstLayout = true;
+ setScrollbarsSuppressed(true);
+- setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
++ if (m_canHaveScrollbars)
++ setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
++ else
++ setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff);
+ setScrollbarsSuppressed(false);
+ }
+
+@@ -316,6 +320,23 @@
+ m_margins.setHeight(h);
+ }
+
++void FrameView::setCanHaveScrollbars(bool canHaveScrollbars)
++{
++ m_canHaveScrollbars = canHaveScrollbars;
++ ScrollView::setCanHaveScrollbars(canHaveScrollbars);
++}
++
++void FrameView::updateCanHaveScrollbars()
++{
++ ScrollbarMode hMode;
++ ScrollbarMode vMode;
++ scrollbarModes(hMode, vMode);
++ if (hMode == ScrollbarAlwaysOff && vMode == ScrollbarAlwaysOff)
++ m_canHaveScrollbars = false;
++ else
++ m_canHaveScrollbars = true;
++}
++
+ PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
+ {
+ // FIXME: We need to update the scrollbar dynamically as documents change (or as doc elements and bodies get discovered that have custom styles).
+@@ -563,7 +584,13 @@
+
+ ScrollbarMode hMode;
+ ScrollbarMode vMode;
+- scrollbarModes(hMode, vMode);
++ if (m_canHaveScrollbars) {
++ hMode = ScrollbarAuto;
++ vMode = ScrollbarAuto;
++ } else {
++ hMode = ScrollbarAlwaysOff;
++ vMode = ScrollbarAlwaysOff;
++ }
+
+ if (!subtree) {
+ RenderObject* rootRenderer = document->documentElement() ? document->documentElement()->renderer() : 0;
+Index: WebCore/platform/ScrollView.h
+===================================================================
+--- WebCore/platform/ScrollView.h (revision 50516)
++++ WebCore/platform/ScrollView.h (working copy)
+@@ -89,7 +89,7 @@
+ void scrollbarModes(ScrollbarMode& horizontalMode, ScrollbarMode& verticalMode) const;
+ ScrollbarMode horizontalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return horizontal; }
+ ScrollbarMode verticalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return vertical; }
+- void setCanHaveScrollbars(bool flag);
++ virtual void setCanHaveScrollbars(bool);
+ bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
+
+ // Overridden by FrameView to create custom CSS scrollbars if applicable.
+Index: LayoutTests/fast/overflow/scrollbar-restored-expected.txt
+===================================================================
+--- LayoutTests/fast/overflow/scrollbar-restored-expected.txt (revision 0)
++++ LayoutTests/fast/overflow/scrollbar-restored-expected.txt (revision 0)
+@@ -0,0 +1,5 @@
++Test for rdar://problem/7215132, bug 29167, REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode, and rdar://problem/7314421, bug 30517, REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
++
++This tests that after setting 'overflow' on the document element to 'hidden' and back to 'visible', scrollbars appear as necessary.
++
++PASS
+
+Property changes on: LayoutTests/fast/overflow/scrollbar-restored-expected.txt
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Index: LayoutTests/fast/overflow/scrollbar-restored.html
+===================================================================
+--- LayoutTests/fast/overflow/scrollbar-restored.html (revision 0)
++++ LayoutTests/fast/overflow/scrollbar-restored.html (revision 0)
+@@ -0,0 +1,29 @@
++<body>
++ <p>
++ Test for <i><a href="rdar://problem/7215132">rdar://problem/7215132</a>,
++ <a href="https://bugs.webkit.org/show_bug.cgi?id=29167">bug 29167</a>,
++ REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode</i>,
++ and <i><a href="rdar://problem/7314421">rdar://problem/7314421</a>,
++ <a href="https://bugs.webkit.org/show_bug.cgi?id=30517">bug 30517</a>,
++ REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store</i>.
++ </p>
++ <p>
++ This tests that after setting 'overflow' on the document element to
++ 'hidden' and back to 'visible', scrollbars appear as necessary.
++ </p>
++ <p id="result">FAIL: Test did not run to completion</p>
++ <script>
++ if (window.layoutTestController)
++ layoutTestController.dumpAsText();
++
++ document.documentElement.style.overflow = "hidden";
++ document.body.offsetTop;
++ document.documentElement.style.removeProperty("overflow");
++ document.body.style.height = "200%";
++ var result = (innerWidth === document.documentElement.offsetWidth)
++ ? "FAIL: Scrollbar did not appear after resetting 'overflow'"
++ : "PASS"
++
++ document.getElementById("result").innerText = result;
++ </script>
++</body>
+
+Property changes on: LayoutTests/fast/overflow/scrollbar-restored.html
+___________________________________________________________________
+Added: svn:mime-type
+ + text/html
+Added: svn:eol-style
+ + native
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698