Changeset 30222 in webkit


Ignore:
Timestamp:
Feb 13, 2008 9:14:32 PM (16 years ago)
Author:
justin.garcia@apple.com
Message:

WebCore:

Reviewed by Oliver Hunt.

Fixes the editing/deleting/5729680.html failure. It succeeds when run by itself
but fails when run with other tests because FramePrivate's m_selectionGranularity
isn't reset when a Frame receives a new document. It was also uninitialized in
the constructor.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
  • page/Frame.cpp: (WebCore::FramePrivate::FramePrivate): Ditto.

LayoutTests:

Reviewed by Oliver Hunt.

  • platform/mac/editing/deleting/table-cells-expected.checksum: Fixed. Before, a space was incorrectly removed by a delete (this isn't a smart delete).
  • platform/mac/editing/deleting/table-cells-expected.png:
  • platform/mac/editing/deleting/table-cells-expected.txt:
  • platform/mac/editing/pasteboard/input-field-1-expected.checksum: Fixed. Before a space was incorrectly added by paste (this isn't a smart paste).
  • platform/mac/editing/pasteboard/input-field-1-expected.png:
  • platform/mac/editing/pasteboard/input-field-1-expected.txt:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r30213 r30222  
     12008-02-13  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        * platform/mac/editing/deleting/table-cells-expected.checksum: Fixed.  Before, a space was
     6        incorrectly removed by a delete (this isn't a smart delete).
     7        * platform/mac/editing/deleting/table-cells-expected.png:
     8        * platform/mac/editing/deleting/table-cells-expected.txt:
     9        * platform/mac/editing/pasteboard/input-field-1-expected.checksum: Fixed.  Before a space
     10        was incorrectly added by paste (this isn't a smart paste).
     11        * platform/mac/editing/pasteboard/input-field-1-expected.png:
     12        * platform/mac/editing/pasteboard/input-field-1-expected.txt:
     13
    1142008-02-13  Justin Garcia  <justin.garcia@apple.com>
    215
  • trunk/LayoutTests/platform/mac/editing/deleting/table-cells-expected.checksum

    r26026 r30222  
    1 2bfd38c0cc5e010d26b1e1fbdf14b97c
     143c60d58c10e76d533d9cd838ede28f6
  • trunk/LayoutTests/platform/mac/editing/deleting/table-cells-expected.txt

    r25970 r30222  
    1717          text run at (361,0) width 356: "Just table content should be removed, not table structure."
    1818      RenderBlock {DIV} at (0,34) size 784x28
    19         RenderTable {TABLE} at (0,0) size 339x28 [border: (1px outset #808080)]
    20           RenderTableSection {TBODY} at (1,1) size 337x26
    21             RenderTableRow {TR} at (0,2) size 337x22
     19        RenderTable {TABLE} at (0,0) size 343x28 [border: (1px outset #808080)]
     20          RenderTableSection {TBODY} at (1,1) size 341x26
     21            RenderTableRow {TR} at (0,2) size 341x22
    2222              RenderTableCell {TD} at (2,2) size 157x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    2323                RenderBlock {DIV} at (2,2) size 153x18
    2424                  RenderText {#text} at (0,0) size 153x18
    2525                    text run at (0,0) width 153: "These two pieces of text"
    26               RenderTableCell {TD} at (161,2) size 174x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    27                 RenderBlock {DIV} at (2,2) size 170x18
    28                   RenderText {#text} at (0,0) size 170x18
    29                     text run at (0,0) width 170: "should be in different cells."
     26              RenderTableCell {TD} at (161,2) size 178x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     27                RenderBlock {DIV} at (2,2) size 174x18
     28                  RenderText {#text} at (0,0) size 174x18
     29                    text run at (0,0) width 174: " should be in different cells."
    3030caret: position 24 of child 0 {#text} of child 0 {DIV} of child 0 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
  • trunk/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.checksum

    r26026 r30222  
    1 e2201948c8f18f6cbac481644c9b9cd5
     15d89ee1b21bccf168d20cdc8d191b5ac
  • trunk/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt

    r25970 r30222  
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    77EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    8 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 3 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     8EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 2 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    99EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1010EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     
    1919      RenderBlock {DIV} at (0,34) size 784x23
    2020        RenderTextControl {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    21         RenderText {#text} at (152,2) size 4x18
    22           text run at (152,2) width 4: " "
    23         RenderTextControl {INPUT} at (158,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     21        RenderTextControl {INPUT} at (154,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2422      RenderBlock {UL} at (0,73) size 784x18
    2523        RenderListItem {LI} at (40,0) size 744x18
     
    2927layer at (13,47) size 142x13
    3028  RenderBlock {DIV} at (3,3) size 142x13
    31 layer at (169,47) size 142x13
     29layer at (165,47) size 142x13
    3230  RenderBlock {DIV} at (3,3) size 142x13
    33 caret: position 1 of child 2 {INPUT} of child 2 {DIV} of child 2 {BODY} of child 0 {HTML} of document
     31caret: position 1 of child 1 {INPUT} of child 2 {DIV} of child 2 {BODY} of child 0 {HTML} of document
  • trunk/WebCore/ChangeLog

    r30218 r30222  
     12008-02-13  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Fixes the editing/deleting/5729680.html failure.  It succeeds when run by itself
     6        but fails when run with other tests because FramePrivate's m_selectionGranularity
     7        isn't reset when a Frame receives a new document.  It was also uninitialized in
     8        the constructor.
     9
     10        * loader/FrameLoader.cpp:
     11        (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
     12        * page/Frame.cpp:
     13        (WebCore::FramePrivate::FramePrivate): Ditto.
     14
    1152008-02-13  Jon Honeycutt  <jhoneycutt@apple.com>
    216
  • trunk/WebCore/loader/FrameLoader.cpp

    r30101 r30222  
    809809    if (m_frame->view())
    810810        m_frame->view()->clear();
     811   
     812    m_frame->setSelectionGranularity(CharacterGranularity);
    811813
    812814    // Do not drop the document before the script proxy and view are cleared, as some destructors
  • trunk/WebCore/page/Frame.cpp

    r30122 r30222  
    18581858    , m_jscript(0)
    18591859    , m_zoomFactor(parent ? parent->d->m_zoomFactor : 100)
     1860    , m_selectionGranularity(CharacterGranularity)
    18601861    , m_selectionController(thisFrame)
    18611862    , m_caretBlinkTimer(thisFrame, &Frame::caretBlinkTimerFired)
Note: See TracChangeset for help on using the changeset viewer.