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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? visible_text.h

?? It is WEB browser core module with source code. Very good!
?? H
字號:
/*
 * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 */

#ifndef KHTML_EDITING_VISIBLE_TEXT_H
#define KHTML_EDITING_VISIBLE_TEXT_H

#include "dom/dom2_range.h"

namespace khtml {

class InlineTextBox;

// FIXME: Can't really answer this question without knowing the white-space mode.
// FIXME: Move this along with the white-space position functions above
// somewhere in the editing directory. It doesn't belong here.
inline bool isCollapsibleWhitespace(const QChar &c)
{
    switch (c.unicode()) {
        case ' ':
        case '\n':
            return true;
        default:
            return false;
    }
}

QString plainText(const DOM::Range &);
DOM::Range findPlainText(const DOM::Range &, const QString &, bool forward, bool caseSensitive);

// Iterates through the DOM range, returning all the text, and 0-length boundaries
// at points where replaced elements break up the text flow.  The text comes back in
// chunks so as to optimize for performance of the iteration.

enum IteratorKind { CONTENT = 0, RUNFINDER = 1 };

class TextIterator
OOM_MODIFIED
{
public:
    TextIterator();
    explicit TextIterator(const DOM::Range &, IteratorKind kind = CONTENT );
    
    bool atEnd() const { return !m_positionNode; }
    void advance();
    
    long length() const { return m_textLength; }
    const QChar *characters() const { return m_textCharacters; }
    
    DOM::Range range() const;
     
    static long TextIterator::rangeLength(const DOM::Range &r);
    static void TextIterator::setRangeFromLocationAndLength (const DOM::Range &range, DOM::Range &resultRange, long rangeLocation, long rangeLength);
    
private:
    void exitNode();
    bool handleTextNode();
    bool handleReplacedElement();
    bool handleNonTextNode();
    void handleTextBox();
    void emitCharacter(QChar, DOM::NodeImpl *textNode, DOM::NodeImpl *offsetBaseNode, long textStartOffset, long textEndOffset);
    
    // Current position, not necessarily of the text being returned, but position
    // as we walk through the DOM tree.
    DOM::NodeImpl *m_node;
    long m_offset;
    bool m_handledNode;
    bool m_handledChildren;
    
    // End of the range.
    DOM::NodeImpl *m_endContainer;
    long m_endOffset;
    DOM::NodeImpl *m_pastEndNode;
    
    // The current text and its position, in the form to be returned from the iterator.
    DOM::NodeImpl *m_positionNode;
    mutable DOM::NodeImpl *m_positionOffsetBaseNode;
    mutable long m_positionStartOffset;
    mutable long m_positionEndOffset;
    const QChar *m_textCharacters;
    long m_textLength;
    
    // Used when there is still some pending text from the current node; when these
    // are false and 0, we go back to normal iterating.
    bool m_needAnotherNewline;
    InlineTextBox *m_textBox;
    
    // Used to do the whitespace collapsing logic.
    DOM::NodeImpl *m_lastTextNode;    
    bool m_lastTextNodeEndedWithCollapsedSpace;
    QChar m_lastCharacter;
    
    // Used for whitespace characters that aren't in the DOM, so we can point at them.
    QChar m_singleCharacterBuffer;
};

// Iterates through the DOM range, returning all the text, and 0-length boundaries
// at points where replaced elements break up the text flow.  The text comes back in
// chunks so as to optimize for performance of the iteration.
class SimplifiedBackwardsTextIterator
OOM_MODIFIED
{
public:
    SimplifiedBackwardsTextIterator();
    explicit SimplifiedBackwardsTextIterator(const DOM::Range &);
    
    bool atEnd() const { return !m_positionNode; }
    void advance();
    
    long length() const { return m_textLength; }
    const QChar *characters() const { return m_textCharacters; }
    
    DOM::Range range() const;
        
private:
    void exitNode();
    bool handleTextNode();
    bool handleReplacedElement();
    bool handleNonTextNode();
    void emitCharacter(QChar, DOM::NodeImpl *Node, long startOffset, long endOffset);
    void emitNewlineForBROrText();
    
    // Current position, not necessarily of the text being returned, but position
    // as we walk through the DOM tree.
    DOM::NodeImpl *m_node;
    long m_offset;
    bool m_handledNode;
    bool m_handledChildren;
    
    // End of the range.
    DOM::NodeImpl *m_startNode;
    long m_startOffset;
    
    // The current text and its position, in the form to be returned from the iterator.
    DOM::NodeImpl *m_positionNode;
    long m_positionStartOffset;
    long m_positionEndOffset;
    const QChar *m_textCharacters;
    long m_textLength;

    // Used to do the whitespace logic.
    DOM::NodeImpl *m_lastTextNode;    
    QChar m_lastCharacter;
    
    // Used for whitespace characters that aren't in the DOM, so we can point at them.
    QChar m_singleCharacterBuffer;
};

// Builds on the text iterator, adding a character position so we can walk one
// character at a time, or faster, as needed. Useful for searching.
class CharacterIterator 
OOM_MODIFIED
{
public:
    CharacterIterator();
    explicit CharacterIterator(const DOM::Range &r);
    
    void advance(long numCharacters);
    
    bool atBreak() const { return m_atBreak; }
    bool atEnd() const { return m_textIterator.atEnd(); }
    
    long length() const { return m_textIterator.length() - m_runOffset; }
    const QChar *characters() const { return m_textIterator.characters() + m_runOffset; }
    QString string(long numChars);
    
    long characterOffset() const { return m_offset; }
    DOM::Range range() const;
        
private:
    long m_offset;
    long m_runOffset;
    bool m_atBreak;
    
    TextIterator m_textIterator;
};
    
// Very similar to the TextIterator, except that the chunks of text returned are "well behaved",
// meaning they never end split up a word.  This is useful for spellcheck or (perhaps one day) searching.
class WordAwareIterator 
OOM_MODIFIED
{
public:
    WordAwareIterator();
    explicit WordAwareIterator(const DOM::Range &r);

    bool atEnd() const { return !m_didLookAhead && m_textIterator.atEnd(); }
    void advance();
    
    long length() const;
    const QChar *characters() const;
    
    // Range of the text we're currently returning
    DOM::Range range() const { return m_range; }

private:
    // text from the previous chunk from the textIterator
    const QChar *m_previousText;
    long m_previousLength;

    // many chunks from textIterator concatenated
    QString m_buffer;
    
    // Did we have to look ahead in the textIterator to confirm the current chunk?
    bool m_didLookAhead;

    DOM::Range m_range;

    TextIterator m_textIterator;
};

}

#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品网久久| 激情欧美一区二区三区在线观看| 日韩影院在线观看| 国产91色综合久久免费分享| 欧美视频中文字幕| 亚洲欧洲美洲综合色网| 狠狠色狠狠色合久久伊人| 色天使色偷偷av一区二区 | 五月天中文字幕一区二区| 国产一区二区不卡老阿姨| 欧美丝袜自拍制服另类| 日韩美女视频一区| 成人免费高清在线观看| 26uuu精品一区二区在线观看| 亚洲国产日韩在线一区模特| 成人自拍视频在线观看| 久久婷婷久久一区二区三区| 午夜精品视频一区| 欧美色国产精品| 伊人性伊人情综合网| 99久久99久久综合| 国产精品午夜免费| 国产成人免费av在线| 精品电影一区二区| 激情欧美一区二区三区在线观看| 欧美一区二区视频在线观看| 亚洲成人黄色小说| 3751色影院一区二区三区| 亚洲一级在线观看| 欧美日韩大陆一区二区| 午夜精品成人在线| 在线不卡的av| 蜜臀av性久久久久蜜臀aⅴ四虎 | 日本电影亚洲天堂一区| 中文字幕日韩av资源站| 99久久精品国产导航| ...xxx性欧美| 色综合久久88色综合天天6| 一区二区国产视频| 欧美性感一区二区三区| 性欧美大战久久久久久久久| 欧美久久久久久蜜桃| 日本欧美肥老太交大片| 欧美va在线播放| 国产不卡在线播放| 亚洲欧洲成人自拍| 在线视频你懂得一区二区三区| 亚洲国产欧美另类丝袜| 欧美一区二区人人喊爽| 国产一区三区三区| 亚洲天堂a在线| 欧美三级视频在线观看| 麻豆极品一区二区三区| 欧美国产激情二区三区| 日本韩国一区二区三区视频| 婷婷丁香激情综合| 久久伊99综合婷婷久久伊| 成人18视频在线播放| 亚洲v中文字幕| 2020国产精品自拍| 一本一道久久a久久精品综合蜜臀| 午夜在线成人av| 久久精品亚洲乱码伦伦中文| 一本到不卡免费一区二区| 亚洲成在人线在线播放| 久久综合色一综合色88| 在线精品国精品国产尤物884a| 美女性感视频久久| 国产精品福利一区二区三区| 6080午夜不卡| 91在线码无精品| 蜜臀99久久精品久久久久久软件| 欧美韩国日本综合| 欧美军同video69gay| 99久久免费精品高清特色大片| 日韩av高清在线观看| 中文字幕亚洲精品在线观看| 日韩精品一区二区三区蜜臀| 色综合天天综合色综合av| 国产在线视视频有精品| 亚洲电影一区二区三区| 日本一区二区电影| 日韩精品一区二区在线观看| 色素色在线综合| 不卡一区二区中文字幕| 国产一区二区在线免费观看| 亚洲一区二区成人在线观看| 国产精品网站导航| 久久久99精品久久| 精品国产一区二区三区四区四| 欧美日韩国产色站一区二区三区| 成人18视频在线播放| 国产中文一区二区三区| 日韩精品电影在线观看| 亚洲一区二区三区四区在线免费观看 | 久久久久久久久久久99999| 欧美日韩精品免费观看视频| www.亚洲精品| 99视频一区二区| 成人性色生活片| 国产一区在线视频| 韩国女主播成人在线| 美国欧美日韩国产在线播放| 天天操天天干天天综合网| 亚洲黄色在线视频| 亚洲美女免费视频| 一区二区三区欧美在线观看| 亚洲色图.com| 成人欧美一区二区三区在线播放| 国产精品视频看| 亚洲三级视频在线观看| 国产精品国产三级国产aⅴ中文| 国产天堂亚洲国产碰碰| 国产日韩在线不卡| 国产精品视频yy9299一区| 国产欧美久久久精品影院| 久久精品亚洲麻豆av一区二区| 国产调教视频一区| 国产精品理论片| 亚洲精品国产高清久久伦理二区| 亚洲三级电影全部在线观看高清| 国产精品高潮久久久久无| ㊣最新国产の精品bt伙计久久| 中文字幕一区二区在线观看| 亚洲欧美综合另类在线卡通| 亚洲欧洲国产日韩| 亚洲一区在线看| 首页国产欧美久久| 精品制服美女丁香| 国产精品羞羞答答xxdd| 成人性视频网站| 色婷婷狠狠综合| 日韩一区二区精品在线观看| 精品美女一区二区| 国产精品盗摄一区二区三区| 亚洲综合自拍偷拍| 麻豆国产欧美日韩综合精品二区| 国产伦精一区二区三区| 91亚洲国产成人精品一区二区三 | 亚洲6080在线| 激情欧美一区二区| 99re热这里只有精品视频| 欧美日韩日日骚| 久久综合成人精品亚洲另类欧美 | 中文字幕在线观看一区| 亚洲妇女屁股眼交7| 精品亚洲成a人在线观看| 99在线视频精品| 91精品国产欧美一区二区成人| 久久久精品免费免费| 亚洲成人av中文| 国产一区二区不卡在线| 欧美午夜不卡视频| 久久免费美女视频| 亚洲第一福利视频在线| 福利一区在线观看| 欧美精品一级二级三级| 国产精品久久影院| 蜜桃av一区二区三区电影| av在线一区二区| 精品久久久久av影院| 亚洲一区欧美一区| 国产91色综合久久免费分享| 欧美一区二区日韩一区二区| 亚洲色图欧美偷拍| 国产麻豆一精品一av一免费| 欧美色倩网站大全免费| 亚洲私人黄色宅男| 国产一区在线观看视频| 91精品久久久久久蜜臀| 亚洲欧美区自拍先锋| 粉嫩av亚洲一区二区图片| 欧美一区二区三区四区高清| 亚洲男同性恋视频| 成人一区二区三区视频在线观看| 欧美一区二区高清| 亚洲国产精品麻豆| 成人av电影免费在线播放| 久久综合中文字幕| 精品亚洲免费视频| 日韩欧美亚洲另类制服综合在线 | 国产不卡一区视频| 久久综合久久综合亚洲| 日韩国产精品久久久| 欧日韩精品视频| 亚洲黄色在线视频| 色综合色综合色综合色综合色综合| 亚洲国产电影在线观看| 国产成人综合亚洲网站| 久久亚洲综合av| 国产在线精品不卡| 2017欧美狠狠色| 国产不卡在线视频| 日本一区二区三区在线观看| 国产精品性做久久久久久| 国产亚洲美州欧州综合国| 国模娜娜一区二区三区| 26uuu欧美| 成人av网站免费| 中文字幕一区在线观看视频|