diff options
7 files changed, 30 insertions, 3 deletions
@@ -252,12 +252,20 @@ LOCAL_CFLAGS += -Darm LOCAL_CFLAGS += -Wno-psabi endif +ifeq ($(TARGET_ARCH_VARIANT),x86-atom) +LOCAL_CFLAGS += -fno-pic +endif + # need a flag to tell the C side when we're on devices with large memory # budgets (i.e. larger than the low-end devices that initially shipped) ifeq ($(ARCH_ARM_HAVE_VFP),true) LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE endif +ifeq ($(TARGET_ARCH),x86) +LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE +endif + ifeq ($(ENABLE_SVG),true) LOCAL_CFLAGS += -DENABLE_SVG=1 -DENABLE_SVG_ANIMATION=1 endif diff --git a/Source/WebCore/editing/TextIterator.cpp b/Source/WebCore/editing/TextIterator.cpp index 3aa68af..871d1f9 100644 --- a/Source/WebCore/editing/TextIterator.cpp +++ b/Source/WebCore/editing/TextIterator.cpp @@ -298,6 +298,7 @@ TextIterator::TextIterator(const Range* r, TextIteratorBehavior behavior) #if OS(ANDROID) , m_stopsOnFormControls(behavior & TextIteratorStopsOnFormControls) , m_shouldStop(false) + , m_needsAnotherNewline(false) #endif { if (!r) diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp index aa84427..db03753 100644 --- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp @@ -101,6 +101,7 @@ ImageTexture::~ImageTexture() delete m_image; delete m_tileGrid; SkSafeUnref(m_picture); + ImagesManager::instance()->onImageTextureDestroy(m_crc); } SkBitmap* ImageTexture::convertBitmap(SkBitmap* bitmap) diff --git a/Source/WebCore/platform/graphics/android/rendering/ImagesManager.cpp b/Source/WebCore/platform/graphics/android/rendering/ImagesManager.cpp index 82ea3fa..d2bd8a0 100644 --- a/Source/WebCore/platform/graphics/android/rendering/ImagesManager.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/ImagesManager.cpp @@ -102,12 +102,20 @@ void ImagesManager::releaseImage(unsigned imgCRC) android::Mutex::Autolock lock(m_imagesLock); if (m_images.contains(imgCRC)) { ImageTexture* image = m_images.get(imgCRC); - if (image->getRefCnt() == 1) - m_images.remove(imgCRC); + // don't need to remove image from the HashMap, it will unregister + // itself by calling onImageTextureDestroy(). + SkSafeUnref(image); } } +void ImagesManager::onImageTextureDestroy(unsigned imgCRC) +{ + // NOTE: all unrefs must go through releaseImage, to ensure that + // onImageTextureDestroy is called under the m_imagesLock + m_images.remove(imgCRC); +} + int ImagesManager::nbTextures() { android::Mutex::Autolock lock(m_imagesLock); diff --git a/Source/WebCore/platform/graphics/android/rendering/ImagesManager.h b/Source/WebCore/platform/graphics/android/rendering/ImagesManager.h index b915a46..718cfdd 100644 --- a/Source/WebCore/platform/graphics/android/rendering/ImagesManager.h +++ b/Source/WebCore/platform/graphics/android/rendering/ImagesManager.h @@ -47,6 +47,9 @@ public: ImageTexture* retainImage(unsigned imgCRC); void releaseImage(unsigned imgCRC); + // should be called only by ~ImageTexture() + void onImageTextureDestroy(unsigned imgCRC); + bool prepareTextures(GLWebViewState*); int nbTextures(); diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index 012427c..ccd7c14 100644 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -1667,6 +1667,12 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newS // If our z-index changes value or our visibility changes, // we need to dirty our stacking context's z-order list. if (newStyle) { +#if ENABLE(COMPOSITED_FIXED_ELEMENTS) + RenderLayer* layer = hasLayer() ? enclosingLayer() : 0; + if (layer && m_style->position() != newStyle->position() + && (m_style->position() == FixedPosition || newStyle->position() == FixedPosition)) + layer->dirtyZOrderLists(); +#endif bool visibilityChanged = m_style->visibility() != newStyle->visibility() || m_style->zIndex() != newStyle->zIndex() || m_style->hasAutoZIndex() != newStyle->hasAutoZIndex(); diff --git a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp index 0af3cc2..f42f307 100644 --- a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp @@ -189,7 +189,7 @@ int WebCookieJar::getNumCookiesInDatabase() return cookieStore()->GetCookieMonster()->GetAllCookies().size(); } -class FlushSemaphore : public base::RefCounted<FlushSemaphore> +class FlushSemaphore : public base::RefCountedThreadSafe<FlushSemaphore> { public: FlushSemaphore() |