Ad

Our DNA is written in Swift
Jump

DTCoreText 1.6.6 + DTRichTextEditor 1.6.3

Again, another maintenance release for DTCoreText and DTRichTextEditorwhich mostly addresses issues introduced by the recent CSS handling rewrite. It also further enhances support for CSS style cascading.

DTCoreText 1.6.6

  • FIXED: Out of Memory crash on certain HTML documents extensively using CSS cascading
  • FIXED: CSS Cascading by element name performance problem
  • FIXED: Issue with font-size doubling in some situations due to CSS selector being applied
  • FIXED: Last line in a list might lose the tab stops
  • FIXED: glyph run has wrong stringRange for hyphenated lines
  • FIXED: all failing unit tests
  • ADDED: Single Selector Cascading
  • ADDED: Many unit tests for CSS Cascading
  • ADDED: Travis-CI for automated testing of pull requests
  • CHANGED: CSS selector matching now evaluates specificity

DTRichTextEditor 1.6.3

  • FIXED: Pasting from Google Drive might yield empty content
  • CHANGED: Updated DTCoreText to 1.6.6

This release’s MVP is again Amro Mousa who fixed and enhanced all that was related to CSS Cascading. Amro rewrote the matching engine and this improved parsing performance several orders of magnitude. Specifically the specificity is a very complex topic but apparently Amro has mastered that as well.

I would also like to highlight the tab stop issue. This was a great catch by Thomas Torp. This caused a funny issue for some people building for platforms which allow zeroing-weak-references. I am using DT_WEAK_VARIABLE to denote variables as weak where the deployment target permits that (>= iOS 5). Strangely there seemed to be a situation where a weak CFArrayRef would become nil and thus the array would be assigned as nil.

weak issue

On the left you see the corrected code, on the right the original. Honestly I don’t quite understand why it would do that. If you have an answer to this riddle please let me know in the comments.

The new version is tagged on GitHub as well as available via CocoaPods.


Tagged as: ,

Categories: Updates

6 Comments »

  1. assigning to a __weak var when the stuff is not held by anything else, will result in an immediate release of the object. that’d be the case in the code on the right IMO

  2. Hi there! Do you have a plan to support TextKit in new versions?