RESOLVED FIXED 49723
Expose default value of maxLength in Chromium API
https://bugs.webkit.org/show_bug.cgi?id=49723
Summary Expose default value of maxLength in Chromium API
Ilya Sherman
Reported 2010-11-18 03:31:09 PST
Expose default value of maxLength in Chromium API
Attachments
Patch (1.94 KB, patch)
2010-11-18 04:07 PST, Ilya Sherman
no flags
Patch (1.95 KB, patch)
2010-11-18 13:18 PST, Ilya Sherman
no flags
Patch (2.00 KB, patch)
2010-11-18 13:28 PST, Ilya Sherman
no flags
Ilya Sherman
Comment 1 2010-11-18 04:07:14 PST
Kent Tamura
Comment 2 2010-11-18 05:12:33 PST
Comment on attachment 74225 [details] Patch ok
Darin Fisher (:fishd, Google)
Comment 3 2010-11-18 09:37:50 PST
Comment on attachment 74225 [details] Patch This breaks the multi-DLL build! Exports need to be annotated with WEBKIT_API
Ilya Sherman
Comment 4 2010-11-18 13:18:01 PST
Ilya Sherman
Comment 5 2010-11-18 13:19:38 PST
Comment on attachment 74284 [details] Patch WEBKIT_API added
Darin Fisher (:fishd, Google)
Comment 6 2010-11-18 13:22:52 PST
Comment on attachment 74284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74284&action=review > WebKit/chromium/public/WebInputElement.h:83 > + WEBKIT_API static const int defaultMaximumLength; since this is related to the maxLength attribute, it'd probably be nice to name it defaultMaxLength. also, please add a comment indicating this relationship. the comment in your ChangeLog seems pretty good. it would be nice to have it in the code as well. > WebKit/chromium/src/WebInputElement.cpp:163 > +const int WebInputElement::defaultMaximumLength = nit: i would probably not insert a line break here as it is fine to exceed 80 chars in webkit code
Ilya Sherman
Comment 7 2010-11-18 13:28:26 PST
Ilya Sherman
Comment 8 2010-11-18 13:29:17 PST
Comment on attachment 74286 [details] Patch (In reply to comment #6) > (From update of attachment 74284 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=74284&action=review > > > WebKit/chromium/public/WebInputElement.h:83 > > + WEBKIT_API static const int defaultMaximumLength; > > since this is related to the maxLength attribute, it'd probably be nice to name > it defaultMaxLength. also, please add a comment indicating this relationship. > the comment in your ChangeLog seems pretty good. it would be nice to have it > in the code as well. Done =) > > WebKit/chromium/src/WebInputElement.cpp:163 > > +const int WebInputElement::defaultMaximumLength = > > nit: i would probably not insert a line break here as it is fine to exceed 80 chars in webkit code Doh, keep forgetting that WebKit isn't 80-col -- thanks :)
Kent Tamura
Comment 9 2010-11-18 15:18:55 PST
Comment on attachment 74286 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74286&action=review Darin, thank you for following up my wrong r+. > WebKit/chromium/public/WebInputElement.h:84 > + WEBKIT_API static const int defaultMaxLength; It is better to make this a function. The hard limit value might be platform-dependent in the future.
Ilya Sherman
Comment 10 2010-11-18 15:27:08 PST
Comment on attachment 74286 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74286&action=review >> WebKit/chromium/public/WebInputElement.h:84 >> + WEBKIT_API static const int defaultMaxLength; > > It is better to make this a function. > The hard limit value might be platform-dependent in the future. I'm confused -- why would a function be better than a constant in the face of platform dependencies? I'm probably overlooking something, but it makes more sense to me to leave this as a constant and update it if/when the underlying WebKit implementation changes.
Kent Tamura
Comment 11 2010-11-18 15:45:17 PST
(In reply to comment #10) > I'm confused -- why would a function be better than a constant in the face of platform dependencies? I'm probably overlooking something, but it makes more sense to me to leave this as a constant and update it if/when the underlying WebKit implementation changes. I was afraid the value would be calculated at runtime in the future. I think It's ok to commit this change as is for now.
WebKit Commit Bot
Comment 12 2010-11-19 14:14:06 PST
Comment on attachment 74286 [details] Patch Clearing flags on attachment: 74286 Committed r72436: <http://trac.webkit.org/changeset/72436>
WebKit Commit Bot
Comment 13 2010-11-19 14:14:12 PST
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.