Summary: | Refactor RenderTextControl::text(). | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kent Tamura <tkent> | ||||
Component: | Forms | Assignee: | Kent Tamura <tkent> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Minor | CC: | morrita, webkit.review.bot | ||||
Priority: | P3 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Kent Tamura
2011-06-28 01:10:40 PDT
Created attachment 98878 [details]
Patch
Comment on attachment 98878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98878&action=review > Source/WebCore/rendering/RenderTextControl.cpp:337 > +static String finishText(StringBuilder& result) Another possible idea would be introducing a small class which wraps or subclasses StringBuilder, and make it build these two types of text. This kind of out-parameter looks kind of horrible for me. What do you think? Comment on attachment 98878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98878&action=review >> Source/WebCore/rendering/RenderTextControl.cpp:337 >> +static String finishText(StringBuilder& result) > > Another possible idea would be introducing a small class > which wraps or subclasses StringBuilder, and make it build these two types of text. > This kind of out-parameter looks kind of horrible for me. > What do you think? I feel it's overkill in this case. Comment on attachment 98878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98878&action=review >>> Source/WebCore/rendering/RenderTextControl.cpp:337 >>> +static String finishText(StringBuilder& result) >> >> Another possible idea would be introducing a small class >> which wraps or subclasses StringBuilder, and make it build these two types of text. >> This kind of out-parameter looks kind of horrible for me. >> What do you think? > > I feel it's overkill in this case. Okay, let's just land this. Comment on attachment 98878 [details] Patch Clearing flags on attachment: 98878 Committed r89913: <http://trac.webkit.org/changeset/89913> All reviewed patches have been landed. Closing bug. It would be really good to have a goal of refactoring mentioned in ChangeLog. What were you trying to achieve? (In reply to comment #7) > It would be really good to have a goal of refactoring mentioned in ChangeLog. What were you trying to achieve? Thank you for pointing it out. The trigger of the change was I found text() was called twice in setInnerText(). It was obviously unnecessary. Changes for text() and finishText() are just code cleanup. I should have written such information to ChangeLog. |