RESOLVED DUPLICATE of bug 29240 30813
scrolling="no" attribute of iframe doesn't work in Chrome
https://bugs.webkit.org/show_bug.cgi?id=30813
Summary scrolling="no" attribute of iframe doesn't work in Chrome
Hanrui
Reported 2009-10-27 03:02:15 PDT
Created attachment 41938 [details] test-case package Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Chrome 4: FAIL Firefox 3.x: OK IE 6/7/8: OK What steps will reproduce the problem? 1. Launch the URL above 2. Pay attention to the "上证博客投票" area on right side. (Or you can search this wording in the page) What is the expected result? Chrome and Safari do not show the scrollbars of the small area. What happens instead? Chrome and Safari show the scrollbars of the small area unexpectedly. (Attached please find the screenshot.) Please provide any additional information below. Attach a screenshot if possible. This issue happens when the iframe element has attribute of scrolling="no" AND the embedded page (i.e. src page of the ifame) has set "overflow:scroll" in <html>'s or <body>'s style. Under this circumstances, IE and Firefox will not show the scrollbars(according to: http://www.w3schools.com/TAGS/att_iframe_scrolling.asp) but Chrome and Safari will. (Please refer my test-case package.)
Attachments
test-case package (726 bytes, application/octet-stream)
2009-10-27 03:02 PDT, Hanrui
no flags
Screenshot for your reference. (47.06 KB, image/png)
2009-10-27 03:03 PDT, Hanrui
no flags
Hanrui
Comment 1 2009-10-27 03:03:21 PDT
Created attachment 41939 [details] Screenshot for your reference.
johnnyding
Comment 2 2009-10-27 07:31:41 PDT
It is because in a frame, WebKit will respect the scrolling type defined on body tag even the owner frame element of the frame has specified value "no" to "scrolling" attribute. (Please refer to function FrameView::layout, file:FrameView.cpp line:583/586). To resolve this problem, I personally think that we should respect the scrolling attribute if ownerFrame element has specified "no" to the attribute. A draft fix is adding the following code before line 568 HTMLFrameOwnerElement* frameElt = m_frame->ownerElement(); if (frameElt->scrollingMode() == ScrollbarAlwaysOff) { hMode = vMode = ScrollbarAlwaysOff; } else if (!subtree) ... Does it make sense?
johnnyding
Comment 3 2009-10-27 07:32:19 PDT
Bug 29240 may be related to this bug.
Simon Fraser (smfr)
Comment 4 2009-11-17 11:31:48 PST
*** This bug has been marked as a duplicate of bug 29240 ***
Note You need to log in before you can comment on or make changes to this bug.