Closed Bug 1068525 Opened 5 years ago Closed 5 years ago

[Text selection] Keep the size of AccessibleCarets during zooming

Categories

(Core :: DOM: Selection, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 3 obsolete files)

Attached image 2014-06-06-13-09-01.png
+++ This bug was initially created as a clone of Bug #1021527 +++

The size of touch caret and selection carets will be enlarged after zooming-in, which make it look blurry.

The correct behavior is to keep the size still and does not enlarge or shrink when zooming in or zooming out.
Priority: -- → P2
Priority: P2 → P3
Duplicate of this bug: 1115478
Duplicate of this bug: 1126610
Blocks: AccessibleCaret
No longer blocks: CopyPasteLegacy
Assignee: nobody → tlin
Summary: [Text selection] Keep the size of touch caret and selection carets during zooming → [Text selection] Keep the size of AccessibleCarets during zooming
We want AccessibleCaret be of the same size regardless of the zoom
level. We simply divide the caret's width, height, margin-left, and the
text selection bar's margin-left by current zoom level.

The margin-left of the caret is adjusted from -23px to -23.5px for better
looking.
Attachment #8605720 - Flags: feedback?(mtseng)
Attachment #8605720 - Flags: feedback?(mtseng) → feedback+
Attachment #8576575 - Attachment is obsolete: true
Attachment #8605720 - Flags: review?(roc)
Comment on attachment 8605720 [details] [diff] [review]
Ignore zoom level for AccessibleCaret. (v1)

Review of attachment 8605720 [details] [diff] [review]:
-----------------------------------------------------------------

This looks fine, but what actually calls SetCaretElementPosition during/after a zoom?
Attachment #8605720 - Flags: review?(roc) → review+
Re roc comment 6:
> This looks fine, but what actually calls SetCaretElementPosition 
> during/after a zoom?

If no selection change or scroll events happens, the last resort for updating carets would be the reflow callback. We'll only update carets when they are visually visible.

The call sequence would be AccessibleCaretEventHub::Reflow() -> AccessibleCaretManager::OnReflow() -> AccessibleCaretManager::UpdateCarets() -> ... -> AccessibleCaret::SetCaretElementPosition()

BTW, I would like to to rename SetCaretElementPosition to SetCaretElementStyle since it now does more than setting the position.
Rename SetCaretElementPosition -> SetCaretElementStyle.
Rename SetSelectionBarElementPosition -> SetSelectionBarElementStyle.
Attachment #8605720 - Attachment is obsolete: true
Attachment #8606596 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/346c13c3d8af
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
This fix is for AccesibleCaret, not for TouchCaret and SelectionCarets. Thus we will still see the caret size changed when zooming in/out until we enable "layout.accessiblecaret.enabled" on master.
You need to log in before you can comment on or make changes to this bug.