Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
LayoutTests:
Reviewed by harrison <rdar://problem/4774354> REGRESSION: In Gmail, caret reappears when dragging a selection over some text in the message body * fast/repaint/4774354-expected.checksum: Added. * fast/repaint/4774354-expected.png: Added. * fast/repaint/4774354-expected.txt: Added. * fast/repaint/4774354.html: Added. * fast/repaint/resources/contenteditable-iframe-src.html: Added. WebCore: Reviewed by harrison <rdar://problem/4774354> REGRESSION: In Gmail, caret reappears when dragging a selection over some text in the message body Functions call recomputCaretRect to see if the caret rect has changed, and, if it has, they invalidate (repaint) it. recomputeCaretRect was returning false if the caret turned into a range selection or was blown away. * editing/SelectionController.cpp: (WebCore::SelectionController::recomputeCaretRect): Don't early return if !isCaret(). Obtain the FrameView* using the m_frame pointer, because m_sel may now be null. Canonical link: https://commits.webkit.org/14362@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Justin Garcia
committed
Oct 17, 2006
1 parent
87f031b
commit a3088b2a3a2d1087540c09e1928c0dba58e58dbd
Showing
8 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1 @@ | ||
880c8befe324d3f8ff20cd55676a182b |
BIN
+7.33 KB
LayoutTests/fast/repaint/4774354-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,21 @@ | ||
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 1 of BODY > HTML > #document | ||
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification | ||
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification | ||
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 40 of #text > BODY > HTML > #document to 40 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE | ||
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification | ||
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification | ||
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x600 | ||
RenderBlock {HTML} at (0,0) size 800x600 | ||
RenderBody {BODY} at (8,8) size 784x584 | ||
RenderPartObject {IFRAME} at (0,0) size 300x150 | ||
layer at (0,0) size 300x150 | ||
RenderView at (0,0) size 300x150 | ||
layer at (0,0) size 300x150 | ||
RenderBlock {HTML} at (0,0) size 300x150 | ||
RenderBody {BODY} at (8,8) size 284x134 [bgcolor=#FFFFE0] | ||
RenderText {#text} at (0,0) size 240x18 | ||
text run at (0,0) width 240: "You should not see a caret in this text." | ||
RenderText {#text} at (0,0) size 0x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,41 @@ | ||
<script src="repaint.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
|
||
function step1() { | ||
if (window.layoutTestController) | ||
window.layoutTestController.waitUntilDone(); | ||
// Wait for the frame to load. | ||
window.setTimeout(step2, 100); | ||
} | ||
|
||
function step2() { | ||
var frame = frames[0]; | ||
var doc = frame.document; | ||
var body = doc.body; | ||
var sel = frame.getSelection(); | ||
frame.focus(); | ||
sel.setPosition(body, 0); | ||
doc.execCommand("InsertText", false, "You should not see a caret in this text."); | ||
var text = body.firstChild; | ||
sel.setPosition(text, text.length); | ||
// Wait for the caret to paint. | ||
window.setTimeout(runRepaintTest, 100); | ||
} | ||
|
||
function repaintTest() { | ||
var frame = frames[0]; | ||
var doc = frame.document; | ||
var body = doc.body; | ||
var text = body.firstChild; | ||
var sel = frame.getSelection(); | ||
|
||
sel.setBaseAndExtent(text, 5, text, text.length); | ||
|
||
if (window.layoutTestController) | ||
window.layoutTestController.notifyDone(); | ||
} | ||
</script> | ||
|
||
<body onload="step1();"> | ||
<iframe src="resources/contenteditable-iframe-src.html"></iframe> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1 @@ | ||
<body bgcolor="lightyellow" contenteditable></body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters