RESOLVED FIXED 36948
Refactoring: Position::primaryDirection() should be extracted.
https://bugs.webkit.org/show_bug.cgi?id=36948
Summary Refactoring: Position::primaryDirection() should be extracted.
Hajime Morrita
Reported 2010-04-01 04:47:12 PDT
TextDirection typed variables named "primaryDirection" are computed several part on our code-base. It should be extract to a function.
Attachments
patch v0 (3.89 KB, patch)
2010-04-01 04:52 PDT, Hajime Morrita
no flags
Hajime Morrita
Comment 1 2010-04-01 04:52:05 PDT
Created attachment 52285 [details] patch v0
Shinichiro Hamaji
Comment 2 2010-04-01 07:50:01 PDT
Comment on attachment 52285 [details] patch v0 Nice!
Shinichiro Hamaji
Comment 3 2010-04-01 08:14:55 PDT
Comment on attachment 52285 [details] patch v0 Clearing flags on attachment: 52285 Committed r56915: <http://trac.webkit.org/changeset/56915>
Shinichiro Hamaji
Comment 4 2010-04-01 08:15:05 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 5 2010-04-01 08:23:00 PDT
Comment on attachment 52285 [details] patch v0 Rejecting patch 52285 from commit-queue. Unexpected failure when landing patch! Please file a bug against webkit-patch. Failed to run "['WebKitTools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', 'land-attachment', '--force-clean', '--non-interactive', '--build-style=both', '--quiet', '52285', '--parent-command=commit-queue', '--no-update']" exit_code: 1 Last 500 characters of output: cgi?id=52285&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=36948&ctype=xml Processing 1 patch from 1 bug. Cleaning working directory Processing patch 52285 from bug 36948. NOBODY (OOPS!) found in /Users/eseidel/Projects/CommitQueue/WebCore/ChangeLog does not appear to be a valid reviewer according to committers.py. ERROR: /Users/eseidel/Projects/CommitQueue/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Alexey Proskuryakov
Comment 6 2010-04-01 10:28:48 PDT
It's definitely a great change to extract this code into a function. But I'm not sure if Position is a good place for it. Of all data members in Position, this code only uses m_node, so I wonder if direction is conceptually a function of position. It's also easy to confuse with VisiblePosition affinity. On the other hand, it's only used in Position and VisiblePosition code. Hmm. + for (const RenderObject* r = node()->renderer(); r; r = r->parent()) { We don't usually use accessor functions in class implementation, should preferably be m_anchorNode->renderer().
Eric Seidel (no email)
Comment 7 2010-04-01 18:19:25 PDT
Comment on attachment 52285 [details] patch v0 Looks like cq+ was just set prematurely.
Hajime Morrita
Comment 8 2010-04-01 22:30:35 PDT
Hi eric, > Looks like cq+ was just set prematurely. Umm. I filed the fix on Bug 37011 and submitted a patch to do that small cleanup, just for taking advantage of commit-queue.
Note You need to log in before you can comment on or make changes to this bug.