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

Side by Side Diff: third_party/WebKit/WebCore/platform/gtk/ScrollViewGtk.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
4 * Copyright (C) 2007 Holger Hans Peter Freyther 4 * Copyright (C) 2007 Holger Hans Peter Freyther
5 * Copyright (C) 2008 Collabora Ltd. 5 * Copyright (C) 2008 Collabora Ltd.
6 * 6 *
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool ScrollView::platformHandleHorizontalAdjustment(const IntSize& scroll) 147 bool ScrollView::platformHandleHorizontalAdjustment(const IntSize& scroll)
148 { 148 {
149 if (m_horizontalAdjustment) { 149 if (m_horizontalAdjustment) {
150 m_horizontalAdjustment->page_size = visibleWidth(); 150 m_horizontalAdjustment->page_size = visibleWidth();
151 m_horizontalAdjustment->step_increment = visibleWidth() / 10.0; 151 m_horizontalAdjustment->step_increment = visibleWidth() / 10.0;
152 m_horizontalAdjustment->page_increment = visibleWidth() * 0.9; 152 m_horizontalAdjustment->page_increment = visibleWidth() * 0.9;
153 m_horizontalAdjustment->lower = 0; 153 m_horizontalAdjustment->lower = 0;
154 m_horizontalAdjustment->upper = contentsWidth(); 154 m_horizontalAdjustment->upper = contentsWidth();
155 gtk_adjustment_changed(m_horizontalAdjustment); 155 gtk_adjustment_changed(m_horizontalAdjustment);
156 156
157 if (m_scrollOffset.width() != scroll.width()) { 157 if (m_horizontalAdjustment->value != scroll.width()) {
158 m_horizontalAdjustment->value = scroll.width(); 158 m_horizontalAdjustment->value = scroll.width();
159 gtk_adjustment_value_changed(m_horizontalAdjustment); 159 gtk_adjustment_value_changed(m_horizontalAdjustment);
160 } 160 }
161 return true; 161 return true;
162 } 162 }
163 return false; 163 return false;
164 } 164 }
165 165
166 bool ScrollView::platformHandleVerticalAdjustment(const IntSize& scroll) 166 bool ScrollView::platformHandleVerticalAdjustment(const IntSize& scroll)
167 { 167 {
168 if (m_verticalAdjustment) { 168 if (m_verticalAdjustment) {
169 m_verticalAdjustment->page_size = visibleHeight(); 169 m_verticalAdjustment->page_size = visibleHeight();
170 m_verticalAdjustment->step_increment = visibleHeight() / 10.0; 170 m_verticalAdjustment->step_increment = visibleHeight() / 10.0;
171 m_verticalAdjustment->page_increment = visibleHeight() * 0.9; 171 m_verticalAdjustment->page_increment = visibleHeight() * 0.9;
172 m_verticalAdjustment->lower = 0; 172 m_verticalAdjustment->lower = 0;
173 m_verticalAdjustment->upper = contentsHeight(); 173 m_verticalAdjustment->upper = contentsHeight();
174 gtk_adjustment_changed(m_verticalAdjustment); 174 gtk_adjustment_changed(m_verticalAdjustment);
175 175
176 if (m_scrollOffset.height() != scroll.height()) { 176 if (m_verticalAdjustment->value != scroll.height()) {
177 m_verticalAdjustment->value = scroll.height(); 177 m_verticalAdjustment->value = scroll.height();
178 gtk_adjustment_value_changed(m_verticalAdjustment); 178 gtk_adjustment_value_changed(m_verticalAdjustment);
179 } 179 }
180 return true; 180 return true;
181 } 181 }
182 return false; 182 return false;
183 } 183 }
184 184
185 bool ScrollView::platformHasHorizontalAdjustment() const 185 bool ScrollView::platformHasHorizontalAdjustment() const
186 { 186 {
187 return m_horizontalAdjustment != 0; 187 return m_horizontalAdjustment != 0;
188 } 188 }
189 189
190 bool ScrollView::platformHasVerticalAdjustment() const 190 bool ScrollView::platformHasVerticalAdjustment() const
191 { 191 {
192 return m_verticalAdjustment != 0; 192 return m_verticalAdjustment != 0;
193 } 193 }
194 194
195 } 195 }
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp ('k') | third_party/WebKit/WebCore/rendering/InlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698