webfontloader 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b59aa330495e3322b63996a48f290ee2fe85b547
4
- data.tar.gz: 21524a08ddfdf3934f59af13e00baac7c1cf8fb1
3
+ metadata.gz: 31821caf4efeb4ba4f34b805d4fd76b56bb35c4b
4
+ data.tar.gz: 8e759e2ae26ab7a5ff848244591f574f7642a43c
5
5
  SHA512:
6
- metadata.gz: a66dffeec358c13ef82ed544966357001bfa400ea7d0d63f67a24df85babc3a4239852e6ec2c9577a65f17f21e1c8bca4f1cb8f14fbac611c9daea621233dca3
7
- data.tar.gz: 0cf1f2208bea28c17cc54ebda0ce9bf19b012abf45443f385dc5ff5a5cd8822204fe967d724e195805609ac59d3774f1fc879213cafec00e8d9a653cbac23974
6
+ metadata.gz: b42346ace09821590399f9de42b038a0c852d0c264fdc20311a2ed7c41ea17af04d7407ddd553f254ebb5c672df52b3de55dd7418ec3003394d423b3f44b1931
7
+ data.tar.gz: cbfcd9c839eda2b1ebba42514e832bc90d654627c694a9a4bd8fb1e16b1c83471b94aa13553f6a06fa1edade50a9a1b406b724f4a8888a2a87bde021e82351b2
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v1.5.6 (September 3, 2014)
2
+ * Fix double inactive event when all modules fail to load
3
+
1
4
  v1.5.5 (June 5, 2014)
2
5
  * Add support for the Chromecast browser
3
6
 
data/README.md CHANGED
@@ -155,8 +155,7 @@ Web Font Loader provides a module system so that any web font provider can contr
155
155
  ### Custom
156
156
 
157
157
  To load fonts from any external stylesheet, use the `custom` module. Here you'll
158
- need to specify both the url of the stylesheet as well as the font families it
159
- provides.
158
+ need to specify the font family names you're trying to load, and optionally the url of the stylesheet that provides the `@font-face` declarations for those fonts.
160
159
 
161
160
  You can specify a specific font variation or set of variations to load and watch
162
161
  by appending the variations separated by commas to the family name separated by
@@ -198,7 +197,7 @@ In this example, the `fonts.css` file might look something like this:
198
197
  }
199
198
  ```
200
199
 
201
- Alternatively, you can load your fonts from a stylesheet not specified in WebFontConfig. As long as the names match those that are declared in the `families` array, the proper loading classes will be applied to the html element.
200
+ If your fonts are already included in another stylesheet you can also leave out the `urls` array and just specify font family names to start font loading. As long as the names match those that are declared in the `families` array, the proper loading classes will be applied to the html element.
202
201
 
203
202
  ```html
204
203
  <script src="//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script>
data/lib/webfontloader.rb CHANGED
@@ -3,7 +3,7 @@ require 'yaml'
3
3
  require 'webfontloader/modules'
4
4
 
5
5
  module WebFontLoader
6
- VERSION = '1.5.5'
6
+ VERSION = '1.5.6'
7
7
 
8
8
  ProjectRoot = File.expand_path(File.dirname(__FILE__) + "/..")
9
9
 
@@ -650,6 +650,25 @@ describe('UserAgentParser', function () {
650
650
  hasWebKitMetricsBug: false
651
651
  }
652
652
  });
653
+
654
+ expect(parse('Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; id404) like Gecko'))
655
+ .toMatchUserAgent({
656
+ name: 'MSIE',
657
+ parsedVersion: new Version(11, 0),
658
+ version: '11.0',
659
+ platform: 'Windows Phone',
660
+ parsedPlatformVersion: new Version(8, 1),
661
+ platformVersion: '8.1',
662
+ engine: 'Trident',
663
+ parsedEngineVersion: new Version(7, 0),
664
+ engineVersion: '7.0',
665
+ documentMode: undefined,
666
+ browserInfo: {
667
+ hasWebFontSupport: true,
668
+ hasWebKitFallbackBug: false,
669
+ hasWebKitMetricsBug: false
670
+ }
671
+ });
653
672
  });
654
673
 
655
674
  it('should detect unsupported Internet Explorer on Windows Phone', function () {
@@ -264,6 +264,7 @@ describe('WebFont', function () {
264
264
  });
265
265
 
266
266
  expect(inactive).toHaveBeenCalled();
267
+ expect(inactive.calls.length).toEqual(1);
267
268
  });
268
269
  });
269
270
 
data/src/core/webfont.js CHANGED
@@ -68,8 +68,9 @@ goog.scope(function () {
68
68
 
69
69
  if (allModulesLoaded && this.moduleFailedLoading_ == 0) {
70
70
  eventDispatcher.dispatchInactive();
71
+ } else {
72
+ fontWatcher.watchFonts([], {}, null, allModulesLoaded);
71
73
  }
72
- fontWatcher.watchFonts([], {}, null, allModulesLoaded);
73
74
  }
74
75
  };
75
76
 
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'webfontloader'
16
- s.version = '1.5.5'
17
- s.date = '2014-06-05'
16
+ s.version = '1.5.6'
17
+ s.date = '2014-09-03'
18
18
 
19
19
  ## Make sure your summary is short. The description may be as long
20
20
  ## as you like.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webfontloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Carver
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-05 00:00:00.000000000 Z
12
+ date: 2014-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake