|
|
DescriptionPaint text cursor in LAYER_SOLID_COLOR
The text cursor used to painted in a texture layer, where each cursor blink costs
130KB memory to raster. It is now painted in the solid color layer and it is free to
raster it.
BUG=680536
Review-Url: https://codereview.chromium.org/2660593002
Cr-Commit-Position: refs/heads/master@{#451179}
Committed: https://chromium.googlesource.com/chromium/src/+/a33c8f5acb10c229da14134b9987e3b16eaa74f4
Patch Set 1 : fix typo #
Total comments: 14
Patch Set 2 : address comments #
Total comments: 8
Patch Set 3 : address comments #
Total comments: 10
Patch Set 4 : fix typo #
Total comments: 4
Patch Set 5 : address comments #
Total comments: 1
Patch Set 6 : nits #
Total comments: 1
Patch Set 7 : comments #
Messages
Total messages: 171 (152 generated)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== cursor BUG= ========== to ========== Paint text cursor in LAYER_SOLID_COLOR BUG= ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Description was changed from ========== Paint text cursor in LAYER_SOLID_COLOR BUG= ========== to ========== Paint text cursor in LAYER_SOLID_COLOR The text cursor used to painted in a texture layer, where each cursor blink costs 130KB memory to raster. It is now painted in the solid co BUG=680536 ==========
Description was changed from ========== Paint text cursor in LAYER_SOLID_COLOR The text cursor used to painted in a texture layer, where each cursor blink costs 130KB memory to raster. It is now painted in the solid co BUG=680536 ========== to ========== Paint text cursor in LAYER_SOLID_COLOR The text cursor used to painted in a texture layer, where each cursor blink costs 130KB memory to raster. It is now painted in the solid color layer and it is free to raster it. BUG=680536 ==========
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:60001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #1 (id:40001) has been deleted
yiyix@chromium.org changed reviewers: + sadrul@chromium.org
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:80001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Patchset #1 (id:100001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
yiyix@chromium.org changed reviewers: - sadrul@chromium.org
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Patchset #1 (id:120001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:140001) has been deleted
Patchset #1 (id:160001) has been deleted
Patchset #1 (id:180001) has been deleted
Patchset #1 (id:200001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
yiyix@chromium.org changed reviewers: + sadrul@chromium.org
@sadrul, could you please take a look? Thank you.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Patchset #1 (id:220001) has been deleted
Patchset #1 (id:240001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:260001) has been deleted
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2660593002/diff/280001/ui/gfx/render_text.h File ui/gfx/render_text.h (left): https://codereview.chromium.org/2660593002/diff/280001/ui/gfx/render_text.h#o... ui/gfx/render_text.h:772: SkColor cursor_color_; Remove this too? https://codereview.chromium.org/2660593002/diff/280001/ui/views/accessibility... File ui/views/accessibility/ax_widget_obj_wrapper.cc (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/accessibility... ui/views/accessibility/ax_widget_obj_wrapper.cc:36: !widget_->GetRootView()->visible()) { It'd be better to move this into a separate CL with a test for it. (where the test attempts to trigger some AX event when the Widget is in the process of being destroyed) https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:504: SchedulePaint(); We should update the layer color here too. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1908: SchedulePaint(); You shouldn't reschedule a paint here, because then we are essentially repainting the entire textfield. Just make sure the position and visibility of the cursor-view are set correctly. That should be sufficient. To reflect this, maybe rename this function to UpdateCursorView() or something like that. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1929: render_text->DrawCursor(canvas, drop_cursor_position_); Add a TODO. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:2067: cursor_view_->SetVisible(!cursor_view_->visible()); If you update the visibility in UpdateCursorView() above, then this can just call UpdateCursorView(). https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... File ui/views/controls/textfield/textfield.h (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.h:528: std::unique_ptr<views::View> cursor_view_; Don't need views. Don't need unique_ptr (i.e. just 'View cursor_view_;')
https://codereview.chromium.org/2660593002/diff/280001/ui/gfx/render_text.h File ui/gfx/render_text.h (left): https://codereview.chromium.org/2660593002/diff/280001/ui/gfx/render_text.h#o... ui/gfx/render_text.h:772: SkColor cursor_color_; On 2017/02/02 17:15:31, sadrul wrote: > Remove this too? This is used in DrawCursor. I will remove this variable as I remove the drop_cursor related stuff. https://codereview.chromium.org/2660593002/diff/280001/ui/views/accessibility... File ui/views/accessibility/ax_widget_obj_wrapper.cc (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/accessibility... ui/views/accessibility/ax_widget_obj_wrapper.cc:36: !widget_->GetRootView()->visible()) { On 2017/02/02 17:15:31, sadrul wrote: > It'd be better to move this into a separate CL with a test for it. (where the > test attempts to trigger some AX event when the Widget is in the process of > being destroyed) I will submit a separate cl for this change. Remove the change here. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:504: SchedulePaint(); On 2017/02/02 17:15:32, sadrul wrote: > We should update the layer color here too. I was not sure if the cursor color has to be the same as the text color. In render_text, the set color method does not change the cursor color: void RenderText::SetColor(SkColor value) { colors_.SetValue(value); OnTextColorChanged(); } Furthermore, The only caller of set_cursor_color in render_text is in OnNativeThemeChange. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1908: SchedulePaint(); On 2017/02/02 17:15:32, sadrul wrote: > You shouldn't reschedule a paint here, because then we are essentially > repainting the entire textfield. Just make sure the position and visibility of > the cursor-view are set correctly. That should be sufficient. > > To reflect this, maybe rename this function to UpdateCursorView() or something > like that. Done. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1929: render_text->DrawCursor(canvas, drop_cursor_position_); On 2017/02/02 17:15:31, sadrul wrote: > Add a TODO. Done. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:2067: cursor_view_->SetVisible(!cursor_view_->visible()); On 2017/02/02 17:15:32, sadrul wrote: > If you update the visibility in UpdateCursorView() above, then this can just > call UpdateCursorView(). As we have discussed offline, keep the set visibility related code here. https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... File ui/views/controls/textfield/textfield.h (right): https://codereview.chromium.org/2660593002/diff/280001/ui/views/controls/text... ui/views/controls/textfield/textfield.h:528: std::unique_ptr<views::View> cursor_view_; On 2017/02/02 17:15:32, sadrul wrote: > Don't need views. > > Don't need unique_ptr (i.e. just 'View cursor_view_;') As we have discussed offline, done.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
@sadrul, could you please take another look? Thank you very much.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2660593002/diff/300001/ui/views/accessibility... File ui/views/accessibility/ax_widget_obj_wrapper.cc (left): https://codereview.chromium.org/2660593002/diff/300001/ui/views/accessibility... ui/views/accessibility/ax_widget_obj_wrapper.cc:37: Restore? https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:962: cursor_view_.SetVisible(true); Call UpdateCursorView() before calling SetVisible(true)? https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:986: UpdateCursorView(); We don't need to call UpdateCursorView() since it's hidden anyway, right? https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... File ui/views/controls/textfield/textfield.h (right): https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.h:376: // Repaint the cursor. Update the comment.
https://codereview.chromium.org/2660593002/diff/300001/ui/views/accessibility... File ui/views/accessibility/ax_widget_obj_wrapper.cc (left): https://codereview.chromium.org/2660593002/diff/300001/ui/views/accessibility... ui/views/accessibility/ax_widget_obj_wrapper.cc:37: On 2017/02/07 04:19:35, sadrul wrote: > Restore? Done. https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:962: cursor_view_.SetVisible(true); On 2017/02/07 04:19:35, sadrul wrote: > Call UpdateCursorView() before calling SetVisible(true)? Good Call! Cursor should show at the correct position. https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:986: UpdateCursorView(); On 2017/02/07 04:19:35, sadrul wrote: > We don't need to call UpdateCursorView() since it's hidden anyway, right? Right. It doesn't matter where the cursor is as it is not shown to the users. https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... File ui/views/controls/textfield/textfield.h (right): https://codereview.chromium.org/2660593002/diff/300001/ui/views/controls/text... ui/views/controls/textfield/textfield.h:376: // Repaint the cursor. On 2017/02/07 04:19:35, sadrul wrote: > Update the comment. Done.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #3 (id:320001) has been deleted
Patchset #3 (id:340001) has been deleted
Patchset #3 (id:360001) has been deleted
Patchset #3 (id:380001) has been deleted
Patchset #3 (id:400001) has been deleted
Patchset #3 (id:420001) has been deleted
Patchset #3 (id:440001) has been deleted
Patchset #3 (id:460001) has been deleted
Patchset #3 (id:480001) has been deleted
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
sadrul@chromium.org changed reviewers: + msw@chromium.org
+msw@ lgtm Thanks! Please wait for msw@'s approval too before landing. https://codereview.chromium.org/2660593002/diff/500001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/views/view.cc#newco... ui/views/view.cc:307: } Remove these changes?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
https://codereview.chromium.org/2660593002/diff/500001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/views/view.cc#newco... ui/views/view.cc:307: } On 2017/02/13 20:33:30, sadrul wrote: > Remove these changes? so sorry, i fixed the changes but i forget to save it after. I will try to check in details before giving to you.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2660593002/diff/500001/chrome/browser/ui/ash/... File chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc (right): https://codereview.chromium.org/2660593002/diff/500001/chrome/browser/ui/ash/... chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc:101: ASSERT_EQ(1U, textfield_children.size()); Should we test that the new child view of the textfield (the cursor's view) is not focusable, etc.? (maybe ping someone on the accessibility team?) https://codereview.chromium.org/2660593002/diff/500001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/gfx/render_text.cc#... ui/gfx/render_text.cc:878: void RenderText::DrawCursor(Canvas* canvas, const SelectionModel& position) { Can you remove this function and inline similar functionality in textfield.cc for the drop cursor? It doesn't make sense to keep this function for just that. Once this is removed, please also remove |cursor_color_|. It looks like we'll need to keep |cursor_enabled_| to reserve space for rendering the cursor. https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:994: if (cursor_view_.visible()) nit: maybe this check isn't really needed? (always set not visible) https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1930: // TODO(yiyix): Use UpdateCursorView to draw drop_cursor instead. Please fix this now or prepare a dependent patch set. https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:267: cursor_view_.set_owned_by_client(); It's unusual to use the pattern; is there any reason to not let the view hierarchy own this view?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
yiyix@chromium.org changed reviewers: + dmazzoni@chromium.org
@dmazzoni, could you please review changes in accessibility/ax_tree_source_aura_unittest.cc, do you think more accessibility tests should be added to test cursor_view? Thank you very much @msw, could you review this patch? Thank you https://codereview.chromium.org/2660593002/diff/500001/chrome/browser/ui/ash/... File chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc (right): https://codereview.chromium.org/2660593002/diff/500001/chrome/browser/ui/ash/... chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc:101: ASSERT_EQ(1U, textfield_children.size()); On 2017/02/13 21:27:12, msw wrote: > Should we test that the new child view of the textfield (the cursor's view) is > not focusable, etc.? (maybe ping someone on the accessibility team?) I don't think we need to add more test cases. I was calling GetRenderText()->GetUpdatedCursorBounds() to get the current cursor location and this function has been well tested. I will ping someone from accessibility to review this change. Thank you for the suggestion. https://codereview.chromium.org/2660593002/diff/500001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/gfx/render_text.cc#... ui/gfx/render_text.cc:878: void RenderText::DrawCursor(Canvas* canvas, const SelectionModel& position) { On 2017/02/13 21:27:12, msw wrote: > Can you remove this function and inline similar functionality in textfield.cc > for the drop cursor? It doesn't make sense to keep this function for just that. > Once this is removed, please also remove |cursor_color_|. It looks like we'll > need to keep |cursor_enabled_| to reserve space for rendering the cursor. Inline it it's a good idea. I will remove the todo and delete cursor_color_. Thanks. https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:994: if (cursor_view_.visible()) On 2017/02/13 21:27:12, msw wrote: > nit: maybe this check isn't really needed? (always set not visible) Right, it checks if the visibility changes in SetVisible function in view.cc. Update. https://codereview.chromium.org/2660593002/diff/500001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:1930: // TODO(yiyix): Use UpdateCursorView to draw drop_cursor instead. On 2017/02/13 21:27:12, msw wrote: > Please fix this now or prepare a dependent patch set. By adding DrawCursor inline, it is also fixed. https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:267: cursor_view_.set_owned_by_client(); On 2017/02/13 21:27:12, msw wrote: > It's unusual to use the pattern; is there any reason to not let the view > hierarchy own this view? I feel that this view is owned by textfield view.
The CQ bit was checked by yiyix@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm with nits, thanks for the cleanup. https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:267: cursor_view_.set_owned_by_client(); On 2017/02/15 16:56:32, yiyix wrote: > On 2017/02/13 21:27:12, msw wrote: > > It's unusual to use the pattern; is there any reason to not let the view > > hierarchy own this view? > > I feel that this view is owned by textfield view. It's more common that view instances are owned by the view hierarchy, so most developers familiar with the views ui toolkit will find this a bit strange, and wonder at the reason it's owned by the client here. I would encourage you to follow that pattern, but I won't block this Cl on that nuance. https://codereview.chromium.org/2660593002/diff/540001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/540001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:279: // |cursor_view_| is owned by TextField view. nit: 'Textfield' to match the class name.
lgtm for accessibility, I don't think this will affect anything
https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/520001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:267: cursor_view_.set_owned_by_client(); On 2017/02/15 22:50:04, msw wrote: > On 2017/02/15 16:56:32, yiyix wrote: > > On 2017/02/13 21:27:12, msw wrote: > > > It's unusual to use the pattern; is there any reason to not let the view > > > hierarchy own this view? > > > > I feel that this view is owned by textfield view. > > It's more common that view instances are owned by the view hierarchy, so most > developers familiar with the views ui toolkit will find this a bit strange, and > wonder at the reason it's owned by the client here. I would encourage you to > follow that pattern, but I won't block this Cl on that nuance. I guess there is no special benefits to make this view owned by textfield rather than view hierarchy as textfield itself is not owned_by_client. I will remove this line in the next patch
The CQ bit was checked by yiyix@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sadrul@chromium.org, msw@chromium.org, dmazzoni@chromium.org Link to the patchset: https://codereview.chromium.org/2660593002/#ps560001 (title: "nits")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks for the sanity-check, Dominick! Just one more comment. https://codereview.chromium.org/2660593002/diff/560001/ui/views/controls/text... File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2660593002/diff/560001/ui/views/controls/text... ui/views/controls/textfield/textfield.cc:278: cursor_view_.layer()->SetColor(GetTextColor()); You'll need to change the cursor_view_ member to a raw pointer, so that it may be owned by the views hierarchy: In textfield.h (with optional comment): View* cursor_view_; // Owned by the views hierarchy. Above this, in textfield.cc's initializer list: cursor_view_(new View), weak_ptr_fact... And then just change use here to reflect that.
The CQ bit was unchecked by yiyix@chromium.org
On 2017/02/16 20:44:24, msw wrote: > Thanks for the sanity-check, Dominick! > Just one more comment. > > https://codereview.chromium.org/2660593002/diff/560001/ui/views/controls/text... > File ui/views/controls/textfield/textfield.cc (right): > > https://codereview.chromium.org/2660593002/diff/560001/ui/views/controls/text... > ui/views/controls/textfield/textfield.cc:278: > cursor_view_.layer()->SetColor(GetTextColor()); > You'll need to change the cursor_view_ member to a raw pointer, so that it may > be owned by the views hierarchy: > > In textfield.h (with optional comment): > View* cursor_view_; // Owned by the views hierarchy. > Above this, in textfield.cc's initializer list: > cursor_view_(new View), > weak_ptr_fact... > And then just change use here to reflect that. As we have discussed offline, i will revert set_owned_by_client and keep |cursor_view_| as a raw type.
The CQ bit was checked by yiyix@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from msw@chromium.org, dmazzoni@chromium.org, sadrul@chromium.org Link to the patchset: https://codereview.chromium.org/2660593002/#ps580001 (title: "comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 580001, "attempt_start_ts": 1487283885489860, "parent_rev": "a255f7468a598ea8cf8a5ab0e21ab0047f52568a", "commit_rev": "a33c8f5acb10c229da14134b9987e3b16eaa74f4"}
Message was sent while issue was closed.
Description was changed from ========== Paint text cursor in LAYER_SOLID_COLOR The text cursor used to painted in a texture layer, where each cursor blink costs 130KB memory to raster. It is now painted in the solid color layer and it is free to raster it. BUG=680536 ========== to ========== Paint text cursor in LAYER_SOLID_COLOR The text cursor used to painted in a texture layer, where each cursor blink costs 130KB memory to raster. It is now painted in the solid color layer and it is free to raster it. BUG=680536 Review-Url: https://codereview.chromium.org/2660593002 Cr-Commit-Position: refs/heads/master@{#451179} Committed: https://chromium.googlesource.com/chromium/src/+/a33c8f5acb10c229da14134b9987... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:580001) as https://chromium.googlesource.com/chromium/src/+/a33c8f5acb10c229da14134b9987... |