Title: [143365] branches/chromium/1410
- Revision
- 143365
- Author
- le...@chromium.org
- Date
- 2013-02-19 11:34:35 -0800 (Tue, 19 Feb 2013)
Log Message
Merge 142793
> 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.
>
TBR=le...@chromium.org
Review URL: https://codereview.chromium.org/12308006
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt (from rev 142793, trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt) (0 => 143365)
--- branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace-expected.txt 2013-02-19 19:34:35 UTC (rev 143365)
@@ -0,0 +1,2 @@
+123 456 789
+PASS
Copied: branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html (from rev 142793, trunk/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html) (0 => 143365)
--- branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/text/content-following-inline-isolate-with-collapsed-whitespace.html 2013-02-19 19:34:35 UTC (rev 143365)
@@ -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: branches/chromium/1410/Source/WebCore/rendering/InlineIterator.h (143364 => 143365)
--- branches/chromium/1410/Source/WebCore/rendering/InlineIterator.h 2013-02-19 19:29:42 UTC (rev 143364)
+++ branches/chromium/1410/Source/WebCore/rendering/InlineIterator.h 2013-02-19 19:34:35 UTC (rev 143365)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes