WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
149489
stop propagating custom scrollbar styles across iframe boundaries
https://bugs.webkit.org/show_bug.cgi?id=149489
Summary
stop propagating custom scrollbar styles across iframe boundaries
MuVen
Reported
2015-09-22 19:21:23 PDT
Currently CustomScrollbars are created for html document/ scrollable div's if the body or document element posses PseudoStyle of SCROLLBAR. While creating customscrollbars for iframes if ownerLayoutObject has PseudoStyle of SCROLLBAR then we create customscrollbars for iframe. But as i see IFrame is a separate document which can hold its own style. As there is no standard spec for this case, i thought of proposing this implementation: to create customscrollbars for IFrame if it posses its own PseudoStyle of SCROLLBAR, else create a regular scrollbar for that IFrame, which stops propagating customscrollbar styles across iframe boundaries. The reason for porposing this intent to implementation is, an irregular creation of custom-scrollbar's in nested IFRAME's. (which is quiet confusing as reported by one of our test engineers) For example consider 4 nested IFRAME's IFRAME 1 => has PseudoStyle of SCROLLBAR with background = orange; IFRAME 2 => has PseudoStyle of SCROLLBAR with background = yellow; IFRAME 3 => doesnt has PseudoStyle of SCROLLBAR; IFRAME 4 => doesnt has PseudoStyle of SCROLLBAR; please check the IFrameStyle-Standardization.jpg. The iframe scrollbars are actually part of the document inside the iframe. As a result, you have to set the scrollbar styles in the document you are loading into the iframe, not in the document that contains the iframe and iframes generically can't inherit/access styles/scripts from their parent page.
Attachments
IframeStlye Standardization
(53.51 KB, image/jpeg)
2015-09-22 19:22 PDT
,
MuVen
no flags
Details
testcase
(1.87 KB, application/x-zip-compressed)
2015-09-22 23:03 PDT
,
MuVen
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
MuVen
Comment 1
2015-09-22 19:22:15 PDT
Created
attachment 261791
[details]
IframeStlye Standardization
Simon Fraser (smfr)
Comment 2
2015-09-22 22:55:55 PDT
Your screenshot of of Chromium, so you should report this against the Blink project. Does the problem reproduce in Safari on Mac?
MuVen
Comment 3
2015-09-22 23:03:00 PDT
@simon, Problem happens on apple safari even. as in the FrameView.cpp PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation) { ... ... ... ... // If we have an owning iframe/frame element, then it can set the custom scrollbar also. RenderWidget* frameRenderer = frame().ownerRenderer(); if (frameRenderer && frameRenderer->style().hasPseudoStyle(SCROLLBAR)) return RenderScrollbar::createCustomScrollbar(*this, orientation, nullptr, &frame()); As this part of code is executed, issue is seen in the safari. Please find the attached testcase. }
MuVen
Comment 4
2015-09-22 23:03:35 PDT
Created
attachment 261799
[details]
testcase
Steve Kobes
Comment 5
2015-09-26 14:43:49 PDT
FYI, we discussed this in Blink on
http://crbug.com/450577
and in
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ULUvtsZ-YQY
. Consistency between Chrome and Safari was a particular concern since custom scrollbar styles are webkit-prefixed. If WebKit changed this, Blink would probably follow. The current behavior makes it possible to detect overflow in a cross-origin iframe, which may have security implications (
http://sirdarckcat.blogspot.com/2013/09/matryoshka-wrapping-overflow-leak-on.html
).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug