WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86315
Styles are not recalculated when the seamless attribute is dynamically added/removed
https://bugs.webkit.org/show_bug.cgi?id=86315
Summary
Styles are not recalculated when the seamless attribute is dynamically added/...
pimvdb
Reported
2012-05-13 02:14:16 PDT
Scenario: A main page with a seamless iframe and an iframe page. The main page has CSS "color: red" applied to "body". Both the main page and the iframe page have text, which initially is both colored red (as expected). Problems: When the seamless attribute is removed, the iframe page should lose its inherited color style. So, the iframe page should get black text, but it stays red. Using the inspector to select an element on the parent page (e.g. the html element) *does* make the text color to be updated to black. Also (without the attribute removed), when the main web page gets another color set such as blue, then the main web page gets blue text but the iframe page stays red. The inspector trick does not seem to work here. I believe this is a bug because the HTML5 spec says: "The attribute can be set or removed dynamically, with the rendering updating in tandem." I'll try to attach a test case, but it's tricky because there are two HTML files involved (main page and parent page).
Attachments
Test case - main page
(507 bytes, text/html)
2012-05-13 02:14 PDT
,
pimvdb
no flags
Details
Test case - iframe page
(130 bytes, text/html)
2012-05-13 02:15 PDT
,
pimvdb
no flags
Details
Patch
(5.67 KB, patch)
2012-05-14 17:31 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
pimvdb
Comment 1
2012-05-13 02:14:55 PDT
Created
attachment 141601
[details]
Test case - main page
pimvdb
Comment 2
2012-05-13 02:15:24 PDT
Created
attachment 141602
[details]
Test case - iframe page
Eric Seidel (no email)
Comment 3
2012-05-14 16:47:19 PDT
This sounds like two (great) bugs. I'm working on bug #1 now. We'll have to split this bug into two to solve both.
Eric Seidel (no email)
Comment 4
2012-05-14 17:23:25 PDT
Bug #2 is not actually a bug in the code, but a bug in your test. :) The body { } selector is inherited by the child iframe, so even though you change the color on the outer body, it will not be changed on the inner body, since a more specific selector applies. :)
Eric Seidel (no email)
Comment 5
2012-05-14 17:31:55 PDT
Created
attachment 141826
[details]
Patch
Eric Seidel (no email)
Comment 6
2012-05-14 17:34:12 PDT
Thank you for the great bug! I look forward to many more. :) The layout changes for seamless should land in the next couple days, at which point it should begin being actually useful. :) Right now we have only landed the style inheritance, stylesheet inheritance, and navigational changes. The dynamic sizing/layout code will be in my next patch.
Eric Seidel (no email)
Comment 7
2012-05-14 17:45:34 PDT
I've heard that Antti and Kling are perhaps familiar with the world of style as well. :)
Andreas Kling
Comment 8
2012-05-14 18:18:56 PDT
Comment on
attachment 141826
[details]
Patch Looks fabulous, r=me
WebKit Review Bot
Comment 9
2012-05-14 21:35:47 PDT
Comment on
attachment 141826
[details]
Patch Clearing flags on attachment: 141826 Committed
r117026
: <
http://trac.webkit.org/changeset/117026
>
WebKit Review Bot
Comment 10
2012-05-14 21:35:52 PDT
All reviewed patches have been landed. Closing bug.
pimvdb
Comment 11
2012-05-15 02:47:47 PDT
Whoops, bug #2 is indeed my own fault. Sorry about that. Thanks for the very quick response and patch.
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