亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fckw3crange.js

?? BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
?? JS
字號:
?/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * This class partially implements the W3C DOM Range for browser that don't
 * support the standards (like IE):
 * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html
 */

var FCKW3CRange = function( parentDocument )
{
	this._Document = parentDocument ;

	this.startContainer	= null ;
	this.startOffset	= null ;
	this.endContainer	= null ;
	this.endOffset		= null ;
	this.collapsed		= true ;
}

FCKW3CRange.CreateRange = function( parentDocument )
{
	// We could opt to use the Range implementation of the browsers. The problem
	// is that every browser have different bugs on their implementations,
	// mostly related to different interpretations of the W3C specifications.
	// So, for now, let's use our implementation and pray for browsers fixings
	// soon. Otherwise will go crazy on trying to find out workarounds.
	/*
	// Get the browser implementation of the range, if available.
	if ( parentDocument.createRange )
	{
		var range = parentDocument.createRange() ;
		if ( typeof( range.startContainer ) != 'undefined' )
			return range ;
	}
	*/
	return new FCKW3CRange( parentDocument ) ;
}

FCKW3CRange.CreateFromRange = function( parentDocument, sourceRange )
{
	var range = FCKW3CRange.CreateRange( parentDocument ) ;
	range.setStart( sourceRange.startContainer, sourceRange.startOffset ) ;
	range.setEnd( sourceRange.endContainer, sourceRange.endOffset ) ;
	return range ;
}

FCKW3CRange.prototype =
{

	_UpdateCollapsed : function()
	{
      this.collapsed = ( this.startContainer == this.endContainer && this.startOffset == this.endOffset ) ;
	},

	// W3C requires a check for the new position. If it is after the end
	// boundary, the range should be collapsed to the new start. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setStart : function( refNode, offset )
	{
		this.startContainer	= refNode ;
		this.startOffset	= offset ;

		if ( !this.endContainer )
		{
			this.endContainer	= refNode ;
			this.endOffset		= offset ;
		}

		this._UpdateCollapsed() ;
	},

	// W3C requires a check for the new position. If it is before the start
	// boundary, the range should be collapsed to the new end. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setEnd : function( refNode, offset )
	{
		this.endContainer	= refNode ;
		this.endOffset		= offset ;

		if ( !this.startContainer )
		{
			this.startContainer	= refNode ;
			this.startOffset	= offset ;
		}

		this._UpdateCollapsed() ;
	},

	setStartAfter : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setStartBefore : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	setEndAfter : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setEndBefore : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	collapse : function( toStart )
	{
		if ( toStart )
		{
			this.endContainer	= this.startContainer ;
			this.endOffset		= this.startOffset ;
		}
		else
		{
			this.startContainer	= this.endContainer ;
			this.startOffset	= this.endOffset ;
		}

		this.collapsed = true ;
	},

	selectNodeContents : function( refNode )
	{
		this.setStart( refNode, 0 ) ;
		this.setEnd( refNode, refNode.nodeType == 3 ? refNode.data.length : refNode.childNodes.length ) ;
	},

	insertNode : function( newNode )
	{
		var startContainer = this.startContainer ;
		var startOffset = this.startOffset ;

		// If we are in a text node.
		if ( startContainer.nodeType == 3 )
		{
			startContainer.splitText( startOffset ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
				this.setEnd( startContainer.nextSibling, this.endOffset - this.startOffset ) ;

			// Insert the new node it after the text node.
			FCKDomTools.InsertAfterNode( startContainer, newNode ) ;

			return ;
		}
		else
		{
			// Simply insert the new node before the current start node.
			startContainer.insertBefore( newNode, startContainer.childNodes[ startOffset ] || null ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
			{
				this.endOffset++ ;
				this.collapsed = false ;
			}
		}
	},

	deleteContents : function()
	{
		if ( this.collapsed )
			return ;

		this._ExecContentsAction( 0 ) ;
	},

	extractContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 1, docFrag ) ;

		return docFrag ;
	},

	// The selection may be lost when cloning (due to the splitText() call).
	cloneContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 2, docFrag ) ;

		return docFrag ;
	},

	_ExecContentsAction : function( action, docFrag )
	{
		var startNode	= this.startContainer ;
		var endNode		= this.endContainer ;

		var startOffset	= this.startOffset ;
		var endOffset	= this.endOffset ;

		var removeStartNode	= false ;
		var removeEndNode	= false ;

		// Check the start and end nodes and make the necessary removals or changes.

		// Start from the end, otherwise DOM mutations (splitText) made in the
		// start boundary may interfere on the results here.

		// For text containers, we must simply split the node and point to the
		// second part. The removal will be handled by the rest of the code .
		if ( endNode.nodeType == 3 )
			endNode = endNode.splitText( endOffset ) ;
		else
		{
			// If the end container has children and the offset is pointing
			// to a child, then we should start from it.
			if ( endNode.childNodes.length > 0 )
			{
				// If the offset points after the last node.
				if ( endOffset > endNode.childNodes.length - 1 )
				{
					// Let's create a temporary node and mark it for removal.
					endNode = FCKDomTools.InsertAfterNode( endNode.lastChild, this._Document.createTextNode('') ) ;
					removeEndNode = true ;
				}
				else
					endNode = endNode.childNodes[ endOffset ] ;
			}
		}

		// For text containers, we must simply split the node. The removal will
		// be handled by the rest of the code .
		if ( startNode.nodeType == 3 )
		{
			startNode.splitText( startOffset ) ;

			// In cases the end node is the same as the start node, the above
			// splitting will also split the end, so me must move the end to
			// the second part of the split.
			if ( startNode == endNode )
				endNode = startNode.nextSibling ;
		}
		else
		{
			// If the start container has children and the offset is pointing
			// to a child, then we should start from its previous sibling.

			// If the offset points to the first node, we don't have a
			// sibling, so let's use the first one, but mark it for removal.
			if ( startOffset == 0 )
			{
				// Let's create a temporary node and mark it for removal.
				startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ;
				removeStartNode = true ;
			}
			else if ( startOffset > startNode.childNodes.length - 1 )
			{
				// Let's create a temporary node and mark it for removal.
				startNode = startNode.appendChild( this._Document.createTextNode('') ) ;
				removeStartNode = true ;
			}
			else
				startNode = startNode.childNodes[ startOffset ].previousSibling ;
		}

		// Get the parent nodes tree for the start and end boundaries.
		var startParents	= FCKDomTools.GetParents( startNode ) ;
		var endParents		= FCKDomTools.GetParents( endNode ) ;

		// Compare them, to find the top most siblings.
		var i, topStart, topEnd ;

		for ( i = 0 ; i < startParents.length ; i++ )
		{
			topStart	= startParents[i] ;
			topEnd		= endParents[i] ;

			// The compared nodes will match until we find the top most
			// siblings (different nodes that have the same parent).
			// "i" will hold the index in the parents array for the top
			// most element.
			if ( topStart != topEnd )
				break ;
		}

		var clone, levelStartNode, levelClone, currentNode, currentSibling ;

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all successive sibling nodes for every node in the
		// startParents tree.
		for ( var j = i ; j < startParents.length ; j++ )
		{
			levelStartNode = startParents[j] ;

			// For Extract and Clone, we must clone this level.
			if ( clone && levelStartNode != startNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == startNode ) ) ;

			currentNode = levelStartNode.nextSibling ;

			while( currentNode )
			{
				// Stop processing when the current node matches a node in the
				// endParents tree or if it is the endNode.
				if ( currentNode == endParents[j] || currentNode == endNode )
					break ;

				// Cache the next sibling.
				currentSibling = currentNode.nextSibling ;

				// If cloning, just clone it.
				if ( action == 2 )	// 2 = Clone
					clone.appendChild( currentNode.cloneNode( true ) ) ;
				else
				{
					// Both Delete and Extract will remove the node.
					currentNode.parentNode.removeChild( currentNode ) ;

					// When Extracting, move the removed node to the docFrag.
					if ( action == 1 )	// 1 = Extract
						clone.appendChild( currentNode ) ;
				}

				currentNode = currentSibling ;
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all previous sibling nodes for every node in the
		// endParents tree.
		for ( var k = i ; k < endParents.length ; k++ )
		{
			levelStartNode = endParents[k] ;

			// For Extract and Clone, we must clone this level.
			if ( action > 0 && levelStartNode != endNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == endNode ) ) ;

			// The processing of siblings may have already been done by the parent.
			if ( !startParents[k] || levelStartNode.parentNode != startParents[k].parentNode )
			{
				currentNode = levelStartNode.previousSibling ;

				while( currentNode )
				{
					// Stop processing when the current node matches a node in the
					// startParents tree or if it is the startNode.
					if ( currentNode == startParents[k] || currentNode == startNode )
						break ;

					// Cache the next sibling.
					currentSibling = currentNode.previousSibling ;

					// If cloning, just clone it.
					if ( action == 2 )	// 2 = Clone
						clone.insertBefore( currentNode.cloneNode( true ), clone.firstChild ) ;
					else
					{
						// Both Delete and Extract will remove the node.
						currentNode.parentNode.removeChild( currentNode ) ;

						// When Extracting, mode the removed node to the docFrag.
						if ( action == 1 )	// 1 = Extract
							clone.insertBefore( currentNode, clone.firstChild ) ;
					}

					currentNode = currentSibling ;
				}
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( action == 2 )		// 2 = Clone.
		{
			// No changes in the DOM should be done, so fix the split text (if any).

			var startTextNode = this.startContainer ;
			if ( startTextNode.nodeType == 3 )
			{
				startTextNode.data += startTextNode.nextSibling.data ;
				startTextNode.parentNode.removeChild( startTextNode.nextSibling ) ;
			}

			var endTextNode = this.endContainer ;
			if ( endTextNode.nodeType == 3 && endTextNode.nextSibling )
			{
				endTextNode.data += endTextNode.nextSibling.data ;
				endTextNode.parentNode.removeChild( endTextNode.nextSibling ) ;
			}
		}
		else
		{
			// Collapse the range.

			// If a node has been partially selected, collapse the range between
			// topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs).
			if ( topStart && topEnd && ( startNode.parentNode != topStart.parentNode || endNode.parentNode != topEnd.parentNode ) )
			{
				var endIndex = FCKDomTools.GetIndexOf( topEnd ) ;

				// If the start node is to be removed, we must correct the
				// index to reflect the removal.
				if ( removeStartNode && topEnd.parentNode == startNode.parentNode )
					endIndex-- ;

				this.setStart( topEnd.parentNode, endIndex ) ;
			}

			// Collapse it to the start.
			this.collapse( true ) ;
		}

		// Cleanup any marked node.
		if( removeStartNode )
			startNode.parentNode.removeChild( startNode ) ;

		if( removeEndNode && endNode.parentNode )
			endNode.parentNode.removeChild( endNode ) ;
	},

	cloneRange : function()
	{
		return FCKW3CRange.CreateFromRange( this._Document, this ) ;
	}
} ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂a在线| 国产成人av福利| 国产综合久久久久影院| 99精品偷自拍| 精品福利视频一区二区三区| 一级中文字幕一区二区| 成人免费黄色大片| 欧美大黄免费观看| 亚洲成av人片在线观看| 成人精品免费网站| 久久久久久一级片| 五月天精品一区二区三区| 懂色av一区二区三区蜜臀| 欧美xxxx老人做受| 日韩国产在线观看| 欧美日韩另类国产亚洲欧美一级| 1024精品合集| 波多野结衣在线一区| 久久久国产一区二区三区四区小说 | 日韩一区在线免费观看| 精品亚洲成a人在线观看| 91精品婷婷国产综合久久竹菊| 亚洲精品国产成人久久av盗摄| 国产91精品一区二区麻豆网站| 日韩欧美国产三级电影视频| 亚洲gay无套男同| 91成人在线免费观看| 日韩理论片网站| 91欧美一区二区| 亚洲色图欧美偷拍| 91久久久免费一区二区| 亚洲裸体xxx| 日本韩国欧美一区二区三区| 亚洲天堂久久久久久久| youjizz国产精品| 国产精品国产三级国产aⅴ无密码| 国产乱子伦视频一区二区三区| 久久久五月婷婷| 国产成人欧美日韩在线电影| 国产无遮挡一区二区三区毛片日本| 麻豆国产精品一区二区三区 | 色天使久久综合网天天| 一区二区三区中文字幕在线观看| 欧洲一区二区av| 日韩精品亚洲一区二区三区免费| 制服丝袜国产精品| 老司机一区二区| 国产女人水真多18毛片18精品视频| 国产精品99久久久久久宅男| 国产嫩草影院久久久久| 91看片淫黄大片一级| 亚洲成人精品影院| 日韩一区二区三区观看| 国产精品一区二区在线看| 国产精品欧美极品| 欧美色区777第一页| 日韩黄色小视频| 欧美高清一级片在线观看| 99国产一区二区三精品乱码| 亚洲国产成人精品视频| 亚洲精品在线免费播放| www.亚洲激情.com| 日韩黄色片在线观看| 久久夜色精品一区| 欧美综合天天夜夜久久| 蜜臀va亚洲va欧美va天堂| 国产农村妇女精品| 欧美视频日韩视频| 国产精品一区在线观看乱码| 悠悠色在线精品| 精品粉嫩aⅴ一区二区三区四区| 99免费精品在线| 日本免费新一区视频| 亚洲欧美日韩中文字幕一区二区三区| 精品视频一区 二区 三区| 国产精品亚洲第一| 五月婷婷色综合| 国产精品国产三级国产普通话99 | 国产午夜一区二区三区| 欧美视频在线一区二区三区 | 青青国产91久久久久久| 亚洲欧美综合网| 欧美大黄免费观看| 欧美性色欧美a在线播放| 国产成人亚洲综合a∨婷婷 | 欧美日韩国产精品成人| 粉嫩av一区二区三区在线播放 | 日韩午夜电影av| 99天天综合性| 国产一区二区三区在线观看免费 | 成人亚洲精品久久久久软件| 婷婷国产在线综合| 亚洲同性同志一二三专区| 久久你懂得1024| 日韩精品一区二区三区四区视频| 日本久久一区二区三区| 粉嫩高潮美女一区二区三区| 久久福利资源站| 奇米777欧美一区二区| 性做久久久久久免费观看欧美| 中文字幕一区二区三区四区不卡| 2023国产一二三区日本精品2022| 欧美日韩午夜在线视频| 91麻豆福利精品推荐| 成人免费观看视频| 成人免费高清在线观看| 国产iv一区二区三区| 国产精品中文字幕一区二区三区| 免费看日韩a级影片| 麻豆精品视频在线观看视频| 日韩国产欧美三级| 蜜臀av在线播放一区二区三区| 婷婷久久综合九色综合绿巨人| 午夜婷婷国产麻豆精品| 亚洲国产乱码最新视频| 亚洲国产日韩精品| 午夜成人在线视频| 日本伊人午夜精品| 狂野欧美性猛交blacked| 久久精品二区亚洲w码| 六月丁香婷婷久久| 精品制服美女久久| 国产盗摄精品一区二区三区在线| 国产综合色产在线精品| 成人午夜av电影| 99久久精品国产精品久久| 一本到高清视频免费精品| 色美美综合视频| 欧美日韩国产经典色站一区二区三区 | 亚洲国产毛片aaaaa无费看| 亚洲高清中文字幕| 免费观看日韩电影| 国产一二精品视频| 成人高清视频在线| 欧美一a一片一级一片| 91精品蜜臀在线一区尤物| 日韩欧美一级在线播放| 国产日韩三级在线| 亚洲女与黑人做爰| 日本亚洲免费观看| 成熟亚洲日本毛茸茸凸凹| 91麻豆成人久久精品二区三区| 欧美日韩精品一区二区| 欧美成人r级一区二区三区| 国产欧美日韩亚州综合| 一区二区三区精品视频| 久久成人免费网| 99久久精品国产观看| 91精品国产综合久久福利软件| 精品国产乱码91久久久久久网站| 国产精品久久久久aaaa| 亚洲成人黄色影院| 国产不卡一区视频| 欧美日韩一卡二卡| 欧美激情一区不卡| 日韩成人免费在线| 99国产精品久久久久| 日韩一级二级三级| 最新国产精品久久精品| 蜜乳av一区二区| 色婷婷久久99综合精品jk白丝| 欧美一级在线观看| 亚洲一区在线免费观看| 国产精品一区在线观看乱码| 欧美日韩一区小说| 国产精品久久久久永久免费观看| 亚瑟在线精品视频| 色激情天天射综合网| 久久久久久久久久久久久女国产乱 | 欧美激情在线看| 手机精品视频在线观看| 暴力调教一区二区三区| 欧美tk—视频vk| 亚洲第一久久影院| av欧美精品.com| 精品国内二区三区| 视频一区二区欧美| 日本丰满少妇一区二区三区| 久久久久久9999| 婷婷成人综合网| 欧美三级电影在线观看| 一区在线中文字幕| 国产经典欧美精品| 久久夜色精品国产欧美乱极品| 亚洲一区二区三区小说| 99久久免费视频.com| 久久九九全国免费| 国产乱理伦片在线观看夜一区| 欧美美女直播网站| 成人免费在线播放视频| 国产精品一区二区黑丝| 精品国产一区二区国模嫣然| 亚洲h动漫在线| 欧美理论电影在线| 一区二区三区日韩欧美精品| 97成人超碰视| 国产精品久久久久7777按摩| 暴力调教一区二区三区| 国产精品久久久久久亚洲伦| eeuss鲁一区二区三区|