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

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

?? fckdomrangeiterator.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 can be used to interate through nodes inside a range.
 *
 * During interation, the provided range can become invalid, due to document
 * mutations, so CreateBookmark() used to restore it after processing, if
 * needed.
 */

var FCKDomRangeIterator = function( range )
{
	/**
	 * The FCKDomRange object that marks the interation boundaries.
	 */
	this.Range = range ;

	/**
	 * Indicates that <br> elements must be used as paragraph boundaries.
	 */
	this.ForceBrBreak = false ;

	/**
	 * Guarantees that the iterator will always return "real" block elements.
	 * If "false", elements like <li>, <th> and <td> are returned. If "true", a
	 * dedicated block element block element will be created inside those
	 * elements to hold the selected content.
	 */
	this.EnforceRealBlocks = false ;
}

FCKDomRangeIterator.CreateFromSelection = function( targetWindow )
{
	var range = new FCKDomRange( targetWindow ) ;
	range.MoveToSelection() ;
	return new FCKDomRangeIterator( range ) ;
}

FCKDomRangeIterator.prototype =
{
	/**
	 * Get the next paragraph element. It automatically breaks the document
	 * when necessary to generate block elements for the paragraphs.
	 */
	GetNextParagraph : function()
	{
		// The block element to be returned.
		var block ;

		// The range object used to identify the paragraph contents.
		var range ;

		// Indicated that the current element in the loop is the last one.
		var isLast ;

		// Instructs to cleanup remaining BRs.
		var removePreviousBr ;
		var removeLastBr ;

		var boundarySet = this.ForceBrBreak ? FCKListsLib.ListBoundaries : FCKListsLib.BlockBoundaries ;

		// This is the first iteration. Let's initialize it.
		if ( !this._LastNode )
		{
			var range = this.Range.Clone() ;
			range.Expand( this.ForceBrBreak ? 'list_contents' : 'block_contents' ) ;

			this._NextNode = range.GetTouchedStartNode() ;
			this._LastNode = range.GetTouchedEndNode() ;

			// Let's reuse this variable.
			range = null ;
		}

		var currentNode = this._NextNode ;
		var lastNode = this._LastNode ;

		this._NextNode = null ;

		while ( currentNode )
		{
			// closeRange indicates that a paragraph boundary has been found,
			// so the range can be closed.
			var closeRange = false ;

			// includeNode indicates that the current node is good to be part
			// of the range. By default, any non-element node is ok for it.
			var includeNode = ( currentNode.nodeType != 1 ) ;

			var continueFromSibling = false ;

			// If it is an element node, let's check if it can be part of the
			// range.
			if ( !includeNode )
			{
				var nodeName = currentNode.nodeName.toLowerCase() ;

				if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) )
				{
					// <br> boundaries must be part of the range. It will
					// happen only if ForceBrBreak.
					if ( nodeName == 'br' )
						includeNode = true ;
					else if ( !range && currentNode.childNodes.length == 0 && nodeName != 'hr' )
					{
						// If we have found an empty block, and haven't started
						// the range yet, it means we must return this block.
						block = currentNode ;
						isLast = currentNode == lastNode ;
						break ;
					}

					// The range must finish right before the boundary,
					// including possibly skipped empty spaces. (#1603)
					if ( range )
					{
						range.SetEnd( currentNode, 3, true ) ;

						// The found boundary must be set as the next one at this
						// point. (#1717)
						if ( nodeName != 'br' )
							this._NextNode = FCKDomTools.GetNextSourceNode( currentNode, true, null, lastNode ) ;
					}

					closeRange = true ;
				}
				else
				{
					// If we have child nodes, let's check them.
					if ( currentNode.firstChild )
					{
						// If we don't have a range yet, let's start it.
						if ( !range )
						{
							range = new FCKDomRange( this.Range.Window ) ;
							range.SetStart( currentNode, 3, true ) ;
						}

						currentNode = currentNode.firstChild ;
						continue ;
					}
					includeNode = true ;
				}
			}
			else if ( currentNode.nodeType == 3 )
			{
				// Ignore normal whitespaces (i.e. not including &nbsp; or
				// other unicode whitespaces) before/after a block node.
				if ( /^[\r\n\t ]+$/.test( currentNode.nodeValue ) )
					includeNode = false ;
			}

			// The current node is good to be part of the range and we are
			// starting a new range, initialize it first.
			if ( includeNode && !range )
			{
				range = new FCKDomRange( this.Range.Window ) ;
				range.SetStart( currentNode, 3, true ) ;
			}

			// The last node has been found.
			isLast = ( ( !closeRange || includeNode ) && currentNode == lastNode ) ;
//			isLast = ( currentNode == lastNode && ( currentNode.nodeType != 1 || currentNode.childNodes.length == 0 ) ) ;

			// If we are in an element boundary, let's check if it is time
			// to close the range, otherwise we include the parent within it.
			if ( range && !closeRange )
			{
				while ( !currentNode.nextSibling && !isLast )
				{
					var parentNode = currentNode.parentNode ;

					if ( boundarySet[ parentNode.nodeName.toLowerCase() ] )
					{
						closeRange = true ;
						isLast = isLast || ( parentNode == lastNode ) ;
						break ;
					}

					currentNode = parentNode ;
					includeNode = true ;
					isLast = ( currentNode == lastNode ) ;
					continueFromSibling = true ;
				}
			}

			// Now finally include the node.
			if ( includeNode )
				range.SetEnd( currentNode, 4, true ) ;

			// We have found a block boundary. Let's close the range and move out of the
			// loop.
			if ( ( closeRange || isLast ) && range )
			{
				range._UpdateElementInfo() ;

				if ( range.StartNode == range.EndNode
						&& range.StartNode.parentNode == range.StartBlockLimit
						&& range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) )
					range = null ;
				else
					break ;
			}

			if ( isLast )
				break ;

			currentNode = FCKDomTools.GetNextSourceNode( currentNode, continueFromSibling, null, lastNode ) ;
		}

		// Now, based on the processed range, look for (or create) the block to be returned.
		if ( !block )
		{
			// If no range has been found, this is the end.
			if ( !range )
			{
				this._NextNode = null ;
				return null ;
			}

			block = range.StartBlock ;

			if ( !block
				&& !this.EnforceRealBlocks
				&& range.StartBlockLimit.nodeName.IEquals( 'DIV', 'TH', 'TD' )
				&& range.CheckStartOfBlock()
				&& range.CheckEndOfBlock() )
			{
				block = range.StartBlockLimit ;
			}
			else if ( !block || ( this.EnforceRealBlocks && block.nodeName.toLowerCase() == 'li' ) )
			{
				// Create the fixed block.
				block = this.Range.Window.document.createElement( FCKConfig.EnterMode == 'p' ? 'p' : 'div' ) ;

				// Move the contents of the temporary range to the fixed block.
				range.ExtractContents().AppendTo( block ) ;
				FCKDomTools.TrimNode( block ) ;

				// Insert the fixed block into the DOM.
				range.InsertNode( block ) ;

				removePreviousBr = true ;
				removeLastBr = true ;
			}
			else if ( block.nodeName.toLowerCase() != 'li' )
			{
				// If the range doesn't includes the entire contents of the
				// block, we must split it, isolating the range in a dedicated
				// block.
				if ( !range.CheckStartOfBlock() || !range.CheckEndOfBlock() )
				{
					// The resulting block will be a clone of the current one.
					block = block.cloneNode( false ) ;

					// Extract the range contents, moving it to the new block.
					range.ExtractContents().AppendTo( block ) ;
					FCKDomTools.TrimNode( block ) ;

					// Split the block. At this point, the range will be in the
					// right position for our intents.
					var splitInfo = range.SplitBlock() ;

					removePreviousBr = !splitInfo.WasStartOfBlock ;
					removeLastBr = !splitInfo.WasEndOfBlock ;

					// Insert the new block into the DOM.
					range.InsertNode( block ) ;
				}
			}
			else if ( !isLast )
			{
				// LIs are returned as is, with all their children (due to the
				// nested lists). But, the next node is the node right after
				// the current range, which could be an <li> child (nested
				// lists) or the next sibling <li>.

				this._NextNode = block == lastNode ? null : FCKDomTools.GetNextSourceNode( range.EndNode, true, null, lastNode ) ;
				return block ;
			}
		}

		if ( removePreviousBr )
		{
			var previousSibling = block.previousSibling ;
			if ( previousSibling && previousSibling.nodeType == 1 )
			{
				if ( previousSibling.nodeName.toLowerCase() == 'br' )
					previousSibling.parentNode.removeChild( previousSibling ) ;
				else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) )
					previousSibling.removeChild( previousSibling.lastChild ) ;
			}
		}

		if ( removeLastBr )
		{
			var lastChild = block.lastChild ;
			if ( lastChild && lastChild.nodeType == 1 && lastChild.nodeName.toLowerCase() == 'br' )
				block.removeChild( lastChild ) ;
		}

		// Get a reference for the next element. This is important because the
		// above block can be removed or changed, so we can rely on it for the
		// next interation.
		if ( !this._NextNode )
			this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;

		return block ;
	}
} ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲综合在线| 欧洲亚洲精品在线| 国产999精品久久| 99精品一区二区| 91精品国产美女浴室洗澡无遮挡| 精品欧美一区二区在线观看| 亚洲精品v日韩精品| 国产乱码精品一区二区三区忘忧草| 91麻豆swag| 久久九九久久九九| 免费的国产精品| 91豆麻精品91久久久久久| 精品欧美久久久| 日本亚洲最大的色成网站www| 成人短视频下载| 久久久久久久免费视频了| 亚洲女爱视频在线| 成人少妇影院yyyy| 精品久久久久久亚洲综合网| 视频一区二区欧美| 在线免费观看不卡av| 亚洲国产精品精华液2区45| 日本欧洲一区二区| 777午夜精品免费视频| 亚洲欧美一区二区三区孕妇| 大陆成人av片| 国产欧美一区二区精品性| 久久精品国产免费| 欧美一卡二卡在线观看| 五月天中文字幕一区二区| 在线看不卡av| 亚洲一区二区精品视频| 99国产精品一区| 亚洲人妖av一区二区| 成年人国产精品| 国产精品国产三级国产aⅴ中文| 韩国成人在线视频| 精品久久人人做人人爰| 久久精品国产免费看久久精品| 欧美一区二区三区视频免费| 日日夜夜一区二区| 3d成人h动漫网站入口| 天天色天天操综合| 欧美一区二区三区公司| 蜜桃久久av一区| 亚洲精品在线观| 成人黄色综合网站| 亚洲欧美日本韩国| 欧美亚州韩日在线看免费版国语版| 亚洲美女区一区| 欧美日韩在线播放三区四区| 午夜国产不卡在线观看视频| 在线成人午夜影院| 美女性感视频久久| 中文字幕第一区综合| 99re视频这里只有精品| 亚洲国产成人高清精品| 日韩精品一区二区三区在线观看| 国产制服丝袜一区| 亚洲免费毛片网站| 91精品国产综合久久久久久漫画 | 视频一区二区三区在线| 91精品国产福利在线观看| 国产一区二区三区四区在线观看| 中文字幕av一区二区三区高 | 国产成人免费9x9x人网站视频| 日本一区二区久久| 欧美久久久久久久久久| 狠狠色狠狠色合久久伊人| 中文字幕欧美一| 91精品国产欧美一区二区成人| 国产98色在线|日韩| 午夜在线成人av| 亚洲国产精品成人综合色在线婷婷 | 国产不卡视频在线播放| 亚洲在线视频一区| 久久久噜噜噜久噜久久综合| 91久久一区二区| 国产在线一区二区综合免费视频| 亚洲天堂精品在线观看| 2021中文字幕一区亚洲| 色94色欧美sute亚洲13| 国产精品一区二区在线观看不卡 | 久久久久久久久久电影| 91久久人澡人人添人人爽欧美| 精品一区二区三区在线视频| 亚洲激情图片小说视频| 久久一区二区视频| 欧美一区二区三区公司| 91麻豆成人久久精品二区三区| 国产精品一区二区三区四区| 亚洲国产精品久久人人爱蜜臀| 国产精品入口麻豆原神| 欧美成人女星排名| 91成人免费在线| 成人激情综合网站| 国产在线播精品第三| 图片区小说区国产精品视频| 亚洲人午夜精品天堂一二香蕉| 国产日韩精品一区二区浪潮av| 欧美一级久久久久久久大片| 一本久道中文字幕精品亚洲嫩| 国产成人精品三级| 久久国产综合精品| 五月婷婷激情综合| 亚洲高清中文字幕| 亚洲国产日日夜夜| 一区二区在线观看免费| 亚洲天天做日日做天天谢日日欢| 中文字幕不卡在线观看| 久久久亚洲欧洲日产国码αv| 精品剧情v国产在线观看在线| 日韩一区二区三区视频| 69久久99精品久久久久婷婷| 欧洲精品一区二区三区在线观看| av电影一区二区| 波多野结衣精品在线| 成人污视频在线观看| 成人污视频在线观看| eeuss国产一区二区三区| 成人激情av网| 色婷婷亚洲婷婷| 一本在线高清不卡dvd| 99re在线视频这里只有精品| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 中文字幕乱码亚洲精品一区| 国产亚洲成aⅴ人片在线观看 | 成人av先锋影音| 成人午夜av影视| 色综合久久天天综合网| 欧美在线一区二区三区| 欧美精品v国产精品v日韩精品| 欧美日韩国产精品成人| 91麻豆精品国产自产在线 | 欧美在线你懂得| 欧美日韩一二区| 日韩精品一区国产麻豆| 久久久精品国产免大香伊| 国产精品系列在线| 洋洋av久久久久久久一区| 亚洲1区2区3区4区| 国精产品一区一区三区mba视频| 国产成人av电影免费在线观看| 成人av网站在线观看免费| 色婷婷久久久综合中文字幕| 欧美日韩亚洲丝袜制服| 欧美xxx久久| 成人免费小视频| 婷婷国产在线综合| 国产一区二区女| 色婷婷综合久久久久中文一区二区 | 欧美日韩久久久| 久久综合久久综合九色| 中文字幕在线不卡国产视频| 亚洲一区欧美一区| 国产麻豆视频精品| 欧美私人免费视频| 久久久蜜桃精品| 亚洲成av人在线观看| 国产一区二区三区av电影| 在线观看免费成人| 久久久不卡网国产精品二区| 一区二区视频免费在线观看| 精品在线播放午夜| 99热99精品| 日韩精品中午字幕| 亚洲不卡av一区二区三区| 国产高清久久久| 91精品国产一区二区人妖| 国产欧美日韩亚州综合| 日韩avvvv在线播放| 一本久久精品一区二区| 亚洲国产精品av| 麻豆久久久久久久| 色婷婷一区二区| 国产精品免费视频网站| 久久国产精品72免费观看| 欧美自拍偷拍午夜视频| 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲一区二区视频在线观看| 成人性生交大合| 久久夜色精品国产欧美乱极品| 香蕉久久一区二区不卡无毒影院| 91丝袜国产在线播放| 2020国产精品久久精品美国| 日韩精品成人一区二区三区 | 国产a精品视频| 精品噜噜噜噜久久久久久久久试看 | 国产在线精品免费| 日韩视频在线永久播放| 一区二区三区电影在线播| 成人高清伦理免费影院在线观看| 国产午夜亚洲精品午夜鲁丝片| 国产综合久久久久久鬼色| 日韩精品一区二区三区中文精品| 日本欧美加勒比视频| 欧美日韩久久一区二区| 亚洲高清免费在线| 欧美日韩电影一区| 亚洲高清一区二区三区|