Reviewed by harrison
<rdar://problem/
4776665>
REGRESSION: In Mail, caret is visible when the message body isn't focused
* editing/selection/
4776665-expected.checksum: Added.
* editing/selection/
4776665-expected.png: Added.
* editing/selection/
4776665-expected.txt: Added.
* editing/selection/
4776665.html: Added.
WebCore:
Reviewed by harrison
<rdar://problem/
4776665>
REGRESSION: In Mail, caret is visible when the message body isn't focused
* page/Frame.cpp:
(WebCore::Frame::paintCaret): If a caret blink timer is ever on in error
(like when the frame that contains the caret isn't focused) then we don't
want to paint the caret. We should eventually move to using a single bool
for caret painting.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17094
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-10-17 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ <rdar://problem/4776665>
+ REGRESSION: In Mail, caret is visible when the message body isn't focused
+
+ * editing/selection/4776665-expected.checksum: Added.
+ * editing/selection/4776665-expected.png: Added.
+ * editing/selection/4776665-expected.txt: Added.
+ * editing/selection/4776665.html: Added.
+
2006-10-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
--- /dev/null
+0b88232a1e7d0bcc3891054d861f116b
\ No newline at end of file
--- /dev/null
+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
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 585x18
+ text run at (0,0) width 217: "This tests for a caret painting bug. "
+ text run at (217,0) width 368: "You should not see a caret in the editable subframe below."
+ RenderBlock (anonymous) at (0,34) size 784x150
+ 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 0x0
--- /dev/null
+<p>This tests for a caret painting bug. You should not see a caret in the editable subframe below.</p>
+<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
+
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.waitUntilDone();
+
+// Wait for the frame to load.
+window.setTimeout(runTest, 200);
+
+function runTest() {
+ var frame = frames[0];
+ var doc = frame.document;
+ var body = doc.body;
+ var sel = frame.getSelection();
+ sel.setPosition(body, 0);
+ if (window.layoutTestController)
+ window.layoutTestController.notifyDone();
+}
+</script>
\ No newline at end of file
+2006-10-17 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ <rdar://problem/4776665>
+ REGRESSION: In Mail, caret is visible when the message body isn't focused
+
+ * page/Frame.cpp:
+ (WebCore::Frame::paintCaret): If a caret blink timer is ever on in error
+ (like when the frame that contains the caret isn't focused) then we don't
+ want to paint the caret. We should eventually move to using a single bool
+ for caret painting.
+
2006-10-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
void Frame::paintCaret(GraphicsContext* p, const IntRect& rect) const
{
- if (d->m_caretPaint)
+ if (d->m_caretPaint && d->m_caretVisible)
selectionController()->paintCaret(p, rect);
}