WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
115736
Changing the style of a hidden div queues a repaint
https://bugs.webkit.org/show_bug.cgi?id=115736
Summary
Changing the style of a hidden div queues a repaint
José Dapena Paz
Reported
2013-05-07 10:27:17 PDT
Created
attachment 200924
[details]
Test html Attaching test html. Test shows how browser updates tiles. There are 4 divs on page: one is container and three others are columns with different colors; right div is hidden(visibility) and placed over two tiles; Every 3 secs JScript changes colors for left and right divs. As result, browser updates tiles upper-left(it is place for left div) and upper-right and down-right, BUT nothing changed(visually) on right side.
Attachments
Test html
(1.37 KB, text/html)
2013-05-07 10:27 PDT
,
José Dapena Paz
no flags
Details
Patch
(4.96 KB, patch)
2013-05-07 10:55 PDT
,
José Dapena Paz
simon.fraser
: review-
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
(735.17 KB, application/zip)
2013-05-07 11:42 PDT
,
Build Bot
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
José Dapena Paz
Comment 1
2013-05-07 10:55:53 PDT
Created
attachment 200931
[details]
Patch
Build Bot
Comment 2
2013-05-07 11:42:07 PDT
Comment on
attachment 200931
[details]
Patch
Attachment 200931
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/266124
New failing tests: fast/repaint/hidden-div-repaint.html
Build Bot
Comment 3
2013-05-07 11:42:09 PDT
Created
attachment 200952
[details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.2
Simon Fraser (smfr)
Comment 4
2013-05-07 12:23:56 PDT
Comment on
attachment 200931
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=200931&action=review
> Source/WebCore/rendering/style/RenderStyle.cpp:678 > + if (visibility() == other->visibility() && visibility() == HIDDEN) > + return StyleDifferenceEqual;
You can't do this; you'll miss out on other styles tested later, which may be different.
José Dapena Paz
Comment 5
2013-05-08 02:36:09 PDT
(In reply to
comment #4
)
> (From update of
attachment 200931
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=200931&action=review
> > > Source/WebCore/rendering/style/RenderStyle.cpp:678 > > + if (visibility() == other->visibility() && visibility() == HIDDEN) > > + return StyleDifferenceEqual; > > You can't do this; you'll miss out on other styles tested later, which may be different.
Let's try to understand the problem better: what you say is something like this scenario, right?: (Considering change from A to B should do a repaint) 1. style A, visible 2. style A, hidden -> proper update 3. style B, hidden -> we prevent style change 4. style B, visible -> Shouldn't this be at least forcing a repaint? We'll be changing visibility in this style change, so the check for inherited_flags._visibility will mark the diff as paint. What happens in current code? 1. style A, visible 2. style A, hidden -> proper update 3. style B, hidden -> We schedule a repaint of the area covered by the element. But... it is and was hidden and with same layout, do we need this change? 4. style B, visible -> It will mark diff as paint due to the visibility change. Guess I am missing something terribly obvious, could you ellaborate more on the issue?
Simon Fraser (smfr)
Comment 6
2013-05-08 09:37:11 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (From update of
attachment 200931
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=200931&action=review
> > > > > Source/WebCore/rendering/style/RenderStyle.cpp:678 > > > + if (visibility() == other->visibility() && visibility() == HIDDEN) > > > + return StyleDifferenceEqual; > > > > You can't do this; you'll miss out on other styles tested later, which may be different. > > Let's try to understand the problem better: what you say is something like this scenario, right?:
The problem is how RenderStlye::diff() works. You can't ever return early with a diff type is that is "less" than later ones. i.e. all the "StyleDifferenceLayout" returns have to come before the StyleDifferenceRepaint returns etc. Bailing early with a StyleDifferenceEqual is not an option because you may miss some other part of the style change.
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