On Sat, Dec 24, 2016, at 04:32 AM, Ehsan Akhgari wrote:
> Gecko supports a navigation mode caret which can be activated by
> pressing F7 or Preferences -> Advanced -> General -> Always use the
> cursor keys to navigate within pages.
> 
> The spec does mention this, but I can’t figure out what it’s saying that
> the browser should do with the navigation caret.  Should this property
> not be respected for the navigation caret?  Note that right now nsCaret
> doesn’t know which kind of caret it is drawing; currently both kinds of
> carets are activated in the exact same way through
> nsCaret::SetVisible().  How are you planning to handle this?

I wasn't aware that there is navigation caret. Since nsCaret doesn't
know its kind, in my current impl, caret-color does affect the
navigation caret as well.

I'm not sure whether the spec should say anything about this, and given
the current spec, I guess navigation caret doesn't need to respect this
property. But for consistency (and not making the code more
complicated), I'd prefer just keep the current impl that this property
affects navigation caret as well.

I don't think that would be a problem, because the number of people who
use navigation caret is rather limited, and thus I don't think websites
would likely hide the caret for normal text intentionally to annoy
people who use that.

Also people can always specify ":root { caret-color: auto !important; }"
in their user stylesheet to effectively disable this property if they do
find any website doing annoying things with it.

> Furthermore, this property is animatable, but the caret blinks…  Are we
> planning to support animating this property?  If yes, how would that
> work with the blinking, do we just use the right color for the times we
> are drawing the caret and let the animation continue when it is hidden?
> Is there something we need to do (such as clarifying how this should
> work in the spec) to achieve interop?

Yes, we will support animating this property.

CSS animation acts on the style system, so there is nothing it can do to
interact with the caret blinks. The animation would continue no matter
whether the caret is shown or hidden.

It may be useful to allow authors to coordinate blinking with the
animation, but I don't think there is any mechanism in the spec (nor in
our code) can achieve this. I guess future spec can introduce a property
to disable the native caret blinking, so that authors can fully control
the blinking via CSS animations.

- Xidorn
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to