Flexbox doesn't need to compute logical height for stretched items in row flow
https://bugs.webkit.org/show_bug.cgi?id=94807

Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-08-23
Reviewed by Tony Chang.

Change logicalHeightConstrainedByMinMax to
constrainLogicalHeightByMinMax. The new method doesn't compute the
MainOrPreferred logical height (that computation has been moved back to
computeLogicalHeight). RenderFlexibleBox now just constrains the
stretchedLogicalHeight by min/max.

No new tests. This is a cleanup of bug 94237.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax): Instead of
computing the MainOrPreferred logical height, just constrain the given
logical height by MinSize and MaxSize.
(WebCore::RenderBox::computeLogicalHeight): Compute the MainOrPreferred
logical height before constraining by min/max.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Use
constrainLogicalHeightByMinMax to constrain the stretchedLogicalHeight.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Web pages are zoomed out to much on initial load
https://bugs.webkit.org/show_bug.cgi?id=94830

Reviewed by Adam Treat.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 193943
Browser continuously adds paddings to the left and right sides of the
main contents which makes the main contents even smaller.
The issue can be reproduced on the desktop websites such as
huffingtonpost.ca, bloomberg.com, online.wsj.com, nytimes.com,
yahoo.com, thestar.com, sina.com.cn, sohu.com and so on.
The root cause is that we layout those contents at the width of 1280
although the fixed width of the main contents of those websites is
less than 1000, which results in adding the paddings.
To fix this, we need to get back to the default max layout size
1024 * 768, which will make the main contents of those popular websites
take full advantage of the screen real estate and look much better.

Internally reviewed by Adam Treat.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::splittingFactor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Removing media/track/track-mode.html - resolved.
[Chromium] Removing media/track/track-cues-cuechange.html - appears to be no longer failing.

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rename LayerRendererChromium to GL-specific name
https://bugs.webkit.org/show_bug.cgi?id=94835

Reviewed by James Robinson.

Over time, LayerRendererChromium has evolved to be a GL-specific
subclass of CCRenderer that has no awareness of layers (as it operates
only with drawQuads).

This patch renames LayerRendererChromium to CCRendererGL, replaces all
instances of "layerRenderer" with just "renderer", and removes a
few unnecessary includes of LayerRendererChromium.h.

Source/WebCore:

No new tests (no-op refactoring).

* WebCore.gypi:
* platform/graphics/chromium/Canvas2DLayerBridge.cpp:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
* platform/graphics/chromium/GeometryBinding.cpp:
* platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp:
(WebCore::HeadsUpDisplayLayerChromium::update):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
* platform/graphics/chromium/LayerTextureSubImage.cpp:
* platform/graphics/chromium/ProgramBinding.cpp:
* platform/graphics/chromium/RenderSurfaceChromium.h:
(WebCore):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
* platform/graphics/chromium/TextureCopier.cpp:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::sortLayers):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
(WebCore::CCLayerTreeHost::initializeRenderer):
(WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread):
(WebCore::CCLayerTreeHost::finishAllRendering):
(WebCore::CCLayerTreeHost::rendererCapabilities):
(WebCore::CCLayerTreeHost::initializeRendererIfNeeded):
(WebCore::CCLayerTreeHost::updateLayers):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::RendererCapabilities::RendererCapabilities):
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::canDraw):
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
(WebCore::CCLayerTreeHostImpl::finishAllRendering):
(WebCore::CCLayerTreeHostImpl::isContextLost):
(WebCore::CCLayerTreeHostImpl::rendererCapabilities):
(WebCore::CCLayerTreeHostImpl::swapBuffers):
(WebCore::CCLayerTreeHostImpl::readback):
(WebCore::CCLayerTreeHostImpl::setVisible):
(WebCore::CCLayerTreeHostImpl::initializeRenderer):
(WebCore::CCLayerTreeHostImpl::setViewportSize):
(WebCore::CCLayerTreeHostImpl::ensureRenderSurfaceLayerList):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore):
(WebCore::CCLayerTreeHostImpl::renderer):
(CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
* platform/graphics/chromium/cc/CCPriorityCalculator.cpp:
* platform/graphics/chromium/cc/CCProxy.h:
(WebCore):
(CCProxy):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore):
* platform/graphics/chromium/cc/CCRenderer.h:
(CCRenderer):
* platform/graphics/chromium/cc/CCRendererGL.cpp: Renamed from Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp.
(WebCore::CCRendererGL::create):
(WebCore):
(WebCore::CCRendererGL::CCRendererGL):
(WebCore::CCRendererGL::initialize):
(WebCore::CCRendererGL::~CCRendererGL):
(WebCore::CCRendererGL::context):
(WebCore::CCRendererGL::debugGLCall):
(WebCore::CCRendererGL::setVisible):
(WebCore::CCRendererGL::releaseRenderPassTextures):
(WebCore::CCRendererGL::viewportChanged):
(WebCore::CCRendererGL::clearFramebuffer):
(WebCore::CCRendererGL::beginDrawingFrame):
(WebCore::CCRendererGL::doNoOp):
(WebCore::CCRendererGL::drawQuad):
(WebCore::CCRendererGL::drawCheckerboardQuad):
(WebCore::CCRendererGL::drawDebugBorderQuad):
(WebCore::applyFilters):
(WebCore::CCRendererGL::drawBackgroundFilters):
(WebCore::CCRendererGL::drawRenderPassQuad):
(WebCore::CCRendererGL::drawSolidColorQuad):
(TileProgramUniforms):
(WebCore::tileUniformLocation):
(WebCore::CCRendererGL::drawTileQuad):
(WebCore::CCRendererGL::drawYUVVideoQuad):
(WebCore::CCRendererGL::drawStreamVideoQuad):
(WebCore::TextureProgramBinding::set):
(TextureProgramBinding):
(WebCore::TexTransformTextureProgramBinding::set):
(TexTransformTextureProgramBinding):
(WebCore::CCRendererGL::drawTextureQuad):
(WebCore::CCRendererGL::drawIOSurfaceQuad):
(WebCore::CCRendererGL::finishDrawingFrame):
(WebCore::CCRendererGL::toGLMatrix):
(WebCore::CCRendererGL::setShaderFloatQuad):
(WebCore::CCRendererGL::setShaderOpacity):
(WebCore::CCRendererGL::drawQuadGeometry):
(WebCore::CCRendererGL::copyTextureToFramebuffer):
(WebCore::CCRendererGL::finish):
(WebCore::CCRendererGL::swapBuffers):
(WebCore::CCRendererGL::onSwapBuffersComplete):
(WebCore::CCRendererGL::onMemoryAllocationChanged):
(WebCore::CCRendererGL::onMemoryAllocationChangedOnImplThread):
(WebCore::CCRendererGL::discardFramebuffer):
(WebCore::CCRendererGL::ensureFramebuffer):
(WebCore::CCRendererGL::onContextLost):
(WebCore::CCRendererGL::getFramebufferPixels):
(WebCore::CCRendererGL::getFramebufferTexture):
(WebCore::CCRendererGL::useScopedTexture):
(WebCore::CCRendererGL::bindFramebufferToOutputSurface):
(WebCore::CCRendererGL::bindFramebufferToTexture):
(WebCore::CCRendererGL::enableScissorTestRect):
(WebCore::CCRendererGL::disableScissorTest):
(WebCore::CCRendererGL::setDrawViewportSize):
(WebCore::CCRendererGL::makeContextCurrent):
(WebCore::CCRendererGL::initializeSharedObjects):
(WebCore::CCRendererGL::tileCheckerboardProgram):
(WebCore::CCRendererGL::solidColorProgram):
(WebCore::CCRendererGL::renderPassProgram):
(WebCore::CCRendererGL::renderPassProgramAA):
(WebCore::CCRendererGL::renderPassMaskProgram):
(WebCore::CCRendererGL::renderPassMaskProgramAA):
(WebCore::CCRendererGL::tileProgram):
(WebCore::CCRendererGL::tileProgramOpaque):
(WebCore::CCRendererGL::tileProgramAA):
(WebCore::CCRendererGL::tileProgramSwizzle):
(WebCore::CCRendererGL::tileProgramSwizzleOpaque):
(WebCore::CCRendererGL::tileProgramSwizzleAA):
(WebCore::CCRendererGL::textureProgram):
(WebCore::CCRendererGL::textureProgramFlip):
(WebCore::CCRendererGL::textureIOSurfaceProgram):
(WebCore::CCRendererGL::videoYUVProgram):
(WebCore::CCRendererGL::videoStreamTextureProgram):
(WebCore::CCRendererGL::cleanupSharedObjects):
(WebCore::CCRendererGL::isContextLost):
* platform/graphics/chromium/cc/CCRendererGL.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h.
(WebKit):
(WebCore):
(CCRendererGL):
(WebCore::CCRendererGL::sharedGeometryQuad):
(WebCore::CCRendererGL::sharedGeometry):
(WebCore::CCRendererGL::isFramebufferDiscarded):
* platform/graphics/chromium/cc/CCResourceProvider.cpp:
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
(WebCore::CCSingleThreadProxy::initializeRenderer):
(WebCore::CCSingleThreadProxy::recreateContext):
(WebCore::CCSingleThreadProxy::rendererCapabilities):
(WebCore::CCSingleThreadProxy::doCommit):
(WebCore::CCSingleThreadProxy::forceSerializeOnSwapBuffers):
(WebCore::CCSingleThreadProxy::commitAndComposite):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(CCSingleThreadProxy):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::compositeAndReadback):
(WebCore::CCThreadProxy::initializeRenderer):
(WebCore::CCThreadProxy::recreateContext):
(WebCore::CCThreadProxy::rendererCapabilities):
(WebCore::CCThreadProxy::forceSerializeOnSwapBuffersOnImplThread):
(WebCore::CCThreadProxy::beginFrame):
(WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
(WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
(WebCore::CCThreadProxy::initializeRendererOnImplThread):
(WebCore::CCThreadProxy::recreateContextOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):

Source/WebKit/chromium:

* WebKit.gypi:
* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestLayerOcclusion::beginTest):
(WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
(WTF::CCLayerTreeHostTestManySurfaces::beginTest):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::drawLayersOnCCThread):
* tests/CCRendererGLTest.cpp: Renamed from Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp.
(FrameCountingMemoryAllocationSettingContext):
(FrameCountingMemoryAllocationSettingContext::FrameCountingMemoryAllocationSettingContext):
(FrameCountingMemoryAllocationSettingContext::prepareTexture):
(FrameCountingMemoryAllocationSettingContext::setMemoryAllocationChangedCallbackCHROMIUM):
(FrameCountingMemoryAllocationSettingContext::getString):
(FrameCountingMemoryAllocationSettingContext::frameCount):
(FrameCountingMemoryAllocationSettingContext::setMemoryAllocation):
(FakeCCRendererClient):
(FakeCCRendererClient::FakeCCRendererClient):
(FakeCCRendererClient::setFullRootLayerDamageCount):
(FakeCCRendererClient::rootRenderPass):
(FakeCCRendererClient::renderPassesInDrawOrder):
(FakeCCRendererClient::renderPasses):
(FakeCCRendererClient::memoryAllocationLimitBytes):
(FakeCCRendererGL):
(FakeCCRendererGL::FakeCCRendererGL):
(CCRendererGLTest):
(CCRendererGLTest::CCRendererGLTest):
(CCRendererGLTest::SetUp):
(CCRendererGLTest::TearDown):
(CCRendererGLTest::swapBuffers):
(CCRendererGLTest::context):
(TEST_F):
(ForbidSynchronousCallContext):
(ForbidSynchronousCallContext::ForbidSynchronousCallContext):
(ForbidSynchronousCallContext::getActiveAttrib):
(ForbidSynchronousCallContext::getActiveUniform):
(ForbidSynchronousCallContext::getAttachedShaders):
(ForbidSynchronousCallContext::getAttribLocation):
(ForbidSynchronousCallContext::getBooleanv):
(ForbidSynchronousCallContext::getBufferParameteriv):
(ForbidSynchronousCallContext::getContextAttributes):
(ForbidSynchronousCallContext::getError):
(ForbidSynchronousCallContext::getFloatv):
(ForbidSynchronousCallContext::getFramebufferAttachmentParameteriv):
(ForbidSynchronousCallContext::getIntegerv):
(ForbidSynchronousCallContext::getProgramiv):
(ForbidSynchronousCallContext::getShaderiv):
(ForbidSynchronousCallContext::getString):
(ForbidSynchronousCallContext::getProgramInfoLog):
(ForbidSynchronousCallContext::getRenderbufferParameteriv):
(ForbidSynchronousCallContext::getShaderInfoLog):
(ForbidSynchronousCallContext::getShaderPrecisionFormat):
(ForbidSynchronousCallContext::getShaderSource):
(ForbidSynchronousCallContext::getTexParameterfv):
(ForbidSynchronousCallContext::getTexParameteriv):
(ForbidSynchronousCallContext::getUniformfv):
(ForbidSynchronousCallContext::getUniformiv):
(ForbidSynchronousCallContext::getUniformLocation):
(ForbidSynchronousCallContext::getVertexAttribfv):
(ForbidSynchronousCallContext::getVertexAttribiv):
(ForbidSynchronousCallContext::getVertexAttribOffset):
(TEST):
(LoseContextOnFirstGetContext):
(LoseContextOnFirstGetContext::LoseContextOnFirstGetContext):
(ContextThatDoesNotSupportMemoryManagmentExtensions):
(ContextThatDoesNotSupportMemoryManagmentExtensions::ContextThatDoesNotSupportMemoryManagmentExtensions):
(ContextThatDoesNotSupportMemoryManagmentExtensions::prepareTexture):
(ContextThatDoesNotSupportMemoryManagmentExtensions::setMemoryAllocationChangedCallbackCHROMIUM):
(ContextThatDoesNotSupportMemoryManagmentExtensions::getString):
(ClearCountingContext):
(ClearCountingContext::ClearCountingContext):
(ClearCountingContext::clear):
(ClearCountingContext::clearCount):
* tests/TiledLayerChromiumTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126473 268f45cc-cd09-0410-ab3c-d52691b4dbfc