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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 16982005: Allow objects without scrollbars to be scrollable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR Fixes Created 7 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Reset the document's scrollbars back to our defaults before we yield the floor. 305 // Reset the document's scrollbars back to our defaults before we yield the floor.
306 m_firstLayout = true; 306 m_firstLayout = true;
307 setScrollbarsSuppressed(true); 307 setScrollbarsSuppressed(true);
308 if (m_canHaveScrollbars) 308 if (m_canHaveScrollbars)
309 setScrollbarModes(ScrollbarAuto, ScrollbarAuto); 309 setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
310 else 310 else
311 setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff); 311 setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff);
312 setScrollbarsSuppressed(false); 312 setScrollbarsSuppressed(false);
313 } 313 }
314 314
315 void FrameView::resetScrollbarsAndClearContentsSize()
316 {
317 resetScrollbars();
318
319 setScrollbarsSuppressed(true);
320 setContentsSize(IntSize());
321 setScrollbarsSuppressed(false);
322 }
323
324 void FrameView::init() 315 void FrameView::init()
325 { 316 {
326 reset(); 317 reset();
327 318
328 m_margins = LayoutSize(-1, -1); // undefined 319 m_margins = LayoutSize(-1, -1); // undefined
329 m_size = LayoutSize(); 320 m_size = LayoutSize();
330 321
331 // Propagate the marginwidth/height and scrolling modes to the view. 322 // Propagate the marginwidth/height and scrolling modes to the view.
332 Element* ownerElement = m_frame ? m_frame->ownerElement() : 0; 323 Element* ownerElement = m_frame ? m_frame->ownerElement() : 0;
333 if (ownerElement && (ownerElement->hasTagName(frameTag) || ownerElement->has TagName(iframeTag))) { 324 if (ownerElement && (ownerElement->hasTagName(frameTag) || ownerElement->has TagName(iframeTag))) {
(...skipping 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 } 3407 }
3417 3408
3418 AXObjectCache* FrameView::axObjectCache() const 3409 AXObjectCache* FrameView::axObjectCache() const
3419 { 3410 {
3420 if (frame() && frame()->document()) 3411 if (frame() && frame()->document())
3421 return frame()->document()->existingAXObjectCache(); 3412 return frame()->document()->existingAXObjectCache();
3422 return 0; 3413 return 0;
3423 } 3414 }
3424 3415
3425 } // namespace WebCore 3416 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698