Changeset 82533 in webkit
- Timestamp:
- Mar 30, 2011 7:08:34 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r82529 r82533 1 2011-03-30 Jia Pu <jpu@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Autocorrection panel isn't positioned correctly in Safari (mac) when the zooming is not 1x. 6 https://bugs.webkit.org/show_bug.cgi?id=57353 7 <rdar://problem/9163983> 8 9 Updated following test in response to recent change in AppKit spell checker. 10 11 * platform/mac/editing/spelling/delete-autocorrected-word-1-expected.txt: 12 * platform/mac/editing/spelling/delete-autocorrected-word-1.html: 13 1 14 2011-03-30 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/LayoutTests/platform/mac/editing/spelling/delete-autocorrected-word-1-expected.txt
r80226 r82533 46 46 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 47 47 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 48 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 49 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 48 50 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 49 51 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 50 52 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 51 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 52 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 53 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 54 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 55 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 56 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 57 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 58 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document toDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 59 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 60 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 61 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 62 EDITING DELEGATE: shouldInsertText:message replacingDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped 63 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 64 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 53 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 54 EDITING DELEGATE: shouldInsertText:message replacingDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped 55 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 56 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 65 57 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 66 58 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/spelling/delete-autocorrected-word-1.html
r73088 r82533 21 21 typeCharacterCommand('e'); 22 22 typeCharacterCommand('s'); 23 typeCharacterCommand('s');24 23 typeCharacterCommand('a'); 25 24 typeCharacterCommand('g'); 26 typeCharacterCommand('e');27 25 typeCharacterCommand('e'); 28 26 typeCharacterCommand(' '); -
trunk/Source/WebCore/ChangeLog
r82532 r82533 1 2011-03-30 Jia Pu <jpu@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Autocorrection panel isn't positioned correctly in Safari (mac) when the zooming is not 1x. 6 https://bugs.webkit.org/show_bug.cgi?id=57353 7 <rdar://problem/9163983> 8 9 We use Range::textQuads() instead of Range::boundingRect() to compute the position of correction 10 panel. The latter function compensates for zooming, which we don't need in this case. We also 11 dismiss correction panel when zooming factor is changed. This is done in Frame::setPageAndTextZoomFactors(). 12 13 * WebCore.exp.in: 14 * dom/Range.cpp: 15 (WebCore::Range::textQuads): 16 * dom/Range.h: 17 * editing/Editor.cpp: 18 (WebCore::Editor::windowRectForRange): 19 * editing/Editor.h: 20 * page/Frame.cpp: 21 (WebCore::Frame::setPageAndTextZoomFactors): 22 1 23 2011-03-30 Chris Guillory <chris.guillory@google.com> 2 24 -
trunk/Source/WebCore/WebCore.exp.in
r82492 r82533 725 725 __ZN7WebCore5Range6setEndEN3WTF10PassRefPtrINS_4NodeEEEiRi 726 726 __ZN7WebCore5Range8setStartEN3WTF10PassRefPtrINS_4NodeEEEiRi 727 __ZN7WebCore5Range9textQuadsERN3WTF6VectorINS_9FloatQuadELm0EEEb728 727 __ZN7WebCore5Range9textRectsERN3WTF6VectorINS_7IntRectELm0EEEb 729 728 __ZN7WebCore5RangeD1Ev … … 1001 1000 __ZNK3JSC8Bindings10RootObject12globalObjectEv 1002 1001 __ZNK3WTF6String14createCFStringEv 1002 __ZNK7WebCore5Range9textQuadsERN3WTF6VectorINS_9FloatQuadELm0EEEb 1003 1003 __ZNK7WebCore10Credential11persistenceEv 1004 1004 __ZNK7WebCore10Credential4userEv -
trunk/Source/WebCore/dom/Range.cpp
r80696 r82533 1621 1621 } 1622 1622 1623 void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight) 1623 void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight) const 1624 1624 { 1625 1625 Node* startContainer = m_start.container(); -
trunk/Source/WebCore/dom/Range.h
r80408 r82533 110 110 void textRects(Vector<IntRect>&, bool useSelectionHeight = false); 111 111 // Transform-friendly 112 void textQuads(Vector<FloatQuad>&, bool useSelectionHeight = false) ;112 void textQuads(Vector<FloatQuad>&, bool useSelectionHeight = false) const; 113 113 void getBorderAndTextQuads(Vector<FloatQuad>&) const; 114 114 FloatRect boundingRect() const; -
trunk/Source/WebCore/editing/Editor.cpp
r82503 r82533 3594 3594 { 3595 3595 FrameView* view = frame()->view(); 3596 return view ? view->contentsToWindow(IntRect(range->boundingRect())) : FloatRect(); 3596 if (!view) 3597 return FloatRect(); 3598 Vector<FloatQuad> textQuads; 3599 range->textQuads(textQuads); 3600 FloatRect boundingRect; 3601 size_t size = textQuads.size(); 3602 for (size_t i = 0; i < size; ++i) 3603 boundingRect.unite(textQuads[i].boundingBox()); 3604 return view->contentsToWindow(IntRect(boundingRect)); 3597 3605 } 3598 3606 -
trunk/Source/WebCore/editing/Editor.h
r82159 r82533 327 327 // If user confirmed a correction in the correction panel, correction has non-zero length, otherwise it means that user has dismissed the panel. 328 328 void handleCorrectionPanelResult(const String& correction); 329 void dismissCorrectionPanel(ReasonForDismissingCorrectionPanel); 329 330 330 331 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool matchStyle); … … 427 428 Node* findEventTargetFromSelection() const; 428 429 void stopCorrectionPanelTimer(); 429 void dismissCorrectionPanel(ReasonForDismissingCorrectionPanel);430 430 String dismissCorrectionPanelSoon(ReasonForDismissingCorrectionPanel); 431 431 void applyCorrectionPanelInfo(const Vector<DocumentMarker::MarkerType>& markerTypesToAdd); -
trunk/Source/WebCore/page/Frame.cpp
r81603 r82533 944 944 return; 945 945 946 m_editor.dismissCorrectionPanel(ReasonForDismissingCorrectionPanelIgnored); 947 946 948 #if ENABLE(SVG) 947 949 // Respect SVGs zoomAndPan="disabled" property in standalone SVG documents.
Note: See TracChangeset
for help on using the changeset viewer.