diff options
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/Android.mk | 1 | ||||
-rw-r--r-- | WebCore/ChangeLog | 15 | ||||
-rw-r--r-- | WebCore/bindings/v8/V8GCController.cpp | 3 | ||||
-rw-r--r-- | WebCore/platform/android/PlatformBridge.h | 1 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp | 6 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/BaseLayerAndroid.cpp | 24 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GLWebViewState.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 52 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.h | 3 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/PaintLayerOperation.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/TextureOwner.cpp | 54 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/TextureOwner.h | 10 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/TiledPage.cpp | 13 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/TiledPage.h | 2 | ||||
-rw-r--r-- | WebCore/platform/text/BidiResolver.h | 31 |
15 files changed, 169 insertions, 50 deletions
diff --git a/WebCore/Android.mk b/WebCore/Android.mk index 8aa16d9..4428a84 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -625,6 +625,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/graphics/android/SharedBufferStream.cpp \ platform/graphics/android/ShaderProgram.cpp \ platform/graphics/android/SharedTexture.cpp \ + platform/graphics/android/TextureOwner.cpp \ platform/graphics/android/TexturesGenerator.cpp \ platform/graphics/android/TilesManager.cpp \ platform/graphics/android/TiledPage.cpp \ diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index b56a885..ae5f73f 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2011-01-20 Xiaomei Ji <xji@chromium.org> + + Reviewed by Dan Bernstein. + + Fix regression(r71566): PDF in RTL block might messes up text directionality. + https://bugs.webkit.org/show_bug.cgi?id=52776 + + Test: fast/dom/52776.html + + * platform/text/BidiResolver.h: + (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel): + (WebCore::::lowerExplicitEmbeddingLevel): + (WebCore::::raiseExplicitEmbeddingLevel): + (WebCore::::createBidiRunsForLine): + 2011-01-12 Kenichi Ishibashi <bashi@google.com> Reviewed by Kent Tamura. diff --git a/WebCore/bindings/v8/V8GCController.cpp b/WebCore/bindings/v8/V8GCController.cpp index 3eeacec..9107b51 100644 --- a/WebCore/bindings/v8/V8GCController.cpp +++ b/WebCore/bindings/v8/V8GCController.cpp @@ -453,8 +453,7 @@ void V8GCController::checkMemoryUsage() // Query the PlatformBridge for memory thresholds as these vary device to device. static const int lowUsageMB = PlatformBridge::lowMemoryUsageMB(); static const int highUsageMB = PlatformBridge::highMemoryUsageMB(); - // We use a delta of -1 to ensure that when we are in a low memory situation we always trigger a GC. - static const int highUsageDeltaMB = -1; + static const int highUsageDeltaMB = PlatformBridge::highUsageDeltaMB(); #else return; #endif diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h index c67c865..7d54ae5 100644 --- a/WebCore/platform/android/PlatformBridge.h +++ b/WebCore/platform/android/PlatformBridge.h @@ -145,6 +145,7 @@ public: // Memory details for V8 GC static int lowMemoryUsageMB(); static int highMemoryUsageMB(); + static int highUsageDeltaMB(); static int memoryUsageMB(); static int actualMemoryUsageMB(); }; diff --git a/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp b/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp index 6d9fe04..dd69c4c 100644 --- a/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp +++ b/WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp @@ -140,6 +140,7 @@ bool BackedDoubleBufferedTexture::setOwner(TextureOwner* owner) if (m_owner && m_owner != owner) m_owner->removeTexture(this); m_owner = owner; + owner->addOwned(this); return true; } return false; @@ -147,8 +148,11 @@ bool BackedDoubleBufferedTexture::setOwner(TextureOwner* owner) void BackedDoubleBufferedTexture::release(TextureOwner* owner) { - if (m_owner == owner) + if (m_owner == owner) { + m_owner->removeOwned(this); m_owner = 0; + } + } } // namespace WebCore diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index 57a53ab..52ef8ca 100644 --- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -166,25 +166,28 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale) && (m_glWebViewState->futureViewport() != viewportTileBounds)) prepareNextTiledPage = true; + bool zooming = false; + if (m_glWebViewState->scaleRequestState() != GLWebViewState::kNoScaleRequest) { + m_glWebViewState->unlockBaseLayerUpdate(); + zooming = true; + } + // Let's prepare the page if needed if (prepareNextTiledPage) { TiledPage* nextTiledPage = m_glWebViewState->backPage(); nextTiledPage->setScale(scale); m_glWebViewState->setFutureViewport(viewportTileBounds); + m_glWebViewState->unlockBaseLayerUpdate(); nextTiledPage->prepare(goingDown, goingLeft, viewportTileBounds); } - bool zooming = false; - if (m_glWebViewState->scaleRequestState() != GLWebViewState::kNoScaleRequest) - zooming = true; - float transparency = 1; bool doSwap = false; // If we fired a request, let's check if it's ready to use if (m_glWebViewState->scaleRequestState() == GLWebViewState::kRequestNewScale) { TiledPage* nextTiledPage = m_glWebViewState->backPage(); - if (nextTiledPage->ready(viewportTileBounds)) + if (nextTiledPage->ready(viewportTileBounds, m_glWebViewState->futureScale())) m_glWebViewState->setScaleRequestState(GLWebViewState::kReceivedNewScale); } @@ -221,26 +224,29 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale) // out of date. When standing still on the other hand, we wait until // the back page is ready before swapping the pages, ensuring that the // displayed content is in sync. - if (!zooming && !m_glWebViewState->moving()) { - if (!tiledPage->ready(preZoomBounds)) { + if (!doSwap && !zooming && !m_glWebViewState->moving()) { + if (!tiledPage->ready(preZoomBounds, m_glWebViewState->currentScale())) { + m_glWebViewState->lockBaseLayerUpdate(); nextTiledPage->setScale(m_glWebViewState->currentScale()); nextTiledPage->prepare(goingDown, goingLeft, preZoomBounds); } - if (nextTiledPage->ready(preZoomBounds)) { + if (nextTiledPage->ready(preZoomBounds, m_glWebViewState->currentScale())) { nextTiledPage->draw(transparency, preZoomBounds); + m_glWebViewState->unlockBaseLayerUpdate(); doSwap = true; } else { tiledPage->draw(transparency, preZoomBounds); } } else { // Ask for the tiles and draw -- tiles may be out of date. + m_glWebViewState->unlockBaseLayerUpdate(); tiledPage->prepare(goingDown, goingLeft, preZoomBounds); tiledPage->draw(transparency, preZoomBounds); } bool ret = false; if (m_glWebViewState->scaleRequestState() != GLWebViewState::kNoScaleRequest - || !tiledPage->ready(preZoomBounds)) + || !tiledPage->ready(preZoomBounds, m_glWebViewState->currentScale())) ret = true; if (doSwap) { diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp index 326f360..252eeab 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -139,6 +139,8 @@ void GLWebViewState::setExtra(BaseLayerAndroid* layer, SkPicture& picture, const IntRect& rect) { android::Mutex::Autolock lock(m_baseLayerLock); + if (!m_baseLayerUpdate) + return; layer->setExtra(picture); if (!rect.isEmpty()) inval(rect); diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 95d4ff4..6426716 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -77,7 +77,8 @@ LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(), m_uniqueId(++gUniqueId), m_drawingTexture(0), m_reservedTexture(0), - m_pictureUsed(0), + m_pictureUsed(-1), + m_requestSent(false), m_scale(1) { m_backgroundColor = 0; @@ -94,7 +95,8 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer), m_extra(0), // deliberately not copied m_uniqueId(layer.m_uniqueId), m_drawingTexture(0), - m_reservedTexture(0) + m_reservedTexture(0), + m_requestSent(false) { m_isFixed = layer.m_isFixed; m_contentsImage = layer.m_contentsImage; @@ -144,6 +146,7 @@ LayerAndroid::LayerAndroid(SkPicture* picture) : SkLayer(), m_uniqueId(-1), m_drawingTexture(0), m_reservedTexture(0), + m_requestSent(false), m_scale(1) { m_backgroundColor = 0; @@ -222,8 +225,9 @@ bool LayerAndroid::evaluateAnimations(double time) const return hasRunningAnimations; } -void LayerAndroid::addAnimation(PassRefPtr<AndroidAnimation> anim) +void LayerAndroid::addAnimation(PassRefPtr<AndroidAnimation> prpAnim) { + RefPtr<AndroidAnimation> anim = prpAnim; if (m_animations.get(anim->name())) removeAnimation(anim->name()); m_animations.add(anim->name(), anim); @@ -641,10 +645,20 @@ void LayerAndroid::createGLTextures() if (!needsScheduleRepaint(reservedTexture)) return; - XLOG("We schedule a paint for layer %d, because isReady %d or m_dirty %d, using texture %x", - uniqueId(), m_reservedTexture->isReady(), m_dirty, m_reservedTexture); - PaintLayerOperation* operation = new PaintLayerOperation(this); - TilesManager::instance()->scheduleOperation(operation); + m_atomicSync.lock(); + if (!m_requestSent) { + m_requestSent = true; + m_atomicSync.unlock(); + XLOG("We schedule a paint for layer %d (%x), because isReady %d or m_dirty %d, using texture %x (%d, %d)", + uniqueId(), this, m_reservedTexture->isReady(), m_dirty, m_reservedTexture, + m_reservedTexture->rect().width(), m_reservedTexture->rect().height()); + PaintLayerOperation* operation = new PaintLayerOperation(this); + TilesManager::instance()->scheduleOperation(operation); + } else { + XLOG("We don't schedule a paint for layer %d (%x), because we already sent a request", + uniqueId(), this); + m_atomicSync.unlock(); + } } bool LayerAndroid::needsScheduleRepaint(LayerTexture* texture) @@ -652,9 +666,11 @@ bool LayerAndroid::needsScheduleRepaint(LayerTexture* texture) if (!texture) return false; - if (!m_pictureUsed || texture->pictureUsed() != m_pictureUsed) { - XLOG("We mark layer %d as dirty because: m_pictureUsed(%d == 0?), texture picture used %x", - uniqueId(), m_pictureUsed, texture->pictureUsed()); + if (!m_pictureUsed == -1 || texture->pictureUsed() != m_pictureUsed) { + XLOG("We mark layer %d (%x) as dirty because: m_pictureUsed(%d == 0?), texture picture used %x", + uniqueId(), this, m_pictureUsed, texture->pictureUsed()); + if (m_pictureUsed == -1) + m_pictureUsed = 0; texture->setPictureUsed(m_pictureUsed); m_dirty = true; } @@ -689,6 +705,8 @@ bool LayerAndroid::drawGL(SkMatrix& matrix) // move the drawing depending on where the texture is on the layer TransformationMatrix m = drawTransform(); m.translate(textureRect.x(), textureRect.y()); + XLOG("LayerAndroid %d %x (%.2f, %.2f) drawGL (texture %x, %d, %d, %d, %d)", uniqueId(), this, getWidth(), getHeight(), + m_drawingTexture, textureRect.x(), textureRect.y(), textureRect.width(), textureRect.height()); TilesManager::instance()->shader()->drawLayerQuad(m, bounds, textureInfo->m_textureId, m_drawOpacity); @@ -750,7 +768,8 @@ void LayerAndroid::paintBitmapGL() return; } - XLOG("LayerAndroid paintBitmapGL (layer %d), texture used %x", uniqueId(), texture); + XLOG("LayerAndroid paintBitmapGL (layer %d), texture used %x (%d, %d)", uniqueId(), texture, + texture->rect().width(), texture->rect().height()); // We need to mark the texture as busy before relinquishing the lock // -- so that TilesManager::cleanupLayersTextures() can check if the texture @@ -770,7 +789,7 @@ void LayerAndroid::paintBitmapGL() return; } - XLOG("LayerAndroid %d paintBitmapGL WE ARE PAINTING", uniqueId()); + XLOG("LayerAndroid %d %x (%.2f, %.2f) paintBitmapGL WE ARE PAINTING", uniqueId(), this, getWidth(), getHeight()); SkCanvas* canvas = texture->canvas(); float scale = texture->scale(); @@ -784,10 +803,17 @@ void LayerAndroid::paintBitmapGL() canvas->restore(); XLOG("LayerAndroid %d paintBitmapGL PAINTING DONE, updating the texture", uniqueId()); + texture->producerUpdate(textureInfo); + + while (!texture->isReady()) { + TextureInfo* textureInfo = texture->producerLock(); + texture->producerUpdate(textureInfo); + } + m_atomicSync.lock(); m_dirty = false; + m_requestSent = false; m_atomicSync.unlock(); - texture->producerUpdate(textureInfo); XLOG("LayerAndroid %d paintBitmapGL UPDATING DONE", uniqueId()); } diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index 95f8547..72eba0f 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -301,6 +301,9 @@ private: bool m_dirty; unsigned int m_pictureUsed; + // painting request sent + bool m_requestSent; + float m_scale; // This mutex serves two purposes. (1) It ensures that certain operations diff --git a/WebCore/platform/graphics/android/PaintLayerOperation.cpp b/WebCore/platform/graphics/android/PaintLayerOperation.cpp index dd81d9a..35867c7 100644 --- a/WebCore/platform/graphics/android/PaintLayerOperation.cpp +++ b/WebCore/platform/graphics/android/PaintLayerOperation.cpp @@ -33,7 +33,7 @@ bool PaintLayerOperation::operator==(const QueuedOperation* operation) if (operation->type() != type()) return false; const PaintLayerOperation* op = static_cast<const PaintLayerOperation*>(operation); - return op->m_layer == m_layer; + return op->m_layer->uniqueId() == m_layer->uniqueId(); } void PaintLayerOperation::run() diff --git a/WebCore/platform/graphics/android/TextureOwner.cpp b/WebCore/platform/graphics/android/TextureOwner.cpp new file mode 100644 index 0000000..6a6845a --- /dev/null +++ b/WebCore/platform/graphics/android/TextureOwner.cpp @@ -0,0 +1,54 @@ +/* + * Copyright 2011, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "TextureOwner.h" + +#include "BackedDoubleBufferedTexture.h" + +namespace WebCore { + +TextureOwner::~TextureOwner() +{ + if (m_ownedTextures.size()) { + // This TextureOwner owns textures still! + HashSet<BackedDoubleBufferedTexture*>::iterator it = m_ownedTextures.begin(); + for (; it != m_ownedTextures.end(); ++it) + (*it)->release(this); + } +} + +void TextureOwner::addOwned(BackedDoubleBufferedTexture* t) +{ + // This TextureOwner now owns texture t + m_ownedTextures.add(t); +} + +void TextureOwner::removeOwned(BackedDoubleBufferedTexture* t) +{ + // This textureowner no longer owns texture t. + m_ownedTextures.remove(t); +} +} diff --git a/WebCore/platform/graphics/android/TextureOwner.h b/WebCore/platform/graphics/android/TextureOwner.h index 7b0673d..c421e8a 100644 --- a/WebCore/platform/graphics/android/TextureOwner.h +++ b/WebCore/platform/graphics/android/TextureOwner.h @@ -26,6 +26,8 @@ #ifndef TextureOwner_h #define TextureOwner_h +#include <wtf/HashSet.h> + namespace WebCore { class TiledPage; @@ -33,9 +35,15 @@ class BackedDoubleBufferedTexture; class TextureOwner { public: - virtual ~TextureOwner() {} + virtual ~TextureOwner(); virtual void removeTexture(BackedDoubleBufferedTexture* texture) = 0; virtual TiledPage* page() = 0; + + void addOwned(BackedDoubleBufferedTexture*); + void removeOwned(BackedDoubleBufferedTexture*); + +private: + WTF::HashSet<BackedDoubleBufferedTexture*> m_ownedTextures; }; } diff --git a/WebCore/platform/graphics/android/TiledPage.cpp b/WebCore/platform/graphics/android/TiledPage.cpp index 79509dd..ca6a6c4 100644 --- a/WebCore/platform/graphics/android/TiledPage.cpp +++ b/WebCore/platform/graphics/android/TiledPage.cpp @@ -179,8 +179,10 @@ void TiledPage::prepareRow(bool goingLeft, int tilesInRow, int firstTileX, int y void TiledPage::updateTileState(const SkIRect& tileBounds) { - if (!m_glWebViewState || tileBounds.isEmpty()) + if (!m_glWebViewState || tileBounds.isEmpty()) { + m_invalRegion.setEmpty(); return; + } const int nbTilesWidth = tileBounds.width(); const int nbTilesHeight = tileBounds.height(); @@ -216,7 +218,7 @@ void TiledPage::updateTileState(const SkIRect& tileBounds) int d = std::max(dx, dy); - XLOG("setTileLevel tile: %x, fxy(%d, %d), level: %d", tile, firstTileX, firstTileY, d); + XLOG("setTileLevel tile: %x, fxy(%d, %d), level: %d", tile, tileBounds.fLeft, tileBounds.fTop, d); tile.setUsedLevel(d); } @@ -233,7 +235,6 @@ void TiledPage::prepare(bool goingDown, bool goingLeft, const SkIRect& tileBound // update the tiles distance from the viewport updateTileState(tileBounds); m_prepare = true; - m_glWebViewState->lockBaseLayerUpdate(); int firstTileX = tileBounds.fLeft; int firstTileY = tileBounds.fTop; @@ -289,7 +290,7 @@ void TiledPage::prepare(bool goingDown, bool goingLeft, const SkIRect& tileBound TilesManager::instance()->scheduleOperation(operation); } -bool TiledPage::ready(const SkIRect& tileBounds) +bool TiledPage::ready(const SkIRect& tileBounds, float scale) { if (!m_glWebViewState) return false; @@ -297,6 +298,9 @@ bool TiledPage::ready(const SkIRect& tileBounds) if (!m_invalRegion.isEmpty() && !m_prepare) return false; + if (m_scale != scale) + return false; + for (int x = tileBounds.fLeft; x < tileBounds.fRight; x++) { for (int y = tileBounds.fTop; y < tileBounds.fBottom; y++) { BaseTile* t = getBaseTile(x, y); @@ -305,7 +309,6 @@ bool TiledPage::ready(const SkIRect& tileBounds) } } m_prepare = false; - m_glWebViewState->unlockBaseLayerUpdate(); return true; } diff --git a/WebCore/platform/graphics/android/TiledPage.h b/WebCore/platform/graphics/android/TiledPage.h index a194ba5..a7402b9 100644 --- a/WebCore/platform/graphics/android/TiledPage.h +++ b/WebCore/platform/graphics/android/TiledPage.h @@ -62,7 +62,7 @@ public: // prepare the page for display on the screen void prepare(bool goingDown, bool goingLeft, const SkIRect& tileBounds); // check to see if the page is ready for display - bool ready(const SkIRect& tileBounds); + bool ready(const SkIRect& tileBounds, float scale); // draw the page on the screen void draw(float transparency, const SkIRect& tileBounds); diff --git a/WebCore/platform/text/BidiResolver.h b/WebCore/platform/text/BidiResolver.h index 1f87115..6018c3f 100644 --- a/WebCore/platform/text/BidiResolver.h +++ b/WebCore/platform/text/BidiResolver.h @@ -314,23 +314,13 @@ void BidiResolver<Iterator, Run>::checkDirectionInLowerRaiseEmbeddingLevel() using namespace WTF::Unicode; ASSERT(m_status.eor != OtherNeutral || eor.atEnd()); - // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last - // Bidi control characters are included into BidiRun, so last direction - // could be one of the bidi embeddings when there are nested embeddings. - // For example: "‪‫....." - ASSERT(m_status.last == EuropeanNumberSeparator - || m_status.last == EuropeanNumberTerminator - || m_status.last == CommonNumberSeparator - || m_status.last == BoundaryNeutral - || m_status.last == BlockSeparator - || m_status.last == SegmentSeparator - || m_status.last == WhiteSpaceNeutral - || m_status.last == OtherNeutral - || m_status.last == RightToLeftEmbedding - || m_status.last == LeftToRightEmbedding - || m_status.last == RightToLeftOverride - || m_status.last == LeftToRightOverride - || m_status.last == PopDirectionalFormat); + ASSERT(m_status.last != NonSpacingMark + && m_status.last != BoundaryNeutral + && m_status.last != RightToLeftEmbedding + && m_status.last != LeftToRightEmbedding + && m_status.last != RightToLeftOverride + && m_status.last != LeftToRightOverride + && m_status.last != PopDirectionalFormat); if (m_direction == OtherNeutral) m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : RightToLeft; } @@ -342,6 +332,7 @@ void BidiResolver<Iterator, Run>::lowerExplicitEmbeddingLevel(WTF::Unicode::Dire if (!emptyRun && eor != last) { checkDirectionInLowerRaiseEmbeddingLevel(); + // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last if (from == LeftToRight) { // bidi.sor ... bidi.eor ... bidi.last L if (m_status.eor == EuropeanNumber) { @@ -377,6 +368,7 @@ void BidiResolver<Iterator, Run>::raiseExplicitEmbeddingLevel(WTF::Unicode::Dire if (!emptyRun && eor != last) { checkDirectionInLowerRaiseEmbeddingLevel(); + // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last if (to == LeftToRight) { // bidi.sor ... bidi.eor ... bidi.last L if (m_status.eor == EuropeanNumber) { @@ -866,6 +858,11 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo break; case NonSpacingMark: case BoundaryNeutral: + case RightToLeftEmbedding: + case LeftToRightEmbedding: + case RightToLeftOverride: + case LeftToRightOverride: + case PopDirectionalFormat: // ignore these break; case EuropeanNumber: |