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

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

?? htmlediting.cpp

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲愉拍一区二区| 岛国av在线一区| 亚洲日本乱码在线观看| 国产午夜精品一区二区三区视频 | 福利91精品一区二区三区| 久久激情综合网| 奇米四色…亚洲| 国内久久婷婷综合| 国产乱子伦视频一区二区三区| 精彩视频一区二区三区| 国产伦精品一区二区三区免费| 国产一区二区视频在线| 国产成人午夜高潮毛片| 国产成人在线看| 波多野结衣欧美| 色系网站成人免费| 欧美片网站yy| 精品国产区一区| 国产视频在线观看一区二区三区| 国产欧美日韩卡一| 亚洲精品综合在线| 日本欧美肥老太交大片| 国产精品一二三区| 色婷婷av一区二区三区gif| 精品视频资源站| 2017欧美狠狠色| 亚洲精品日日夜夜| 狠狠色丁香九九婷婷综合五月| 成人午夜私人影院| 538prom精品视频线放| 久久亚洲欧美国产精品乐播 | 色哟哟欧美精品| 日韩美女主播在线视频一区二区三区| 久久久久国产免费免费 | 777欧美精品| 欧美国产一区二区在线观看| 亚洲精品国久久99热| 精品一区二区精品| 欧洲国内综合视频| 国产欧美一区二区精品性色| 亚洲图片欧美综合| 成人精品国产一区二区4080| 欧美久久久久久久久中文字幕| wwwwww.欧美系列| 亚洲一卡二卡三卡四卡无卡久久| 国产精品一区二区在线看| 欧美日韩成人一区二区| 中文字幕在线视频一区| 久久不见久久见免费视频7 | 免费日本视频一区| 99国产精品久久久久久久久久| 日韩欧美一区在线| 亚洲香蕉伊在人在线观| 91美女在线看| 国产精品午夜免费| 国产精品亚洲第一区在线暖暖韩国| 欧美老年两性高潮| 一片黄亚洲嫩模| 岛国精品在线播放| 国产视频一区二区三区在线观看| 久久精品免费观看| 欧美人伦禁忌dvd放荡欲情| 最新中文字幕一区二区三区| 国产91在线|亚洲| 国产视频一区在线观看| 国内精品不卡在线| 久久久午夜精品| 久久国产三级精品| 精品国产人成亚洲区| 麻豆精品在线播放| 精品国产免费人成电影在线观看四季| 偷拍与自拍一区| 欧美顶级少妇做爰| 视频一区视频二区中文字幕| 波多野结衣中文一区| 国产精品理论片| 欧美日韩高清一区二区| 亚洲一区二区三区四区在线免费观看 | 欧美午夜一区二区三区免费大片| 亚洲图片另类小说| av电影天堂一区二区在线观看| 欧美韩国一区二区| 99久久伊人网影院| 一区二区三区加勒比av| 欧美日本在线播放| 麻豆精品新av中文字幕| 久久看人人爽人人| 成人av免费在线观看| 亚洲美女偷拍久久| 欧美区视频在线观看| 蜜桃精品视频在线观看| 久久久国产精品午夜一区ai换脸| 福利一区二区在线| 亚洲一区二区三区中文字幕在线| 欧美日本一区二区在线观看| 久久精品av麻豆的观看方式| 国产亚洲午夜高清国产拍精品 | 国产在线一区观看| 国产精品国产三级国产a| 欧美视频中文一区二区三区在线观看 | 高潮精品一区videoshd| 尤物av一区二区| 这里是久久伊人| 国产乱对白刺激视频不卡| 亚洲日穴在线视频| 欧美va亚洲va| 99精品视频在线免费观看| 午夜在线成人av| 久久这里只有精品视频网| 99久久er热在这里只有精品66| 亚洲高清不卡在线观看| 欧美激情一区三区| 欧美日韩午夜影院| 成人精品视频网站| 蜜臀av性久久久久蜜臀aⅴ流畅 | 午夜亚洲国产au精品一区二区| 2欧美一区二区三区在线观看视频| 91在线视频观看| 韩国av一区二区三区| 一区二区三区高清| 日本一区二区三区在线不卡| 欧美日韩亚洲综合在线| 不卡高清视频专区| 国内精品在线播放| 日本在线不卡视频| 亚洲一区在线看| 国产欧美日韩视频一区二区| 91精品啪在线观看国产60岁| 色婷婷综合久久久中文一区二区 | 99国产精品久久久久| 国产一区二区精品久久| 日本vs亚洲vs韩国一区三区 | 国产精品丝袜黑色高跟| 欧美草草影院在线视频| 欧美日韩国产综合视频在线观看| 成人毛片在线观看| 国产一区二区福利视频| 国内精品在线播放| 久久精工是国产品牌吗| 日本成人中文字幕在线视频| 午夜av区久久| 亚洲国产精品天堂| 亚洲综合999| 亚洲欧美日韩久久| 中文字幕一区二区三区视频| 国产日产欧美一区| 国产视频在线观看一区二区三区| 日韩精品专区在线影院重磅| 欧美精选一区二区| 制服丝袜亚洲精品中文字幕| 欧美日韩激情一区| 欧美日韩精品综合在线| 欧美视频在线不卡| 欧美日韩五月天| 欧美日韩国产欧美日美国产精品| 欧美视频一区在线观看| 欧美日韩国产中文| 欧美一区二区三区免费视频| 91精品国产综合久久香蕉的特点| 91精品国产综合久久久久久久| 884aa四虎影成人精品一区| 亚洲欧洲日产国码二区| 综合色中文字幕| 亚洲与欧洲av电影| 亚洲电影第三页| 久久超碰97人人做人人爱| 国产精品亚洲人在线观看| jiyouzz国产精品久久| 99re8在线精品视频免费播放| 色综合久久久网| 91精品国产综合久久久久久久 | 日本乱人伦一区| 欧美日韩视频在线一区二区| 欧美一卡2卡3卡4卡| 久久夜色精品一区| 亚洲男人的天堂一区二区| 天堂午夜影视日韩欧美一区二区| 麻豆精品视频在线| 成人中文字幕合集| 精品婷婷伊人一区三区三| 久久一留热品黄| 一区二区三区国产豹纹内裤在线| 五月天国产精品| 成人午夜碰碰视频| 欧美精品一级二级| 国产午夜精品美女毛片视频| 亚洲黄色小说网站| 美女精品自拍一二三四| 一本久久精品一区二区| 日韩欧美色综合| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 一区二区三区精品久久久| 国内精品自线一区二区三区视频| 91小视频在线免费看| 欧美成人福利视频| 亚洲最新视频在线观看| 国产大片一区二区| 欧美一区永久视频免费观看| 国产精品毛片无遮挡高清| 奇米777欧美一区二区|