Bug 76946

Summary: Make DataTransferItemList::length() const.
Product: WebKit Reporter: Daniel Cheng <dcheng>
Component: New BugsAssignee: Daniel Cheng <dcheng>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch tony: review+

Daniel Cheng
Reported 2012-01-24 14:26:57 PST
Make DataTransferItemList::length() const.
Attachments
Patch (4.88 KB, patch)
2012-01-24 14:27 PST, Daniel Cheng
no flags
Patch (5.01 KB, patch)
2012-01-24 15:39 PST, Daniel Cheng
tony: review+
Daniel Cheng
Comment 1 2012-01-24 14:27:23 PST
Tony Chang
Comment 2 2012-01-24 14:46:40 PST
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 .
Daniel Cheng
Comment 3 2012-01-24 15:39:52 PST
Tony Chang
Comment 4 2012-01-24 15:45:16 PST
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."
Daniel Cheng
Comment 5 2012-01-24 15:47:04 PST
Note You need to log in before you can comment on or make changes to this bug.