WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 95890
seamless iframes should not inherit editability
https://bugs.webkit.org/show_bug.cgi?id=95890
Summary
seamless iframes should not inherit editability
Ojan Vafai
Reported
2012-09-05 14:00:53 PDT
http://html5.org/tools/web-apps-tracker?from=7318&to=7319
Attachments
Patch
(5.87 KB, patch)
2012-11-28 02:23 PST
,
Mike West
no flags
Details
Formatted Diff
Diff
Patch
(5.19 KB, patch)
2012-11-28 11:09 PST
,
Mike West
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ian 'Hixie' Hickson
Comment 1
2012-09-05 16:13:58 PDT
This was in response to feedback from WebKit people asking for it not to saying that it didn't in WebKit, FWIW...
Ojan Vafai
Comment 2
2012-09-05 16:32:57 PDT
Ah, I see. There's just a FIXME in the code that we should delete.
http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp?rev=127593#L1671
Eric Seidel (no email)
Comment 3
2012-09-06 11:53:11 PDT
rs=me on removing such. :) we first-implementors are just a confused lot, wandering unawares in the darkness of the unknown.
Mike West
Comment 4
2012-11-27 07:26:34 PST
Based on some quick fiddling around with
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1929
, it looks like WebKit is already behaving as the spec claims it should. Eric, did you mean "Remove that FIXME, we should totally inherit editability!" If so, I'm happy to pick it up. If not, I think we can close this bug.
Ojan Vafai
Comment 5
2012-11-27 16:33:50 PST
Yes, I think we can remove the FIXME.
Mike West
Comment 6
2012-11-28 02:23:36 PST
Created
attachment 176434
[details]
Patch
Ojan Vafai
Comment 7
2012-11-28 10:36:59 PST
Comment on
attachment 176434
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=176434&action=review
Removing the FIXME is still correct since this only affects the document, but please update the test case to use js-test-pre and to fail in the second case (it's ok to check in tests that say FAIL if they are exposing a bug).
> LayoutTests/fast/frames/seamless/seamless-contenteditable-not-inherited.html:22 > + if (window.testRunner) > + testRunner.dumpAsText(); > + > + function test() { > + var span = document.querySelector('div > iframe').contentWindow.document.querySelector('span'); > + var spanEditable = window.getComputedStyle(span).getPropertyCSSValue('-webkit-user-modify').cssText; > + if (spanEditable == 'read-only') > + console.log("PASS: An element inside a seamless iframe inside a contenteditable element does not inherit editability."); > + else > + console.log("FAIL: An element inside a seamless iframe inside a contenteditable element should not inherit editability."); > + > + var p = document.querySelector('body > iframe').contentWindow.document.querySelector('p'); > + var pEditable = window.getComputedStyle(p).getPropertyCSSValue('-webkit-user-modify').cssText; > + if (pEditable == 'read-only') > + console.log("PASS: An element inside a seamless iframe does not inherit editability via CSS cascade."); > + else > + console.log("FAIL: An element inside a seamless iframe should not inherit editability via CSS cascade."); > + }
Please use js-test-pre.js for this. It makes for more developer friendly error messages when there are failures and would be less code.
> LayoutTests/fast/frames/seamless/seamless-contenteditable-not-inherited.html:36 > + <iframe seamless srcdoc="<p>This paragraph is not editable.</p>"></iframe>
Actually, I think this paragraph should be editable! The spec just says contentEditable doesn't inherit. It seems like all CSS styling should. In fact, it some cases it seems like it does. I think this is exposing a bug in the seamless implementation. Looks like this is a general seamless bug:
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1932
.
Mike West
Comment 8
2012-11-28 11:09:11 PST
Created
attachment 176526
[details]
Patch
Mike West
Comment 9
2012-11-28 11:11:26 PST
(In reply to
comment #7
)
> (From update of
attachment 176434
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=176434&action=review
> > Removing the FIXME is still correct since this only affects the document, but please update the test case to use js-test-pre and to fail in the second case (it's ok to check in tests that say FAIL if they are exposing a bug). > > Please use js-test-pre.js for this. It makes for more developer friendly error messages when there are failures and would be less code.
Done, thanks for the tip.
> Looks like this is a general seamless bug:
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1932
.
Bleh. :(
Ojan Vafai
Comment 10
2012-11-28 12:24:15 PST
Comment on
attachment 176526
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=176526&action=review
Thanks!
> LayoutTests/fast/frames/seamless/seamless-contenteditable-not-inherited.html:10 > + window.span = document.querySelector('div > iframe').contentDocument.querySelector('span'); > + window.p = document.querySelector('body > iframe').contentDocument.querySelector('p');
Nit: This is fine, but I would have just made them globals (e.g. s/window.span/span/).
Mike West
Comment 11
2012-11-28 23:21:11 PST
(In reply to
comment #10
)
> (From update of
attachment 176526
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=176526&action=review
> > Thanks!
Thank you!
> > LayoutTests/fast/frames/seamless/seamless-contenteditable-not-inherited.html:10 > > + window.span = document.querySelector('div > iframe').contentDocument.querySelector('span'); > > + window.p = document.querySelector('body > iframe').contentDocument.querySelector('p'); > > Nit: This is fine, but I would have just made them globals (e.g. s/window.span/span/).
I did it this way for consistency with the other seamless tests, which generally seem to follow this pattern.
WebKit Review Bot
Comment 12
2012-11-28 23:46:51 PST
Comment on
attachment 176526
[details]
Patch Clearing flags on attachment: 176526 Committed
r136105
: <
http://trac.webkit.org/changeset/136105
>
WebKit Review Bot
Comment 13
2012-11-28 23:46:56 PST
All reviewed patches have been landed. Closing bug.
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