Changeset 56854 in webkit
- Timestamp:
- Mar 31, 2010 11:03:40 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56852 r56854 1 2010-03-31 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Reviewed by Antti Koivisto. 4 5 iframe flattening doesn't flatten 6 https://bugs.webkit.org/show_bug.cgi?id=36798 7 8 Do not draw scrollbars for subframes when frame flattening is 9 enabled. Implemented using a virtual method in ScrollView as 10 suggested by Dave Hyatt. 11 12 Do not suppress scrollbars as that is wrong according to 13 Dave Hyatt. 14 15 Covered by current tests. 16 17 * page/FrameView.cpp: 18 (WebCore::FrameView::avoidScrollbarCreation): 19 * page/FrameView.h: 20 * platform/ScrollView.cpp: 21 (WebCore::ScrollView::setHasHorizontalScrollbar): 22 (WebCore::ScrollView::setHasVerticalScrollbar): 23 * platform/ScrollView.h: 24 (WebCore::ScrollView::avoidScrollbarCreation): 25 * rendering/RenderPart.cpp: 26 (WebCore::RenderPart::layoutWithFlattening): 27 1 28 2010-03-30 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 29 -
trunk/WebCore/page/FrameView.cpp
r56764 r56854 326 326 } 327 327 328 bool FrameView::avoidScrollbarCreation() 329 { 330 // with frame flattening no subframe can have scrollbars 331 // but we also cannot turn scrollbars of as we determine 332 // our flattening policy using that. 333 334 if (!m_frame->ownerElement()) 335 return false; 336 337 if (!m_frame->settings() || m_frame->settings()->frameFlatteningEnabled()) 338 return true; 339 340 return false; 341 } 342 328 343 void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) 329 344 { -
trunk/WebCore/page/FrameView.h
r56209 r56854 78 78 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); 79 79 80 virtual bool avoidScrollbarCreation(); 81 80 82 virtual void setContentsSize(const IntSize&); 81 83 -
trunk/WebCore/platform/ScrollView.cpp
r56526 r56854 35 35 #include <wtf/StdLibExtras.h> 36 36 37 37 38 using std::max; 38 39 … … 81 82 void ScrollView::setHasHorizontalScrollbar(bool hasBar) 82 83 { 84 if (avoidScrollbarCreation()) 85 return; 86 83 87 if (hasBar && !m_horizontalScrollbar) { 84 88 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); … … 93 97 void ScrollView::setHasVerticalScrollbar(bool hasBar) 94 98 { 99 if (avoidScrollbarCreation()) 100 return; 101 95 102 if (hasBar && !m_verticalScrollbar) { 96 103 m_verticalScrollbar = createScrollbar(VerticalScrollbar); -
trunk/WebCore/platform/ScrollView.h
r55890 r56854 93 93 bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } 94 94 95 virtual bool avoidScrollbarCreation() { return false; } 96 95 97 // By default you only receive paint events for the area that is visible. In the case of using a 96 98 // tiled backing store, this method can be set, so that the view paints the entire contents. -
trunk/WebCore/rendering/RenderPart.cpp
r56718 r56854 63 63 HTMLFrameElement* element = static_cast<HTMLFrameElement*>(node()); 64 64 65 // suppress scrollbars as we might have fixed width or height66 childFrameView->setScrollbarsSuppressed(true, true);67 68 65 // Do not expand frames which has zero width or height 69 66 if (!width() || !height() || !childRoot) {
Note: See TracChangeset
for help on using the changeset viewer.