Lines Matching +full:fail +full:- +full:fast

1 <!--
5 Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Vers…
6 -->
8 <!-- saved from url=(0014)about:internet -->
18 CSS_PREFIX: '-pie-',
73 * IE version detection approach by James Padolsey, with modifications -- from
74 * http://james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
81 div.innerHTML = '<!--[if gt IE ' + (++ieVersion) + ']><i></i><![endif]-->',
89 PIE.CSS_PREFIX = PIE.CSS_PREFIX.replace( /^-/, '' );
117 * full-fledged Document. It allows adding namespaces immediately, so we add the
126 vmlCreatorDoc.namespaces.add( vmlPrefix, 'urn:schemas-microsoft-com:vml' );
209 …// This is used below to find the start/end positions of the CSS3 gradient-line, and also in findi…
210 // the total length of the VML rendered gradient-line corner to corner.
214 endCornerX = width - startCornerX;
215 endCornerY = height - startCornerY;
244 // Find the end position by extending a perpendicular line from the gradient-line which
252 endX = width - startX;
253 endY = height - startY;
260 deltaX = endX - startX;
261 deltaY = endY - startY;
268 -Math.atan2( deltaY, deltaX ) / Math.PI * 180
294 * @param x1 - x coord of the starting point
295 * @param y1 - y coord of the starting point
296 * @param angle - angle of the line extending from the starting point (in degrees)
297 * @param x2 - x coord of point along the perpendicular line
298 * @param y2 - y coord of point along the perpendicular line
303 // divide-by-zero errors.
314 var a1 = Math.tan( -angle * Math.PI / 180 ),
315 c1 = a1 * x1 - y1,
316 a2 = -1 / a1,
317 c2 = a2 * x2 - y2,
318 d = a2 - a1,
319 endX = ( c2 - c1 ) / d,
320 endY = ( a1 * c2 - a2 * c1 ) / d;
334 var dx = p2x - p1x,
335 dy = p2y - p1y;
353 * Hash of function ids to their position in the observers list, for fast lookup
381 while( i-- ) {
387 * Simple heartbeat timer - this is a brute-force workaround for syncing issues caused by IE not
390 * which adds heartbeat listeners based on the custom -pie-poll flag, which defaults to true in IE8
478 * value is returned from PIE.getLength() - always use that instead of instantiating directly.
484 var lengthCalcEl = doc.createElement( 'length-calc' ),
493 s.top = s.left = '-9999px';
496 while( i-- ) {
553 * @param {Element} el - the context element, used to resolve font-relative values
554 …* @param {(function():number|number)=} pct100 - the number of pixels that equal a 100% percentage.…
575 * The em and ex units are relative to the font-size of the current element,
576 * however if the font-size is set using non-pixel units then we get that value
580 * additional calculation. If the font-size *is* specified in pixels, then we use that
623 * Wrapper for a CSS3 bg-position value. Takes up to 2 position keywords and 2 lengths/percentages.
665 // Two values - CSS2
694 // Three or four values - CSS3
705 … * Find the coordinates of the background image from the upper-left corner of the background area.
708 … * @param {number} width - the width for percentages (background area width minus image width)
709 … * @param {number} height - the height for percentages (background area height minus image height)
718 x: vals[0] === 'right' ? width - pxX : pxX,
719 y: vals[2] === 'bottom' ? height - pxY : pxY
727 * Wrapper for a CSS3 background-size value.
781 * @param {string} val The raw CSS value for the angle. It is assumed it has been pre-validated.
788 unitRE: /[a-z]+$/i,
815 * value is returned from PIE.getColor() - always use that instead of instantiating directly.
974 * @param {number} type The type of the token - see PIE.Tokenizer.Type
992 number: /^[\+\-]?(\d*\.)?\d+/,
993 url: /^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,
994 ident: /^\-?[_a-z][\w-]*/i,
998 hashColor: /^#([\da-f]{6}|[\da-f]{3})/i,
1015 …* @param {boolean} forget - if true, the token will not be stored for the purposes of backtracking…
1170 return this.tokens[ this.tokenIndex-- - 2 ];
1185 * @param {function():boolean} func - test function
1186 * @param {boolean} require - if true, then if the end of the CSS string is reached
1239 w: isIE9 ? el.offsetWidth : rect.right - rect.left,
1240 h: isIE9 ? el.offsetHeight : rect.bottom - rect.top
1259 if( !--this._locked ) {
1353 if( !--this._locked ) {
1360 * Handles parsing, caching, and detecting changes to background (and -pie-background) CSS
1370 repeatIdents: { 'repeat-x':1, 'repeat-y':1, 'repeat':1, 'no-repeat':1 },
1371 originAndClipIdents: { 'padding-box':1, 'border-box':1, 'content-box':1 },
1385 * For background styles, we support the -pie-background property but fall back to the standard
1398 * imgRepeat: <'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'>,
1401 * bgOrigin: <'border-box' | 'padding-box' | 'content-box'>,
1402 * bgClip: <'border-box' | 'padding-box'>,
1404 * origString: 'url(img.png) no-repeat top left'
1407 * imgType: 'linear-gradient',
1442 // If the CSS3-specific -pie-background property is present, parse it
1451 … if( !image.imgType && tokType & tok_type.FUNCTION && tokVal === 'linear-gradient' ) {
1469 // Color stop - must start with color
1475 break; //fail
1491 // Angle - can only appear in first spot
1510 // Found something we didn't recognize; fail without adding image
1571 image.origString = css.substring( beginCharIndex, tokenizer.ch - 1 );
1715 * Tests if style.PiePngFix or the -pie-png-fix property is set to true in IE6.
1721 …E_PREFIX + 'PngFix' ] || el.currentStyle.getAttribute( PIE.CSS_PREFIX + 'png-fix' ) ) === 'true' );
1729 * to report is as being "active" if either the -pie-background override property is present
1730 * and parses successfully or '-pie-png-fix' is set to true in IE6.
1805 // Don't redraw or hide borders for cells in border-collapse:collapse tables
1838 * Handles parsing, caching, and detecting changes to border-radius CSS
1846 cssProperty: 'border-radius',
1880 // See if there is a slash followed by more lengths, for the y-axis radii
1889 // Treat all-zero values the same as no value
1905 * Handles parsing, caching, and detecting changes to border-image CSS
1911 cssProperty: 'border-image',
2047 * Handles parsing, caching, and detecting changes to box-shadow CSS
2053 cssProperty: 'box-shadow',
2088 else { //encountered an unrecognized token; fail.
2220 …* Add a layer element, with the given z-order index, to the renderer's main box element. We can't …
2221 …* z-index because that breaks when the root rendering box's z-index is 'auto' in IE8+ standards mo…
2268 … using container elements in the correct order, to get correct z stacking without z-index.
2375 …* @param {Object.<{t:number, r:number, b:number, l:number}>} shrink - if present, specifies number…
2411 'l' + ceil( w - trX ) + ',' + floor( shrinkT ) +
2412 'qx' + ceil( w - shrinkR ) + ',' + floor( trY ) +
2413 'l' + ceil( w - shrinkR ) + ',' + ceil( h - brY ) +
2414 'qy' + ceil( w - brX ) + ',' + ceil( h - shrinkB ) +
2415 'l' + floor( blX ) + ',' + ceil( h - shrinkB ) +
2416 'qx' + floor( shrinkL ) + ',' + ceil( h - blY ) + ' x e';
2418 // simplified path for non-rounded box
2420 'l' + ceil( w - shrinkR ) + ',' + floor( shrinkT ) +
2421 'l' + ceil( w - shrinkR ) + ',' + ceil( h - shrinkB ) +
2422 'l' + floor( shrinkL ) + ',' + ceil( h - shrinkB ) +
2465 for( i = sides.length; i--; ) {
2478 … // TODO find a better way to do this that doesn't mess up the DOM parent-child relationship,
2482 if( el.childNodes.length !== 1 || el.firstChild.tagName !== 'ie6-mask' ) {
2483 var cont = doc.createElement( 'ie6-mask' ),
2562 x = elBounds.x - parRect.left - ( parseFloat(cs.borderLeftWidth) || 0 );
2563 y = elBounds.y - parRect.top - ( parseFloat(cs.borderTopWidth) || 0 );
2566 x = elBounds.x + docEl.scrollLeft - docEl.clientLeft;
2567 y = elBounds.y + docEl.scrollTop - docEl.clientTop;
2575 s.zIndex = tgtPos === 'static' ? -1 : tgtCS.zIndex;
2604 box = this._box = doc.createElement( 'css3-container' );
2712 while( i-- ) {
2726 if( img.imgType === 'linear-gradient' ) {
2756 // update executed, make sure that's not the case to avoid divide-by-zero error
2767 …bgPos = bg.bgPosition ? bg.bgPosition.coords( el, elW - size.w - bwL - bwR, elH - size.h - bwT - b…
2774 // Positioning - find the pixel offset from the top/left and convert to a ratio
2775 …// The position is shifted by half a pixel, to adjust for the half-pixel coordorigin shift which is
2781 // Repeating - clip the image shape
2783 if( repeat === 'repeat-x' || repeat === 'no-repeat' ) {
2787 if( repeat === 'repeat-y' || repeat === 'no-repeat' ) {
2844 … // For each, we find its pixel offset along the gradient-line; if the offset of a stop is less
2846 // percentage along the VML gradient-line, which runs from shape corner to corner.
2853 // Find the pixel offsets along the CSS3 gradient-line for each stop.
2857 i === 0 ? 0 : i === stopCount - 1 ? lineLength : null );
2859 // Fill in gaps with evenly-spaced offsets
2862 before = stopPx[ i - 1 ];
2867 stopPx[ i ] = before + ( after - before ) / ( j - i + 1 );
2870 stopPx[ i ] = Math.max( stopPx[ i ], stopPx[ i - 1 ] );
2886 fill['color2'] = stops[stopCount - 1].color.colorValue( el );
2975 // remove any previously-created border shapes which didn't get used above
3004 // shortcut for identical border on all sides - only need 1 stroked shape
3052 … ( isRight ? ceil( elW - rx ) : floor( rx ) ) * mult + ',' + // center x
3053 … ( isBottom ? ceil( elH - ry ) : floor( ry ) ) * mult + ',' + // center y
3054 ( floor( rx ) - shrinkX ) * mult + ',' + // width
3055 ( floor( ry ) - shrinkY ) * mult + ',' + // height
3057 ( 45 * deg * ( ccw ? 1 : -1 ) // angle change
3060 ( isRight ? elW - shrinkX : shrinkX ) * mult + ',' +
3061 ( isBottom ? elH - shrinkY : shrinkY ) * mult
3071 … ceil( elW - shrink ) * mult + ',' + floor( radius( 'y', 'tr') ) * mult :
3073 … ceil( elW - radius( 'x', 'br') ) * mult + ',' + floor( elH - shrink ) * mult :
3075 … floor( shrink ) * mult + ',' + ceil( elH - radius( 'y', 'bl') ) * mult
3079 … ceil( elW - radius( 'x', 'tr') ) * mult + ',' + ceil( shrink ) * mult :
3081 … ceil( elW - shrink ) * mult + ',' + ceil( elH - radius( 'y', 'br') ) * mult :
3083 … floor( radius( 'x', 'bl') ) * mult + ',' + floor( elH - shrink ) * mult :
3117 curve( cornerAfter, 0, 0, baseAngle - 45, 1, 0 ),
3128 …curve( cornerAfter, afterX - floor( afterX / 3 ), afterY - floor( afterY / 3 ), baseAngle - 45, 1,…
3130 …curve( cornerBefore, beforeX - floor( beforeX / 3 ), beforeY - floor( beforeY / 3 ), baseAngle, 1,…
3137 curve( cornerAfter, 0, 0, baseAngle - 45, 1, 0 ) +
3148 addSide( 'b', 'r', 'l', 'br', 'bl', -90 );
3149 addSide( 'l', 'b', 't', 'bl', 'tl', -180 );
3167 * Renderer for border-image
3220 setSizeAndPos( 't', elW - widthL - widthR, widthT, widthL, 0 );
3221 setSizeAndPos( 'tr', widthR, widthT, elW - widthR, 0 );
3222 setSizeAndPos( 'r', widthR, elH - widthT - widthB, elW - widthR, widthT );
3223 setSizeAndPos( 'br', widthR, widthB, elW - widthR, elH - widthB );
3224 setSizeAndPos( 'b', elW - widthL - widthR, widthB, widthL, elH - widthB );
3225 setSizeAndPos( 'bl', widthL, widthB, 0, elH - widthB );
3226 setSizeAndPos( 'l', widthL, elH - widthT - widthB, 0, widthT );
3227 setSizeAndPos( 'c', elW - widthL - widthR, elH - widthT - widthB, widthL, widthT );
3238 setCrops( [ 'tl', 't', 'tr' ], 'cropBottom', ( imgSize.h - sliceT ) / imgSize.h );
3239 setCrops( [ 'tl', 'l', 'bl' ], 'cropRight', ( imgSize.w - sliceL ) / imgSize.w );
3240 setCrops( [ 'bl', 'b', 'br' ], 'cropTop', ( imgSize.h - sliceB ) / imgSize.h );
3241 setCrops( [ 'tr', 'r', 'br' ], 'cropLeft', ( imgSize.w - sliceR ) / imgSize.w );
3266 box = doc.createElement( 'border-image' );
3298 // Force border-style to solid so it doesn't collapse
3301 // If widths specified in border-image shorthand, override border-width
3327 * Renderer for outset box-shadows
3336 boxName: 'outset-box-shadow',
3367 var shape = me.getShape( 'shadow' + index + corner, 'fill', box, len - index ),
3379 …pe'] = 'gradienttitle'; //makes the VML gradient follow the shape's outline - hooray for undocumen…
3398 while( i-- ) {
3406 shrink = -spread - blur;
3408 // If blurring, use a non-null border radius info object so that getBoxPath will
3419 if( blur - spread > w / 2 || blur - spread > h / 2 ) {
3425 for( j = 4; j--; ) {
3431 fill['focusposition'] = ( isRight ? 1 - focusX : focusX ) + ',' +
3432 ( isBottom ? 1 - focusY : focusY );
3447 fill['focussize'] = ( 1 - focusX * 2 ) + ',' + ( 1 - focusY * 2 );
3463 * Renderer for re-rendering img elements using VML. Kicks in if the img has
3464 * a border-radius applied, or if the -pie-png-fix flag is set.
3503 // In IE6, the BorderRenderer will have hidden the border by moving the border-width to
3607 if (img.imgType === 'linear-gradient' ) {
3647 if( bgOrigin !== 'border-box' ) {
3650 w -= borders[ 'l' ].pixels( el ) + borders[ 'l' ].pixels( el );
3651 h -= borders[ 't' ].pixels( el ) + borders[ 'b' ].pixels( el );
3655 if ( bgOrigin === 'content-box' ) {
3658 … w -= getLength( cs.paddingLeft ).pixels( el ) + getLength( cs.paddingRight ).pixels( el );
3659 … h -= getLength( cs.paddingTop ).pixels( el ) + getLength( cs.paddingBottom ).pixels( el );
3679 // Find the pixel offsets along the CSS3 gradient-line for each stop.
3683 i === 0 ? 0 : i === stopCount - 1 ? lineLength : null );
3685 // Fill in gaps with evenly-spaced offsets
3688 before = stopPx[ i - 1 ];
3693 stopPx[ i ] = before + ( after - before ) / ( j - i + 1 );
3708 '" stop-color="' + stopsInfo[i].color.colorValue( el ) +
3709 '" stop-opacity="' + stopsInfo[i].color.alpha() + '"/>'
3729 * Renderer for border-image
3769 … // security exception (perhaps due to cross-origin policy within data URIs?) Therefore we
3771 … // canvas. This unfortunately requires the border-image src to be within the same domain,
3772 … // which isn't a limitation in true border-image, so we need to try and find a better fix.
3791 centerW = elW - widthL - widthR,
3792 middleH = elH - widthT - widthB,
3793 imgCenterW = imgW - sliceL - sliceR,
3794 imgMiddleH = imgH - sliceT - sliceB,
3796 // Determine the size of each tile - 'round' is handled below
3809 … tileSizeT -= (tileSizeT - (centerW % tileSizeT || tileSizeT)) / ceil(centerW / tileSizeT);
3810 … tileSizeB -= (tileSizeB - (centerW % tileSizeB || tileSizeB)) / ceil(centerW / tileSizeB);
3813 … tileSizeR -= (tileSizeR - (middleH % tileSizeR || tileSizeR)) / ceil(middleH / tileSizeR);
3814 … tileSizeL -= (tileSizeL - (middleH % tileSizeL || tileSizeL)) / ceil(middleH / tileSizeL);
3818 …// Build the SVG for the border-image rendering. Add each piece as a pattern, which is then stretc…
3827 'x="' + (repeatH === REPEAT ? x + w / 2 - tileW / 2 : x) + '" ' +
3828 'y="' + (repeatV === REPEAT ? y + h / 2 - tileH / 2 : y) + '" ' +
3842 …addImage( elW - widthR, 0, widthR, widthT, imgW - sliceR, 0, sliceR, sliceT, widthR, widthT ); // …
3848 …addImage( elW - widthR, widthT, widthR, middleH, imgW - sliceR, sliceT, sliceR, imgMiddleH, widthR…
3849 …addImage( 0, elH - widthB, widthL, widthB, 0, imgH - sliceB, sliceL, sliceB, widthL, widthB ); // …
3850 …addImage( widthL, elH - widthB, centerW, widthB, sliceL, imgH - sliceB, imgCenterW, sliceB, tileSi…
3851 …addImage( elW - widthR, elH - widthB, widthR, widthB, imgW - sliceR, imgH - sliceB, sliceR, sliceB…
3861 …ndex, 'url(data:image/svg+xml,' + escape( svg.join( '' ) ) + ') no-repeat border-box border-box' );
3863 … // If the border-image's src wasn't immediately available, the SVG for its background layer
3909 lazyInitCssProp = PIE.CSS_PREFIX + 'lazy-init',
3914 firstChildClass = PIE.CLASS_PREFIX + 'first-child',
3934 while( i-- ) {
3944 while( i-- ) {
3978 …// Polling for size/position changes: default to on in IE8, off otherwise, overridable by -pie-poll
3992 …// If the -pie-lazy-init:true flag is set, check if the element is outside the viewport and if so,…
4125 check to be as fast as possible. */
4152 … // Some elements like <table> fire onpropertychange events for old-school background properties
4166 … // TODO this feels sloppy - look into merging propChanged and update functions
4186 * hover styles to non-link elements, and to trigger a propertychange update.
4203 * active styles to non-link elements, and to trigger a propertychange update.
4243 * which adds these listeners as requested with the -pie-watch-ancestors CSS property.
4254 for( var i = styleInfosArr.length; i--; ) {
4260 for( var i = styleInfosArr.length; i--; ) {
4280 while( i-- ) {
4326 * If requested via the custom -pie-watch-ancestors CSS property, add onpropertychange and
4331 var watch = el.currentStyle.getAttribute( PIE.CSS_PREFIX + 'watch-ancestors' ),
4353 … * If the target element is a first child, add a pie_first-child class to it. This allows using
4354 …* the added class as a workaround for the fact that PIE's rendering element breaks the :first-child
4355 * pseudo-class selector.