Bug 176210 - Ensure RenderStyle and SameSizeAsRenderStyle have the same size
Summary: Ensure RenderStyle and SameSizeAsRenderStyle have the same size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: PC Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar, PlatformOnly
Depends on: 176171
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-31 20:16 PDT by Daniel Bates
Modified: 2017-09-27 12:43 PDT (History)
6 users (show)

See Also:


Attachments
For EWS (1.37 KB, patch)
2017-08-31 20:19 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (1.72 KB, patch)
2017-08-31 23:55 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-08-31 20:16:14 PDT
We should look to revert the Apple Windows build fix in <http://trac.webkit.org/changeset/221469> (build fix for bug #176171).

The following is the error that led to change made in r221469:

[[
c:\cygwin\home\buildbot\slave\win-debug\build\source\webcore\rendering\style\RenderStyle.cpp(84): error C2338: RenderStyle should stay small (compiling source file C:\cygwin\home\buildbot\slave\win-debug\build\Source\WebCore\rendering\style\StyleAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\Source\WebCore\WebCore.vcxproj]
]]
<https://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/3683/steps/compile-webkit/logs/stdio>

This error only occurs on the Apple Windows Debug and Release bots. It does not occur when building on any other port. The Apple Windows Debug and Release bots are using VS 2015. Another data point, Don Olmstead was not able to reproduce this compile-time failure on VS 2015 when building the WinCairo port.
Comment 1 Daniel Bates 2017-08-31 20:19:26 PDT
Created attachment 319566 [details]
For EWS

I expect this patch to fail on the Windows EWS. This is for my sanity.
Comment 2 Yoshiaki Jitsukawa 2017-08-31 23:05:19 PDT
The size of RenderStyle and SameSizeAsRenderStyle are 0x34 and 0x38 bytes respectively on AppleWin (32 bit).

static_assert(sizeof(RenderStyle) == 0x34, "0x34");
static_assert(sizeof(SameSizeAsRenderStyle) == 0x38, "0x38");
Comment 3 Yoshiaki Jitsukawa 2017-08-31 23:27:34 PDT
There's a 4 byte padding between SameSizeAsRenderStyle::m_inheritedFlags and
SameSizeAsRenderStyle::m_nonInheritedFlags due to 64 bit align requirement
for m_nonInheritedFlags (uint64_t).

static_assert(offsetof(SameSizeAsRenderStyle, m_inheritedFlags) == 0x24, "0x24");
static_assert(offsetof(SameSizeAsRenderStyle, m_nonInheritedFlags) == 0x30, "0x30");
Comment 4 Yoshiaki Jitsukawa 2017-08-31 23:55:50 PDT
Created attachment 319582 [details]
Patch
Comment 5 WebKit Commit Bot 2017-09-01 10:17:36 PDT
Comment on attachment 319582 [details]
Patch

Clearing flags on attachment: 319582

Committed r221480: <http://trac.webkit.org/changeset/221480>
Comment 6 WebKit Commit Bot 2017-09-01 10:17:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-09-27 12:43:05 PDT
<rdar://problem/34693819>