Skip to content

Commit

Permalink
Merge branch 'release-1.6.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Oct 11, 2016
2 parents 311a095 + cd43be6 commit 5bb5fd6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Core/Source/DTCSSStylesheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ - (NSMutableArray *)matchingComplexCascadingSelectorsForElement:(DTHTMLElement *
for (NSString *selector in _orderedSelectors)
{
// We only process the selector if our selector has more than 1 part to it (e.g. ".foo" would be skipped and ".foo .bar" would not)
if (![selector containsString:@" "]) {
if (![selector rangeOfString:@" "].length) {
continue;
}

Expand Down
9 changes: 9 additions & 0 deletions Core/Source/DTLazyImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
- (void)removeFromSuperview
{
[super removeFromSuperview];

#if DTCORETEXT_USES_NSURLSESSION
[_dataTask cancel];
[_session invalidateAndCancel];
#else
[_connection cancel];
#endif
}

#if DTCORETEXT_USES_NSURLSESSION
Expand All @@ -349,6 +356,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
}

#if DTCORETEXT_USES_NSURLSESSION
[_session finishTasksAndInvalidate];
_dataTask = nil;
#else
_connection = nil;
Expand All @@ -367,6 +375,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
#if DTCORETEXT_USES_NSURLSESSION
[_session invalidateAndCancel];
_dataTask = nil;
#else
_connection = nil;
Expand Down
3 changes: 1 addition & 2 deletions Core/Source/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ article,aside,footer,header,hgroup,nav,section
p
{
display:block;
-webkit-margin-before:1em;
-webkit-margin-after:1em;
-webkit-margin-start:0;
-webkit-margin-end:0;
Expand Down Expand Up @@ -267,4 +266,4 @@ table {
border-collapse: separate;
border-spacing: 2px;
border-color: gray;
}
}
2 changes: 1 addition & 1 deletion DTCoreText.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'DTCoreText'
spec.version = '1.6.18'
spec.version = '1.6.19'
spec.platforms = {:ios => '4.3', :tvos => '9.0' }
spec.license = 'BSD'
spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :tag => spec.version.to_s }
Expand Down
5 changes: 4 additions & 1 deletion Demo/Source/DemoTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,10 @@ - (void)lazyImageView:(DTLazyImageView *)lazyImageView didChangeImageSize:(CGSiz
if (didUpdate)
{
// layout might have changed due to image sizes
[_textView relayoutText];
// do it on next run loop because a layout pass might be going on
dispatch_async(dispatch_get_main_queue(), ^{
[_textView relayoutText];
});
}
}

Expand Down

0 comments on commit 5bb5fd6

Please sign in to comment.