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

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

?? render_line.cpp

?? It is WEB browser core module with source code. Very good!
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
/**
* This file is part of the html renderer for KDE.
 *
 * Copyright (C) 2003 Apple Computer, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */
// -------------------------------------------------------------------------

#include <kdebug.h>
#include <assert.h>
#include <qpainter.h>
#include <kglobal.h>

#include "rendering/render_flow.h"
#include "rendering/render_text.h"
#include "rendering/render_table.h"
#include "xml/dom_nodeimpl.h"
#include "xml/dom_docimpl.h"
#include "html/html_formimpl.h"
#include "render_inline.h"
#include "render_block.h"
#include "render_arena.h"
#include "render_line.h"

#include "khtmlview.h"
#include "htmltags.h"

using namespace DOM;

#ifndef NDEBUG
static bool inInlineBoxDetach;
#endif

namespace khtml {

class EllipsisBox : public InlineBox
{
public:
    EllipsisBox(RenderObject* obj, const DOM::AtomicString& ellipsisStr, InlineFlowBox* p,
                int w, int y, int h, int b, bool firstLine, InlineBox* markupBox)
    :InlineBox(obj), m_str(ellipsisStr) {
        m_parent = p;
        m_width = w;
        m_y = y;
        m_height = h;
        m_baseline = b;
        m_firstLine = firstLine;
        m_constructed = true;
        m_markupBox = markupBox;
    }

    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
    virtual bool nodeAtPoint(RenderObject::NodeInfo& info, int _x, int _y, int _tx, int _ty);

private:
    DOM::AtomicString m_str;
    InlineBox* m_markupBox;
};

void InlineBox::remove()
{
    if (parent())
        parent()->removeChild(this);
}

void InlineBox::detach(RenderArena* renderArena)
{
#ifndef NDEBUG
    inInlineBoxDetach = true;
#endif
    delete this;
#ifndef NDEBUG
    inInlineBoxDetach = false;
#endif

    // Recover the size left there for us by operator delete and free the memory.
    renderArena->free(*(size_t *)this, this);
}

void* InlineBox::operator new(size_t sz, RenderArena* renderArena) throw()
{
    return renderArena->allocate(sz);
}


void InlineBox::operator delete(void* ptr, size_t sz)
{
    assert(inInlineBoxDetach);

    // Stash size where detach can find it.
    *(size_t *)ptr = sz;
}

long InlineBox::caretMinOffset() const
{
    return 0;
}

long InlineBox::caretMaxOffset() const
{
    return 1;
}

unsigned long InlineBox::caretMaxRenderedOffset() const
{
    return 1;
}

void InlineBox::dirtyLineBoxes()
{
    markDirty();
    for (InlineFlowBox* curr = parent(); curr && !curr->isDirty(); curr = curr->parent())
        curr->markDirty();
}

void InlineBox::deleteLine(RenderArena* arena)
{
    m_object->setInlineBoxWrapper(0);
    detach(arena);
}

void InlineBox::extractLine()
{
    m_extracted = true;
    m_object->setInlineBoxWrapper(0);
}

void InlineBox::attachLine()
{
    m_extracted = false;
    m_object->setInlineBoxWrapper(this);
}

void InlineBox::adjustPosition(int dx, int dy)
{
    m_x += dx;
    m_y += dy;
    if (m_object->isReplaced() || m_object->isBR())
        m_object->setPos(m_object->xPos() + dx, m_object->yPos() + dy);
}

void InlineBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
{
    if (!object()->shouldPaintWithinRoot(i) || i.phase == PaintActionOutline)
        return;

    // Paint all phases of replaced elements atomically, as though the replaced element established its
    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
    // specification.)
    bool paintSelectionOnly = i.phase == PaintActionSelection;
    RenderObject::PaintInfo info(i.p, i.r, paintSelectionOnly ? i.phase : PaintActionBlockBackground, i.paintingRoot);
    object()->paint(info, tx, ty);
    if (!paintSelectionOnly) {
        info.phase = PaintActionChildBlockBackgrounds;
        object()->paint(info, tx, ty);
        info.phase = PaintActionFloat;
        object()->paint(info, tx, ty);
        info.phase = PaintActionForeground;
        object()->paint(info, tx, ty);
        info.phase = PaintActionOutline;
        object()->paint(info, tx, ty);
    }
}

bool InlineBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx, int ty)
{
    // Hit test all phases of replaced elements atomically, as though the replaced element established its
    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
    // specification.)
    return object()->hitTest(i, x, y, tx, ty);
}

RootInlineBox* InlineBox::root()
{
    if (m_parent)
        return m_parent->root();
    return static_cast<RootInlineBox*>(this);
}

bool InlineBox::nextOnLineExists() const
{
    if (!parent())
        return false;

    if (nextOnLine())
        return true;

    return parent()->nextOnLineExists();
}

bool InlineBox::prevOnLineExists() const
{
    if (!parent())
        return false;

    if (prevOnLine())
        return true;

    return parent()->prevOnLineExists();
}

InlineBox* InlineBox::firstLeafChild()
{
    return this;
}

InlineBox* InlineBox::lastLeafChild()
{
    return this;
}

InlineBox* InlineBox::nextLeafChild()
{
    return parent() ? parent()->firstLeafChildAfterBox(this) : 0;
}

InlineBox* InlineBox::prevLeafChild()
{
    return parent() ? parent()->lastLeafChildBeforeBox(this) : 0;
}

RenderObject::SelectionState InlineBox::selectionState()
{
    return object()->selectionState();
}

bool InlineBox::canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth)
{
    // Non-replaced elements can always accommodate an ellipsis.
    if (!m_object || !m_object->isReplaced())
        return true;

    QRect boxRect(m_x, 0, m_width, 10);
    QRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
    return !(boxRect.intersects(ellipsisRect));
}

int InlineBox::placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth, bool&)
{
    // Use -1 to mean "we didn't set the position."
    return -1;
}

RenderFlow* InlineFlowBox::flowObject()
{
    return static_cast<RenderFlow*>(m_object);
}

int InlineFlowBox::marginLeft()
{
    if (!includeLeftEdge())
        return 0;

    RenderStyle* cstyle = object()->style();
    Length margin = cstyle->marginLeft();
    if (margin.type != Variable)
        return (margin.type == Fixed ? margin.value : object()->marginLeft());
    return 0;
}

int InlineFlowBox::marginRight()
{
    if (!includeRightEdge())
        return 0;

    RenderStyle* cstyle = object()->style();
    Length margin = cstyle->marginRight();
    if (margin.type != Variable)
        return (margin.type == Fixed ? margin.value : object()->marginRight());
    return 0;
}

int InlineFlowBox::marginBorderPaddingLeft()
{
    return marginLeft() + borderLeft() + paddingLeft();
}

int InlineFlowBox::marginBorderPaddingRight()
{
    return marginRight() + borderRight() + paddingRight();
}

int InlineFlowBox::getFlowSpacingWidth()
{
    int totWidth = marginBorderPaddingLeft() + marginBorderPaddingRight();
    for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
        if (curr->isInlineFlowBox())
            totWidth += static_cast<InlineFlowBox*>(curr)->getFlowSpacingWidth();
    }
    return totWidth;
}

void InlineFlowBox::addToLine(InlineBox* child) {
    if (!m_firstChild)
        m_firstChild = m_lastChild = child;
    else {
        m_lastChild->m_next = child;
        child->m_prev = m_lastChild;
        m_lastChild = child;
    }
    child->setFirstLineStyleBit(m_firstLine);
    child->setParent(this);
    if (child->isText())
        m_hasTextChildren = true;
    if (child->object()->selectionState() != RenderObject::SelectionNone)
        root()->setHasSelectedChildren(true);
}

void InlineFlowBox::removeChild(InlineBox* child)
{
    if (!m_dirty)
        dirtyLineBoxes();

    root()->childRemoved(child);

    if (child == m_firstChild)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线小视频| 久久久久九九视频| 国产亚洲1区2区3区| 一区二区三区欧美亚洲| 狠狠色丁香久久婷婷综合_中| 99精品热视频| 久久欧美一区二区| 午夜精品久久久久久久| 波多野结衣在线aⅴ中文字幕不卡| 欧美午夜精品久久久久久孕妇 | 亚洲卡通动漫在线| 狠狠网亚洲精品| 欧美色窝79yyyycom| 国产精品久久久久久户外露出| 免费在线欧美视频| 欧美日韩成人综合天天影院 | 亚洲大片免费看| 99久久伊人久久99| 国产三级三级三级精品8ⅰ区| 日本一不卡视频| 在线观看亚洲专区| 中文字幕亚洲一区二区av在线 | 色欧美日韩亚洲| 国产视频一区二区三区在线观看| 蜜臀av一级做a爰片久久| 欧美天堂一区二区三区| 亚洲免费观看高清完整版在线观看| 国产一区激情在线| 日韩欧美精品三级| 日本不卡视频在线| 欧美一区二区二区| 日韩电影网1区2区| 777午夜精品免费视频| 视频一区视频二区中文字幕| 欧美性猛交xxxx乱大交退制版| 日韩毛片精品高清免费| 99精品国产91久久久久久| 国产精品初高中害羞小美女文| 成人av免费网站| 中文字幕一区二区三中文字幕| 高清不卡在线观看| 国产精品久久久久久户外露出 | 国产在线一区二区综合免费视频| 日韩一区二区三区免费观看| 老司机精品视频导航| 日韩欧美自拍偷拍| 激情综合网激情| 国产情人综合久久777777| 成人综合在线网站| 中文字幕巨乱亚洲| 91老师片黄在线观看| 亚洲一区二区三区激情| 欧美剧在线免费观看网站| 免费在线观看一区| 久久精品这里都是精品| av亚洲精华国产精华| 亚洲精品乱码久久久久久黑人 | 亚洲丰满少妇videoshd| 欧美va日韩va| 国产成人亚洲精品狼色在线| 中文字幕日本不卡| 欧美性猛交一区二区三区精品| 三级久久三级久久| 日本一区二区三区久久久久久久久不 | 成人午夜在线免费| 亚洲制服丝袜av| 日韩精品一区二区三区蜜臀| 成人短视频下载| 香蕉久久一区二区不卡无毒影院| 欧美xxxx老人做受| 色综合欧美在线| 激情综合一区二区三区| 亚洲激情图片qvod| 26uuu国产电影一区二区| 97成人超碰视| 国产一区二区看久久| 亚洲最新视频在线观看| 久久综合久久99| 欧美在线免费观看亚洲| 国模无码大尺度一区二区三区| 亚洲精品国产第一综合99久久 | 色婷婷综合在线| 久久国产成人午夜av影院| 中文字幕一区三区| 久久一夜天堂av一区二区三区| 一道本成人在线| 国产精品一区二区无线| 亚洲成人先锋电影| 国产精品白丝在线| 欧美成人免费网站| 欧美日韩综合在线| bt7086福利一区国产| 免费观看成人av| 亚洲香蕉伊在人在线观| 中文字幕不卡的av| 精品国产成人在线影院| 色狠狠一区二区| 成人激情免费视频| 韩国av一区二区三区在线观看| 亚洲成av人**亚洲成av**| 中文字幕五月欧美| 国产精品视频观看| 久久天天做天天爱综合色| 欧美一级片在线观看| 欧美在线看片a免费观看| 成人一二三区视频| 国产精选一区二区三区| 免费一级片91| 日日欢夜夜爽一区| 午夜电影一区二区| 亚洲一区二区三区在线看| 国产精品视频看| 亚洲国产精品国自产拍av| 久久综合九色综合97婷婷| 日韩欧美成人一区二区| 日韩一二三区不卡| 欧美一级一区二区| 精品福利一区二区三区| 欧美一区二区免费视频| 日韩一区二区三区在线观看| 日韩一区二区视频在线观看| 日韩欧美自拍偷拍| 精品乱人伦一区二区三区| 精品国产1区2区3区| 久久久国产午夜精品| 国产日韩欧美精品电影三级在线| 国产色婷婷亚洲99精品小说| 久久久欧美精品sm网站| 国产女人aaa级久久久级| 日本一区二区久久| 国产精品免费看片| 夜夜夜精品看看| 日韩精品欧美成人高清一区二区| 偷窥少妇高潮呻吟av久久免费| 蜜臀久久久99精品久久久久久| 国内一区二区在线| av激情亚洲男人天堂| 欧美亚洲国产怡红院影院| 欧美一区二区三区在| 国产亚洲精品aa| 一区二区三区在线看| 奇米在线7777在线精品| 国产精品 欧美精品| 日本韩国视频一区二区| 欧美肥妇bbw| 国产性天天综合网| 亚洲六月丁香色婷婷综合久久 | 欧美精品777| 亚洲精品一区二区三区香蕉| 国产精品久久毛片| 亚洲动漫第一页| 蜜臀久久久久久久| av电影在线观看一区| 欧美日韩第一区日日骚| 国产亚洲成av人在线观看导航| 一区二区三区中文字幕在线观看| 日韩不卡在线观看日韩不卡视频| 国内精品免费**视频| www.66久久| 日韩一区二区在线看| 亚洲丝袜美腿综合| 久88久久88久久久| 色诱亚洲精品久久久久久| 精品三级在线看| 一个色妞综合视频在线观看| 精品一区二区久久久| 色婷婷香蕉在线一区二区| www激情久久| 亚洲福利视频一区| va亚洲va日韩不卡在线观看| 欧美一级片免费看| 亚洲综合色婷婷| 成人性生交大片免费| 欧美变态tickle挠乳网站| 一区二区三区久久| 成人高清视频在线| 26uuu色噜噜精品一区| 天天影视网天天综合色在线播放| 国产精品一区二区在线观看不卡 | 白白色亚洲国产精品| 欧美大胆人体bbbb| 亚洲午夜久久久久久久久电影院| 国产精品亚洲一区二区三区在线| 欧美日韩国产影片| 亚洲乱码精品一二三四区日韩在线| 国产一二三精品| 日韩一区二区高清| 五月婷婷久久丁香| 在线观看av一区| 亚洲天堂a在线| av综合在线播放| 国产精品无圣光一区二区| 国产成人高清在线| 国产亚洲精品超碰| 国产91在线观看| 欧美国产禁国产网站cc| 国产不卡在线一区| 国产精品色一区二区三区| 国产99久久久久久免费看农村| 久久久久久久电影|