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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Index: WebCore/WebCore.base.exp
2 ===================================================================
3 --- WebCore/WebCore.base.exp (revision 50516)
4 +++ WebCore/WebCore.base.exp (working copy)
5 @@ -688,6 +688,7 @@
6 __ZN7WebCore9FrameView21scrollPositionChangedEv
7 __ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
8 __ZN7WebCore9FrameView23layoutIfNeededRecursiveEv
9 +__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
10 __ZN7WebCore9FrameView29forceLayoutWithPageWidthRangeEffb
11 __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
12 __ZN7WebCore9FrameView29syncCompositingStateRecursiveEv
13 Index: WebCore/page/FrameView.h
14 ===================================================================
15 --- WebCore/page/FrameView.h (revision 50516)
16 +++ WebCore/page/FrameView.h (working copy)
17 @@ -72,6 +72,9 @@
18 void setMarginWidth(int);
19 void setMarginHeight(int);
20
21 + virtual void setCanHaveScrollbars(bool);
22 + void updateCanHaveScrollbars();
23 +
24 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
25
26 virtual void setContentsSize(const IntSize&);
27 @@ -258,6 +261,7 @@
28
29 bool m_doFullRepaint;
30
31 + bool m_canHaveScrollbars;
32 bool m_useSlowRepaints;
33 bool m_isOverlapped;
34 bool m_contentIsOpaque;
35 Index: WebCore/page/FrameView.cpp
36 ===================================================================
37 --- WebCore/page/FrameView.cpp (revision 50516)
38 +++ WebCore/page/FrameView.cpp (working copy)
39 @@ -105,6 +105,7 @@
40
41 FrameView::FrameView(Frame* frame)
42 : m_frame(frame)
43 + , m_canHaveScrollbars(true)
44 , m_slowRepaintObjectCount(0)
45 , m_layoutTimer(this, &FrameView::layoutTimerFired)
46 , m_layoutRoot(0)
47 @@ -219,7 +220,10 @@
48 // Reset the document's scrollbars back to our defaults before we yield the floor.
49 m_firstLayout = true;
50 setScrollbarsSuppressed(true);
51 - setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
52 + if (m_canHaveScrollbars)
53 + setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
54 + else
55 + setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff);
56 setScrollbarsSuppressed(false);
57 }
58
59 @@ -316,6 +320,23 @@
60 m_margins.setHeight(h);
61 }
62
63 +void FrameView::setCanHaveScrollbars(bool canHaveScrollbars)
64 +{
65 + m_canHaveScrollbars = canHaveScrollbars;
66 + ScrollView::setCanHaveScrollbars(canHaveScrollbars);
67 +}
68 +
69 +void FrameView::updateCanHaveScrollbars()
70 +{
71 + ScrollbarMode hMode;
72 + ScrollbarMode vMode;
73 + scrollbarModes(hMode, vMode);
74 + if (hMode == ScrollbarAlwaysOff && vMode == ScrollbarAlwaysOff)
75 + m_canHaveScrollbars = false;
76 + else
77 + m_canHaveScrollbars = true;
78 +}
79 +
80 PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientati on)
81 {
82 // FIXME: We need to update the scrollbar dynamically as documents change ( or as doc elements and bodies get discovered that have custom styles).
83 @@ -563,7 +584,13 @@
84
85 ScrollbarMode hMode;
86 ScrollbarMode vMode;
87 - scrollbarModes(hMode, vMode);
88 + if (m_canHaveScrollbars) {
89 + hMode = ScrollbarAuto;
90 + vMode = ScrollbarAuto;
91 + } else {
92 + hMode = ScrollbarAlwaysOff;
93 + vMode = ScrollbarAlwaysOff;
94 + }
95
96 if (!subtree) {
97 RenderObject* rootRenderer = document->documentElement() ? document->do cumentElement()->renderer() : 0;
98 Index: WebCore/platform/ScrollView.h
99 ===================================================================
100 --- WebCore/platform/ScrollView.h (revision 50516)
101 +++ WebCore/platform/ScrollView.h (working copy)
102 @@ -89,7 +89,7 @@
103 void scrollbarModes(ScrollbarMode& horizontalMode, ScrollbarMode& verticalM ode) const;
104 ScrollbarMode horizontalScrollbarMode() const { ScrollbarMode horizontal, v ertical; scrollbarModes(horizontal, vertical); return horizontal; }
105 ScrollbarMode verticalScrollbarMode() const { ScrollbarMode horizontal, ver tical; scrollbarModes(horizontal, vertical); return vertical; }
106 - void setCanHaveScrollbars(bool flag);
107 + virtual void setCanHaveScrollbars(bool);
108 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scroll barAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
109
110 // Overridden by FrameView to create custom CSS scrollbars if applicable.
111 Index: LayoutTests/fast/overflow/scrollbar-restored-expected.txt
112 ===================================================================
113 --- LayoutTests/fast/overflow/scrollbar-restored-expected.txt (revision 0)
114 +++ LayoutTests/fast/overflow/scrollbar-restored-expected.txt (revision 0)
115 @@ -0,0 +1,5 @@
116 +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.
117 +
118 +This tests that after setting 'overflow' on the document element to 'hidden' an d back to 'visible', scrollbars appear as necessary.
119 +
120 +PASS
121
122 Property changes on: LayoutTests/fast/overflow/scrollbar-restored-expected.txt
123 ___________________________________________________________________
124 Added: svn:eol-style
125 + native
126
127 Index: LayoutTests/fast/overflow/scrollbar-restored.html
128 ===================================================================
129 --- LayoutTests/fast/overflow/scrollbar-restored.html (revision 0)
130 +++ LayoutTests/fast/overflow/scrollbar-restored.html (revision 0)
131 @@ -0,0 +1,29 @@
132 +<body>
133 + <p>
134 + Test for <i><a href="rdar://problem/7215132">rdar://problem/7215132</a> ,
135 + <a href="https://bugs.webkit.org/show_bug.cgi?id=29167">bug 29167</a>,
136 + REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode</i>,
137 + and <i><a href="rdar://problem/7314421">rdar://problem/7314421</a>,
138 + <a href="https://bugs.webkit.org/show_bug.cgi?id=30517">bug 30517</a>,
139 + REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store</i>.
140 + </p>
141 + <p>
142 + This tests that after setting 'overflow' on the document element to
143 + 'hidden' and back to 'visible', scrollbars appear as necessary.
144 + </p>
145 + <p id="result">FAIL: Test did not run to completion</p>
146 + <script>
147 + if (window.layoutTestController)
148 + layoutTestController.dumpAsText();
149 +
150 + document.documentElement.style.overflow = "hidden";
151 + document.body.offsetTop;
152 + document.documentElement.style.removeProperty("overflow");
153 + document.body.style.height = "200%";
154 + var result = (innerWidth === document.documentElement.offsetWidth)
155 + ? "FAIL: Scrollbar did not appear after resetting 'overflow'"
156 + : "PASS"
157 +
158 + document.getElementById("result").innerText = result;
159 + </script>
160 +</body>
161
162 Property changes on: LayoutTests/fast/overflow/scrollbar-restored.html
163 ___________________________________________________________________
164 Added: svn:mime-type
165 + text/html
166 Added: svn:eol-style
167 + native
168
OLDNEW
« 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