summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/JavaScriptCore/wtf/ThreadingPthreads.cpp2
-rw-r--r--Source/WebCore/Android.derived.jscbindings.mk4
-rw-r--r--Source/WebCore/Android.derived.v8bindings.mk4
-rw-r--r--Source/WebCore/html/HTMLMetaElement.cpp8
-rw-r--r--Source/WebCore/loader/DocumentLoader.cpp4
-rw-r--r--Source/WebCore/loader/FrameLoader.h2
-rw-r--r--Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp56
-rw-r--r--Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp9
-rw-r--r--Source/WebCore/platform/graphics/android/FontAndroid.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp2
-rw-r--r--Source/WebCore/platform/graphics/android/HarfbuzzSkia.cpp17
11 files changed, 53 insertions, 61 deletions
diff --git a/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp b/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp
index bd4690f..aa63f33 100644
--- a/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp
+++ b/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp
@@ -165,7 +165,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
}
// The thread will take ownership of invocation.
- invocation.leakPtr();
+ ThreadFunctionInvocation* unused = invocation.leakPtr();
return establishIdentifierForPthreadHandle(threadHandle);
}
diff --git a/Source/WebCore/Android.derived.jscbindings.mk b/Source/WebCore/Android.derived.jscbindings.mk
index a049033..641727c 100644
--- a/Source/WebCore/Android.derived.jscbindings.mk
+++ b/Source/WebCore/Android.derived.jscbindings.mk
@@ -665,9 +665,9 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/xml/%.cpp : $(intermediates)/xml/
#end
# Inspector
-# These headers are required even when Inspector is disabled
+# These headers are required even when Inspector is disabled.
+# Note that Inspector.idl should not be processed using the JS generator.
GEN := \
- $(intermediates)/inspector/JSInspector.h \
$(intermediates)/inspector/JSScriptProfile.h
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
diff --git a/Source/WebCore/Android.derived.v8bindings.mk b/Source/WebCore/Android.derived.v8bindings.mk
index d708f63..e6ac529 100644
--- a/Source/WebCore/Android.derived.v8bindings.mk
+++ b/Source/WebCore/Android.derived.v8bindings.mk
@@ -661,10 +661,10 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)
#end
# Inspector
-# These headers are required by the V8 bindings even when Inspector is disabled
+# These headers are required by the V8 bindings even when Inspector is disabled.
+# Note that Inspector.idl should not be processed using the V8 generator.
GEN := \
$(intermediates)/bindings/V8InjectedScriptHost.h \
- $(intermediates)/bindings/V8Inspector.h \
$(intermediates)/bindings/V8InspectorFrontendHost.h \
$(intermediates)/bindings/V8ScriptProfile.h
diff --git a/Source/WebCore/html/HTMLMetaElement.cpp b/Source/WebCore/html/HTMLMetaElement.cpp
index 4863f3b..d8d9fb3 100644
--- a/Source/WebCore/html/HTMLMetaElement.cpp
+++ b/Source/WebCore/html/HTMLMetaElement.cpp
@@ -83,11 +83,9 @@ void HTMLMetaElement::process()
updateViewport = true;
} else if (equalIgnoringCase(name(), "format-detection"))
document()->processMetadataSettings(m_content);
- else if ((equalIgnoringCase(name(), "HandheldFriendly")
- && equalIgnoringCase(m_content, "true") ||
- equalIgnoringCase(name(), "MobileOptimized"))
- && document()->settings()
- && document()->settings()->viewportWidth() == -1) {
+ else if (((equalIgnoringCase(name(), "HandheldFriendly") && equalIgnoringCase(m_content, "true")) || equalIgnoringCase(name(), "MobileOptimized"))
+ && document()->settings()
+ && document()->settings()->viewportWidth() == -1) {
// fit mobile sites directly in the screen
document()->settings()->setMetadataSettings("width", "device-width");
updateViewport = true;
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
index 4e7c656..6e91107 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
@@ -30,12 +30,8 @@
#include "DocumentLoader.h"
#include "ApplicationCacheHost.h"
-#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size
#include "ArchiveFactory.h"
#include "ArchiveResourceCollection.h"
-#else
-#include "SubstituteResource.h"
-#endif
#include "CachedPage.h"
#include "CachedResourceLoader.h"
#include "DOMWindow.h"
diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h
index 0cc1fa7..12afbdd 100644
--- a/Source/WebCore/loader/FrameLoader.h
+++ b/Source/WebCore/loader/FrameLoader.h
@@ -46,9 +46,7 @@
namespace WebCore {
-#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size
class Archive;
-#endif
class AuthenticationChallenge;
class CachedFrameBase;
class CachedPage;
diff --git a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp
index 9cff676..fbb0aec 100644
--- a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp
+++ b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp
@@ -117,7 +117,7 @@ static bool loadArchiveResourceField(xmlNodePtr resourceNode, const xmlChar* fie
}
}
if (!base64Data) {
- LOGD("loadWebArchive: Failed to load field.");
+ LOGD("loadArchiveResourceField: Failed to load field.");
return false;
}
@@ -125,7 +125,7 @@ static bool loadArchiveResourceField(xmlNodePtr resourceNode, const xmlChar* fie
const int result = base64Decode(base64Data, base64Size, *outputData);
if (!result) {
- LOGD("loadWebArchive: Failed to decode field.");
+ LOGD("loadArchiveResourceField: Failed to decode field.");
return false;
}
@@ -165,37 +165,37 @@ static KURL loadArchiveResourceFieldURL(xmlNodePtr resourceNode, const xmlChar*
static PassRefPtr<ArchiveResource> loadArchiveResource(xmlNodePtr resourceNode)
{
if (!xmlStrEqual(resourceNode->name, archiveResourceTag)) {
- LOGD("loadWebArchive: Malformed resource.");
+ LOGD("loadArchiveResource: Malformed resource.");
return 0;
}
KURL url = loadArchiveResourceFieldURL(resourceNode, urlFieldTag);
if (url.isNull()) {
- LOGD("loadWebArchive: Failed to load resource.");
+ LOGD("loadArchiveResource: Failed to load resource.");
return 0;
}
String mimeType = loadArchiveResourceFieldString(resourceNode, mimeFieldTag);
if (mimeType.isNull()) {
- LOGD("loadWebArchive: Failed to load resource.");
+ LOGD("loadArchiveResource: Failed to load resource.");
return 0;
}
String textEncoding = loadArchiveResourceFieldString(resourceNode, encodingFieldTag);
if (textEncoding.isNull()) {
- LOGD("loadWebArchive: Failed to load resource.");
+ LOGD("loadArchiveResource: Failed to load resource.");
return 0;
}
String frameName = loadArchiveResourceFieldString(resourceNode, frameFieldTag);
if (frameName.isNull()) {
- LOGD("loadWebArchive: Failed to load resource.");
+ LOGD("loadArchiveResource: Failed to load resource.");
return 0;
}
PassRefPtr<SharedBuffer> data = loadArchiveResourceFieldBuffer(resourceNode, dataFieldTag);
if (!data) {
- LOGD("loadWebArchive: Failed to load resource.");
+ LOGD("loadArchiveResource: Failed to load resource.");
return 0;
}
@@ -211,7 +211,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode)
Vector<PassRefPtr<Archive> > subframes;
if (!xmlStrEqual(archiveNode->name, archiveTag)) {
- LOGD("loadWebArchive: Malformed archive.");
+ LOGD("loadArchive: Malformed archive.");
return 0;
}
@@ -227,7 +227,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode)
}
}
if (!mainResource) {
- LOGD("saveWebArchive: Failed to load main resource.");
+ LOGD("loadArchive: Failed to load main resource.");
return 0;
}
@@ -240,7 +240,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode)
resourceNode = resourceNode->next) {
PassRefPtr<ArchiveResource> subresource = loadArchiveResource(resourceNode);
if (!subresource) {
- LOGD("saveWebArchive: Failed to load subresource.");
+ LOGD("loadArchive: Failed to load subresource.");
break;
}
subresources.append(subresource);
@@ -258,7 +258,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode)
resourceNode = resourceNode->next) {
PassRefPtr<WebArchiveAndroid> subframe = loadArchive(resourceNode);
if (!subframe) {
- LOGD("saveWebArchive: Failed to load subframe.");
+ LOGD("loadArchive: Failed to load subframe.");
break;
}
subframes.append(subframe);
@@ -290,20 +290,20 @@ PassRefPtr<WebArchiveAndroid> WebArchiveAndroid::create(SharedBuffer* buffer)
xmlDocPtr doc = xmlReadMemory(buffer->data(), buffer->size(), noBaseUrl, defaultEncoding, noParserOptions);
if (!doc) {
- LOGD("loadWebArchive: Failed to parse document.");
+ LOGD("create: Failed to parse document.");
return createArchiveForError();
}
xmlNodePtr root = xmlDocGetRootElement(doc);
if (!root) {
- LOGD("loadWebArchive: Empty document.");
+ LOGD("create: Empty document.");
xmlFreeDoc(doc);
return createArchiveForError();
}
RefPtr<WebArchiveAndroid> archive = loadArchive(root);
if (!archive) {
- LOGD("loadWebArchive: Failed to load archive.");
+ LOGD("create: Failed to load archive.");
xmlFreeDoc(doc);
return createArchiveForError();
}
@@ -316,7 +316,7 @@ static bool saveArchiveResourceField(xmlTextWriterPtr writer, const xmlChar* tag
{
int result = xmlTextWriterStartElement(writer, tag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchiveResourceField: Failed to start element.");
return false;
}
@@ -324,20 +324,20 @@ static bool saveArchiveResourceField(xmlTextWriterPtr writer, const xmlChar* tag
Vector<char> base64Data;
base64Encode(data, size, base64Data, false);
if (base64Data.isEmpty()) {
- LOGD("saveWebArchive: Failed to base64 encode data.");
+ LOGD("saveArchiveResourceField: Failed to base64 encode data.");
return false;
}
result = xmlTextWriterWriteRawLen(writer, BAD_CAST base64Data.data(), base64Data.size());
if (result < 0) {
- LOGD("saveWebArchive: Failed to write data.");
+ LOGD("saveArchiveResourceField: Failed to write data.");
return false;
}
}
result = xmlTextWriterEndElement(writer);
if (result < 0) {
- LOGD("saveWebArchive: Failed to end element.");
+ LOGD("saveArchiveResourceField: Failed to end element.");
return false;
}
@@ -360,7 +360,7 @@ static bool saveArchiveResource(xmlTextWriterPtr writer, PassRefPtr<ArchiveResou
{
int result = xmlTextWriterStartElement(writer, archiveResourceTag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchiveResource: Failed to start element.");
return false;
}
@@ -373,7 +373,7 @@ static bool saveArchiveResource(xmlTextWriterPtr writer, PassRefPtr<ArchiveResou
result = xmlTextWriterEndElement(writer);
if (result < 0) {
- LOGD("saveWebArchive: Failed to end element.");
+ LOGD("saveArchiveResource: Failed to end element.");
return false;
}
@@ -384,13 +384,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive)
{
int result = xmlTextWriterStartElement(writer, archiveTag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchive: Failed to start element.");
return false;
}
result = xmlTextWriterStartElement(writer, mainResourceTag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchive: Failed to start element.");
return false;
}
@@ -399,13 +399,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive)
result = xmlTextWriterEndElement(writer);
if (result < 0) {
- LOGD("saveWebArchive: Failed to end element.");
+ LOGD("saveArchive: Failed to end element.");
return false;
}
result = xmlTextWriterStartElement(writer, subresourcesTag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchive: Failed to start element.");
return false;
}
@@ -418,13 +418,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive)
result = xmlTextWriterEndElement(writer);
if (result < 0) {
- LOGD("saveWebArchive: Failed to end element.");
+ LOGD("saveArchive: Failed to end element.");
return false;
}
result = xmlTextWriterStartElement(writer, subframesTag);
if (result < 0) {
- LOGD("saveWebArchive: Failed to start element.");
+ LOGD("saveArchive: Failed to start element.");
return false;
}
@@ -437,7 +437,7 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive)
result = xmlTextWriterEndElement(writer);
if (result < 0) {
- LOGD("saveWebArchive: Failed to end element.");
+ LOGD("saveArchive: Failed to end element.");
return true;
}
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 09d80a1..8aa334f 100644
--- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -138,9 +138,7 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale, double
// If we have a different scale than the current one, we have to
// decide what to do. The current behaviour is to delay an update,
// so that we do not slow down zooming unnecessarily.
- if (m_glWebViewState->currentScale() != scale
- && (m_glWebViewState->scaleRequestState() == GLWebViewState::kNoScaleRequest
- || m_glWebViewState->futureScale() != scale)
+ if ((m_glWebViewState->currentScale() != scale && (m_glWebViewState->scaleRequestState() == GLWebViewState::kNoScaleRequest || m_glWebViewState->futureScale() != scale))
|| m_glWebViewState->scaleRequestState() == GLWebViewState::kWillScheduleRequest) {
// schedule the new request
@@ -152,9 +150,8 @@ bool BaseLayerAndroid::drawBasePictureInGL(SkRect& viewport, float scale, double
}
// If the viewport has changed since we scheduled the request, we also need to prepare.
- if (((m_glWebViewState->scaleRequestState() == GLWebViewState::kRequestNewScale)
- || (m_glWebViewState->scaleRequestState() == GLWebViewState::kReceivedNewScale))
- && (m_glWebViewState->futureViewport() != viewportTileBounds))
+ if ((m_glWebViewState->scaleRequestState() == GLWebViewState::kRequestNewScale || m_glWebViewState->scaleRequestState() == GLWebViewState::kReceivedNewScale)
+ && m_glWebViewState->futureViewport() != viewportTileBounds)
prepareNextTiledPage = true;
bool zooming = false;
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
index 6966e7d..a4fb51b 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -49,6 +49,8 @@
#include <unicode/uchar.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnArrayPtr.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/unicode/Unicode.h>
#endif
@@ -817,12 +819,12 @@ const TextRun& TextRunWalker::getNormalizedTextRun(const TextRun& originalRun,
sourceText = normalizedString.getBuffer();
}
- normalizedBuffer.set(new UChar[normalizedBufferLength + 1]);
+ normalizedBuffer = adoptArrayPtr(new UChar[normalizedBufferLength + 1]);
normalizeSpacesAndMirrorChars(sourceText, originalRun.rtl(), normalizedBuffer.get(),
normalizedBufferLength);
- normalizedRun.set(new TextRun(originalRun));
+ normalizedRun = adoptPtr(new TextRun(originalRun));
normalizedRun->setText(normalizedBuffer.get(), normalizedBufferLength);
return *normalizedRun;
}
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 4acd563..f46d335 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -307,7 +307,7 @@ void GLWebViewState::paintExtras()
{
if (m_displayRings) {
// TODO: handles correctly the multi-rings case
- for (int i=0; i<m_rings.size(); i++) {
+ for (size_t i = 0; i < m_rings.size(); i++) {
IntRect rect = m_rings.at(i);
drawFocusRing(rect);
}
diff --git a/Source/WebCore/platform/graphics/android/HarfbuzzSkia.cpp b/Source/WebCore/platform/graphics/android/HarfbuzzSkia.cpp
index 81841f2..7c3a6b4 100644
--- a/Source/WebCore/platform/graphics/android/HarfbuzzSkia.cpp
+++ b/Source/WebCore/platform/graphics/android/HarfbuzzSkia.cpp
@@ -27,13 +27,14 @@
#include "config.h"
#include "FontPlatformData.h"
-#include "wtf/OwnArrayPtr.h"
-#include "SkFontHost.h"
-#include "SkPaint.h"
-#include "SkPath.h"
-#include "SkPoint.h"
-#include "SkRect.h"
+#include <SkFontHost.h>
+#include <SkPaint.h>
+#include <SkPath.h>
+#include <SkPoint.h>
+#include <SkRect.h>
+#include <wtf/OwnArrayPtr.h>
+#include <wtf/PassOwnArrayPtr.h>
extern "C" {
#include "harfbuzz-shaper.h"
@@ -80,7 +81,7 @@ static void glyphsToAdvances(HB_Font hbFont, const HB_Glyph* glyphs, hb_uint32 n
font->setupPaint(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- OwnArrayPtr<uint16_t> glyphs16(new uint16_t[numGlyphs]);
+ OwnArrayPtr<uint16_t> glyphs16 = adoptArrayPtr(new uint16_t[numGlyphs]);
if (!glyphs16.get())
return;
for (unsigned i = 0; i < numGlyphs; ++i)
@@ -106,7 +107,7 @@ static HB_Bool canRender(HB_Font hbFont, const HB_UChar16* characters, hb_uint32
font->setupPaint(&paint);
paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);
- OwnArrayPtr<uint16_t> glyphs16(new uint16_t[length]);
+ OwnArrayPtr<uint16_t> glyphs16 = adoptArrayPtr(new uint16_t[length]);
glyphs16.get();
int numGlyphs = paint.textToGlyphs(characters, length * sizeof(uint16_t), glyphs16.get());