WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176277
Follow up FrameView::updateLayoutAndStyleIfNeededRecursive changes with related improvements
https://bugs.webkit.org/show_bug.cgi?id=176277
Summary
Follow up FrameView::updateLayoutAndStyleIfNeededRecursive changes with relat...
Darin Adler
Reported
2017-09-02 11:25:46 PDT
Follow-up FrameView::updateLayoutAndStyleIfNeededRecursive changes with related improvements
Attachments
Patch
(9.56 KB, patch)
2017-09-02 11:34 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-elcapitan
(1.40 MB, application/zip)
2017-09-02 12:27 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews115 for mac-elcapitan
(316.94 KB, application/zip)
2017-09-02 12:35 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(1.59 MB, application/zip)
2017-09-02 12:53 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(1.46 MB, application/zip)
2017-09-02 13:18 PDT
,
Build Bot
no flags
Details
Patch
(9.59 KB, patch)
2017-09-03 15:36 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(3.00 MB, application/zip)
2017-09-03 16:20 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews114 for mac-elcapitan
(348.23 KB, application/zip)
2017-09-03 16:34 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1.86 MB, application/zip)
2017-09-03 16:35 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews126 for ios-simulator-wk2
(11.80 MB, application/zip)
2017-09-03 17:33 PDT
,
Build Bot
no flags
Details
Patch
(9.48 KB, patch)
2017-09-03 20:48 PDT
,
Darin Adler
koivisto
: review+
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2017-09-02 11:34:02 PDT
Comment hidden (obsolete)
Created
attachment 319723
[details]
Patch
Build Bot
Comment 2
2017-09-02 12:27:31 PDT
Comment hidden (obsolete)
Comment on
attachment 319723
[details]
Patch
Attachment 319723
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/4436028
Number of test failures exceeded the failure limit.
Build Bot
Comment 3
2017-09-02 12:27:33 PDT
Comment hidden (obsolete)
Created
attachment 319728
[details]
Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 4
2017-09-02 12:35:55 PDT
Comment hidden (obsolete)
Comment on
attachment 319723
[details]
Patch
Attachment 319723
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/4436010
Number of test failures exceeded the failure limit.
Build Bot
Comment 5
2017-09-02 12:35:56 PDT
Comment hidden (obsolete)
Created
attachment 319730
[details]
Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 6
2017-09-02 12:53:13 PDT
Comment hidden (obsolete)
Comment on
attachment 319723
[details]
Patch
Attachment 319723
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4436122
New failing tests: pageoverlay/overlay-small-frame-paints.html fast/events/mouse-cursor-image-set.html fast/forms/range/range-type-change-onchange.html pageoverlay/overlay-large-document-scrolled.html pageoverlay/overlay-installation.html pageoverlay/overlay-large-document.html accessibility/loading-iframe-sends-notification.html pageoverlay/overlay-small-frame-mouse-events.html
Build Bot
Comment 7
2017-09-02 12:53:15 PDT
Comment hidden (obsolete)
Created
attachment 319732
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 8
2017-09-02 13:18:42 PDT
Comment hidden (obsolete)
Comment on
attachment 319723
[details]
Patch
Attachment 319723
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4436155
New failing tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height.html imported/blink/animations/display-none-cancels-nested-animations.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth.html
Build Bot
Comment 9
2017-09-02 13:18:44 PDT
Comment hidden (obsolete)
Created
attachment 319736
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Darin Adler
Comment 10
2017-09-03 15:36:09 PDT
Comment hidden (obsolete)
Created
attachment 319812
[details]
Patch
Build Bot
Comment 11
2017-09-03 16:19:59 PDT
Comment hidden (obsolete)
Comment on
attachment 319812
[details]
Patch
Attachment 319812
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/4444209
Number of test failures exceeded the failure limit.
Build Bot
Comment 12
2017-09-03 16:20:00 PDT
Comment hidden (obsolete)
Created
attachment 319814
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 13
2017-09-03 16:34:37 PDT
Comment hidden (obsolete)
Comment on
attachment 319812
[details]
Patch
Attachment 319812
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/4444246
Number of test failures exceeded the failure limit.
Build Bot
Comment 14
2017-09-03 16:34:38 PDT
Comment hidden (obsolete)
Created
attachment 319816
[details]
Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 15
2017-09-03 16:35:08 PDT
Comment hidden (obsolete)
Comment on
attachment 319812
[details]
Patch
Attachment 319812
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4444215
New failing tests: pageoverlay/overlay-small-frame-paints.html accessibility/loading-iframe-sends-notification.html pageoverlay/overlay-large-document-scrolled.html pageoverlay/overlay-installation.html compositing/updates/animation-non-composited.html fast/images/animated-gif-no-layout.html pageoverlay/overlay-large-document.html pageoverlay/overlay-small-frame-mouse-events.html
Build Bot
Comment 16
2017-09-03 16:35:10 PDT
Comment hidden (obsolete)
Created
attachment 319817
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 17
2017-09-03 17:33:20 PDT
Comment hidden (obsolete)
Comment on
attachment 319812
[details]
Patch
Attachment 319812
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4444367
New failing tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html compositing/layer-creation/translate-animation-overlap.html compositing/updates/animation-non-composited.html scrollingcoordinator/ios/sync-layer-positions-after-scroll.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html compositing/layer-creation/scale-rotation-animation-overlap.html compositing/layer-creation/translate-scale-animation-overlap.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth.html compositing/layer-creation/multiple-keyframes-animation-overlap.html
Build Bot
Comment 18
2017-09-03 17:33:22 PDT
Comment hidden (obsolete)
Created
attachment 319819
[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Darin Adler
Comment 19
2017-09-03 20:48:13 PDT
Created
attachment 319832
[details]
Patch
Darin Adler
Comment 20
2017-09-03 22:24:11 PDT
Passing all EWS now. Ready for someone to review.
Antti Koivisto
Comment 21
2017-09-04 12:30:31 PDT
Comment on
attachment 319832
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319832&action=review
> Source/WebCore/dom/Document.cpp:1902 > + bool didWork = styleScope().hasPendingUpdate(); > styleScope().flushPendingUpdate(); > > if (!needsStyleRecalc()) > - return false; > + return didWork;
Does this change actually fix some problem? The main side effect of style scope update is style invalidation. If the style doesn't get invalidated (that is, the stylesheets haven't changed in a way that would affect current document) then why do we need signal that we "did work"? If this does makes sense for some reason then an enum return value would be better than a boolean. The name of the function communicates that the boolean is specifically about style update.
> Source/WebCore/page/FrameView.cpp:4577 > + auto nextRenderedDescendant = [this] (DescendantsDeque& descendantsDeque) -> RefPtr<FrameView> { > + if (descendantsDeque.isEmpty()) > + descendantsDeque.append(*this);
Does this only happen on the first iteration? It might be cleaner if you had DescendantsDeque deque { *this } in the caller and removed the branch from the lambda.
Darin Adler
Comment 22
2017-09-04 16:47:50 PDT
Comment on
attachment 319832
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319832&action=review
>> Source/WebCore/dom/Document.cpp:1902 >> + return didWork; > > Does this change actually fix some problem? The main side effect of style scope update is style invalidation. If the style doesn't get invalidated (that is, the stylesheets haven't changed in a way that would affect current document) then why do we need signal that we "did work"? > > If this does makes sense for some reason then an enum return value would be better than a boolean. The name of the function communicates that the boolean is specifically about style update.
OK, I won’t make this change.
>> Source/WebCore/page/FrameView.cpp:4577 >> + descendantsDeque.append(*this); > > Does this only happen on the first iteration? It might be cleaner if you had DescendantsDeque deque { *this } in the caller and removed the branch from the lambda.
Yes. But it’s trickier than it sounds to change. The challenge is how to make something reusable that keeps the three loops readable. - I won’t really be able to "remove the branch" from the lambda. If I get rid of the special case, I still need a way to tell it’s the the first time through the function, since the "append children" operation is done after processing the previous. And the first time through there is no previous. That whole thing is carefully constructed so I can use this single "next" function. - Unfortunately, I can’t write DescendantsDeque deque { *this } because of some subtlety about what Deque constructor arguments are currently supported and the fact that these are Ref. I was able to make it work with a separate append call, but could not make it work as a constructor without something pretty long and ugly. I can keep fiddling with that. Note that whatever it is, I have to repeat it all three times. I tried a few different ways to make a reusable loop that is easy to use both without early exit (for the main function) and with early exit (for the assertions). This was the best I was able to come up with. Something like a for loop would be more natural but I didn’t manage to come up with anything simple. I’m happy to keep fiddling with it for clarity or readability, but I don’t think it is trivial to make it better.
Darin Adler
Comment 23
2017-09-04 16:50:08 PDT
Committed
r221596
: <
http://trac.webkit.org/changeset/221596
>
Radar WebKit Bug Importer
Comment 24
2017-09-27 12:40:52 PDT
<
rdar://problem/34693741
>
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