diff options
author | Steve Block <steveblock@google.com> | 2011-05-20 09:10:52 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-20 09:10:52 -0700 |
commit | 483066d710566d4c99077d4d150e4aa72654b97d (patch) | |
tree | 2f920c687609e6b47b4c5426556295bb1dae6164 /Source/WebCore/platform | |
parent | 41c4de163e4183c0e2a74c5c296de8a734ecc516 (diff) | |
parent | f2f7d373c9827c5c27771dfda4ca627f173fbe10 (diff) | |
download | external_webkit-483066d710566d4c99077d4d150e4aa72654b97d.zip external_webkit-483066d710566d4c99077d4d150e4aa72654b97d.tar.gz external_webkit-483066d710566d4c99077d4d150e4aa72654b97d.tar.bz2 |
Merge changes Ib103214e,Ibc8ca754,I6adc6f64,I4c5fde48,I81552b1b
* changes:
Do not process Inspector.idl using the V8 or JSC code generator
Remove some superfluous ARCHIVE enable guards
Fix WebArchiveAndroid logging
Fix some compiler warnings
Use adoptPtr() and adoptArrayPtr() when setting OwnPtr and OwnArrayPtr
Diffstat (limited to 'Source/WebCore/platform')
4 files changed, 17 insertions, 17 deletions
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()); |