WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
13328
Code cleanup in image pasteboard code
https://bugs.webkit.org/show_bug.cgi?id=13328
Summary
Code cleanup in image pasteboard code
Andrew Wellington
Reported
2007-04-11 06:29:38 PDT
The soon-to-be-attached patch addresses some comments from aroben and jgarcia relating to the fix for
http://bugs.webkit.org/show_bug.cgi?id=12959
- Consolidate Pasteboard::writeImage(const HitTestResult& result) and Pasteboard::writeImage(Node* imageNode, const KURL& url) - Create frameContainsCopyableImageDocument in Editor.cpp to create more readable code in Editor::canCopy and Editor::copy
Attachments
Proposed patch
(8.25 KB, patch)
2007-04-11 06:30 PDT
,
Andrew Wellington
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andrew Wellington
Comment 1
2007-04-11 06:30:40 PDT
Created
attachment 14007
[details]
Proposed patch
Darin Adler
Comment 2
2007-04-11 09:37:26 PDT
Comment on
attachment 14007
[details]
Proposed patch + if (frame->document() && frame->document()->isImageDocument()) { + Document* doc = frame->document(); If you're going to have a local variable here, then I suggest declaring it outside the if statement. Further, I think this function would read better with early exits and a couple more local variables. It also might be good to make the function return the image element instead of a boolean, allowing us to share slightly more code. Otherwise looks great. I'm not going to say review+ right now, but I'll probably look back later today.
Andrew Wellington
Comment 3
2007-04-12 05:36:17 PDT
Comment on
attachment 14007
[details]
Proposed patch
r20846
by Adam Roben addresses this issue
Adam Roben (:aroben)
Comment 4
2007-04-12 10:41:20 PDT
(In reply to
comment #3
)
> (From update of
attachment 14007
[details]
[edit]) >
r20846
by Adam Roben addresses this issue >
Sorry, I didn't see that this bug had been filed! At least now we know we were thinking along the same lines :-)
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