WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
96638
[EFL] Remove a lot of C'ism from Ewk_Tiled_Matrix
https://bugs.webkit.org/show_bug.cgi?id=96638
Summary
[EFL] Remove a lot of C'ism from Ewk_Tiled_Matrix
Chris Dumez
Reported
2012-09-13 05:39:55 PDT
Ewk_Tiled_Matrix contains a lot of C'ism and does not always follow coding style. We should clean it up.
Attachments
Patch
(21.33 KB, patch)
2012-09-13 05:41 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(24.12 KB, patch)
2012-09-13 22:49 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2012-09-13 05:41:57 PDT
Created
attachment 163848
[details]
Patch
Chris Dumez
Comment 2
2012-09-13 09:19:35 PDT
Could someone please take a look at this one?
Ryuan Choi
Comment 3
2012-09-13 16:02:48 PDT
Comment on
attachment 163848
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163848&action=review
Good to me. I found some small things which you may like.
> Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:252 > if (iterator->zoom != zoom) > continue; > - entry = iterator; > - tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(entry)); > - tileMatrix->matrix = entry->matrix; > + > + tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(iterator)); > + tileMatrix->matrix = iterator->matrix; > return true;
if (iterator->zoom == zoom) { ... return true; } Although it may not be related to C'sm, I think that you like this more.
> Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:579 > + unsigned long col = info->col; > + unsigned long row = info->row; > > Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, col));
What do you think about passing them instead of making local variable?
> Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:628 > + bool last_empty = false;
lastEmpty looks correct for webkit style.
Chris Dumez
Comment 4
2012-09-13 22:01:34 PDT
(In reply to
comment #3
)
> (From update of
attachment 163848
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=163848&action=review
> > Good to me. > > I found some small things which you may like. > > > Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:252 > > if (iterator->zoom != zoom) > > continue; > > - entry = iterator; > > - tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(entry)); > > - tileMatrix->matrix = entry->matrix; > > + > > + tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(iterator)); > > + tileMatrix->matrix = iterator->matrix; > > return true; > > if (iterator->zoom == zoom) { > ... > return true; > } > > Although it may not be related to C'sm, I think that you like this more. > > > Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:579 > > + unsigned long col = info->col; > > + unsigned long row = info->row; > > > > Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, col)); > > What do you think about passing them instead of making local variable? > > > Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:628 > > + bool last_empty = false; > > lastEmpty looks correct for webkit style.
Thanks for taking a look Ryuan. I'll improve the patch based on your comments.
Chris Dumez
Comment 5
2012-09-13 22:49:13 PDT
Created
attachment 164051
[details]
Patch Take Ryuan's feedback into consideration.
Ryuan Choi
Comment 6
2012-09-13 22:58:58 PDT
(In reply to
comment #5
)
> Created an attachment (id=164051) [details] > Patch > > Take Ryuan's feedback into consideration.
Looks good to me. Thank you.
Gyuyoung Kim
Comment 7
2012-09-13 23:01:48 PDT
Comment on
attachment 164051
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=164051&action=review
Looks fine thanks.
> Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:399 > +#ifndef NDEBUG
Don't you need to check this routine in normal mode ?
Chris Dumez
Comment 8
2012-09-13 23:04:29 PDT
(In reply to
comment #7
)
> (From update of
attachment 164051
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=164051&action=review
> > Looks fine thanks. > > > Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp:399 > > +#ifndef NDEBUG > > Don't you need to check this routine in normal mode ?
If you look at the code, it does nothing besides doing extra checks and printing a warning. This is debug code IMO. In release mode, it would only slow us down.
Gyuyoung Kim
Comment 9
2012-09-13 23:11:39 PDT
(In reply to
comment #8
)
> If you look at the code, it does nothing besides doing extra checks and printing a warning. This is debug code IMO. In release mode, it would only slow us down.
I just wanna verify it. Thanks. :)
WebKit Review Bot
Comment 10
2012-09-13 23:28:59 PDT
Comment on
attachment 164051
[details]
Patch Clearing flags on attachment: 164051 Committed
r128560
: <
http://trac.webkit.org/changeset/128560
>
WebKit Review Bot
Comment 11
2012-09-13 23:29:03 PDT
All reviewed patches have been landed. Closing bug.
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