WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 116337
Add a compile assert for the size of RootInlineBox and InlineTextbox
https://bugs.webkit.org/show_bug.cgi?id=116337
Summary
Add a compile assert for the size of RootInlineBox and InlineTextbox
Lamarque V. Souza
Reported
2013-05-17 11:33:44 PDT
Add ompile asserts for the size of RootInlineBox and InlineTextbox as suggested in
https://bugs.webkit.org/show_bug.cgi?id=116108#c10
Attachments
Patch
(2.29 KB, patch)
2013-05-17 11:39 PDT
,
Lamarque V. Souza
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Lamarque V. Souza
Comment 1
2013-05-17 11:39:14 PDT
Created
attachment 202128
[details]
Patch Proposed patch.
Darin Adler
Comment 2
2013-05-17 12:45:53 PDT
Comment on
attachment 202128
[details]
Patch OK.
Bruno Abinader (history only)
Comment 3
2013-05-20 06:29:01 PDT
Comment on
attachment 202128
[details]
Patch
>Subversion Revision: 150274 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c3462a41eeba42daea64b3dd52e1cd5a2921f833..87f3a4d71cf3831575bdb44b62523b863aa2747c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2013-05-17 Lamarque V. Souza <
Lamarque.Souza@basyskom.com
> >+ >+ Add compile asserts for the size of RootInlineBox and InlineTextbox >+
https://bugs.webkit.org/show_bug.cgi?id=116337
>+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add compile asserts to ensure RootInlineBox and InlineTextbox stay small. >+ >+ * rendering/InlineTextBox.cpp: >+ (SameSizeAsInlineTextBox): >+ (WebCore): >+ * rendering/RootInlineBox.cpp: >+ (SameSizeAsRootInlineBox): >+ (WebCore): >+ > 2013-05-17 Darin Adler <
darin@apple.com
> > > [EFL] Move EFL port off legacy clipboard >diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp >index 26e84ff73d1ac40a3bca1c9b359a617e1fe957db..365d02eb6e68766a59ed3cc3ae0270531188223e 100644 >--- a/Source/WebCore/rendering/InlineTextBox.cpp >+++ b/Source/WebCore/rendering/InlineTextBox.cpp >@@ -53,6 +53,14 @@ using namespace std; > > namespace WebCore { > >+struct SameSizeAsInlineTextBox : public InlineBox { >+ unsigned variables[1]; >+ unsigned short variables2[2]; >+ void* pointers[2]; >+}; >+ >+COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineTextBox_should_stay_small); >+ > typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; > static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; > >diff --git a/Source/WebCore/rendering/RootInlineBox.cpp b/Source/WebCore/rendering/RootInlineBox.cpp >index 626c8864a2769cda388ce82a42fb44e04c3e5d62..a83855d23b385222284140c0b83e24f5f32048c9 100644 >--- a/Source/WebCore/rendering/RootInlineBox.cpp >+++ b/Source/WebCore/rendering/RootInlineBox.cpp >@@ -43,6 +43,13 @@ using namespace std; > > namespace WebCore { > >+struct SameSizeAsRootInlineBox : public InlineFlowBox { >+ unsigned variables[5]; >+ void* pointers[4]; >+}; >+ >+COMPILE_ASSERT(sizeof(RootInlineBox) == sizeof(SameSizeAsRootInlineBox), RootInlineBox_should_stay_small); >+ > typedef WTF::HashMap<const RootInlineBox*, EllipsisBox*> EllipsisBoxMap; > static EllipsisBoxMap* gEllipsisBoxMap = 0;
>
WebKit Commit Bot
Comment 4
2013-05-20 06:36:13 PDT
Comment on
attachment 202128
[details]
Patch Clearing flags on attachment: 202128 Committed
r150365
: <
http://trac.webkit.org/changeset/150365
>
WebKit Commit Bot
Comment 5
2013-05-20 06:36:15 PDT
All reviewed patches have been landed. Closing bug.
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