~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/editing/htmlediting.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090515183058-50q5exjo9b1kxy9s
Tags: 1.1.7-1
* New upstream release
* debian/libwebkit-1.0-2.symbols:
- updated with the new symbols in 1.1.7
* debian/libwebkit-dev.install, debian/libwebkit-dev.links,
  debian/rules:
- Build, and ship gtk-doc documentation (Closes: #526683)
* debian/copyright:
- updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    ASSERT(nodeA);
99
99
    Node* nodeB = b.node();
100
100
    ASSERT(nodeB);
101
 
    int offsetA = a.m_offset;
102
 
    int offsetB = b.m_offset;
 
101
    int offsetA = a.deprecatedEditingOffset();
 
102
    int offsetB = b.deprecatedEditingOffset();
103
103
 
104
104
    Node* shadowAncestorA = nodeA->shadowAncestorNode();
105
105
    if (shadowAncestorA == nodeA)
322
322
 
323
323
    Node* node = pos.node();
324
324
 
325
 
    if (pos.m_offset <= 0) {
 
325
    if (pos.deprecatedEditingOffset() <= 0) {
326
326
        if (node->parentNode() && (editingIgnoresContent(node) || isTableElement(node)))
327
327
            return positionBeforeNode(node);
328
328
        return Position(node, 0);
329
329
    }
330
330
 
331
331
    if (node->offsetInCharacters())
332
 
        return Position(node, min(node->maxCharacterOffset(), pos.m_offset));
 
332
        return Position(node, min(node->maxCharacterOffset(), pos.deprecatedEditingOffset()));
333
333
 
334
334
    int maxCompliantOffset = node->childNodeCount();
335
 
    if (pos.m_offset > maxCompliantOffset) {
 
335
    if (pos.deprecatedEditingOffset() > maxCompliantOffset) {
336
336
        if (node->parentNode())
337
337
            return positionAfterNode(node);
338
338
 
342
342
    } 
343
343
 
344
344
    // Editing should never generate positions like this.
345
 
    if ((pos.m_offset < maxCompliantOffset) && editingIgnoresContent(node)) {
 
345
    if ((pos.deprecatedEditingOffset() < maxCompliantOffset) && editingIgnoresContent(node)) {
346
346
        ASSERT_NOT_REACHED();
347
347
        return node->parentNode() ? positionBeforeNode(node) : Position(node, 0);
348
348
    }
349
349
    
350
 
    if (pos.m_offset == maxCompliantOffset && (editingIgnoresContent(node) || isTableElement(node)))
 
350
    if (pos.deprecatedEditingOffset() == maxCompliantOffset && (editingIgnoresContent(node) || isTableElement(node)))
351
351
        return positionAfterNode(node);
352
352
    
353
353
    return Position(pos);