OLD | NEW |
---|---|
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 // make it update the rendering area when set | 467 // make it update the rendering area when set |
468 m_margins.setWidth(w); | 468 m_margins.setWidth(w); |
469 } | 469 } |
470 | 470 |
471 void FrameView::setMarginHeight(LayoutUnit h) | 471 void FrameView::setMarginHeight(LayoutUnit h) |
472 { | 472 { |
473 // make it update the rendering area when set | 473 // make it update the rendering area when set |
474 m_margins.setHeight(h); | 474 m_margins.setHeight(h); |
475 } | 475 } |
476 | 476 |
477 IntSize FrameView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarIncl usion) const | |
478 { | |
479 if (m_layoutSize.isEmpty()) | |
480 return ScrollView::layoutSize(scrollbarInclusion); | |
aelias_OOO_until_Jul13
2013/07/31 22:31:21
I don't think we should keep using the ScrollView:
| |
481 | |
482 return m_layoutSize; | |
483 } | |
484 | |
485 void FrameView::setLayoutSize(const IntSize& newSize) | |
aelias_OOO_until_Jul13
2013/07/31 22:31:21
Could you just layout() when this is called and re
| |
486 { | |
487 if (m_layoutSize == newSize) | |
488 return; | |
489 | |
490 m_layoutSize = newSize; | |
491 updateScrollbars(scrollOffset()); | |
492 contentsResized(); | |
493 } | |
494 | |
477 void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) | 495 void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) |
478 { | 496 { |
479 m_canHaveScrollbars = canHaveScrollbars; | 497 m_canHaveScrollbars = canHaveScrollbars; |
480 ScrollView::setCanHaveScrollbars(canHaveScrollbars); | 498 ScrollView::setCanHaveScrollbars(canHaveScrollbars); |
481 } | 499 } |
482 | 500 |
483 void FrameView::updateCanHaveScrollbars() | 501 void FrameView::updateCanHaveScrollbars() |
484 { | 502 { |
485 ScrollbarMode hMode; | 503 ScrollbarMode hMode; |
486 ScrollbarMode vMode; | 504 ScrollbarMode vMode; |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1705 | 1723 |
1706 void FrameView::visibleContentsResized() | 1724 void FrameView::visibleContentsResized() |
1707 { | 1725 { |
1708 // We check to make sure the view is attached to a frame() as this method ca n | 1726 // We check to make sure the view is attached to a frame() as this method ca n |
1709 // be triggered before the view is attached by Frame::createView(...) settin g | 1727 // be triggered before the view is attached by Frame::createView(...) settin g |
1710 // various values such as setScrollBarModes(...) for example. An ASSERT is | 1728 // various values such as setScrollBarModes(...) for example. An ASSERT is |
1711 // triggered when a view is layout before being attached to a frame(). | 1729 // triggered when a view is layout before being attached to a frame(). |
1712 if (!frame()->view()) | 1730 if (!frame()->view()) |
1713 return; | 1731 return; |
1714 | 1732 |
1715 if (!useFixedLayout() && needsLayout()) | 1733 if (m_layoutSize.isEmpty() && needsLayout()) |
1716 layout(); | 1734 layout(); |
1717 | 1735 |
1718 if (RenderView* renderView = this->renderView()) { | 1736 if (RenderView* renderView = this->renderView()) { |
1719 if (renderView->usesCompositing()) | 1737 if (renderView->usesCompositing()) |
1720 renderView->compositor()->frameViewDidChangeSize(); | 1738 renderView->compositor()->frameViewDidChangeSize(); |
1721 } | 1739 } |
1722 } | 1740 } |
1723 | 1741 |
1724 void FrameView::beginDeferredRepaints() | 1742 void FrameView::beginDeferredRepaints() |
1725 { | 1743 { |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3373 } | 3391 } |
3374 | 3392 |
3375 AXObjectCache* FrameView::axObjectCache() const | 3393 AXObjectCache* FrameView::axObjectCache() const |
3376 { | 3394 { |
3377 if (frame() && frame()->document()) | 3395 if (frame() && frame()->document()) |
3378 return frame()->document()->existingAXObjectCache(); | 3396 return frame()->document()->existingAXObjectCache(); |
3379 return 0; | 3397 return 0; |
3380 } | 3398 } |
3381 | 3399 |
3382 } // namespace WebCore | 3400 } // namespace WebCore |
OLD | NEW |