Diff
Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (103450 => 103451)
--- branches/safari-534.54-branch/LayoutTests/ChangeLog 2011-12-21 22:29:39 UTC (rev 103450)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog 2011-12-21 22:31:48 UTC (rev 103451)
@@ -1,5 +1,18 @@
2011-12-21 Lucas Forschler <[email protected]>
+ Merge 94991
+
+ 2011-09-12 Dan Bernstein <[email protected]>
+
+ <rdar://problem/10054615> Floats in ruby text intrude into the base
+
+ Reviewed by Darin Adler.
+
+ * fast/ruby/float-overhang-from-ruby-text-expected.png: Added.
+ * fast/ruby/float-overhang-from-ruby-text-expected.txt: Added.
+ * fast/ruby/float-overhang-from-ruby-text.html: Added.
+2011-12-21 Lucas Forschler <[email protected]>
+
Merge 94905
2011-09-10 Ken Buchanan <[email protected]>
Copied: branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.png (from rev 94991, trunk/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.png)
(Binary files differ)
Copied: branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.txt (from rev 94991, trunk/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.txt) (0 => 103451)
--- branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.txt (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text-expected.txt 2011-12-21 22:31:48 UTC (rev 103451)
@@ -0,0 +1,23 @@
+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 784x75
+ RenderRuby (inline) {RUBY} at (0,0) size 100x50
+ RenderRubyRun (anonymous) at (0,25) size 100x50
+ RenderRubyText {RT} at (0,-25) size 100x25
+ RenderText {#text} at (50,0) size 25x25
+ text run at (50,0) width 25: "a"
+ RenderBlock (floating) {DIV} at (0,0) size 50x50 [bgcolor=#ADD8E6]
+ RenderRubyBase (anonymous) at (0,0) size 100x50
+ RenderText {#text} at (0,0) size 100x50
+ text run at (0,0) width 100: "aa"
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (0,75) size 784x50
+ RenderRuby (inline) {RUBY} at (0,0) size 100x50
+ RenderRubyRun (anonymous) at (0,0) size 100x50
+ RenderRubyBase (anonymous) at (0,0) size 100x50
+ RenderText {#text} at (0,0) size 100x50
+ text run at (0,0) width 100: "aa"
+ RenderText {#text} at (0,0) size 0x0
Copied: branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text.html (from rev 94991, trunk/LayoutTests/fast/ruby/float-overhang-from-ruby-text.html) (0 => 103451)
--- branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text.html (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/float-overhang-from-ruby-text.html 2011-12-21 22:31:48 UTC (rev 103451)
@@ -0,0 +1,15 @@
+<style>
+ ruby { font-family: ahem; font-size: 50px; -webkit-font-smoothing: none; }
+ .float { height: 50px; width: 50px; float: left; background-color: lightblue; }
+</style>
+<div>
+ <ruby>aa<rt>a<div class="float"></div></rt></ruby>
+</div>
+<div>
+ <ruby>aa<rt id="target">a<div class="float"></div></rt></ruby>
+</div>
+<script>
+ document.body.offsetTop;
+ var target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+</script>
Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (103450 => 103451)
--- branches/safari-534.54-branch/Source/WebCore/ChangeLog 2011-12-21 22:29:39 UTC (rev 103450)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog 2011-12-21 22:31:48 UTC (rev 103451)
@@ -1,5 +1,22 @@
2011-12-21 Lucas Forschler <[email protected]>
+ Merge 94991
+
+ 2011-09-12 Dan Bernstein <[email protected]>
+
+ <rdar://problem/10054615> Floats in ruby text intrude into the base
+
+ Reviewed by Darin Adler.
+
+ Test: fast/ruby/float-overhang-from-ruby-text.html
+
+ * rendering/RenderRubyText.cpp:
+ (WebCore::RenderRubyText::avoidsFloats): Added. Returns true. This ensures that
+ RenderBlock::clearFloats() will not consider ruby text as having intruding floats.
+ * rendering/RenderRubyText.h:
+
+2011-12-21 Lucas Forschler <[email protected]>
+
Merge 94905
2011-09-10 Ken Buchanan <[email protected]>
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.cpp (103450 => 103451)
--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.cpp 2011-12-21 22:29:39 UTC (rev 103450)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.cpp 2011-12-21 22:31:48 UTC (rev 103451)
@@ -81,4 +81,9 @@
logicalWidth -= inset;
}
+bool RenderRubyText::avoidsFloats() const
+{
+ return true;
+}
+
} // namespace WebCore
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.h (103450 => 103451)
--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.h 2011-12-21 22:29:39 UTC (rev 103450)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderRubyText.h 2011-12-21 22:31:48 UTC (rev 103451)
@@ -47,6 +47,8 @@
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
private:
+ virtual bool avoidsFloats() const;
+
virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
virtual void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const;
};