Source/WebCore/ChangeLog

 12011-03-17 ChangSeok Oh <shivamidow@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Wrong tab focused region
 6 https://bugs.webkit.org/show_bug.cgi?id=52952
 7
 8 Fix wrong outline of focused anchor node.
 9 The outline region of anchor node which has image node is smaller than expected region, when the anchor node is focused.
 10 All child nodes of anchor node have been considered as text node.
 11 So font height is only calculated to get top position.
 12 To fix this, Some lines are added to get maxium line height and to recalulate top position.
 13
 14 Test: fast/repaint/outline-focus-anchor-image.html
 15
 16 * rendering/RenderInline.cpp:
 17 (WebCore::RenderInline::paintOutline):
 18 (WebCore::RenderInline::paintOutlineForLine):
 19
1202011-03-16 Stephen White <senorblanco@chromium.org>
221
322 Reviewed by Kenneth Russell.
81353

Source/WebCore/rendering/RenderInline.cpp

@@void RenderInline::paintOutline(Graphics
10271027 return;
10281028
10291029 Vector<IntRect> rects;
1030 
 1030
10311031 rects.append(IntRect());
10321032 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
10331033 RootInlineBox* root = curr->root();
10341034 int top = max(root->lineTop(), curr->logicalTop());
10351035 int bottom = min(root->lineBottom(), curr->logicalBottom());
1036  rects.append(IntRect(curr->x(), top, curr->logicalWidth(), bottom - top));
 1036 int height = max(bottom - top, root->lineBottom() - root->lineTop());
 1037 rects.append(IntRect(curr->x(), bottom - height, curr->logicalWidth(), height));
10371038 }
10381039 rects.append(IntRect());
10391040

@@void RenderInline::paintOutlineForLine(G
10551056 int l = tx + thisline.x() - offset;
10561057 int b = ty + thisline.maxY() + offset;
10571058 int r = tx + thisline.maxX() + offset;
1058 
 1059
10591060 // left edge
10601061 drawLineForBoxSide(graphicsContext,
10611062 l - ow,
81353

LayoutTests/ChangeLog

 12011-03-17 ChangSeok Oh <shivamidow@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Wrong tab focused region
 6 https://bugs.webkit.org/show_bug.cgi?id=52952
 7
 8 Test that the outline of anchor node which has non-text child node like image node.
 9 Layout test wouldn't verify this. Pixel test is valid.
 10
 11 * fast/repaint/outline-focus-anchor-image.html: Added.
 12 * platform/mac/fast/repaint/outline-focus-anchor-image-expected.png: Added.
 13 * platform/mac/fast/repaint/outline-focus-anchor-image-expected.txt: Added.
 14
1152011-03-17 Philippe Normand <pnormand@igalia.com>
216
317 Unreviewed, skip fast/reflections/abs-position-in-reflection.html on GTK
81353

LayoutTests/fast/repaint/outline-focus-anchor-image.html

 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 2<html>
 3 <head>
 4 <title>CSS 2.1 Test Suite: outline</title>
 5 <link rel="help" href="http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines">
 6 <style>
 7 a:focus { outline: 3px solid red; }
 8 </style>
 9 <script>
 10 function runTest()
 11 {
 12 var parentAnchor = document.getElementById('ID_parentAnchor');
 13 parentAnchor.focus();
 14 }
 15 </script>
 16 </head>
 17 <body onload="runTest();" style="background-color:#000000;">
 18 <a id="ID_parentAnchor" href="#">
 19 <img src="resources/apple.jpg" />
 20 </a>
 21 </body>
 22</html>
0

LayoutTests/platform/mac/fast/repaint/outline-focus-anchor-image-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x252
 4 RenderBlock {HTML} at (0,0) size 800x252
 5 RenderBody {BODY} at (8,8) size 784x236 [bgcolor=#000000]
 6 RenderInline {A} at (0,0) size 214x18 [color=#0000EE]
 7 RenderText {#text} at (0,0) size 0x0
 8 RenderImage {IMG} at (0,0) size 214x232
 9 RenderText {#text} at (0,0) size 0x0
 10 RenderText {#text} at (0,0) size 0x0
0

LayoutTests/platform/mac/fast/repaint/outline-focus-anchor-image-expected.png

INVALID: Image lacks a checksum. This will fail with a MISSING error in run-webkit-tests. Always generate new png files using run-webkit-tests.