@@ -316,6 +316,292 @@ var styles = {
316316 }
317317} ;
318318
319+ var stylesWithoutMediaQueries = {
320+ header : {
321+ width : "90%" ,
322+ maxWidth : 1104 ,
323+ marginTop : 0 ,
324+ marginRight : "auto" ,
325+ marginBottom : 0 ,
326+ marginLeft : "auto" ,
327+ paddingTop : 46 ,
328+ paddingRight : 30 ,
329+ paddingBottom : 30 ,
330+ paddingLeft : 30 ,
331+ flexGrow : 1 ,
332+ flexShrink : 1 ,
333+ flexBasis : 0 ,
334+ flexDirection : "row"
335+ } ,
336+ headerHeadings : {
337+ flexGrow : 1 ,
338+ flexShrink : 1 ,
339+ flexBasis : 0 ,
340+ flexDirection : "column"
341+ } ,
342+ headerSpan : {
343+ fontSize : 16 ,
344+ fontWeight : "700" ,
345+ letterSpacing : 8 ,
346+ paddingTop : 0 ,
347+ paddingRight : 0 ,
348+ paddingBottom : 9.6 ,
349+ paddingLeft : 1.6 ,
350+ color : "#47a3da" ,
351+ fontFamily : "Arial"
352+ } ,
353+ headerNav : { display : "flex" , flexDirection : "row" , alignItems : "center" } ,
354+ headerNavItem : {
355+ width : 40 ,
356+ height : 40 ,
357+ backgroundColor : "#fff" ,
358+ borderRadius : 20 ,
359+ marginTop : 0 ,
360+ marginRight : 6.4 ,
361+ marginBottom : 0 ,
362+ marginLeft : 1.6 ,
363+ borderWidth : 4 ,
364+ borderStyle : "solid" ,
365+ borderColor : "#47a3da" ,
366+ display : "flex" ,
367+ justifyContent : "center" ,
368+ alignItems : "center"
369+ } ,
370+ h1 : {
371+ fontSize : 34 ,
372+ lineHeight : 44 ,
373+ marginTop : 0 ,
374+ marginRight : 0 ,
375+ marginBottom : 20 ,
376+ marginLeft : 0 ,
377+ fontWeight : "400" ,
378+ color : "#47a3da" ,
379+ fontFamily : "Arial"
380+ } ,
381+ contentSection : {
382+ paddingTop : 48 ,
383+ paddingRight : 16 ,
384+ paddingBottom : 48 ,
385+ paddingLeft : 16 ,
386+ width : "100%" ,
387+ maxWidth : 1230 ,
388+ marginTop : 0 ,
389+ marginRight : "auto" ,
390+ marginBottom : 0 ,
391+ marginLeft : "auto" ,
392+ flexGrow : 1 ,
393+ flexShrink : 1 ,
394+ flexBasis : 0 ,
395+ flexDirection : "row"
396+ } ,
397+ tabsWrapper : {
398+ marginTop : 16 ,
399+ marginRight : 0 ,
400+ marginBottom : 32 ,
401+ marginLeft : 0
402+ } ,
403+ tabs : { width : "100%" , marginBottom : 3 , position : "relative" } ,
404+ bottomBorder : {
405+ height : 1 ,
406+ width : "100%" ,
407+ backgroundColor : "#47a3da" ,
408+ position : "absolute" ,
409+ bottom : 0 ,
410+ left : 0 ,
411+ zIndex : - 1
412+ } ,
413+ ul : {
414+ flexGrow : 1 ,
415+ flexShrink : 1 ,
416+ flexBasis : 0 ,
417+ flexDirection : "row" ,
418+ marginLeft : "auto" ,
419+ marginRight : "auto"
420+ } ,
421+ li : {
422+ borderWidth : 1 ,
423+ borderStyle : "solid" ,
424+ borderColor : "#becbd2" ,
425+ borderBottomColor : "#47a3da" ,
426+ marginTop : 0 ,
427+ marginRight : 4 ,
428+ marginBottom : 0 ,
429+ marginLeft : 4 ,
430+ backgroundColor : "#fff"
431+ } ,
432+ liCurrent : {
433+ borderWidth : 1 ,
434+ borderStyle : "solid" ,
435+ borderColor : "#47a3da" ,
436+ borderTopWidth : 3 ,
437+ borderBottomColor : "#fff" ,
438+ marginTop : 0 ,
439+ marginRight : 4 ,
440+ marginBottom : 0 ,
441+ marginLeft : 4 ,
442+ backgroundColor : "#fff" ,
443+ zIndex : 1
444+ } ,
445+ icon : { marginTop : - 4 , marginRight : 9 , marginBottom : 0 , marginLeft : 0 } ,
446+ link : {
447+ height : 54 ,
448+ paddingTop : 0 ,
449+ paddingRight : 29 ,
450+ paddingBottom : 0 ,
451+ paddingLeft : 29 ,
452+ flexGrow : 1 ,
453+ flexShrink : 1 ,
454+ flexBasis : 0 ,
455+ flexDirection : "row" ,
456+ alignItems : "center"
457+ } ,
458+ liCurrentLinkText : { fontSize : 23.2 , color : "#47a3da" , fontFamily : "Arial" } ,
459+ linkText : { fontSize : 23.2 , color : "#becbd2" , fontFamily : "Arial" } ,
460+ mediabox : {
461+ width : "33%" ,
462+ flexBasis : "33%" ,
463+ marginTop : 10 ,
464+ marginRight : 0 ,
465+ marginBottom : 10 ,
466+ marginLeft : 0 ,
467+ paddingTop : 0 ,
468+ paddingRight : 25 ,
469+ paddingBottom : 0 ,
470+ paddingLeft : 25
471+ } ,
472+ imgWrapper : { position : "relative" , height : 0 , paddingTop : "54.39%" } ,
473+ img : {
474+ position : "absolute" ,
475+ top : 0 ,
476+ right : 0 ,
477+ bottom : 0 ,
478+ left : 0 ,
479+ width : "auto" ,
480+ maxWidth : "100%" ,
481+ resizeMode : "cover"
482+ } ,
483+ h3 : {
484+ fontSize : 23 ,
485+ marginTop : 18 ,
486+ marginRight : 0 ,
487+ marginBottom : 12 ,
488+ marginLeft : 0 ,
489+ color : "#47a3da" ,
490+ fontWeight : "700" ,
491+ fontFamily : "Arial"
492+ } ,
493+ p : {
494+ fontSize : 20 ,
495+ paddingTop : 0 ,
496+ paddingRight : 0 ,
497+ paddingBottom : 16 ,
498+ paddingLeft : 0 ,
499+ marginTop : 0 ,
500+ marginRight : 0 ,
501+ marginBottom : 0 ,
502+ marginLeft : 0 ,
503+ lineHeight : 24 ,
504+ color : "#47a3da" ,
505+ fontFamily : "Arial"
506+ } ,
507+ info : {
508+ paddingTop : 20 ,
509+ paddingRight : 20 ,
510+ paddingBottom : 20 ,
511+ paddingLeft : 20
512+ } ,
513+ infoText : { fontSize : 16 , textAlign : "center" , color : "#47a3da" } ,
514+ infoLink : { color : "#ccc" } ,
515+ "@media screen and (max-width: 55rem)" : {
516+ header : { flexDirection : "column" , alignItems : "center" } ,
517+ headerSpan : { textAlign : "center" } ,
518+ h1 : { textAlign : "center" }
519+ } ,
520+ "@media screen and (max-width: 52.375rem)" : {
521+ liCurrentLinkText : { display : "none" } ,
522+ linkText : { display : "none" } ,
523+ icon : { marginRight : 0 } ,
524+ contentSection : { flexDirection : "column" } ,
525+ mediabox : {
526+ paddingTop : 0 ,
527+ paddingRight : 0 ,
528+ paddingBottom : 35 ,
529+ paddingLeft : 0 ,
530+ flexDirection : "row" ,
531+ width : "100%"
532+ } ,
533+ imgWrapper : {
534+ marginTop : 0 ,
535+ marginRight : 25 ,
536+ marginBottom : 10 ,
537+ marginLeft : 0 ,
538+ width : "40%" ,
539+ paddingTop : "22.39%"
540+ } ,
541+ textWrapper : { width : "58%" } ,
542+ h3 : { marginTop : 0 , fontSize : 21 } ,
543+ p : { fontSize : 18 }
544+ } ,
545+ "@media screen and (max-width: 32rem)" : {
546+ ul : {
547+ width : "100%" ,
548+ paddingTop : 0 ,
549+ paddingRight : 0 ,
550+ paddingBottom : 0 ,
551+ paddingLeft : 0
552+ } ,
553+ link : {
554+ width : "100%" ,
555+ paddingTop : 0 ,
556+ paddingRight : 0 ,
557+ paddingBottom : 0 ,
558+ paddingLeft : 0 ,
559+ justifyContent : "center"
560+ } ,
561+ li : {
562+ flexGrow : 1 ,
563+ flexBasis : "20%" ,
564+ marginTop : 0 ,
565+ marginRight : 0 ,
566+ marginBottom : 0 ,
567+ marginLeft : - 1
568+ } ,
569+ liCurrent : {
570+ flexGrow : 1 ,
571+ flexBasis : "20%" ,
572+ marginTop : 0 ,
573+ marginRight : 0 ,
574+ marginBottom : 0 ,
575+ marginLeft : - 1
576+ } ,
577+ contentSection : { flexDirection : "column" } ,
578+ mediabox : { width : "100%" , flexBasis : "100%" , flexDirection : "column" } ,
579+ imgWrapper : { width : "100%" , maxWidth : "100%" , paddingTop : "54.39%" } ,
580+ textWrapper : { width : "100%" } ,
581+ img : {
582+ marginTop : 0 ,
583+ marginRight : "auto" ,
584+ marginBottom : 0 ,
585+ marginLeft : "auto" ,
586+ maxWidth : "100%"
587+ } ,
588+ h3 : {
589+ marginTop : 20 ,
590+ marginRight : 0 ,
591+ marginBottom : 16 ,
592+ marginLeft : 0 ,
593+ textAlign : "center"
594+ } ,
595+ p : {
596+ marginTop : 0 ,
597+ marginRight : 0 ,
598+ marginBottom : 0 ,
599+ marginLeft : 0 ,
600+ textAlign : "center"
601+ }
602+ }
603+ } ;
604+
319605var portrait = {
320606 width : 420 ,
321607 height : 690
@@ -343,6 +629,9 @@ suite
343629 . add ( "already parsed queries" , function ( ) {
344630 parsed ( styles , portrait , Platform ) ;
345631 } )
632+ . add ( "already parsed queries, return early" , function ( ) {
633+ parsed ( stylesWithoutMediaQueries , portrait , Platform ) ;
634+ } )
346635 . on ( "cycle" , function ( event ) {
347636 console . log ( String ( event . target ) ) ;
348637 } )
@@ -376,6 +665,12 @@ suite2
376665 parsed ( styles , portrait , Platform ) ;
377666 parsed ( styles , landscape , Platform ) ;
378667 } )
668+ . add ( "orientation change: already parsed queries, return early" , function ( ) {
669+ parsed ( stylesWithoutMediaQueries , portrait , Platform ) ;
670+ parsed ( stylesWithoutMediaQueries , landscape , Platform ) ;
671+ parsed ( stylesWithoutMediaQueries , portrait , Platform ) ;
672+ parsed ( stylesWithoutMediaQueries , landscape , Platform ) ;
673+ } )
379674 . on ( "cycle" , function ( event ) {
380675 console . log ( String ( event . target ) ) ;
381676 } )
0 commit comments