Bug 176210

Summary: Ensure RenderStyle and SameSizeAsRenderStyle have the same size
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, don.olmstead, pvollan, webkit-bug-importer, yoshiaki.jitsukawa
Priority: P2 Keywords: InRadar, PlatformOnly
Version: WebKit Local Build   
Hardware: PC   
OS: Unspecified   
Bug Depends on: 176171    
Bug Blocks:    
Attachments:
Description Flags
For EWS
none
Patch none

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>