Summary: | Changing "scrolling" attribute on iframe element already in DOM doesn't take effect | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tom Robinson <tom> | ||||||||
Component: | Scrolling | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, jasneet, rniwa, simon.fraser, techrazy.yang, webkit-bug-importer, zwarich | ||||||||
Priority: | P2 | Keywords: | GoodFirstBug, InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Tom Robinson
2009-02-20 19:47:47 PST
Created attachment 27847 [details]
Reduction
conform on Windows Safari. Created attachment 28060 [details]
First attempt to fix the bug
Add a new method in FrameView to change the scrollbar's state and a test case for this bug.
*** Bug 24972 has been marked as a duplicate of this bug. *** Comment on attachment 28060 [details]
First attempt to fix the bug
+ if (attached()) {
Is there any need to check attached() here? Shouldn't checking contentFrame() be enough?
+ if (contentFrame() && contentFrame()->view()) {
+ FrameView* view = contentFrame()->view();
+ view->changeScrollbarsState(m_scrolling != ScrollbarAlwaysOff);
+ }
+ }
There is already a method on FrameView for setting the scrollbar state:
void setCanHaveScrollbars(bool canScroll);
You should use that instead of making your own. I'm r-'ing this patch, but I am glad that you are fixing this bug.
I am able to reproduce this in Safari 15.6 on macOS using modified test case by changing HTTP to HTTPS in test case: Link - https://jsfiddle.net/fcjd6qr8/ Following are results across browsers: *** Firefox Nightly 105 *** Once iframe load, clicking "show scrollbars" load "scrollbar" in iframe *** Chrome Canary 106 *** Nothing loads and "show scrollbars" do nothing. *** Safari 15.6 on macOS 12.5 *** Nothing loads and "show scrollbars" do nothing. ________ I am not sure on web-spec but just wanted to share updated testing results. Thanks! Created attachment 461752 [details]
Reduction
HTMLFrameElementBase::parseAttribute() needs to respond to "scrolling" attribute changes. |