~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/editing/Editor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
832
832
                TriState nodeState = triStateOfStyleInComputedStyle(style, nodeStyle.get(), !node->isTextNode());
833
833
                if (node == m_frame->selection()->start().node())
834
834
                    state = nodeState;
835
 
                else if (state != nodeState) {
 
835
                else if (state != nodeState && node->isTextNode()) {
836
836
                    state = MixedTriState;
837
837
                    break;
838
838
                }
1391
1391
 
1392
1392
    insertText(text, 0);
1393
1393
 
1394
 
    if (preserveSelection)
 
1394
    if (preserveSelection) {
1395
1395
        m_frame->selection()->setSelection(oldSelection, false, false);
 
1396
        // An open typing command that disagrees about current selection would cause issues with typing later on.
 
1397
        TypingCommand::closeTyping(m_lastEditCommand.get());
 
1398
    }
1396
1399
 
1397
1400
    setIgnoreCompositionSelectionChange(false);
1398
1401
}
1813
1816
        }
1814
1817
        if (lastIteration || totalLengthProcessed + currentLength >= totalRangeLength)
1815
1818
            break;
1816
 
        setStart(paragraphRange.get(), startOfNextParagraph(paragraphRange->endPosition()));
1817
 
        setEnd(paragraphRange.get(), endOfParagraph(paragraphRange->startPosition()));
 
1819
        VisiblePosition newParagraphStart = startOfNextParagraph(paragraphRange->endPosition());
 
1820
        setStart(paragraphRange.get(), newParagraphStart);
 
1821
        setEnd(paragraphRange.get(), endOfParagraph(newParagraphStart));
1818
1822
        firstIteration = false;
1819
1823
        totalLengthProcessed += currentLength;
1820
1824
    }
2752
2756
        return true;
2753
2757
    
2754
2758
    RenderPart* renderer = frame->ownerRenderer();
 
2759
    if (!renderer)
 
2760
        return false;
 
2761
 
2755
2762
    RenderBlock* container = renderer->containingBlock();
2756
2763
    if (!(container->style()->overflowX() == OHIDDEN || container->style()->overflowY() == OHIDDEN))
2757
2764
        return true;
2778
2785
        return true;
2779
2786
    
2780
2787
    RenderPart* renderer = frame->ownerRenderer();
 
2788
    if (!renderer)
 
2789
        return false;
 
2790
 
2781
2791
    RenderBlock* container = renderer->containingBlock();
2782
2792
    if (!(container->style()->overflowX() == OHIDDEN || container->style()->overflowY() == OHIDDEN))
2783
2793
        return true;