WordPress.org

Make WordPress Core

Changeset 36162


Ignore:
Timestamp:
01/03/2016 04:48:47 PM (4 years ago)
Author:
afercia
Message:

Media: set the image editor spinner on the smallest possible area.

When using spinners as background images, the re-painted area should be the smallest
possible one. See similar performance issue in #31196, #33311, #33322, and #34951.

Fixes #35296.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/media.css

    r35427 r36162  
    876876    position: absolute;
    877877    top: 0;
    878     background: #fff url(../images/spinner.gif) no-repeat center;
     878    bottom: 0;
     879    width: 100%;
     880    background: #fff;
     881    opacity: 0.7;
     882    filter: alpha(opacity=70);
     883    display: none;
     884}
     885
     886.imgedit-wait:before {
     887    content: "";
     888    display: block;
     889    width: 20px;
     890    height: 20px;
     891    position: absolute;
     892    left: 50%;
     893    top: 50%;
     894    margin: -10px 0 0 -10px;
     895    background: transparent url(../images/spinner.gif) no-repeat center;
    879896    -webkit-background-size: 20px 20px;
    880897    background-size: 20px 20px;
    881     opacity: 0.7;
    882     filter: alpha(opacity=70);
    883     width: 100%;
    884     height: 500px;
    885     display: none;
     898    -webkit-transform: translateZ(0);
     899    transform: translateZ(0);
    886900}
    887901
     
    10941108  (-webkit-min-device-pixel-ratio: 1.25),
    10951109  (min-resolution: 120dpi) {
    1096     .imgedit-wait {
     1110    .imgedit-wait:before {
    10971111        background-image: url(../images/spinner-2x.gif);
    10981112    }
  • trunk/src/wp-admin/js/image-edit.js

    r35567 r36162  
    5757
    5858        if ( toggle ) {
    59             wait.height( $('#imgedit-panel-' + postid).height() ).fadeIn('fast');
     59            wait.fadeIn( 'fast' );
    6060        } else {
    6161            wait.fadeOut('fast');
  • trunk/src/wp-includes/css/media-views.css

    r36122 r36162  
    17221722}
    17231723
    1724 .media-modal .imgedit-wait {
    1725     height: auto !important;
    1726     right: 0;
    1727     bottom: 0;
    1728     left: 0;
    1729 }
    1730 
    17311724.media-modal .imgedit-wrap .imgedit-panel-content {
    17321725    padding: 16px;
Note: See TracChangeset for help on using the changeset viewer.