New selection gap-filling architecture. Makes the gap-filling much more like NSText...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 20:25:19 +0000 (20:25 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 20:25:19 +0000 (20:25 +0000)
commit1688d2078abc7bbe5cf4f1782627e96232978549
treead51ad0008e61e97b6492afc95853a92e3bbe1ad
parent9f9843d8172b33211435991108bca42c8116bb22
New selection gap-filling architecture.  Makes the gap-filling much more like NSTextView and puts the responsibility
for gap-filling in the block.  Fixes numerous bugs with selection drawing including bidi issues, incorrect old
horizontal gap filling, and selection performance issues.

        Reviewed by kocienda

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageLoader::notifyFinished):
        * khtml/misc/khtmllayout.h:
        (khtml::GapRects::left):
        (khtml::GapRects::center):
        (khtml::GapRects::right):
        (khtml::GapRects::uniteLeft):
        (khtml::GapRects::uniteCenter):
        (khtml::GapRects::uniteRight):
        (khtml::GapRects::unite):
        (khtml::GapRects::operator QRect):
        (khtml::GapRects::operator==):
        (khtml::GapRects::operator!=):
        * khtml/rendering/font.cpp:
        (Font::drawHighlightForText):
        * khtml/rendering/font.h:
        * khtml/rendering/render_block.cpp:
        (khtml:::RenderFlow):
        (khtml::RenderBlock::removeChild):
        (khtml::RenderBlock::paintObject):
        (khtml::RenderBlock::paintEllipsisBoxes):
        (khtml::RenderBlock::setSelectionState):
        (khtml::RenderBlock::shouldPaintSelectionGaps):
        (khtml::RenderBlock::isSelectionRoot):
        (khtml::RenderBlock::selectionGapRects):
        (khtml::RenderBlock::paintSelection):
        (khtml::RenderBlock::fillSelectionGaps):
        (khtml::RenderBlock::fillInlineSelectionGaps):
        (khtml::RenderBlock::fillBlockSelectionGaps):
        (khtml::RenderBlock::fillHorizontalSelectionGap):
        (khtml::RenderBlock::fillVerticalSelectionGap):
        (khtml::RenderBlock::fillLeftSelectionGap):
        (khtml::RenderBlock::fillRightSelectionGap):
        (khtml::RenderBlock::getHorizontalSelectionGapInfo):
        (khtml::RenderBlock::leftSelectionOffset):
        (khtml::RenderBlock::rightSelectionOffset):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::hasSelectedChildren):
        (khtml::RenderBlock::selectionState):
        (khtml::RenderBlock::BlockSelectionInfo::BlockSelectionInfo):
        (khtml::RenderBlock::BlockSelectionInfo::rects):
        (khtml::RenderBlock::BlockSelectionInfo::state):
        (khtml::RenderBlock::BlockSelectionInfo::block):
        (khtml::RenderBlock::selectionRect):
        * khtml/rendering/render_box.cpp:
        (RenderBox::position):
        * khtml/rendering/render_br.cpp:
        (RenderBR::inlineBox):
        * khtml/rendering/render_br.h:
        (khtml::RenderBR::selectionRect):
        (khtml::RenderBR::paint):
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::selectionRect):
        (RenderCanvas::setSelection):
        * khtml/rendering/render_canvasimage.cpp:
        (RenderCanvasImage::paint):
        * khtml/rendering/render_image.cpp:
        (RenderImage::paint):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_line.cpp:
        (khtml::InlineBox::nextLeafChild):
        (khtml::InlineBox::prevLeafChild):
        (khtml::InlineBox::selectionState):
        (khtml::InlineFlowBox::addToLine):
        (khtml::InlineFlowBox::firstLeafChild):
        (khtml::InlineFlowBox::lastLeafChild):
        (khtml::InlineFlowBox::firstLeafChildAfterBox):
        (khtml::InlineFlowBox::lastLeafChildBeforeBox):
        (khtml::InlineFlowBox::selectionState):
        (khtml::RootInlineBox::fillLineSelectionGap):
        (khtml::RootInlineBox::setHasSelectedChildren):
        (khtml::RootInlineBox::selectionState):
        (khtml::RootInlineBox::firstSelectedBox):
        (khtml::RootInlineBox::lastSelectedBox):
        (khtml::RootInlineBox::selectionTop):
        (khtml::RootInlineBox::block):
        * khtml/rendering/render_line.h:
        (khtml::RootInlineBox::RootInlineBox):
        (khtml::RootInlineBox::hasSelectedChildren):
        (khtml::RootInlineBox::selectionHeight):
        * khtml/rendering/render_object.cpp:
        (RenderObject::selectionColor):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::):
        (khtml::RenderObject::selectionState):
        (khtml::RenderObject::setSelectionState):
        (khtml::RenderObject::selectionRect):
        (khtml::RenderObject::canBeSelectionLeaf):
        (khtml::RenderObject::hasSelectedChildren):
        (khtml::RenderObject::hasDirtySelectionState):
        (khtml::RenderObject::setHasDirtySelectionState):
        (khtml::RenderObject::shouldPaintSelectionGaps):
        (khtml::RenderObject::SelectionInfo::SelectionInfo):
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::RenderReplaced):
        (RenderReplaced::shouldPaint):
        (RenderReplaced::selectionRect):
        (RenderReplaced::setSelectionState):
        (RenderReplaced::selectionColor):
        (RenderWidget::paint):
        (RenderWidget::setSelectionState):
        * khtml/rendering/render_replaced.h:
        (khtml::RenderReplaced::canBeSelectionLeaf):
        (khtml::RenderReplaced::selectionState):
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::checkVerticalPoint):
        (InlineTextBox::isSelected):
        (InlineTextBox::selectionState):
        (InlineTextBox::selectionRect):
        (InlineTextBox::paintSelection):
        (InlineTextBox::paintMarkedTextBackground):
        (RenderText::paint):
        (RenderText::setSelectionState):
        (RenderText::selectionRect):
        * khtml/rendering/render_text.h:
        (khtml::RenderText::canBeSelectionLeaf):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawHighlightForText):
        * kwq/KWQPtrDict.h:
        (QPtrDictIterator::toFirst):
        * kwq/KWQRect.mm:
        (QRect::unite):
        * kwq/WebCoreTextRenderer.h:
        * kwq/WebCoreTextRendererFactory.mm:
        (WebCoreInitializeEmptyTextGeometry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/html_imageimpl.cpp
WebCore/khtml/misc/khtmllayout.h
WebCore/khtml/rendering/font.cpp
WebCore/khtml/rendering/font.h
WebCore/khtml/rendering/render_block.cpp
WebCore/khtml/rendering/render_block.h
WebCore/khtml/rendering/render_box.cpp
WebCore/khtml/rendering/render_br.cpp
WebCore/khtml/rendering/render_br.h
WebCore/khtml/rendering/render_canvas.cpp
WebCore/khtml/rendering/render_canvasimage.cpp
WebCore/khtml/rendering/render_image.cpp
WebCore/khtml/rendering/render_image.h
WebCore/khtml/rendering/render_line.cpp
WebCore/khtml/rendering/render_line.h
WebCore/khtml/rendering/render_object.cpp
WebCore/khtml/rendering/render_object.h
WebCore/khtml/rendering/render_replaced.cpp
WebCore/khtml/rendering/render_replaced.h
WebCore/khtml/rendering/render_text.cpp
WebCore/khtml/rendering/render_text.h
WebCore/kwq/KWQPainter.h
WebCore/kwq/KWQPainter.mm
WebCore/kwq/KWQPtrDict.h
WebCore/kwq/KWQRect.mm
WebCore/kwq/WebCoreTextRenderer.h
WebCore/kwq/WebCoreTextRendererFactory.mm