Skip to content

Commit 5bb5fd6

Browse files
committed
Merge branch 'release-1.6.19'
2 parents 311a095 + cd43be6 commit 5bb5fd6

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

Core/Source/DTCSSStylesheet.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ - (NSMutableArray *)matchingComplexCascadingSelectorsForElement:(DTHTMLElement *
826826
for (NSString *selector in _orderedSelectors)
827827
{
828828
// 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)
829-
if (![selector containsString:@" "]) {
829+
if (![selector rangeOfString:@" "].length) {
830830
continue;
831831
}
832832

Core/Source/DTLazyImageView.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
324324
- (void)removeFromSuperview
325325
{
326326
[super removeFromSuperview];
327+
328+
#if DTCORETEXT_USES_NSURLSESSION
329+
[_dataTask cancel];
330+
[_session invalidateAndCancel];
331+
#else
332+
[_connection cancel];
333+
#endif
327334
}
328335

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

351358
#if DTCORETEXT_USES_NSURLSESSION
359+
[_session finishTasksAndInvalidate];
352360
_dataTask = nil;
353361
#else
354362
_connection = nil;
@@ -367,6 +375,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
367375
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
368376
{
369377
#if DTCORETEXT_USES_NSURLSESSION
378+
[_session invalidateAndCancel];
370379
_dataTask = nil;
371380
#else
372381
_connection = nil;

Core/Source/default.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ article,aside,footer,header,hgroup,nav,section
4242
p
4343
{
4444
display:block;
45-
-webkit-margin-before:1em;
4645
-webkit-margin-after:1em;
4746
-webkit-margin-start:0;
4847
-webkit-margin-end:0;
@@ -267,4 +266,4 @@ table {
267266
border-collapse: separate;
268267
border-spacing: 2px;
269268
border-color: gray;
270-
}
269+
}

DTCoreText.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'DTCoreText'
3-
spec.version = '1.6.18'
3+
spec.version = '1.6.19'
44
spec.platforms = {:ios => '4.3', :tvos => '9.0' }
55
spec.license = 'BSD'
66
spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :tag => spec.version.to_s }

Demo/Source/DemoTextViewController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,10 @@ - (void)lazyImageView:(DTLazyImageView *)lazyImageView didChangeImageSize:(CGSiz
753753
if (didUpdate)
754754
{
755755
// layout might have changed due to image sizes
756-
[_textView relayoutText];
756+
// do it on next run loop because a layout pass might be going on
757+
dispatch_async(dispatch_get_main_queue(), ^{
758+
[_textView relayoutText];
759+
});
757760
}
758761
}
759762

0 commit comments

Comments
 (0)