Diff
Modified: branches/safari-534-branch/LayoutTests/ChangeLog (87218 => 87219)
--- branches/safari-534-branch/LayoutTests/ChangeLog 2011-05-24 22:22:26 UTC (rev 87218)
+++ branches/safari-534-branch/LayoutTests/ChangeLog 2011-05-24 22:23:58 UTC (rev 87219)
@@ -1,5 +1,20 @@
2011-05-24 Lucas Forschler <lforsch...@apple.com>
+ Merged r87026.
+
+ 2011-05-21 Dan Bernstein <m...@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
+ https://bugs.webkit.org/show_bug.cgi?id=61241
+
+ * fast/block/positioning/start-ignoring-before-expected.png: Added.
+ * fast/block/positioning/start-ignoring-before-expected.txt: Added.
+ * fast/block/positioning/start-ignoring-before.html: Added.
+
+2011-05-24 Lucas Forschler <lforsch...@apple.com>
+
Merged r87009.
2011-05-20 Simon Fraser <simon.fra...@apple.com>
Copied: branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before-expected.png (from rev 87026, trunk/LayoutTests/fast/block/positioning/start-ignoring-before-expected.png)
(Binary files differ)
Copied: branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before-expected.txt (from rev 87026, trunk/LayoutTests/fast/block/positioning/start-ignoring-before-expected.txt) (0 => 87219)
--- branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before-expected.txt (rev 0)
+++ branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before-expected.txt 2011-05-24 22:23:58 UTC (rev 87219)
@@ -0,0 +1,15 @@
+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 {DIV} at (0,0) size 784x50
+ RenderText {#text} at (0,0) size 100x50
+ text run at (0,0) width 100: "X "
+ RenderText {#text} at (0,0) size 0x0
+ RenderInline {SPAN} at (0,0) size 50x50 [color=#FF0000]
+ RenderText {#text} at (100,0) size 50x50
+ text run at (100,0) width 50: "Y"
+ RenderText {#text} at (0,0) size 0x0
+layer at (108,8) size 50x50
+ RenderImage {IMG} at (108,8) size 50x50 [bgcolor=#008000]
Copied: branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before.html (from rev 87026, trunk/LayoutTests/fast/block/positioning/start-ignoring-before.html) (0 => 87219)
--- branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before.html (rev 0)
+++ branches/safari-534-branch/LayoutTests/fast/block/positioning/start-ignoring-before.html 2011-05-24 22:23:58 UTC (rev 87219)
@@ -0,0 +1,3 @@
+<div style="font: 50px ahem; -webkit-font-smoothing: none;">
+ X <img style="position: absolute; width: 50px; height: 50px; background-color: green;"> <span style="color: red;">Y</span>
+</div>
Modified: branches/safari-534-branch/Source/WebCore/ChangeLog (87218 => 87219)
--- branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-24 22:22:26 UTC (rev 87218)
+++ branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-24 22:23:58 UTC (rev 87219)
@@ -1,5 +1,25 @@
2011-05-24 Lucas Forschler <lforsch...@apple.com>
+ Merged r87026.
+
+ 2011-05-21 Dan Bernstein <m...@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
+ https://bugs.webkit.org/show_bug.cgi?id=61241
+
+ Test: fast/block/positioning/start-ignoring-before.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
+ whether to merge the first trailing space with the line break.
+ (WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
+ character, account for trailing positioned objects that occurred after the midpoint by calling
+ updateMidpointsForTrailingBoxes(), which adds midpoints for them.
+
+2011-05-24 Lucas Forschler <lforsch...@apple.com>
+
Merged r87009.
2011-05-20 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-534-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (87218 => 87219)
--- branches/safari-534-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2011-05-24 22:22:26 UTC (rev 87218)
+++ branches/safari-534-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2011-05-24 22:23:58 UTC (rev 87219)
@@ -1744,8 +1744,11 @@
void setTrailingWhitespace(RenderText*);
void clear();
void appendBoxIfNeeded(RenderBox*);
- void updateMidpointsForTrailingBoxes(LineMidpointState&, const InlineIterator& lBreak);
+ enum CollapseFirstSpaceOrNot { DoNotCollapseFirstSpace, CollapseFirstSpace };
+
+ void updateMidpointsForTrailingBoxes(LineMidpointState&, const InlineIterator& lBreak, CollapseFirstSpaceOrNot);
+
private:
RenderText* m_whitespace;
Vector<RenderBox*, 4> m_boxes;
@@ -1774,7 +1777,7 @@
m_boxes.append(box);
}
-void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMidpointState, const InlineIterator& lBreak)
+void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMidpointState, const InlineIterator& lBreak, CollapseFirstSpaceOrNot collapseFirstSpace)
{
if (!m_whitespace)
return;
@@ -1786,7 +1789,8 @@
int trailingSpaceMidpoint = lineMidpointState.numMidpoints - 1;
for ( ; trailingSpaceMidpoint >= 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { }
ASSERT(trailingSpaceMidpoint >= 0);
- lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
+ if (collapseFirstSpace == CollapseFirstSpace)
+ lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
// Now make sure every single trailingPositionedBox following the trailingSpaceMidpoint properly stops and starts
// ignoring spaces.
@@ -1805,6 +1809,7 @@
}
} else if (!lBreak.m_obj) {
ASSERT(m_whitespace->isText());
+ ASSERT(collapseFirstSpace == CollapseFirstSpace);
// Add a new end midpoint that stops right at the very end.
unsigned length = m_whitespace->textLength();
unsigned pos = length >= 2 ? length - 2 : UINT_MAX;
@@ -2212,6 +2217,7 @@
// spaces. Create a midpoint to terminate the run
// before the second space.
addMidpoint(lineMidpointState, ignoreStart);
+ trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, InlineIterator(), TrailingObjects::DoNotCollapseFirstSpace);
}
}
} else if (ignoringSpaces) {
@@ -2360,7 +2366,7 @@
// Sanity check our midpoints.
checkMidpoints(lineMidpointState, lBreak);
- trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, lBreak);
+ trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, lBreak, TrailingObjects::CollapseFirstSpace);
// We might have made lBreak an iterator that points past the end
// of the object. Do this adjustment to make it point to the start