[Cairo] Fix memory leak in GraphicsContext3DCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=89561

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-20
Reviewed by Martin Robinson.

Fix a memory leak in GraphicsContext3D::getImageData().

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::getImageData): asNewNativeImage() returns a
caller-owned pointer to the native image data. So, using OwnPtr to manage
memory automatically.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: duplicating selected text when Enter key is pressed
https://bugs.webkit.org/show_bug.cgi?id=89559

Patch by Sergey Rogulenko <rogulenko@google.com> on 2012-06-20
Reviewed by Pavel Feldman.

* inspector/front-end/TextViewer.js:
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
The returned result of method normalize() should be used.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] IndexedDB: Don't close database if pending connections are in flight
https://bugs.webkit.org/show_bug.cgi?id=89512

Source/WebCore:

Add a counter tracking connections between the two phases, which is used along with
the completed connection count to determine the total number of connections.

Reviewed by Tony Chang.

Test: webkit_unit_tests --gtest_filter='IDBDatabaseBackendTest.ConnectionLifecycle'

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::connectionCount):
(WebCore):
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::transaction):
(WebCore::IDBDatabaseBackendImpl::registerFrontendCallbacks):
(WebCore::IDBDatabaseBackendImpl::openConnection):
(WebCore::IDBDatabaseBackendImpl::close):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::openInternal):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):

Source/WebKit/chromium:

Reviewed by Tony Chang.

* tests/IDBDatabaseBackendTest.cpp:
(MockIDBCallbacks):
(WebCore::MockIDBCallbacks::create):
(WebCore::MockIDBCallbacks::MockIDBCallbacks):
(WebCore):
(FakeIDBDatabaseCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::create):
(WebCore::FakeIDBDatabaseCallbacks::FakeIDBDatabaseCallbacks):
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: mark used/allocated JS heap on the native memory bar chart.
https://bugs.webkit.org/show_bug.cgi?id=89476

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-06-20
Reviewed by Yury Semikhatsky.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeMemoryBarChart):
(WebInspector.NativeMemoryBarChart.prototype._updateView):
* inspector/front-end/nativeMemoryProfiler.css:
(.memory-bar-chart-bar):
(.memory-bar-chart-unused):
(.memory-bar-chart-percent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Implement Web Intent delivery
https://bugs.webkit.org/show_bug.cgi?id=88989

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-20
Reviewed by Anders Carlsson.

Add a deliverIntent() method to the WebFrame so that
Web intents can be delivered once matched to a
specific service.

* UIProcess/WebFrameProxy.cpp:
(WebKit):
(WebKit::WebFrameProxy::deliverIntent):
* UIProcess/WebFrameProxy.h:
(WebKit):
(WebFrameProxy):
* UIProcess/WebIntentData.h:
(WebKit::WebIntentData::store):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit):
(WebKit::WebFrame::deliverIntent):
* WebProcess/WebPage/WebFrame.h:
(WebKit):
(WebFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit):
(WebKit::WebPage::deliverIntentToFrame):
* WebProcess/WebPage/WebPage.h:
(WebKit):
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use IntSize in RenderLayer to represent scroll offsets
https://bugs.webkit.org/show_bug.cgi?id=89154

Reviewed by Eric Seidel.

Source/WebCore:

Refactoring, covered by existing tests.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::scrollTo):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):
Updated those call-sites to use the IntSize variant of the scrolling function.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::panScrollFromPoint):
Updated the signature to use IntPoint to avoid an extra round-trip to LayoutPoint
(furthermore touch points should be in device pixels).

(WebCore::RenderLayer::clampScrollOffset):
Added this function that clamps a scroll offset to the box's size. This enables more
code sharing between the different functions. Also removed a NULL-check that shouldn't
be needed: scrolling is a RenderBox concept so any callers should ensure that we have
a RenderBox or it makes no sense to try to scroll.

(WebCore::RenderLayer::updateLayerPosition):
(WebCore::adjustedScrollDelta):
(WebCore::RenderLayer::scrollByRecursively):
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Updated to do IntSize arithmetic. Reuse clampScrollOffset when applicable.

* rendering/RenderLayer.h:
(WebCore::RenderLayer::scrollToXOffset):
(WebCore::RenderLayer::scrollToYOffset):
Updated the functions to take IntSize as much as possible.

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::scrollRenderer):
Updated to pass an IntSize to scrollToOffset.

Source/WebKit/win:

* WebView.cpp:
(WebView::gesture):
Updated to pass an IntSize to scrollByRecursively.

Source/WebKit2:

* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::gestureDidScroll):
Updated to pass an IntSize to scrollByRecursively.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix.

* tests/IDBDatabaseBackendTest.cpp:
(WebCore::MockIDBCallbacks::~MockIDBCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::~FakeIDBDatabaseCallbacks):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should be able to print disassembly interleaved with the IR
https://bugs.webkit.org/show_bug.cgi?id=89551

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::labelIgnoringWatchpoints):
(ARMv7Assembler):
* assembler/AbstractMacroAssembler.h:
(AbstractMacroAssembler):
(JSC::AbstractMacroAssembler::labelIgnoringWatchpoints):
* assembler/X86Assembler.h:
(X86Assembler):
(JSC::X86Assembler::labelIgnoringWatchpoints):
* dfg/DFGCommon.h:
(JSC::DFG::shouldShowDisassembly):
(DFG):
* dfg/DFGDisassembler.cpp: Added.
(DFG):
(JSC::DFG::Disassembler::Disassembler):
(JSC::DFG::Disassembler::dump):
(JSC::DFG::Disassembler::dumpDisassembly):
* dfg/DFGDisassembler.h: Added.
(DFG):
(Disassembler):
(JSC::DFG::Disassembler::setStartOfCode):
(JSC::DFG::Disassembler::setForBlock):
(JSC::DFG::Disassembler::setForNode):
(JSC::DFG::Disassembler::setEndOfMainPath):
(JSC::DFG::Disassembler::setEndOfCode):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpCodeOrigin):
(JSC::DFG::Graph::amountOfNodeWhiteSpace):
(DFG):
(JSC::DFG::Graph::printNodeWhiteSpace):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(DFG):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JITCompiler):
(JSC::DFG::JITCompiler::setStartOfCode):
(JSC::DFG::JITCompiler::setForBlock):
(JSC::DFG::JITCompiler::setForNode):
(JSC::DFG::JITCompiler::setEndOfMainPath):
(JSC::DFG::JITCompiler::setEndOfCode):
* dfg/DFGNode.h:
(Node):
(JSC::DFG::Node::willHaveCodeGen):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::nodeFlagsAsString):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* runtime/Options.cpp:
(Options):
(JSC::Options::initializeOptions):
* runtime/Options.h:
(Options):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS3 Backgrounds and Borders] Implement box-decoration-break rendering.
https://bugs.webkit.org/show_bug.cgi?id=88228

Reviewed by Eric Seidel.

Source/WebCore:

Implement the new CSS property box-decoration-break. It modifies
where we decide whether the borders needs to be sliced or not by
checking if the box-decoration-break is set to clone. If it's the case
then we need to explicitely redraw all edges.

Test: fast/box-decoration-break/box-decoration-break-rendering.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::paintFillLayer):

LayoutTests:

Add new tests to cover the feature.

* fast/box-decoration-break/box-decoration-break-rendering-expected.html: Added.
* fast/box-decoration-break/box-decoration-break-rendering.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix JSC ChangeLog, forgot to add a comment to the ChangeLog before committing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make sure that render surfaces are not pixel doubled with a device scale factor of 2
https://bugs.webkit.org/show_bug.cgi?id=86882

Patch by Ian Vollick <vollick@chromium.org> on 2012-06-20
Reviewed by Adrienne Walker.

To ensure that render surfaces are not pixel doubled when device scale factor is
two, the render surface's owning layer's draw transform is scaled by the
contents scale (in the same way that the parent matrix is scaled by the device
scale factor). The transformedLayerRect's dimensions also need to be in pixel
space. The surface origin transform should not scale, but needs to offset the
correct number of pixels, and the replica transforms need to be modified to
account for the scaling.

Source/WebCore:

To accomplish this, CCLayerImpl's needed to be made aware of contentsScale.

Thanks to Adrienne Walker for the computation of the replica draw transform.

Unit test: CCLayerTreeHostCommonTest.verifyRenderSurfaceTranformsInHighDPI

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::setContentsScale):
(WebCore::CCLayerImpl::contentsScale):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsInternal):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):

Source/WebKit/chromium:

* tests/CCLayerTreeHostCommonTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Timeline label bar jiggles when scrolling
https://bugs.webkit.org/show_bug.cgi?id=89579

Reviewed by Vsevolod Vlasov.

Adding timeline header into the timeline panel and settings its position
to absolute. Drive-by fix that updates rulers on sidebar resize.

* inspector/front-end/TimelineGrid.js:
(WebInspector.TimelineGrid):
(WebInspector.TimelineGrid.prototype.get gridHeaderElement):
(WebInspector.TimelineGrid.prototype.addEventDividers):
(WebInspector.TimelineGrid.prototype.setScrollAndDividerTop):
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane.prototype.sidebarResized):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype.sidebarResized):
(WebInspector.TimelinePanel.prototype.onResize):
* inspector/front-end/timelinePanel.css:
(#timeline-grid-header):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable setAcceleratedCompositingForFixedPositionEnabled
https://bugs.webkit.org/show_bug.cgi?id=89575

Patch by Konrad Piascik <kpiascik@rim.com> on 2012-06-20
Reviewed by Antonio Gomes.

Enable the flag so that we get position:fixed elemetns to be rendered
using accelerated compositing.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Made the incremental sweeper more aggressive
https://bugs.webkit.org/show_bug.cgi?id=89527

Reviewed by Oliver Hunt.

This is a pre-requisite to getting rid of "berzerker GC" because we need
the sweeper to reclaim memory in a timely fashion, or we'll see a memory
footprint regression.

* heap/IncrementalSweeper.h:
* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::scheduleTimer): Since the time slice is predictable,
no need to use a data member to record it.

(JSC::IncrementalSweeper::doSweep): Sweep as many blocks as we can in a
small time slice. This is better than sweeping only one block per timer
fire because that strategy has a heavy timer overhead, and artificially
delays memory reclamation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Allow module injections into the InjectedScript
https://bugs.webkit.org/show_bug.cgi?id=89530

Add a new InjectedScriptModule abstract class that inherits InjectedScriptBase
to reuse implementation, and which javascript code is injected via
InjectedScript.

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-06-20
Reviewed by Pavel Feldman.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptObject.cpp:
(WebCore::ScriptObject::ScriptObject):
(WebCore):
* bindings/js/ScriptObject.h:
(ScriptObject):
(WebCore::ScriptObject::ScriptObject):
* bindings/v8/ScriptObject.cpp:
(WebCore::ScriptObject::ScriptObject):
(WebCore):
* bindings/v8/ScriptObject.h:
(ScriptObject):
(WebCore::ScriptObject::~ScriptObject):
* inspector/InjectedScript.cpp:
* inspector/InjectedScript.h:
(WebCore):
(WebCore::InjectedScript::name):
(InjectedScript):
* inspector/InjectedScriptBase.cpp:
(WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
* inspector/InjectedScriptBase.h:
(WebCore):
(InjectedScriptBase):
* inspector/InjectedScriptManager.h:
(InjectedScriptManager):
(WebCore::InjectedScriptManager::inspectedStateAccessCheck):
* inspector/InjectedScriptModule.cpp: Copied from Source/WebCore/inspector/InjectedScriptBase.h.
(WebCore):
(WebCore::InjectedScriptModule::InjectedScriptModule):
(WebCore::InjectedScriptModule::ensureInjected):
* inspector/InjectedScriptModule.h: Copied from Source/WebCore/bindings/js/ScriptObject.h.
(WebCore):
(InjectedScriptModule):
* inspector/InjectedScriptSource.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Negative margin block doesn't properly clear a float enclosed by a previous sibling
https://bugs.webkit.org/show_bug.cgi?id=10900

Reviewed by Eric Seidel.

Source/WebCore:

Tests: fast/block/float/previous-sibling-abspos-001.html
       fast/block/float/previous-sibling-abspos-002.html
       fast/block/float/previous-sibling-float-001.html
       fast/block/float/previous-sibling-float-002.html
       fast/css/clear-float-sibling.html

Parent blocks keep a list of child floats that extend out of the parent block and
by implication overhang into the parent's siblings. But this doesn't work if the
sibling has collapsing margins - it will not find the float in the previous block's
list so will ignore the float and fail to clear it.

RenderBlock:collapseMargins() needs to check if a child's collapsing margin has
reduced the height of the parent up past the bottom of its previous sibling's lowest float
and add the now overhanging float to the parent's float list if appropriate. No need to do
this if the previous sibling is a float or is positioned - the child will clear/avoid it anyway
and attempting to avoid floated children of floats causes incorrect layout.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseMargins):

LayoutTests:

* fast/block/float/previous-sibling-abspos-001-expected.html: Added.
* fast/block/float/previous-sibling-abspos-001.html: Added.
* fast/block/float/previous-sibling-abspos-002-expected.html: Added.
* fast/block/float/previous-sibling-abspos-002.html: Added.
* fast/block/float/previous-sibling-float-001-expected.html: Added.
* fast/block/float/previous-sibling-float-001.html: Added.
* fast/block/float/previous-sibling-float-002-expected.html: Added.
* fast/block/float/previous-sibling-float-002.html: Added.
* fast/css/clear-float-sibling-expected.html: Added.
* fast/css/clear-float-sibling.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Don't re-enter CachedResource::removeClient() if an XHR
is canceled and restarted multiple times.
https://bugs.webkit.org/show_bug.cgi?id=89378

Reviewed by Eric Seidel.

Test: http/tests/xmlhttprequest/reentrant-cancel.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::cancel):
(WebCore::DocumentThreadableLoader::clearResource): Save off a copy of m_resource
   then clear it, so we don't call clearResource() multiple times for the same resource.

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=89378.
Reviewed by Eric Seidel.

* http/tests/xmlhttprequest/reentrant-cancel-expected.txt: Added.
* http/tests/xmlhttprequest/reentrant-cancel.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
new-run-webkit-tests should spin-up enough httpd processes to avoid timeouts
https://bugs.webkit.org/show_bug.cgi?id=88134

Reviewed by Tony Chang.

Change NRWT to spin up 2*min(child_processes, locked_shards)
http servers by default so that we are less likely to get a
bunch of http timeouts at the beginning of a test run.

Note that I had to tweak executive_mock to support mocked stderr
because the apache_http_server code reads stderr when starting a
process to ensure it started okay.

* Scripts/webkitpy/common/system/executive_mock.py:
(MockProcess.__init__):
* Scripts/webkitpy/common/system/outputcapture.py:
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests):
(Manager.start_servers_with_lock):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.to.start_http_server):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort.start_http_server):
(TestPort._path_to_apache):
(TestPort):
(TestPort._path_to_apache_config_file):
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py: Added
(LayoutTestApacheHttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] webkit-backface-visibility doesn't work with video
https://bugs.webkit.org/show_bug.cgi?id=88908

When determining a contents layer's backface culling, use the parent
layer's transform and backface-visibility properties. Track which
layers need this special treatment with useParentBackfaceVisibility
and setUseParentBackfaceVisibility functions in WebCore::LayerChromium,
WebKit::WebLayer, and WebCore::CCLayerImpl.

Patch by Christopher Cameron <ccameron@chromium.org> on 2012-06-20
Reviewed by Adrienne Walker.

Source/Platform:

* chromium/public/WebLayer.h:
    (WebLayer):
        Add an accessor to specify that a layer should use its parent's
        backface culling behavior.

Source/WebCore:

Tests: compositing/backface-visibility/backface-visibility-image.html
       compositing/backface-visibility/backface-visibility-webgl.html

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setupContentsLayer):
    When a contents layer is added, tag it as inheriting its backface
    culling from its parent.
* platform/graphics/chromium/LayerChromium.cpp:
    (WebCore::LayerChromium::LayerChromium):
        Initialize new m_useParentBackfaceVisibility member variable.
    (WebCore::LayerChromium::pushPropertiesTo):
        Propagate m_useParentBackfaceVisibility to CCLayerImpl.
* platform/graphics/chromium/LayerChromium.h:
    (WebCore::LayerChromium::setUseParentBackfaceVisibility):
    (WebCore::LayerChromium::useParentBackfaceVisibility):
    (LayerChromium):
        Add m_useParentBackfaceVisibility member variable and modify
        and query accessors.
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
    (WebCore::CCLayerImpl::CCLayerImpl):
        Initialize new m_useParentBackfaceVisibility member variable.
* platform/graphics/chromium/cc/CCLayerImpl.h:
    (WebCore::CCLayerImpl::setUseParentBackfaceVisibility):
    (WebCore::CCLayerImpl::useParentBackfaceVisibility):
    (CCLayerImpl):
        Add m_useParentBackfaceVisibility member variable and modify
        and query accessors.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
    (WebCore::layerShouldBeSkipped):
        When examining a layer, if the layer has
        useParentBackfaceVisibility set then use the layer's parent
        layer to determine backface culling.

Source/WebKit/chromium:

* src/WebLayer.cpp:
    (WebKit::WebLayer::setUseParentBackfaceVisibility):
        Add an accessor to specify that a layer should use its parent's
        backface culling behavior.

LayoutTests:

* compositing/backface-visibility/backface-visibility-image-expected.png: Added.
* compositing/backface-visibility/backface-visibility-image-expected.txt: Added.
* compositing/backface-visibility/backface-visibility-image.html: Added.
* compositing/backface-visibility/backface-visibility-webgl-expected.png: Added.
* compositing/backface-visibility/backface-visibility-webgl-expected.txt: Added.
* compositing/backface-visibility/backface-visibility-webgl.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for fit-content etc
https://bugs.webkit.org/show_bug.cgi?id=38919

Patch by Elliott Sprehn <esprehn@gmail.com> on 2012-06-20
Reviewed by Tony Chang.

Source/WebCore:

Implement the CSS3 intrinsic dimension keywords for width properties and
add most of the plumbing for height properties but don't expose them
yet since this patch doesn't enforce them (matching current Gecko).
http://dev.w3.org/csswg/css3-writing-modes/#intrinsic-sizing

This patch implements -webkit-min-content, -webkit-max-content,
-webkit-fill-available and -webkit-fit-content for all width
properties.

Tests: fast/css-intrinsic-dimensions/height-dynamic-property-value.html
       fast/css-intrinsic-dimensions/height-property-value.html
       fast/css-intrinsic-dimensions/max-width-constrained.html
       fast/css-intrinsic-dimensions/max-width-unconstrained.html
       fast/css-intrinsic-dimensions/min-width.html
       fast/css-intrinsic-dimensions/width-avoid-floats.html
       fast/css-intrinsic-dimensions/width-dynamic-property-value.html
       fast/css-intrinsic-dimensions/width-property-value.html
       fast/css-intrinsic-dimensions/width.html

* css/CSSParser.cpp: Add parser support for the new keywords.
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValue.cpp:
(WebCore):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* css/LengthFunctions.cpp: Implement conversion functions.
(WebCore::minimumValueForLength):
(WebCore::valueForLength):
(WebCore::floatValueForLength):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::StyleBuilder::StyleBuilder): Clean up the template for old
   intrinsic values and add new values. Rename old intrinsic to
   LegacyIntrinsic and add support for the new dimension keywords as
   Intrinsic.
* platform/Length.h:
(WebCore::Length::isIntrinsicOrAuto):
(WebCore::Length::isLegacyIntrinsic): New method to check for old
    min-intrinsic and intrinsic keywords.
(WebCore::Length::isIntrinsic): New method to check for CSS3 intrinsic
    dimension keywords like min-content.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegionUsing): Expose the max
   and min logical preferred widths as the new keywords.
(WebCore::RenderBox::sizesLogicalWidthToFitContent): Renamed method to
   be more consistent with the new MinContent naming in the spec.
* rendering/RenderBox.h:
(RenderBox):

LayoutTests:

Tests for CSS3 intrinsic dimension keywords as defined in the
writing modes spec. This tests the implementation for width and
ensures that height properties don't allow the new keywords yet
since they're not implemented by this patch.

* fast/css-intrinsic-dimensions/height-dynamic-property-value-expected.txt: Added.
* fast/css-intrinsic-dimensions/height-dynamic-property-value.html: Added.
* fast/css-intrinsic-dimensions/height-property-value-expected.txt: Added.
* fast/css-intrinsic-dimensions/height-property-value.html: Added.
* fast/css-intrinsic-dimensions/max-width-constrained-expected.html: Added.
* fast/css-intrinsic-dimensions/max-width-constrained.html: Added.
* fast/css-intrinsic-dimensions/max-width-unconstrained-expected.html: Added.
* fast/css-intrinsic-dimensions/max-width-unconstrained.html: Added.
* fast/css-intrinsic-dimensions/min-width-expected.html: Added.
* fast/css-intrinsic-dimensions/min-width.html: Added.
* fast/css-intrinsic-dimensions/width-avoid-floats-expected.html: Added.
* fast/css-intrinsic-dimensions/width-avoid-floats.html: Added.
* fast/css-intrinsic-dimensions/width-dynamic-property-value-expected.txt: Added.
* fast/css-intrinsic-dimensions/width-dynamic-property-value.html: Added.
* fast/css-intrinsic-dimensions/width-expected.html: Added.
* fast/css-intrinsic-dimensions/width-keyword-classes.css: Added.
(.min-content):
(.max-content):
(.fill-available):
(.fit-content):
(.max-width-min-content):
(.max-width-max-content):
(.max-width-fill-available):
(.max-width-fit-content):
(.min-width-min-content):
(.min-width-max-content):
(.min-width-fill-available):
(.min-width-fit-content):
* fast/css-intrinsic-dimensions/width-property-value-expected.txt: Added.
* fast/css-intrinsic-dimensions/width-property-value.html: Added.
* fast/css-intrinsic-dimensions/width.html: Added.

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