extensions/amp-story/1.0/amp-story.js
/**
   * For some reason, Safari has an issue where sometimes when pages become
   * visible, some descendants are not painted.  This is a hack, where we detect
   * that the browser is Safari and force it to repaint, to avoid this case.
   * See newmuis/amphtml-story#106 for details.
   * @private
   */
For some reason, Safari has an issue where sometimes when pages become
visible, some descendants are not painted.  This is a hack, where we detect
that the browser is Safari and force it to repaint, to avoid this case.
See newmuis/amphtml-story#106 for details.
@private
For some reason Safari has an issue where sometimes when pages become visible some descendants are not painted . This is a hack where we detect that the browser is Safari and force it to repaint to avoid this case . See newmuis / amphtml - story#106 for details . @private
forceRepaintForSafari_() {
    if (!this.platform_.isSafari() && !this.platform_.isIos()) {
      return;
    }
    this.mutateElement(() => {
      toggle(this.element, false);
      const height = this.element. offsetHeight;
      if (height >= 0) {
        toggle(this.element, true);
      }
    });
  }
forceRepaintForSafari_ ( ) { if ( ! this . platform_ . isSafari ( ) && ! this . platform_ . isIos ( ) ) { return ; } this . mutateElement ( ( ) => { toggle ( this . element , false ) ; const height = this . element . offsetHeight ; if ( height >= 0 ) { toggle ( this . element , true ) ; } } ) ; }
For some reason, Safari has an issue where sometimes when pages become
 visible, some descendants are not painted.
For some reason Safari has an issue where sometimes when pages become visible some descendants are not painted .
// Reading the height is what forces the repaint.  The conditional exists // only to workaround the fact that the closure compiler would otherwise // think that only reading the height has no effect.  Since the height is // always >= 0, this conditional will always be executed. /*OK*/