Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[CRAZY] CSS font-family hints #3848

Merged
merged 3 commits into from
May 18, 2013
Merged

Conversation

iwehrman
Copy link
Contributor

This pull request makes three changes, the first of which is ostensibly innocuous while the latter two of which are probably crazy:

  1. Add font-family values that are directly defined by the CSS specification to CSSProperties.json so that the CSS hinter can provide font-family hints. This is useful because EWF might not be installed, might have failed to load, etc.
  2. Change the CodeHintManager API and implementation (:sunglasses:) so that CodeHintProviders can end the current session and request that the CodeHintManager immediately attempt to begin a new one by querying all the registered providers for hints. This is a non-breaking API change: providers may now return true to signal this in addition to all of their previous options, null, a hint object, or a deferred hint object, for which the semantics have not changed.
  3. Change the CSS hinter to request a session restart when it switches context from property names to property values. As a consequence, if you type font-family: then upon typing the : the provider returns true, hence requesting that the session be restarted. If a higher-priority provider is registered (like, e.g., EWF) then it can take over. Without this change, higher priority providers wouldn't get the opportunity to take over until the lower-priority provider ended the session because it either ran out of hints to provide (which is not the case here) or it inserted a hint (which also wouldn't happen here if the user typed out font-family in full).

Discuss!

Ian Wehrman added 3 commits May 15, 2013 16:04
… to indicate that the current session should be closed, but that the CHM should immediately attempt to begin a new session.
…rom property names to values to give other more specialized hinters (like EWF) a chance to intervene.
@iwehrman
Copy link
Contributor Author

@RaymondLim
Copy link
Contributor

Looks good. I verify that your crazy idea does work. Merging.

RaymondLim added a commit that referenced this pull request May 18, 2013
@RaymondLim RaymondLim merged commit 8653151 into master May 18, 2013
@RaymondLim RaymondLim deleted the iwehrman/font-family-css-code-hints branch May 18, 2013 05:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants