Title: [142793] trunk
- Revision
- 142793
- Author
- [email protected]
- Date
- 2013-02-13 13:55:24 -0800 (Wed, 13 Feb 2013)
Log Message
Bidi-Isolated inlines can cause subsequent content to not be rendered
https://bugs.webkit.org/show_bug.cgi?id=108137
Reviewed by Eric Seidel.
Source/WebCore:
First step in fixing how inline isolates behave with collapsed spaces.
webkit.org/b/109624 tracks the overarching issue.
Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
* rendering/InlineIterator.h:
(WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
ignoring spaces, ensure we leave it considering them again. This can result in
including spaces that should be ignored following the isolate on the line, but
failing to do so results in those contents not being rendered at all.
LayoutTests:
* fast/text/content-following-inline-isolate-with-collapsed-whitespace.html: Added.
* fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (142792 => 142793)
--- trunk/LayoutTests/ChangeLog 2013-02-13 21:49:23 UTC (rev 142792)
+++ trunk/LayoutTests/ChangeLog 2013-02-13 21:55:24 UTC (rev 142793)
@@ -1,3 +1,13 @@
+2013-02-13 Levi Weintraub <[email protected]>
+
+ Bidi-Isolated inlines can cause subsequent content to not be rendered
+ https://bugs.webkit.org/show_bug.cgi?id=108137
+
+ Reviewed by Eric Seidel.
+
+ * fast/text/content-following-inline-isolate-with-collapsed-whitespace.html: Added.
+ * fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt: Added.
+
2013-02-13 Christian Biesinger <[email protected]>
Crash when encountering <object style="resize:both;">
Added: trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt (0 => 142793)
--- trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt 2013-02-13 21:55:24 UTC (rev 142793)
@@ -0,0 +1,2 @@
+123 456 789
+PASS
Added: trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html (0 => 142793)
--- trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html (rev 0)
+++ trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html 2013-02-13 21:55:24 UTC (rev 142793)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<body>
+<p><span data-expected-width="80" id="test">123
+ <span style="unicode-bidi: -webkit-isolate">456</span> 789</span></p>
+<script src=""
+<script>
+checkLayout('#test');
+</script>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (142792 => 142793)
--- trunk/Source/WebCore/ChangeLog 2013-02-13 21:49:23 UTC (rev 142792)
+++ trunk/Source/WebCore/ChangeLog 2013-02-13 21:55:24 UTC (rev 142793)
@@ -1,3 +1,21 @@
+2013-02-13 Levi Weintraub <[email protected]>
+
+ Bidi-Isolated inlines can cause subsequent content to not be rendered
+ https://bugs.webkit.org/show_bug.cgi?id=108137
+
+ Reviewed by Eric Seidel.
+
+ First step in fixing how inline isolates behave with collapsed spaces.
+ webkit.org/b/109624 tracks the overarching issue.
+
+ Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
+
+ * rendering/InlineIterator.h:
+ (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
+ ignoring spaces, ensure we leave it considering them again. This can result in
+ including spaces that should be ignored following the isolate on the line, but
+ failing to do so results in those contents not being rendered at all.
+
2013-02-13 Andreas Kling <[email protected]>
Better names for ElementAttributeData & subclasses.
Modified: trunk/Source/WebCore/rendering/InlineIterator.h (142792 => 142793)
--- trunk/Source/WebCore/rendering/InlineIterator.h 2013-02-13 21:49:23 UTC (rev 142792)
+++ trunk/Source/WebCore/rendering/InlineIterator.h 2013-02-13 21:55:24 UTC (rev 142793)
@@ -489,6 +489,14 @@
// We don't need to mark the end of the run because this is implicit: it is either endOfLine or the end of the
// isolate, when we call createBidiRunsForLine it will stop at whichever comes first.
addPlaceholderRunForIsolatedInline(resolver, obj, pos);
+ // FIXME: Inline isolates don't work properly with collapsing whitespace, see webkit.org/b/109624
+ // For now, if we enter an isolate between midpoints, we increment our current midpoint or else
+ // we'll leave the isolate and ignore the content that follows.
+ MidpointState<InlineIterator>& midpointState = resolver.midpointState();
+ if (midpointState.betweenMidpoints && midpointState.midpoints[midpointState.currentMidpoint].object() == obj) {
+ midpointState.betweenMidpoints = false;
+ ++midpointState.currentMidpoint;
+ }
}
private:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes