Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/128013@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
leviw committed Feb 13, 2013
1 parent 89b7d40 commit 08e062b3ab730e93751debd0a604412f1dbba430
Showing 5 changed files with 46 additions and 0 deletions.
@@ -1,3 +1,13 @@
2013-02-13 Levi Weintraub <leviw@chromium.org>

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 <cbiesinger@chromium.org>

Crash when encountering <object style="resize:both;">
@@ -0,0 +1,2 @@
123 456 789
PASS
@@ -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="../../resources/check-layout.js"></script>
<script>
checkLayout('#test');
</script>
@@ -1,3 +1,21 @@
2013-02-13 Levi Weintraub <leviw@chromium.org>

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 <akling@apple.com>

Better names for ElementAttributeData & subclasses.
@@ -489,6 +489,14 @@ class IsolateTracker {
// 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:

0 comments on commit 08e062b

Please sign in to comment.