Bug 202712 - [iOS] REGRESSION (r250398) Layout Test fast/history/page-cache-element-state-focused.html is failing
Summary: [iOS] REGRESSION (r250398) Layout Test fast/history/page-cache-element-state-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-08 16:59 PDT by Chris Dumez
Modified: 2019-10-09 10:27 PDT (History)
15 users (show)

See Also:


Attachments
WIP Patch (2.00 KB, patch)
2019-10-08 17:01 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (3.40 KB, patch)
2019-10-08 18:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-10-08 16:59:23 PDT
fast/history/page-cache-element-state-focused.html is failing on internal bots.
Comment 1 Chris Dumez 2019-10-08 16:59:40 PDT
<rdar://problem/56082428>
Comment 2 Chris Dumez 2019-10-08 17:01:24 PDT
Created attachment 380481 [details]
WIP Patch

Needs change log.
Comment 3 Chris Dumez 2019-10-08 18:30:35 PDT
Created attachment 380490 [details]
Patch
Comment 4 WebKit Commit Bot 2019-10-09 07:38:52 PDT
Comment on attachment 380490 [details]
Patch

Clearing flags on attachment: 380490

Committed r250912: <https://trac.webkit.org/changeset/250912>
Comment 5 WebKit Commit Bot 2019-10-09 07:38:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2019-10-09 09:45:21 PDT
Comment on attachment 380490 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380490&action=review

> Source/WebCore/css/CSSDefaultStyleSheets.cpp:96
> +static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}" CSS_DARK_MODE_ADDITION "head{display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto " DEFAULT_OUTLINE_WIDTH " -webkit-focus-ring-color}a:any-link{color:-webkit-link;text-decoration:underline}a:any-link:active{color:-webkit-activelink}";

Tiny nitpick: There’s not enough const here. This declares a constant string, and a non-constant global variable that starts out pointing to it; but we don’t need to change the value of that global variable. We should add another const or constexpr so the pointer itself is constant too, not just the string contents. Or could use a constant array instead of a pointer to a string; I think that is a little smaller.
Comment 7 Chris Dumez 2019-10-09 10:27:35 PDT
(In reply to Darin Adler from comment #6)
> Comment on attachment 380490 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=380490&action=review
> 
> > Source/WebCore/css/CSSDefaultStyleSheets.cpp:96
> > +static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}" CSS_DARK_MODE_ADDITION "head{display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto " DEFAULT_OUTLINE_WIDTH " -webkit-focus-ring-color}a:any-link{color:-webkit-link;text-decoration:underline}a:any-link:active{color:-webkit-activelink}";
> 
> Tiny nitpick: There’s not enough const here. This declares a constant
> string, and a non-constant global variable that starts out pointing to it;
> but we don’t need to change the value of that global variable. We should add
> another const or constexpr so the pointer itself is constant too, not just
> the string contents. Or could use a constant array instead of a pointer to a
> string; I think that is a little smaller.

Landed a follow-up fix in <https://trac.webkit.org/changeset/250916> thanks.
I opted for "static const char simpleUserAgentStyleSheet[]".