Summary: | Make DataTransferItemList::length() const. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Cheng <dcheng> | ||||||
Component: | New Bugs | Assignee: | Daniel Cheng <dcheng> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Daniel Cheng
2012-01-24 14:26:57 PST
Created attachment 123810 [details]
Patch
Comment on attachment 123810 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123810&action=review > Source/WebCore/ChangeLog:8 > + > + No new tests. (OOPS!) Please include a sentence saying why length should be const. No new tests seems fine, but you'll have to remove the OOPS. > Source/WebCore/platform/chromium/DataTransferItemListChromium.cpp:67 > + // FIXME: This is a pretty evil. > + const Vector<RefPtr<DataTransferItem> >& items = m_items; > + clipboardChromium()->mayUpdateItems(const_cast<Vector<RefPtr<DataTransferItem> >&>(items)); I would make m_items mutable with a FIXME saying that it will be fixed in https://bugs.webkit.org/show_bug.cgi?id=76598 . Created attachment 123827 [details]
Patch
Comment on attachment 123827 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123827&action=review > Source/WebCore/platform/chromium/DataTransferItemListChromium.h:69 > + // FIXME: This will be fixed by https://bugs.webkit.org/show_bug.cgi?id=76598 > + mutable Vector<RefPtr<DataTransferItem> > m_items; Nit: I would be explicit about what "This" refers to. E.g., "FIXME: m_items should not be mutable. This will be fixed by https://bugs.webkit.org/show_bug.cgi?id=76598." Committed r105825: <http://trac.webkit.org/changeset/105825> |