On 2016-12-23 8:13 PM, Xidorn Quan wrote: > 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.
FWIW there is only a single call site to SetVisible() for the navigational caret: <http://searchfox.org/mozilla-central/rev/60785fce6d52289c2e147364863f9d42207c5f91/dom/base/nsFocusManager.cpp#2331> if browseWithCaret is true. > 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. The reason why I mentioned this is that this feature is related to accessibility, and I'm worried that respecting random styles for this may hinder the visibility of the caret on the screen, but I suppose as things stand the caret may not be fully visible everywhere on the page... I'm fine with leaving things as is personally. >> 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. Thanks for your explanation, sounds good! _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform