WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98116
[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98116
Summary
[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
Kent Tamura
Reported
2012-10-01 22:52:42 PDT
[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
Attachments
Patch
(2.36 KB, patch)
2012-10-02 00:18 PDT
,
Kent Tamura
morrita
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-10-02 00:18:43 PDT
Created
attachment 166627
[details]
Patch
WebKit Review Bot
Comment 2
2012-10-02 18:20:32 PDT
Comment on
attachment 166627
[details]
Patch Rejecting
attachment 166627
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://queues.webkit.org/results/14129438
Kent Tamura
Comment 3
2012-10-02 18:21:58 PDT
Oops, the ChangeLog has no "Reviewed by" line.
Kent Tamura
Comment 4
2012-10-02 18:25:16 PDT
Committed
r130243
: <
http://trac.webkit.org/changeset/130243
>
Darin Adler
Comment 5
2012-10-03 07:48:29 PDT
Comment on
attachment 166627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166627&action=review
> Source/WebCore/platform/text/mac/LocaleMac.mm:257 > + if (!m_dateFormat.isEmpty())
I suggest using isNull, more efficient, here.
> Source/WebCore/platform/text/mac/LocaleMac.mm:260 > + RetainPtr<NSDateFormatter> formatter(AdoptNS, createShortDateFormatter()); > + m_dateFormat = String([formatter.get() dateFormat]);
The explicit String() here is unneeded, I believe. I would write this: if (m_dateFormat.isNull()) m_dateFormat = [adoptNS(createShortDateFormatter()).get() dateFormat]; return m_dateFormat; And later createShortDateFormatter should be changed to return a RetainPtr instead of a raw pointer, which would eliminate the need for the adoptNS call here.
Kent Tamura
Comment 6
2012-10-04 01:25:24 PDT
(In reply to
comment #5
)
> > Source/WebCore/platform/text/mac/LocaleMac.mm:257 > > + if (!m_dateFormat.isEmpty()) > > I suggest using isNull, more efficient, here. > > > Source/WebCore/platform/text/mac/LocaleMac.mm:260 > > + RetainPtr<NSDateFormatter> formatter(AdoptNS, createShortDateFormatter()); > > + m_dateFormat = String([formatter.get() dateFormat]); > > The explicit String() here is unneeded, I believe. > > I would write this: > > if (m_dateFormat.isNull()) > m_dateFormat = [adoptNS(createShortDateFormatter()).get() dateFormat]; > return m_dateFormat; > > And later createShortDateFormatter should be changed to return a RetainPtr instead of a raw pointer, which would eliminate the need for the adoptNS call here.
Thank you for the suggestions! I filed
Bug 98383
, and uploaded a patch for them.
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