Title: [120366] trunk/Source/WebCore
- Revision
- 120366
- Author
- [email protected]
- Date
- 2012-06-14 15:33:20 -0700 (Thu, 14 Jun 2012)
Log Message
Fix bit packing of StyleRareInheritedData on Windows
https://bugs.webkit.org/show_bug.cgi?id=89112
Reviewed by Ryosuke Niwa.
On my machine (64 bit Chromium Linux), StyleRareInheritedData is 168 bytes.
No new tests, added a compile assert to ensure correctness going forward.
* rendering/style/StyleRareInheritedData.cpp:
(SameSizeAsStyleRareInheritedData):
(WebCore):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (120365 => 120366)
--- trunk/Source/WebCore/ChangeLog 2012-06-14 22:24:26 UTC (rev 120365)
+++ trunk/Source/WebCore/ChangeLog 2012-06-14 22:33:20 UTC (rev 120366)
@@ -1,3 +1,20 @@
+2012-06-14 Tony Chang <[email protected]>
+
+ Fix bit packing of StyleRareInheritedData on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=89112
+
+ Reviewed by Ryosuke Niwa.
+
+ On my machine (64 bit Chromium Linux), StyleRareInheritedData is 168 bytes.
+
+ No new tests, added a compile assert to ensure correctness going forward.
+
+ * rendering/style/StyleRareInheritedData.cpp:
+ (SameSizeAsStyleRareInheritedData):
+ (WebCore):
+ * rendering/style/StyleRareInheritedData.h:
+ (StyleRareInheritedData):
+
2012-06-14 Andreas Kling <[email protected]>
Crashes below IconDatabase::performPendingRetainAndReleaseOperations().
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (120365 => 120366)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2012-06-14 22:24:26 UTC (rev 120365)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2012-06-14 22:33:20 UTC (rev 120366)
@@ -30,6 +30,35 @@
namespace WebCore {
+struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareInheritedData> {
+ Color firstColor;
+ float firstFloat;
+ Color colors[5];
+ void* ownPtrs[1];
+ AtomicString atomicStrings[5];
+ void* refPtrs[2];
+ Length lengths[1];
+ float secondFloat;
+ unsigned m_bitfields[2];
+ short pagedMediaShorts[2];
+ unsigned unsigneds[1];
+ short hyphenationShorts[3];
+
+#if ENABLE(CSS_IMAGE_RESOLUTION)
+ float imageResolutionFloats;
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+ Color touchColors;
+#endif
+
+#if ENABLE(CSS_VARIABLES)
+ void* variableDataRefs[1];
+#endif
+};
+
+COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInheritedData), StyleRareInheritedData_should_bit_pack);
+
StyleRareInheritedData::StyleRareInheritedData()
: textStrokeWidth(RenderStyle::initialTextStrokeWidth())
, indent(RenderStyle::initialTextIndent())
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (120365 => 120366)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2012-06-14 22:24:26 UTC (rev 120365)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2012-06-14 22:33:20 UTC (rev 120366)
@@ -84,7 +84,7 @@
unsigned wordWrap : 1; // EWordWrap
unsigned nbspMode : 1; // ENBSPMode
unsigned khtmlLineBreak : 1; // EKHTMLLineBreak
- bool textSizeAdjust : 1; // An Apple extension.
+ unsigned textSizeAdjust : 1; // An Apple extension.
unsigned resize : 2; // EResize
unsigned userSelect : 1; // EUserSelect
unsigned colorSpace : 1; // ColorSpace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes