diff options
Diffstat (limited to 'Source/WebCore')
22 files changed, 131 insertions, 55 deletions
diff --git a/Source/WebCore/Android.derived.v8bindings.mk b/Source/WebCore/Android.derived.v8bindings.mk index 546cefe..509d21e 100644 --- a/Source/WebCore/Android.derived.v8bindings.mk +++ b/Source/WebCore/Android.derived.v8bindings.mk @@ -31,7 +31,7 @@ js_binding_scripts := \ $(LOCAL_PATH)/bindings/scripts/generate-bindings.pl # Add ACCELERATED_COMPOSITING=1 and ENABLE_3D_RENDERING=1 for layers support -FEATURE_DEFINES := ENABLE_ORIENTATION_EVENTS=1 ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_GEOLOCATION=1 ENABLE_CONNECTION=1 ENABLE_APPLICATION_INSTALLED=1 ENABLE_XPATH=1 ENABLE_XSLT=1 ENABLE_DEVICE_ORIENTATION=1 ENABLE_FILE_READER=1 ENABLE_BLOB=1 ENABLE_WEB_TIMING=1 +FEATURE_DEFINES := ENABLE_ORIENTATION_EVENTS=1 ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 ENABLE_VIDEO=1 ENABLE_GEOLOCATION=1 ENABLE_CONNECTION=1 ENABLE_APPLICATION_INSTALLED=1 ENABLE_XPATH=1 ENABLE_XSLT=1 ENABLE_DEVICE_ORIENTATION=1 ENABLE_FILE_READER=1 ENABLE_BLOB=1 ENABLE_WEB_TIMING=1 ENABLE_MEDIA_CAPTURE=1 # The defines above should be identical to those for JSC. FEATURE_DEFINES += V8_BINDING diff --git a/Source/WebCore/html/HTMLAttributeNames.in b/Source/WebCore/html/HTMLAttributeNames.in index 5e0fe7b..578f717 100644 --- a/Source/WebCore/html/HTMLAttributeNames.in +++ b/Source/WebCore/html/HTMLAttributeNames.in @@ -58,6 +58,7 @@ bgcolor bgproperties border bordercolor +capture cellpadding cellspacing char diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp index 2b262e4..36cdf51 100644 --- a/Source/WebCore/html/HTMLInputElement.cpp +++ b/Source/WebCore/html/HTMLInputElement.cpp @@ -1588,4 +1588,24 @@ void HTMLInputElement::handleBeforeTextInsertedEvent(Event* event) InputElement::handleBeforeTextInsertedEvent(m_data, this, this, event); } +#if PLATFORM(ANDROID) && ENABLE(MEDIA_CAPTURE) +String HTMLInputElement::capture() const +{ + if (!isFileUpload()) { + // capture has no meaning on anything other than file pickers. + return String(); + } + + String capture = fastGetAttribute(captureAttr).lower(); + if (capture == "camera" + || capture == "camcorder" + || capture == "microphone" + || capture == "filesystem") + return capture; + // According to the HTML Media Capture specification, the invalid and + // missing default value is filesystem. + return "filesystem"; +} +#endif + } // namespace diff --git a/Source/WebCore/html/HTMLInputElement.h b/Source/WebCore/html/HTMLInputElement.h index 2a98b13..58d86ac 100644 --- a/Source/WebCore/html/HTMLInputElement.h +++ b/Source/WebCore/html/HTMLInputElement.h @@ -200,6 +200,10 @@ public: void updateCheckedRadioButtons(); bool lastChangeWasUserEdit() const; + +#if PLATFORM(ANDROID) && ENABLE(MEDIA_CAPTURE) + String capture() const; +#endif protected: HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool createdByParser); diff --git a/Source/WebCore/html/HTMLInputElement.idl b/Source/WebCore/html/HTMLInputElement.idl index f346e10..e1937e4 100644 --- a/Source/WebCore/html/HTMLInputElement.idl +++ b/Source/WebCore/html/HTMLInputElement.idl @@ -107,6 +107,9 @@ module html { attribute [Reflect, EnabledAtRuntime] boolean webkitGrammar; attribute [DontEnum] EventListener onwebkitspeechchange; #endif +#if defined(WTF_PLATFORM_ANDROID) && defined(ENABLE_MEDIA_CAPTURE) && ENABLE_MEDIA_CAPTURE + attribute [Reflect] DOMString capture; +#endif }; } diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp index a737754..45450b5 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp @@ -3224,15 +3224,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) // When sending a touch cancel event, use empty touches and targetTouches lists. bool isTouchCancelEvent = (state == PlatformTouchPoint::TouchCancelled); RefPtr<TouchList>& effectiveTouches(isTouchCancelEvent ? emptyList : touches); -#if PLATFORM(ANDROID) - AtomicString stateName(eventNameForTouchPointState(static_cast<PlatformTouchPoint::State>(state))); - if (event.type() == TouchLongPress) - stateName = eventNames().touchlongpressEvent; - else if (event.type() == TouchDoubleTap) - stateName = eventNames().touchdoubletapEvent; -#else const AtomicString& stateName(eventNameForTouchPointState(static_cast<PlatformTouchPoint::State>(state))); -#endif const EventTargetSet& targetsForState = changedTouches[state].m_targets; for (EventTargetSet::const_iterator it = targetsForState.begin(); it != targetsForState.end(); ++it) { diff --git a/Source/WebCore/platform/FileChooser.h b/Source/WebCore/platform/FileChooser.h index ac5e0e6..6c382d1 100644 --- a/Source/WebCore/platform/FileChooser.h +++ b/Source/WebCore/platform/FileChooser.h @@ -50,6 +50,9 @@ public: virtual String acceptTypes() = 0; virtual void chooseIconForFiles(FileChooser*, const Vector<String>&) = 0; virtual ~FileChooserClient(); +#if PLATFORM(ANDROID) && ENABLE(MEDIA_CAPTURE) + virtual String capture() = 0; +#endif }; class FileChooser : public RefCounted<FileChooser> { @@ -79,6 +82,10 @@ public: // Acceptable MIME types. It's an 'accept' attribute value of the corresponding INPUT element. String acceptTypes() const { return m_client ? m_client->acceptTypes() : String(); } +#if PLATFORM(ANDROID) && ENABLE(MEDIA_CAPTURE) + String capture() const { return m_client ? m_client->capture() : String(); } +#endif + private: FileChooser(FileChooserClient*, const Vector<String>& initialFilenames); void initialize(); diff --git a/Source/WebCore/platform/PlatformTouchEvent.h b/Source/WebCore/platform/PlatformTouchEvent.h index 2ca7c99..f7524b4 100644 --- a/Source/WebCore/platform/PlatformTouchEvent.h +++ b/Source/WebCore/platform/PlatformTouchEvent.h @@ -52,10 +52,6 @@ enum TouchEventType { , TouchMove , TouchEnd , TouchCancel -#if PLATFORM(ANDROID) - , TouchLongPress - , TouchDoubleTap -#endif }; class PlatformTouchEvent { diff --git a/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp b/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp index a327b79..b9798e6 100644 --- a/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp @@ -44,12 +44,12 @@ namespace WebCore { #define NO_BREAK_SPACE_UNICHAR 0xA0 -static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, uint16_t* glyphs, unsigned bufferLength) +static HB_Error substituteWithVerticalGlyphs(const FontPlatformData& platformData, uint16_t* glyphs, unsigned bufferLength) { HB_FaceRec_* hbFace = platformData.harfbuzzFace(); if (!hbFace->gsub) { // if there is no GSUB table, treat it as not covered - return 0Xffff; + return static_cast<HB_Error>(0Xffff); } HB_Buffer buffer; @@ -60,13 +60,19 @@ static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, ui HB_UShort scriptIndex; HB_UShort featureIndex; - HB_GSUB_Select_Script(hbFace->gsub, HB_MAKE_TAG('D', 'F', 'L', 'T'), &scriptIndex); + HB_Error error = HB_GSUB_Select_Script(hbFace->gsub, HB_MAKE_TAG('D', 'F', 'L', 'T'), &scriptIndex); + if (error) { + if (error != HB_Err_Not_Covered) + return error; + scriptIndex = HB_Script_Common; // Set script to common script. + } + HB_GSUB_Select_Feature(hbFace->gsub, HB_MAKE_TAG('v', 'e', 'r', 't'), scriptIndex, 0xffff, &featureIndex); HB_GSUB_Add_Feature(hbFace->gsub, featureIndex, 1); HB_GSUB_Select_Feature(hbFace->gsub, HB_MAKE_TAG('v', 'r', 't', '2'), scriptIndex, 0xffff, &featureIndex); HB_GSUB_Add_Feature(hbFace->gsub, featureIndex, 1); - int error = HB_GSUB_Apply_String(hbFace->gsub, buffer); + error = HB_GSUB_Apply_String(hbFace->gsub, buffer); if (!error) { for (unsigned i = 0; i < bufferLength; ++i) glyphs[i] = static_cast<Glyph>(buffer->out_string[i].gindex); @@ -74,6 +80,14 @@ static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, ui return error; } +static void convertToVerticalForms(UChar* src, UChar* dest, unsigned bufferLength) { + for (unsigned i = 0; i < bufferLength; ++i) { + dest[i] = VerticalTextMap::getVerticalForm(src[i]); + if (!dest[i]) + dest[i] = src[i]; + } +} + bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData) { if (SkUTF16_IsHighSurrogate(buffer[bufferLength-1])) { @@ -92,11 +106,7 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b if (fontData->platformData().orientation() == Vertical && !fontData->hasVerticalGlyphs()) { // Convert to vertical form if there is no vertical glyphs. - for (unsigned i = 0; i < bufferLength; ++i) { - vTextBuffer[i] = VerticalTextMap::getVerticalForm(buffer[i]); - if (!vTextBuffer[i]) - vTextBuffer[i] = buffer[i]; - } + convertToVerticalForms(buffer, vTextBuffer, bufferLength); textBuffer = vTextBuffer; } @@ -111,11 +121,22 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b for (unsigned i = 0; i < bufferLength; ++i) { if (!Font::isCJKIdeograph(textBuffer[i])) { lookVariants = true; - continue; + break; + } + } + if (lookVariants) { + if (substituteWithVerticalGlyphs(fontData->platformData(), glyphs, bufferLength)) { + // Convert text to vertical forms if substituteWithVerticalGlyphs() fails to access vert tables. + convertToVerticalForms(buffer, vTextBuffer, bufferLength); + textBuffer = vTextBuffer; + + unsigned count = paint.textToGlyphs(textBuffer, bufferLength << 1, glyphs); + if (count != length) { + SkDebugf("%s count != length\n", __FUNCTION__); + return false; + } } } - if (lookVariants) - substituteWithVerticalGlyphs(fontData->platformData(), glyphs, bufferLength); } unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 81427b8..a02759d 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -884,7 +884,8 @@ void LayerAndroid::onDraw(SkCanvas* canvas, SkScalar opacity, return; } - if (masksToBounds() || !m_content) + // only continue drawing if layer is drawable + if (!m_content && !m_imageCRC) return; // we just have this save/restore for opacity... diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp index 26bd55d..9435065 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp @@ -578,16 +578,6 @@ void GLUtils::createTextureWithBitmap(GLuint texture, const SkBitmap& bitmap, GL } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); - - // The following is a workaround -- remove when EGLImage texture upload is fixed. - GLuint fboID; - glGenFramebuffers(1, &fboID); - glBindFramebuffer(GL_FRAMEBUFFER, fboID); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); - glCheckFramebufferStatus(GL_FRAMEBUFFER); // should return GL_FRAMEBUFFER_COMPLETE - - glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO - glDeleteFramebuffers(1, &fboID); } void GLUtils::updateTextureWithBitmap(GLuint texture, const SkBitmap& bitmap, diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp index 3ed3aad..f0d9e58 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp @@ -30,6 +30,7 @@ #include "Surface.h" #include "AndroidLog.h" +#include "BaseLayerAndroid.h" #include "ClassTracker.h" #include "LayerAndroid.h" #include "GLWebViewState.h" @@ -140,6 +141,9 @@ void Surface::addLayer(LayerAndroid* layer, const TransformationMatrix& transfor m_unclippedArea.x(), m_unclippedArea.y(), m_unclippedArea.width(), m_unclippedArea.height()); } + + if (isBase()) + m_background = static_cast<BaseLayerAndroid*>(layer)->getBackgroundColor(); } IntRect Surface::visibleArea() @@ -250,6 +254,14 @@ bool Surface::isReady() return m_surfaceBacking->isReady(); } +bool Surface::isMissingContent() +{ + if (!m_surfaceBacking) + return true; + + return m_surfaceBacking->isMissingContent(); +} + IntRect Surface::computePrepareArea() { IntRect area; diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.h b/Source/WebCore/platform/graphics/android/rendering/Surface.h index 756fabd..d197d43 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.h +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.h @@ -53,6 +53,7 @@ public: bool drawGL(bool layerTilesDisabled); void swapTiles(); bool isReady(); + bool isMissingContent(); void computeTexturesAmount(TexturesResult* result); @@ -60,7 +61,6 @@ public: bool needsTexture() { return m_needsTexture; } bool hasText() { return m_hasText; } bool isBase(); - void setBackground(Color background) { m_background = background; } // TilePainter methods virtual bool paint(Tile* tile, SkCanvas* canvas); @@ -72,7 +72,6 @@ private: IntRect visibleArea(); IntRect unclippedArea(); bool singleLayer() { return m_layers.size() == 1; } - void updateBackground(const Color& background); bool useAggressiveRendering(); const TransformationMatrix* drawTransform(); diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h index b04e462..ec01dbe 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h @@ -59,6 +59,11 @@ public: return !m_zooming && m_frontTexture->isReady() && m_scale > 0; } + bool isMissingContent() + { + return !m_zooming && m_frontTexture->isMissingContent(); + } + int nbTextures(IntRect& area, float scale) { // TODO: consider the zooming case for the backTexture diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp index cd5ceef..24e196b 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp @@ -63,11 +63,8 @@ SurfaceCollection::SurfaceCollection(LayerAndroid* layer) // set the layersurfaces' update count, to be drawn on painted tiles unsigned int updateCount = TilesManager::instance()->incWebkitContentUpdates(); - for (unsigned int i = 0; i < m_surfaces.size(); i++) { + for (unsigned int i = 0; i < m_surfaces.size(); i++) m_surfaces[i]->setUpdateCount(updateCount); - if (m_surfaces[i]->isBase()) - m_surfaces[i]->setBackground(getBackground()); - } #ifdef DEBUG_COUNT ClassTracker::instance()->increment("SurfaceCollection"); @@ -128,7 +125,7 @@ bool SurfaceCollection::drawGL(const SkRect& visibleRect) return needsRedraw; } -Color SurfaceCollection::getBackground() +Color SurfaceCollection::getBackgroundColor() { return static_cast<BaseLayerAndroid*>(m_compositedRoot)->getBackgroundColor(); } @@ -156,6 +153,16 @@ bool SurfaceCollection::isReady() return true; } +bool SurfaceCollection::isMissingBackgroundContent() +{ + if (!m_compositedRoot) + return true; + + // return true when the first surface is missing content (indicating the + // entire viewport isn't covered) + return m_surfaces[0]->isMissingContent(); +} + void SurfaceCollection::computeTexturesAmount(TexturesResult* result) { for (unsigned int i = 0; i < m_surfaces.size(); i++) diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h index 6450c9c..7dfe140 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h @@ -50,9 +50,10 @@ public: // Tiled painting methods (executed on groups) void prepareGL(const SkRect& visibleRect); bool drawGL(const SkRect& visibleRect); - Color getBackground(); + Color getBackgroundColor(); void swapTiles(); bool isReady(); + bool isMissingBackgroundContent(); void computeTexturesAmount(TexturesResult* result); // Recursive tree methods (animations, invals, etc) diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp index 91335c7..8c9cad5 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp @@ -224,6 +224,7 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, // =========================================================================== // Don't have a drawing collection, draw white background Color background = Color::white; + bool drawBackground = true; if (m_drawingCollection) { bool drawingReady = didCollectionSwap || m_drawingCollection->isReady(); @@ -245,17 +246,21 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, m_drawingCollection->evaluateAnimations(currentTime); ALOGV("drawing collection %p", m_drawingCollection); - background = m_drawingCollection->getBackground(); + background = m_drawingCollection->getBackgroundColor(); + drawBackground = m_drawingCollection->isMissingBackgroundContent(); } else if (m_paintingCollection) { // Use paintingCollection background color while tiles are not done painting. - background = m_paintingCollection->getBackground(); + background = m_paintingCollection->getBackgroundColor(); } // Start doing the actual GL drawing. - ALOGV("background is %x", background.rgb()); - // If background is opaque, we can safely and efficiently clear it here. - // Otherwise, we have to calculate all the missing tiles and blend the background. - GLUtils::clearBackgroundIfOpaque(&background); + if (drawBackground) { + ALOGV("background is %x", background.rgb()); + // If background is opaque, we can safely and efficiently clear it here. + // Otherwise, we have to calculate all the missing tiles and blend the background. + GLUtils::clearBackgroundIfOpaque(&background); + } + if (m_drawingCollection && m_drawingCollection->drawGL(visibleRect)) returnFlags |= uirenderer::DrawGlInfo::kStatusDraw; diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp index 2510d52..a58a1d2 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp @@ -274,8 +274,8 @@ int TileGrid::nbTextures(IntRect& area, float scale) } void TileGrid::drawGL(const IntRect& visibleArea, float opacity, - const TransformationMatrix* transform, - const Color* background) + const TransformationMatrix* transform, + const Color* background) { m_area = computeTilesArea(visibleArea, m_scale); if (m_area.width() == 0 || m_area.height() == 0) @@ -322,7 +322,8 @@ void TileGrid::drawGL(const IntRect& visibleArea, float opacity, drawn++; } - if (semiOpaqueBaseSurface) + // log tile information for base, high res tiles + if (m_isBaseSurface && background) TilesManager::instance()->getProfiler()->nextTile(tile, invScale, tileInView); } diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp index af19f30..a330b41 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp @@ -203,7 +203,6 @@ void TransferQueue::blitTileFromQueue(GLuint fboID, TileTexture* destTex, GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { ALOGV("Error: glCheckFramebufferStatus failed"); - glBindFramebuffer(GL_FRAMEBUFFER, 0); return; } @@ -426,7 +425,6 @@ void TransferQueue::updateDirtyTiles() // dynamic switch possible. Moving this out from the loop can save some // milli-seconds. if (usedFboForUpload) { - glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO restoreGLState(); GLUtils::checkGlError("updateDirtyTiles"); } @@ -593,6 +591,7 @@ void TransferQueue::cleanupPendingDiscard() void TransferQueue::saveGLState() { + glGetIntegerv(GL_FRAMEBUFFER_BINDING, m_GLStateBeforeBlit.bufferId); glGetIntegerv(GL_VIEWPORT, m_GLStateBeforeBlit.viewport); glGetBooleanv(GL_SCISSOR_TEST, m_GLStateBeforeBlit.scissor); glGetBooleanv(GL_DEPTH_TEST, m_GLStateBeforeBlit.depth); @@ -616,6 +615,7 @@ void TransferQueue::setGLStateForCopy(int width, int height) void TransferQueue::restoreGLState() { + glBindFramebuffer(GL_FRAMEBUFFER, m_GLStateBeforeBlit.bufferId[0]); glViewport(m_GLStateBeforeBlit.viewport[0], m_GLStateBeforeBlit.viewport[1], m_GLStateBeforeBlit.viewport[2], diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h index 65ff116..d1024a4 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h +++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h @@ -40,6 +40,7 @@ class Tile; class TileTexture; struct GLState { + GLint bufferId[1]; GLint viewport[4]; GLboolean scissor[1]; GLboolean depth[1]; diff --git a/Source/WebCore/rendering/RenderFileUploadControl.cpp b/Source/WebCore/rendering/RenderFileUploadControl.cpp index 8056662..109d219 100644 --- a/Source/WebCore/rendering/RenderFileUploadControl.cpp +++ b/Source/WebCore/rendering/RenderFileUploadControl.cpp @@ -122,6 +122,13 @@ String RenderFileUploadControl::acceptTypes() return static_cast<HTMLInputElement*>(node())->accept(); } +#if ENABLE(MEDIA_CAPTURE) +String RenderFileUploadControl::capture() +{ + return static_cast<HTMLInputElement*>(node())->capture(); +} +#endif + void RenderFileUploadControl::chooseIconForFiles(FileChooser* chooser, const Vector<String>& filenames) { if (Chrome* chromePointer = chrome()) diff --git a/Source/WebCore/rendering/RenderFileUploadControl.h b/Source/WebCore/rendering/RenderFileUploadControl.h index e9fb7f0..b57260d 100644 --- a/Source/WebCore/rendering/RenderFileUploadControl.h +++ b/Source/WebCore/rendering/RenderFileUploadControl.h @@ -68,6 +68,9 @@ private: #endif String acceptTypes(); void chooseIconForFiles(FileChooser*, const Vector<String>&); +#if ENABLE(MEDIA_CAPTURE) + String capture(); +#endif Chrome* chrome() const; int maxFilenameWidth() const; |