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

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

?? htmlediting.cpp

?? It is WEB browser core module with source code. Very good!
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/*
 * 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. 
 */

#include "htmlediting.h"

#include "css_computedstyle.h"
#include "css_value.h"
#include "css_valueimpl.h"
#include "cssparser.h"
#include "cssproperties.h"
#include "dom_doc.h"
#include "dom_docimpl.h"
#include "dom_elementimpl.h"
#include "dom_nodeimpl.h"
#include "dom_position.h"
#include "dom_positioniterator.h"
#include "dom_stringimpl.h"
#include "dom_textimpl.h"
#include "dom2_range.h"
#include "dom2_rangeimpl.h"
#include "html_elementimpl.h"
#include "html_imageimpl.h"
#include "html_interchange.h"
#include "htmlattrs.h"
#include "htmltags.h"
#include "khtml_part.h"
#include "khtml_part.h"
#include "khtmlview.h"
#include "qcolor.h"
#include "qptrlist.h"
#include "render_object.h"
#include "render_style.h"
#include "render_text.h"
#include "visible_position.h"
#include "visible_text.h"
#include "visible_units.h"

using DOM::AttrImpl;
using DOM::CSSComputedStyleDeclarationImpl;
using DOM::CSSMutableStyleDeclarationImpl;
using DOM::CSSParser;
using DOM::CSSPrimitiveValue;
using DOM::CSSPrimitiveValueImpl;
using DOM::CSSProperty;
using DOM::CSSStyleDeclarationImpl;
using DOM::CSSValue;
using DOM::CSSValueImpl;
using DOM::DocumentFragmentImpl;
using DOM::DocumentImpl;
using DOM::DOMString;
using DOM::DOMStringImpl;
using DOM::DoNotStayInBlock;
using DOM::DoNotUpdateLayout;
using DOM::EditingTextImpl;
using DOM::ElementImpl;
using DOM::EStayInBlock;
using DOM::HTMLElementImpl;
using DOM::HTMLImageElementImpl;
using DOM::NamedAttrMapImpl;
using DOM::Node;
using DOM::NodeImpl;
using DOM::NodeListImpl;
using DOM::Position;
using DOM::PositionIterator;
using DOM::Range;
using DOM::RangeImpl;
using DOM::StayInBlock;
using DOM::TextImpl;
using DOM::TreeWalkerImpl;

#if APPLE_CHANGES
#include "KWQAssertions.h"
#include "KWQLogging.h"
#include "KWQKHTMLPart.h"
#endif

#if !APPLE_CHANGES
#define ASSERT(assertion) ((void)0)
#define ASSERT_WITH_MESSAGE(assertion, formatAndArgs...) ((void)0)
#define ASSERT_NOT_REACHED() ((void)0)
#define LOG(channel, formatAndArgs...) ((void)0)
#define ERROR(formatAndArgs...) ((void)0)
#define ASSERT(assertion) assert(assertion)
#if LOG_DISABLED
#define debugPosition(a,b) ((void)0)
#define debugNode(a,b) ((void)0)
#endif
#endif

#define IF_IMPL_NULL_RETURN_ARG(arg) do { \
        if (isNull()) { return arg; } \
    } while (0)
        
#define IF_IMPL_NULL_RETURN do { \
        if (isNull()) { return; } \
    } while (0)

namespace khtml {

static inline bool isNBSP(const QChar &c)
{
    return c.unicode() == 0xa0;
}

// FIXME: Can't really determine this without taking white-space mode into account.
static inline bool nextCharacterIsCollapsibleWhitespace(const Position &pos)
{
    if (!pos.node())
        return false;
    if (!pos.node()->isTextNode())
        return false;
    return isCollapsibleWhitespace(static_cast<TextImpl *>(pos.node())->data()[pos.offset()]);
}

static const int spacesPerTab = 4;

static bool isTableStructureNode(const NodeImpl *node)
{
    RenderObject *r = node->renderer();
    return (r && (r->isTableCell() || r->isTableRow() || r->isTableSection() || r->isTableCol()));
}

static bool isListStructureNode(const NodeImpl *node)
{
    // FIXME: Irritating that we can get away with just going at the render tree for isTableStructureNode,
    // but here we also have to peek at the type of DOM node?
    RenderObject *r = node->renderer();
    NodeImpl::Id nodeID = node->id();
    return (r && r->isListItem())
        || (nodeID == ID_OL || nodeID == ID_UL || nodeID == ID_DD || nodeID == ID_DT || nodeID == ID_DIR || nodeID == ID_MENU);
}

static DOMString &nonBreakingSpaceString()
{
    static DOMString nonBreakingSpaceString = QString(QChar(0xa0));
    return nonBreakingSpaceString;
}

static DOMString &styleSpanClassString()
{
    static DOMString styleSpanClassString = AppleStyleSpanClass;
    return styleSpanClassString;
}

static bool isEmptyStyleSpan(const NodeImpl *node)
{
    if (!node || !node->isHTMLElement() || node->id() != ID_SPAN)
        return false;

    const HTMLElementImpl *elem = static_cast<const HTMLElementImpl *>(node);
    CSSMutableStyleDeclarationImpl *inlineStyleDecl = elem->inlineStyleDecl();
    return (!inlineStyleDecl || inlineStyleDecl->length() == 0) && elem->getAttribute(ATTR_CLASS) == styleSpanClassString();
}

static bool isStyleSpan(const NodeImpl *node)
{
    if (!node || !node->isHTMLElement())
        return false;

    const HTMLElementImpl *elem = static_cast<const HTMLElementImpl *>(node);
    return elem->id() == ID_SPAN && elem->getAttribute(ATTR_CLASS) == styleSpanClassString();
}

static bool isEmptyFontTag(const NodeImpl *node)
{
    if (!node || node->id() != ID_FONT)
        return false;

    const ElementImpl *elem = static_cast<const ElementImpl *>(node);
    NamedAttrMapImpl *map = elem->attributes(true); // true for read-only
    return (!map || map->length() == 1) && elem->getAttribute(ATTR_CLASS) == styleSpanClassString();
}

static DOMString &blockPlaceholderClassString()
{
    static DOMString blockPlaceholderClassString = "khtml-block-placeholder";
    return blockPlaceholderClassString;
}

static DOMString &matchNearestBlockquoteColorString()
{
    static DOMString matchNearestBlockquoteColorString = "match";
    return matchNearestBlockquoteColorString;
}

static void derefNodesInList(QPtrList<NodeImpl> &list)
{
    for (QPtrListIterator<NodeImpl> it(list); it.current(); ++it)
        it.current()->deref();
}

static int maxRangeOffset(NodeImpl *n)
{
    if (DOM::offsetInCharacters(n->nodeType()))
        return n->maxOffset();

    if (n->isElementNode())
        return n->childNodeCount();

    return 1;
}

static int maxDeepOffset(NodeImpl *n)
{
    if (n->isAtomicNode())
        return n->caretMaxOffset();

    if (n->isElementNode())
        return n->childNodeCount();

    return 1;
}

static void debugPosition(const char *prefix, const Position &pos)
{
    if (!prefix)
        prefix = "";
    if (pos.isNull())
        LOG(Editing, "%s <null>", prefix);
    else
        LOG(Editing, "%s%s %p : %d", prefix, pos.node()->nodeName().string().latin1(), pos.node(), pos.offset());
}

static void debugNode(const char *prefix, const NodeImpl *node)
{
    if (!prefix)
        prefix = "";
    if (!node)
        LOG(Editing, "%s <null>", prefix);
    else
        LOG(Editing, "%s%s %p", prefix, node->nodeName().string().latin1(), node);
}

//------------------------------------------------------------------------------------------
// EditCommandPtr

EditCommandPtr::EditCommandPtr()
{
}

EditCommandPtr::EditCommandPtr(EditCommand *impl) : SharedPtr<EditCommand>(impl)
{
}

EditCommandPtr::EditCommandPtr(const EditCommandPtr &o) : SharedPtr<EditCommand>(o)
{
}

EditCommandPtr::~EditCommandPtr()
{
}

EditCommandPtr &EditCommandPtr::operator=(const EditCommandPtr &c)
{
    static_cast<SharedPtr<EditCommand> &>(*this) = c;
    return *this;
}

bool EditCommandPtr::isCompositeStep() const
{
    IF_IMPL_NULL_RETURN_ARG(false);        
    return get()->isCompositeStep();
}

bool EditCommandPtr::isInsertTextCommand() const
{
    IF_IMPL_NULL_RETURN_ARG(false);        
    return get()->isInsertTextCommand();
}

bool EditCommandPtr::isTypingCommand() const
{
    IF_IMPL_NULL_RETURN_ARG(false);        
    return get()->isTypingCommand();
}

void EditCommandPtr::apply() const
{
    IF_IMPL_NULL_RETURN;
    get()->apply();
}

void EditCommandPtr::unapply() const
{
    IF_IMPL_NULL_RETURN;
    get()->unapply();
}

void EditCommandPtr::reapply() const
{
    IF_IMPL_NULL_RETURN;
    get()->reapply();
}

EditAction EditCommandPtr::editingAction() const
{
    IF_IMPL_NULL_RETURN_ARG(EditActionUnspecified);
    return get()->editingAction();
}

DocumentImpl * const EditCommandPtr::document() const
{
    IF_IMPL_NULL_RETURN_ARG(0);
    return get()->document();
}

Selection EditCommandPtr::startingSelection() const
{
    IF_IMPL_NULL_RETURN_ARG(Selection());
    return get()->startingSelection();
}

Selection EditCommandPtr::endingSelection() const
{
    IF_IMPL_NULL_RETURN_ARG(Selection());
    return get()->endingSelection();
}

void EditCommandPtr::setStartingSelection(const Selection &s) const
{
    IF_IMPL_NULL_RETURN;
    get()->setStartingSelection(s);
}

void EditCommandPtr::setStartingSelection(const VisiblePosition &p) const
{
    IF_IMPL_NULL_RETURN;
    get()->setStartingSelection(p);
}

void EditCommandPtr::setStartingSelection(const Position &p, EAffinity affinity) const
{
    IF_IMPL_NULL_RETURN;
    Selection s = Selection(p, affinity);
    get()->setStartingSelection(s);
}

void EditCommandPtr::setEndingSelection(const Selection &s) const
{
    IF_IMPL_NULL_RETURN;
    get()->setEndingSelection(s);
}

#if 0
// Implementation mistakenly used get()->setStartingSelection(), but it is
// too late in Tiger to change, even though this method is unused.  Safest, then,
// to fix but comment out until post-Tiger.
void EditCommandPtr::setEndingSelection(const VisiblePosition &p) const
{
    IF_IMPL_NULL_RETURN;
    get()->setEndingSelection(p);
}
#endif

void EditCommandPtr::setEndingSelection(const Position &p, EAffinity affinity) const
{
    IF_IMPL_NULL_RETURN;
    Selection s = Selection(p, affinity);
    get()->setEndingSelection(s);
}

CSSMutableStyleDeclarationImpl *EditCommandPtr::typingStyle() const
{
    IF_IMPL_NULL_RETURN_ARG(0);
    return get()->typingStyle();
}

void EditCommandPtr::setTypingStyle(CSSMutableStyleDeclarationImpl *style) const
{
    IF_IMPL_NULL_RETURN;
    get()->setTypingStyle(style);
}

EditCommandPtr EditCommandPtr::parent() const
{
    IF_IMPL_NULL_RETURN_ARG(0);
    return get()->parent();

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
性感美女极品91精品| 26uuu国产电影一区二区| 欧美精品v国产精品v日韩精品| 欧美性一二三区| 日韩欧美一级片| 欧美国产日韩精品免费观看| 亚洲精品欧美二区三区中文字幕| 亚洲成人一区在线| 国产精品一区二区在线播放| 99国产欧美另类久久久精品| 91.麻豆视频| 久久精品亚洲国产奇米99| 亚洲欧美电影院| 免费在线看成人av| 97久久精品人人做人人爽| 91精品婷婷国产综合久久性色| 国产视频亚洲色图| 午夜欧美视频在线观看| 国产精品99久久久久久久女警 | 国产午夜亚洲精品不卡| 亚洲精品视频观看| 狠狠色丁香婷婷综合久久片| 91欧美一区二区| 精品国精品自拍自在线| 亚洲成av人片在线| 大胆欧美人体老妇| 日韩一卡二卡三卡四卡| 亚洲视频 欧洲视频| 狠狠色2019综合网| 欧美三级一区二区| 国产精品―色哟哟| 久久99国产精品久久99果冻传媒| 色综合久久88色综合天天| 欧美精品一区二区不卡| 亚洲永久免费av| 成人久久18免费网站麻豆| 欧美一区二区性放荡片| 亚洲人成网站精品片在线观看| 国产一区二区三区av电影| 欧美一级淫片007| 亚洲最大的成人av| a在线播放不卡| 国产亚洲综合在线| 美女精品一区二区| 欧美日韩情趣电影| 亚洲免费视频中文字幕| proumb性欧美在线观看| 久久精品人人做人人爽97| 久久精品国产网站| 欧美二区在线观看| 亚洲国产日韩一区二区| 色综合欧美在线视频区| 1区2区3区欧美| 99免费精品在线观看| 国产清纯美女被跳蛋高潮一区二区久久w | 蜜桃av一区二区三区电影| 在线观看中文字幕不卡| 亚洲免费在线电影| 色婷婷国产精品综合在线观看| 国产精品免费人成网站| 国产激情偷乱视频一区二区三区| 日韩欧美一级精品久久| 美日韩一级片在线观看| 91精品国产色综合久久不卡蜜臀| 午夜久久久影院| 欧美日韩你懂得| 日韩综合一区二区| 欧美疯狂性受xxxxx喷水图片| 婷婷综合在线观看| 91精品国产综合久久蜜臀| 日韩中文字幕av电影| 91精品婷婷国产综合久久性色| 视频一区视频二区中文| 91麻豆精品国产自产在线观看一区 | 另类小说综合欧美亚洲| 日韩欧美一区在线观看| 美女视频一区二区| 久久婷婷一区二区三区| 国产精品一区二区免费不卡| 久久精品无码一区二区三区| 成人性色生活片| 亚洲视频一区在线| 欧美视频日韩视频在线观看| 香蕉久久夜色精品国产使用方法 | 日本91福利区| 久久一区二区三区四区| 国产麻豆精品在线| 中文字幕二三区不卡| 91在线丨porny丨国产| 亚洲一级二级在线| 日韩一区二区免费在线观看| 激情综合五月婷婷| 国产日韩精品一区二区三区 | 亚洲视频狠狠干| 欧美视频在线观看一区二区| 偷拍与自拍一区| 精品国产乱码久久久久久浪潮| 国产精品亚洲专一区二区三区| 中文字幕亚洲欧美在线不卡| 日本精品一区二区三区高清 | 日韩一区二区三区高清免费看看| 激情国产一区二区| 欧美国产欧美综合| 91福利视频在线| 美国欧美日韩国产在线播放 | 91香蕉视频黄| 丝瓜av网站精品一区二区| 欧美成人r级一区二区三区| 处破女av一区二区| 亚洲国产日韩精品| 久久久久久99精品| 91行情网站电视在线观看高清版| 日韩av中文字幕一区二区三区| 久久久精品国产99久久精品芒果| 97精品久久久午夜一区二区三区| 日韩精品一级中文字幕精品视频免费观看 | 国产精品国产三级国产三级人妇| 欧美亚洲免费在线一区| 精品在线播放免费| 亚洲黄色免费网站| 精品国产一区二区三区忘忧草 | 一区二区三区欧美| 欧美精品一区视频| 在线精品视频一区二区三四| 国产一区二区精品在线观看| 一区二区三区中文字幕精品精品 | 久久99精品网久久| 亚洲激情图片qvod| 日韩美女视频一区二区在线观看| 99精品国产热久久91蜜凸| 久久国产综合精品| 亚洲综合在线第一页| 国产欧美久久久精品影院| 91麻豆精品国产91久久久使用方法 | 日韩一区二区在线看片| 91香蕉国产在线观看软件| 国产综合久久久久久久久久久久| 一区二区三区在线播| 久久久午夜精品| 欧美人成免费网站| 99天天综合性| 国产福利一区在线观看| 三级成人在线视频| 亚洲尤物在线视频观看| 国产精品成人一区二区艾草 | 懂色av中文字幕一区二区三区| 日韩精品亚洲一区| 一区二区三区在线观看国产| 亚洲国产精品v| 欧美成人一区二区三区| 欧美日本在线观看| 色88888久久久久久影院按摩 | 中文字幕一区二区三区不卡在线| 欧美成人vps| 欧美一区二区三区在线观看| 欧美亚男人的天堂| 91在线高清观看| 高清成人在线观看| 国产精品888| 国产一区亚洲一区| 麻豆精品久久精品色综合| 日韩精品成人一区二区在线| 亚洲一区二区三区四区的| 国产精品二区一区二区aⅴ污介绍| 久久亚洲精华国产精华液| 精品理论电影在线观看| 日韩一区二区中文字幕| 欧美一区二区视频在线观看2022| 欧美亚洲国产怡红院影院| 色婷婷综合久色| 色综合久久久久综合体桃花网| 成人激情免费电影网址| 成人一区二区三区视频在线观看 | 中文字幕精品一区二区精品绿巨人 | 亚洲图片自拍偷拍| 一区二区三区在线不卡| 一区二区三区加勒比av| 一区二区三区在线免费播放| 一区二区三区精品在线| 一级做a爱片久久| 亚洲福中文字幕伊人影院| 亚洲国产精品人人做人人爽| 亚洲尤物在线视频观看| 亚洲mv大片欧洲mv大片精品| 亚洲18色成人| 日韩和欧美一区二区| 蜜臀国产一区二区三区在线播放 | 久久伊99综合婷婷久久伊| 久久亚洲精精品中文字幕早川悠里 | 亚洲午夜精品一区二区三区他趣| 一区二区三区欧美日| 香蕉成人伊视频在线观看| 午夜激情一区二区| 免费观看在线色综合| 国产一区二区三区免费播放| 国产成a人亚洲| 97久久人人超碰| 欧美视频一区二区三区在线观看| 欧美日韩国产乱码电影| 日韩美一区二区三区|