[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

Source/WebCore/rendering/InlineIterator.h

@@static inline void notifyObserverEntered
131131 // Thus we ignore any possible dir= attribute on the span.
132132 return;
133133 }
134  if (unicodeBidi == Isolate) {
 134 if (unicodeBidi == Isolate || unicodeBidi == Plaintext) {
135135 observer->enterIsolate();
136136 // Embedding/Override characters implied by dir= are handled when
137137 // we process the isolated span, not when laying out the "parent" run.
138138 return;
139139 }
140140
141  // FIXME: Should unicode-bidi: plaintext really be embedding override/embed characters here?
142141 if (!observer->inIsolate())
143142 observer->embed(embedCharFromDirection(style->direction(), unicodeBidi), FromStyleOrDOM);
144143}

@@static inline void notifyObserverWillExi
152151 EUnicodeBidi unicodeBidi = object->style()->unicodeBidi();
153152 if (unicodeBidi == UBNormal)
154153 return; // Nothing to do for unicode-bidi: normal
155  if (unicodeBidi == Isolate) {
 154 if (unicodeBidi == Isolate || unicodeBidi == Plaintext) {
156155 observer->exitIsolate();
157156 return;
158157 }

@@inline void InlineBidiResolver::incremen
392391static inline bool isIsolatedInline(RenderObject* object)
393392{
394393 ASSERT(object);
395  return object->isRenderInline() && object->style()->unicodeBidi() == Isolate;
 394 return object->isRenderInline() && (object->style()->unicodeBidi() == Isolate || object->style()->unicodeBidi() == Plaintext);
396395}
397396
398397static inline RenderObject* containingIsolate(RenderObject* object, RenderObject* root)
101412

Source/WebCore/rendering/RenderBlockLineLayout.cpp

@@static LayoutUnit inlineLogicalWidth(Ren
253253 return extraWidth;
254254}
255255
256 static void determineParagraphDirection(TextDirection& dir, InlineIterator iter)
 256static void determineDirectionality(TextDirection& dir, InlineIterator iter)
257257{
258258 while (!iter.atEnd()) {
259259 if (iter.atParagraphSeparator())

@@static inline void constructBidiRuns(Inl
959959 // Only inlines make sense with unicode-bidi: isolate (blocks are already isolated).
960960 RenderInline* isolatedSpan = toRenderInline(isolatedRun->object());
961961 InlineBidiResolver isolatedResolver;
962  isolatedResolver.setStatus(statusWithDirection(isolatedSpan->style()->direction()));
 962 EUnicodeBidi unicodeBidi = isolatedSpan->style()->unicodeBidi();
 963 ASSERT(unicodeBidi == Plaintext || unicodeBidi == Isolate);
 964 TextDirection direction = isolatedSpan->style()->direction();
 965 if (unicodeBidi == Plaintext) {
 966 // FIXME: Allow bidiFirstSkippingEmptyInlines to run without a resolver and use here
 967 determineDirectionality(direction, InlineIterator(isolatedSpan, bidiFirstIncludingEmptyInlines(isolatedSpan), 0));
 968 }
 969 isolatedResolver.setStatus(statusWithDirection(direction));
963970
964971 // FIXME: The fact that we have to construct an Iterator here
965972 // currently prevents this code from moving into BidiResolver.

@@void RenderBlock::layoutRunsAndFloatsInR
12211228 FloatingObject* lastFloatFromPreviousLine = (m_floatingObjects && !m_floatingObjects->set().isEmpty()) ? m_floatingObjects->set().last() : 0;
12221229 end = lineBreaker.nextLineBreak(resolver, layoutState.lineInfo(), lineBreakIteratorInfo, lastFloatFromPreviousLine, consecutiveHyphenatedLines);
12231230 if (resolver.position().atEnd()) {
1224  // FIXME: We shouldn't be creating any runs in findNextLineBreak to begin with!
 1231 // FIXME: We shouldn't be creating any runs in nextLineBreak to begin with!
12251232 // Once BidiRunList is separated from BidiResolver this will not be needed.
12261233 resolver.runs().deleteRuns();
12271234 resolver.markCurrentRunEmpty(); // FIXME: This can probably be replaced by an ASSERT (or just removed).

@@void RenderBlock::layoutRunsAndFloatsInR
12391246
12401247 if (isNewUBAParagraph && style()->unicodeBidi() == Plaintext && !resolver.context()->parent()) {
12411248 TextDirection direction = style()->direction();
1242  determineParagraphDirection(direction, resolver.position());
 1249 determineDirectionality(direction, resolver.position());
12431250 resolver.setStatus(BidiStatus(direction, style()->unicodeBidi() == Override));
12441251 }
12451252 // FIXME: This ownership is reversed. We should own the BidiRunList and pass it to createBidiRunsForLine.

@@RootInlineBox* RenderBlock::determineSta
16441651 } else {
16451652 TextDirection direction = style()->direction();
16461653 if (style()->unicodeBidi() == Plaintext) {
1647  // FIXME: Why does "unicode-bidi: plaintext" bidiFirstIncludingEmptyInlines when all other line layout code uses bidiFirstSkippingEmptyInlines?
1648  determineParagraphDirection(direction, InlineIterator(this, bidiFirstIncludingEmptyInlines(this), 0));
 1654 // FIXME: Allow bidiFirstSkippingEmptyInlines to run without a resolver and use here
 1655 determineDirectionality(direction, InlineIterator(this, bidiFirstIncludingEmptyInlines(this), 0));
16491656 }
16501657 resolver.setStatus(BidiStatus(direction, style()->unicodeBidi() == Override));
16511658 resolver.setPosition(InlineIterator(this, bidiFirstSkippingEmptyInlines(this, &resolver), 0));
101412

LayoutTests/fast/text/international/inline-plaintext-is-isolated-expected.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 .border {
 6 border: solid thin gray;
 7 }
 8</style>
 9</head><body>
 10 <table>
 11 <tr>
 12 <td class="border">1 <span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 13 <td>should look the same as</td>
 14 <td class="border">1 <span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 15 </tr>
 16 <tr>
 17 <td class="border">1 a!<br><span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 18 <td>should look the same as</td>
 19 <td class="border">1 a!<br><span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 20 </tr>
 21 </table>
 22</body></html>
0

LayoutTests/fast/text/international/inline-plaintext-is-isolated.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 .rtl {
 6 direction: rtl;
 7 }
 8 .plaintext {
 9 unicode-bidi: -webkit-plaintext;
 10 unicode-bidi: plaintext;
 11 }
 12 .border {
 13 border: solid thin gray;
 14 }
 15</style>
 16</head><body>
 17 <table>
 18 <tr>
 19 <td class="border">1 <span class="plaintext rtl">&#x05D0;!</span> 2</td>
 20 <td>should look the same as</td>
 21 <td class="border">1 <span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 22 </tr>
 23 <tr>
 24 <td class="border">1 <span class="plaintext rtl">a!<br/>&#x05D0;!</span> 2</td>
 25 <td>should look the same as</td>
 26 <td class="border">1 a!<br><span dir="rtl">&#x05D0;!</span>&lrm; 2</td>
 27 </tr>
 28 </table>
 29</body></html>
0

LayoutTests/fast/text/international/inline-plaintext-relayout-with-leading-neutrals-expected.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 .border {
 6 border: solid thin gray;
 7 width: 20px;
 8 }
 9</style>
 10</head><body>
 11 <table>
 12 <tr>
 13 <td class="border"><span dir="rtl">1... .... ....<span>&#x05D0;</span></span></td>
 14 <td>should look the same as</td>
 15 <td class="border"><span dir="rtl">1... .... ....<span>&#x05D0;</span></span></td>
 16 </tr>
 17 <tr>
 18 <td class="border"><span dir="ltr">2... .... ....<span>a</span></span></td>
 19 <td>should look the same as</td>
 20 <td class="border"><span dir="ltr">2... .... ....<span>a</span></span></td>
 21 </tr>
 22 </table>
 23</body></html>
0

LayoutTests/fast/text/international/inline-plaintext-relayout-with-leading-neutrals.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 .plaintext {
 6 unicode-bidi: -webkit-plaintext;
 7 unicode-bidi: plaintext;
 8 }
 9 .border {
 10 border: solid thin gray;
 11 width: 20px;
 12 }
 13</style>
 14<script>
 15function runTest() {
 16 var span1 = document.getElementById("replacement1");
 17 span1.innerText = "א";
 18 var span2 = document.getElementById("replacement2");
 19 span2.innerText = "a";
 20}
 21</script>
 22</head><body >
 23 <table>
 24 <tr>
 25 <td class="border"><span class="plaintext">1... .... ....<span id="replacement1">a</span></span></td>
 26 <td>should look the same as</td>
 27 <td class="border"><span dir="rtl">1... .... ....<span>&#x05D0;</span></span></td>
 28 </tr>
 29 <tr>
 30 <td class="border"><span class="plaintext">2... .... ....<span id="replacement2">&#x05D0;</span></span></td>
 31 <td>should look the same as</td>
 32 <td class="border"><span dir="ltr">2... .... ....<span>a</span></span></td>
 33 </tr>
 34 </table>
 35</body></html>
0

LayoutTests/fast/text/international/inline-plaintext-with-generated-content-expected.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 td.border:first-letter {
 6 color: red;
 7 }
 8 .border {
 9 border: solid thin gray;
 10 width: 20px;
 11 }
 12</style>
 13</head><body>
 14 <table>
 15 <tr>
 16 <td class="border"><span dir="ltr">a&#x05D0;!</span></td>
 17 <td>should look the same as</td>
 18 <td class="border"><span dir="ltr">a&#x05D0;!</span></td>
 19 </tr>
 20 <tr>
 21 <td class="border"><span dir="rtl">&#x05D0;a!</span></td>
 22 <td>should look the same as</td>
 23 <td class="border"><span dir="rtl">&#x05D0;a!</span></td>
 24 </tr>
 25 </table>
 26</body></html>
0

LayoutTests/fast/text/international/inline-plaintext-with-generated-content.html

 1<!DOCTYPE HTML>
 2<html><head>
 3<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 4<style>
 5 .plaintext {
 6 unicode-bidi: -webkit-plaintext;
 7 unicode-bidi: plaintext;
 8 }
 9 td.border:first-letter {
 10 color: red;
 11 }
 12 .border {
 13 border: solid thin gray;
 14 width: 20px;
 15 }
 16</style>
 17</head><body>
 18 <table>
 19 <tr>
 20 <td class="border"><span class="plaintext">a&#x05D0;!</span></td>
 21 <td>should look the same as</td>
 22 <td class="border"><span dir="ltr">a&#x05D0;!</span></td>
 23 </tr>
 24 <tr>
 25 <td class="border"><span class="plaintext">&#x05D0;a!</span></td>
 26 <td>should look the same as</td>
 27 <td class="border"><span dir="rtl">&#x05D0;a!</span></td>
 28 </tr>
 29 </table>
 30</body></html>
0