Lines Matching +full:fail +full:- +full:fast
5 Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Vers…
12 CSS_PREFIX: '-pie-',
67 * IE version detection approach by James Padolsey, with modifications -- from
68 * http://james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
75 div.innerHTML = '<!--[if gt IE ' + (++ieVersion) + ']><i></i><![endif]-->',
83 PIE.CSS_PREFIX = PIE.CSS_PREFIX.replace( /^-/, '' );
111 * full-fledged Document. It allows adding namespaces immediately, so we add the
120 vmlCreatorDoc.namespaces.add( vmlPrefix, 'urn:schemas-microsoft-com:vml' );
203 …// This is used below to find the start/end positions of the CSS3 gradient-line, and also in findi…
204 // the total length of the VML rendered gradient-line corner to corner.
208 endCornerX = width - startCornerX;
209 endCornerY = height - startCornerY;
238 // Find the end position by extending a perpendicular line from the gradient-line which
246 endX = width - startX;
247 endY = height - startY;
254 deltaX = endX - startX;
255 deltaY = endY - startY;
262 -Math.atan2( deltaY, deltaX ) / Math.PI * 180
288 * @param x1 - x coord of the starting point
289 * @param y1 - y coord of the starting point
290 * @param angle - angle of the line extending from the starting point (in degrees)
291 * @param x2 - x coord of point along the perpendicular line
292 * @param y2 - y coord of point along the perpendicular line
297 // divide-by-zero errors.
308 var a1 = Math.tan( -angle * Math.PI / 180 ),
309 c1 = a1 * x1 - y1,
310 a2 = -1 / a1,
311 c2 = a2 * x2 - y2,
312 d = a2 - a1,
313 endX = ( c2 - c1 ) / d,
314 endY = ( a1 * c2 - a2 * c1 ) / d;
328 var dx = p2x - p1x,
329 dy = p2y - p1y;
347 * Hash of function ids to their position in the observers list, for fast lookup
375 while( i-- ) {
381 * Simple heartbeat timer - this is a brute-force workaround for syncing issues caused by IE not
384 * which adds heartbeat listeners based on the custom -pie-poll flag, which defaults to true in IE8
472 * value is returned from PIE.getLength() - always use that instead of instantiating directly.
478 var lengthCalcEl = doc.createElement( 'length-calc' ),
487 s.top = s.left = '-9999px';
490 while( i-- ) {
547 * @param {Element} el - the context element, used to resolve font-relative values
548 …* @param {(function():number|number)=} pct100 - the number of pixels that equal a 100% percentage.…
569 * The em and ex units are relative to the font-size of the current element,
570 * however if the font-size is set using non-pixel units then we get that value
574 * additional calculation. If the font-size *is* specified in pixels, then we use that
617 * Wrapper for a CSS3 bg-position value. Takes up to 2 position keywords and 2 lengths/percentages.
659 // Two values - CSS2
688 // Three or four values - CSS3
699 … * Find the coordinates of the background image from the upper-left corner of the background area.
702 … * @param {number} width - the width for percentages (background area width minus image width)
703 … * @param {number} height - the height for percentages (background area height minus image height)
712 x: vals[0] === 'right' ? width - pxX : pxX,
713 y: vals[2] === 'bottom' ? height - pxY : pxY
721 * Wrapper for a CSS3 background-size value.
775 * @param {string} val The raw CSS value for the angle. It is assumed it has been pre-validated.
782 unitRE: /[a-z]+$/i,
809 * value is returned from PIE.getColor() - always use that instead of instantiating directly.
968 * @param {number} type The type of the token - see PIE.Tokenizer.Type
986 number: /^[\+\-]?(\d*\.)?\d+/,
987 url: /^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,
988 ident: /^\-?[_a-z][\w-]*/i,
992 hashColor: /^#([\da-f]{6}|[\da-f]{3})/i,
1009 …* @param {boolean} forget - if true, the token will not be stored for the purposes of backtracking…
1164 return this.tokens[ this.tokenIndex-- - 2 ];
1179 * @param {function():boolean} func - test function
1180 * @param {boolean} require - if true, then if the end of the CSS string is reached
1233 w: isIE9 ? el.offsetWidth : rect.right - rect.left,
1234 h: isIE9 ? el.offsetHeight : rect.bottom - rect.top
1253 if( !--this._locked ) {
1347 if( !--this._locked ) {
1354 * Handles parsing, caching, and detecting changes to background (and -pie-background) CSS
1364 repeatIdents: { 'repeat-x':1, 'repeat-y':1, 'repeat':1, 'no-repeat':1 },
1365 originAndClipIdents: { 'padding-box':1, 'border-box':1, 'content-box':1 },
1379 * For background styles, we support the -pie-background property but fall back to the standard
1392 * imgRepeat: <'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'>,
1395 * bgOrigin: <'border-box' | 'padding-box' | 'content-box'>,
1396 * bgClip: <'border-box' | 'padding-box'>,
1398 * origString: 'url(img.png) no-repeat top left'
1401 * imgType: 'linear-gradient',
1436 // If the CSS3-specific -pie-background property is present, parse it
1445 … if( !image.imgType && tokType & tok_type.FUNCTION && tokVal === 'linear-gradient' ) {
1463 // Color stop - must start with color
1469 break; //fail
1485 // Angle - can only appear in first spot
1504 // Found something we didn't recognize; fail without adding image
1565 image.origString = css.substring( beginCharIndex, tokenizer.ch - 1 );
1709 * Tests if style.PiePngFix or the -pie-png-fix property is set to true in IE6.
1715 …E_PREFIX + 'PngFix' ] || el.currentStyle.getAttribute( PIE.CSS_PREFIX + 'png-fix' ) ) === 'true' );
1723 * to report is as being "active" if either the -pie-background override property is present
1724 * and parses successfully or '-pie-png-fix' is set to true in IE6.
1799 // Don't redraw or hide borders for cells in border-collapse:collapse tables
1832 * Handles parsing, caching, and detecting changes to border-radius CSS
1840 cssProperty: 'border-radius',
1874 // See if there is a slash followed by more lengths, for the y-axis radii
1883 // Treat all-zero values the same as no value
1899 * Handles parsing, caching, and detecting changes to border-image CSS
1905 cssProperty: 'border-image',
2041 * Handles parsing, caching, and detecting changes to box-shadow CSS
2047 cssProperty: 'box-shadow',
2082 else { //encountered an unrecognized token; fail.
2214 …* Add a layer element, with the given z-order index, to the renderer's main box element. We can't …
2215 …* z-index because that breaks when the root rendering box's z-index is 'auto' in IE8+ standards mo…
2262 … using container elements in the correct order, to get correct z stacking without z-index.
2369 …* @param {Object.<{t:number, r:number, b:number, l:number}>} shrink - if present, specifies number…
2405 'l' + ceil( w - trX ) + ',' + floor( shrinkT ) +
2406 'qx' + ceil( w - shrinkR ) + ',' + floor( trY ) +
2407 'l' + ceil( w - shrinkR ) + ',' + ceil( h - brY ) +
2408 'qy' + ceil( w - brX ) + ',' + ceil( h - shrinkB ) +
2409 'l' + floor( blX ) + ',' + ceil( h - shrinkB ) +
2410 'qx' + floor( shrinkL ) + ',' + ceil( h - blY ) + ' x e';
2412 // simplified path for non-rounded box
2414 'l' + ceil( w - shrinkR ) + ',' + floor( shrinkT ) +
2415 'l' + ceil( w - shrinkR ) + ',' + ceil( h - shrinkB ) +
2416 'l' + floor( shrinkL ) + ',' + ceil( h - shrinkB ) +
2459 for( i = sides.length; i--; ) {
2472 … // TODO find a better way to do this that doesn't mess up the DOM parent-child relationship,
2476 if( el.childNodes.length !== 1 || el.firstChild.tagName !== 'ie6-mask' ) {
2477 var cont = doc.createElement( 'ie6-mask' ),
2556 x = elBounds.x - parRect.left - ( parseFloat(cs.borderLeftWidth) || 0 );
2557 y = elBounds.y - parRect.top - ( parseFloat(cs.borderTopWidth) || 0 );
2560 x = elBounds.x + docEl.scrollLeft - docEl.clientLeft;
2561 y = elBounds.y + docEl.scrollTop - docEl.clientTop;
2569 s.zIndex = tgtPos === 'static' ? -1 : tgtCS.zIndex;
2598 box = this._box = doc.createElement( 'css3-container' );
2706 while( i-- ) {
2720 if( img.imgType === 'linear-gradient' ) {
2750 // update executed, make sure that's not the case to avoid divide-by-zero error
2761 …bgPos = bg.bgPosition ? bg.bgPosition.coords( el, elW - size.w - bwL - bwR, elH - size.h - bwT - b…
2768 // Positioning - find the pixel offset from the top/left and convert to a ratio
2769 …// The position is shifted by half a pixel, to adjust for the half-pixel coordorigin shift which is
2775 // Repeating - clip the image shape
2777 if( repeat === 'repeat-x' || repeat === 'no-repeat' ) {
2781 if( repeat === 'repeat-y' || repeat === 'no-repeat' ) {
2838 … // For each, we find its pixel offset along the gradient-line; if the offset of a stop is less
2840 // percentage along the VML gradient-line, which runs from shape corner to corner.
2847 // Find the pixel offsets along the CSS3 gradient-line for each stop.
2851 i === 0 ? 0 : i === stopCount - 1 ? lineLength : null );
2853 // Fill in gaps with evenly-spaced offsets
2856 before = stopPx[ i - 1 ];
2861 stopPx[ i ] = before + ( after - before ) / ( j - i + 1 );
2864 stopPx[ i ] = Math.max( stopPx[ i ], stopPx[ i - 1 ] );
2880 fill['color2'] = stops[stopCount - 1].color.colorValue( el );
2969 // remove any previously-created border shapes which didn't get used above
2998 // shortcut for identical border on all sides - only need 1 stroked shape
3046 … ( isRight ? ceil( elW - rx ) : floor( rx ) ) * mult + ',' + // center x
3047 … ( isBottom ? ceil( elH - ry ) : floor( ry ) ) * mult + ',' + // center y
3048 ( floor( rx ) - shrinkX ) * mult + ',' + // width
3049 ( floor( ry ) - shrinkY ) * mult + ',' + // height
3051 ( 45 * deg * ( ccw ? 1 : -1 ) // angle change
3054 ( isRight ? elW - shrinkX : shrinkX ) * mult + ',' +
3055 ( isBottom ? elH - shrinkY : shrinkY ) * mult
3065 … ceil( elW - shrink ) * mult + ',' + floor( radius( 'y', 'tr') ) * mult :
3067 … ceil( elW - radius( 'x', 'br') ) * mult + ',' + floor( elH - shrink ) * mult :
3069 … floor( shrink ) * mult + ',' + ceil( elH - radius( 'y', 'bl') ) * mult
3073 … ceil( elW - radius( 'x', 'tr') ) * mult + ',' + ceil( shrink ) * mult :
3075 … ceil( elW - shrink ) * mult + ',' + ceil( elH - radius( 'y', 'br') ) * mult :
3077 … floor( radius( 'x', 'bl') ) * mult + ',' + floor( elH - shrink ) * mult :
3111 curve( cornerAfter, 0, 0, baseAngle - 45, 1, 0 ),
3122 …curve( cornerAfter, afterX - floor( afterX / 3 ), afterY - floor( afterY / 3 ), baseAngle - 45, 1,…
3124 …curve( cornerBefore, beforeX - floor( beforeX / 3 ), beforeY - floor( beforeY / 3 ), baseAngle, 1,…
3131 curve( cornerAfter, 0, 0, baseAngle - 45, 1, 0 ) +
3142 addSide( 'b', 'r', 'l', 'br', 'bl', -90 );
3143 addSide( 'l', 'b', 't', 'bl', 'tl', -180 );
3161 * Renderer for border-image
3214 setSizeAndPos( 't', elW - widthL - widthR, widthT, widthL, 0 );
3215 setSizeAndPos( 'tr', widthR, widthT, elW - widthR, 0 );
3216 setSizeAndPos( 'r', widthR, elH - widthT - widthB, elW - widthR, widthT );
3217 setSizeAndPos( 'br', widthR, widthB, elW - widthR, elH - widthB );
3218 setSizeAndPos( 'b', elW - widthL - widthR, widthB, widthL, elH - widthB );
3219 setSizeAndPos( 'bl', widthL, widthB, 0, elH - widthB );
3220 setSizeAndPos( 'l', widthL, elH - widthT - widthB, 0, widthT );
3221 setSizeAndPos( 'c', elW - widthL - widthR, elH - widthT - widthB, widthL, widthT );
3232 setCrops( [ 'tl', 't', 'tr' ], 'cropBottom', ( imgSize.h - sliceT ) / imgSize.h );
3233 setCrops( [ 'tl', 'l', 'bl' ], 'cropRight', ( imgSize.w - sliceL ) / imgSize.w );
3234 setCrops( [ 'bl', 'b', 'br' ], 'cropTop', ( imgSize.h - sliceB ) / imgSize.h );
3235 setCrops( [ 'tr', 'r', 'br' ], 'cropLeft', ( imgSize.w - sliceR ) / imgSize.w );
3260 box = doc.createElement( 'border-image' );
3292 // Force border-style to solid so it doesn't collapse
3295 // If widths specified in border-image shorthand, override border-width
3321 * Renderer for outset box-shadows
3330 boxName: 'outset-box-shadow',
3361 var shape = me.getShape( 'shadow' + index + corner, 'fill', box, len - index ),
3373 …pe'] = 'gradienttitle'; //makes the VML gradient follow the shape's outline - hooray for undocumen…
3392 while( i-- ) {
3400 shrink = -spread - blur;
3402 // If blurring, use a non-null border radius info object so that getBoxPath will
3413 if( blur - spread > w / 2 || blur - spread > h / 2 ) {
3419 for( j = 4; j--; ) {
3425 fill['focusposition'] = ( isRight ? 1 - focusX : focusX ) + ',' +
3426 ( isBottom ? 1 - focusY : focusY );
3441 fill['focussize'] = ( 1 - focusX * 2 ) + ',' + ( 1 - focusY * 2 );
3457 * Renderer for re-rendering img elements using VML. Kicks in if the img has
3458 * a border-radius applied, or if the -pie-png-fix flag is set.
3497 // In IE6, the BorderRenderer will have hidden the border by moving the border-width to
3601 if (img.imgType === 'linear-gradient' ) {
3641 if( bgOrigin !== 'border-box' ) {
3644 w -= borders[ 'l' ].pixels( el ) + borders[ 'l' ].pixels( el );
3645 h -= borders[ 't' ].pixels( el ) + borders[ 'b' ].pixels( el );
3649 if ( bgOrigin === 'content-box' ) {
3652 … w -= getLength( cs.paddingLeft ).pixels( el ) + getLength( cs.paddingRight ).pixels( el );
3653 … h -= getLength( cs.paddingTop ).pixels( el ) + getLength( cs.paddingBottom ).pixels( el );
3673 // Find the pixel offsets along the CSS3 gradient-line for each stop.
3677 i === 0 ? 0 : i === stopCount - 1 ? lineLength : null );
3679 // Fill in gaps with evenly-spaced offsets
3682 before = stopPx[ i - 1 ];
3687 stopPx[ i ] = before + ( after - before ) / ( j - i + 1 );
3702 '" stop-color="' + stopsInfo[i].color.colorValue( el ) +
3703 '" stop-opacity="' + stopsInfo[i].color.alpha() + '"/>'
3723 * Renderer for border-image
3763 … // security exception (perhaps due to cross-origin policy within data URIs?) Therefore we
3765 … // canvas. This unfortunately requires the border-image src to be within the same domain,
3766 … // which isn't a limitation in true border-image, so we need to try and find a better fix.
3785 centerW = elW - widthL - widthR,
3786 middleH = elH - widthT - widthB,
3787 imgCenterW = imgW - sliceL - sliceR,
3788 imgMiddleH = imgH - sliceT - sliceB,
3790 // Determine the size of each tile - 'round' is handled below
3803 … tileSizeT -= (tileSizeT - (centerW % tileSizeT || tileSizeT)) / ceil(centerW / tileSizeT);
3804 … tileSizeB -= (tileSizeB - (centerW % tileSizeB || tileSizeB)) / ceil(centerW / tileSizeB);
3807 … tileSizeR -= (tileSizeR - (middleH % tileSizeR || tileSizeR)) / ceil(middleH / tileSizeR);
3808 … tileSizeL -= (tileSizeL - (middleH % tileSizeL || tileSizeL)) / ceil(middleH / tileSizeL);
3812 …// Build the SVG for the border-image rendering. Add each piece as a pattern, which is then stretc…
3821 'x="' + (repeatH === REPEAT ? x + w / 2 - tileW / 2 : x) + '" ' +
3822 'y="' + (repeatV === REPEAT ? y + h / 2 - tileH / 2 : y) + '" ' +
3836 …addImage( elW - widthR, 0, widthR, widthT, imgW - sliceR, 0, sliceR, sliceT, widthR, widthT ); // …
3842 …addImage( elW - widthR, widthT, widthR, middleH, imgW - sliceR, sliceT, sliceR, imgMiddleH, widthR…
3843 …addImage( 0, elH - widthB, widthL, widthB, 0, imgH - sliceB, sliceL, sliceB, widthL, widthB ); // …
3844 …addImage( widthL, elH - widthB, centerW, widthB, sliceL, imgH - sliceB, imgCenterW, sliceB, tileSi…
3845 …addImage( elW - widthR, elH - widthB, widthR, widthB, imgW - sliceR, imgH - sliceB, sliceR, sliceB…
3855 …ndex, 'url(data:image/svg+xml,' + escape( svg.join( '' ) ) + ') no-repeat border-box border-box' );
3857 … // If the border-image's src wasn't immediately available, the SVG for its background layer
3903 lazyInitCssProp = PIE.CSS_PREFIX + 'lazy-init',
3908 firstChildClass = PIE.CLASS_PREFIX + 'first-child',
3928 while( i-- ) {
3938 while( i-- ) {
3972 …// Polling for size/position changes: default to on in IE8, off otherwise, overridable by -pie-poll
3986 …// If the -pie-lazy-init:true flag is set, check if the element is outside the viewport and if so,…
4119 check to be as fast as possible. */
4146 … // Some elements like <table> fire onpropertychange events for old-school background properties
4160 … // TODO this feels sloppy - look into merging propChanged and update functions
4180 * hover styles to non-link elements, and to trigger a propertychange update.
4197 * active styles to non-link elements, and to trigger a propertychange update.
4237 * which adds these listeners as requested with the -pie-watch-ancestors CSS property.
4248 for( var i = styleInfosArr.length; i--; ) {
4254 for( var i = styleInfosArr.length; i--; ) {
4274 while( i-- ) {
4320 * If requested via the custom -pie-watch-ancestors CSS property, add onpropertychange and
4325 var watch = el.currentStyle.getAttribute( PIE.CSS_PREFIX + 'watch-ancestors' ),
4347 … * If the target element is a first child, add a pie_first-child class to it. This allows using
4348 …* the added class as a workaround for the fact that PIE's rendering element breaks the :first-child
4349 * pseudo-class selector.