Skip to content
Permalink
Browse files
LayoutTests:
        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.



Canonical link: https://commits.webkit.org/14363@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Justin Garcia committed Oct 18, 2006
1 parent a3088b2 commit 4e684a51c5a04addfa7dca7b0b1cad4b1450f066
Showing 7 changed files with 65 additions and 1 deletion.
@@ -1,3 +1,15 @@
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
@@ -0,0 +1 @@
0b88232a1e7d0bcc3891054d861f116b
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,18 @@
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
@@ -0,0 +1,20 @@
<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>
@@ -1,3 +1,16 @@
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
@@ -1410,7 +1410,7 @@ void Frame::caretBlinkTimerFired(Timer<Frame>*)

void Frame::paintCaret(GraphicsContext* p, const IntRect& rect) const
{
if (d->m_caretPaint)
if (d->m_caretPaint && d->m_caretVisible)
selectionController()->paintCaret(p, rect);
}

0 comments on commit 4e684a5

Please sign in to comment.