Fix cross-direction stretch for replaced elements in row flexbox
https://bugs.webkit.org/show_bug.cgi?id=94237

Patch by Shezan Baig <sbaig1@bloomberg.net> on 2012-08-21
Reviewed by Ojan Vafai.

Source/WebCore:

When stretching, don't take into account the instrinsic size of child
replaced elements. Only the fixed size, min size, and max size of the
child should be taken into account. The logic that computed this was
moved from RenderBox::computeLogicalHeight to a new helper method
called logicalHeightConstrainedByMinMax.  This helper method is now
used from RenderFlexibleBox::applyStretchAlignmentToChild, instead of
using RenderBox::computeLogicalHeight.

A similar change will need to be made for column-flowing flexboxes.
This will be addressed in https://webkit.org/b/94604.

No new tests.  The existing css3/flexbox/flexitem.html test was
extended to cover this case.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::logicalHeightConstrainedByMinMax): New helper
method that is used by RenderBox::computeLogicalHeight and also by
RenderFlexibleBox::applyStretchAlignmentToChild.
(WebCore):
(WebCore::RenderBox::computeLogicalHeight): Updated to use the new
logicalHeightConstrainedByMinMax helper method.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Use
logicalHeightConstrainedByMinMax instead of computeLogicalHeight.

LayoutTests:

Fix test cases for images stretching in the cross direction. Also,
added test cases for stretching/shrinking iframes, seamless iframes,
and also tests for vertically flowing flexboxes.

* css3/flexbox/flexitem-expected.txt:
* css3/flexbox/flexitem.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement UndoManager's automatic DOM transactions
https://bugs.webkit.org/show_bug.cgi?id=91812

Patch by Sukolsak Sakshuwong <sukolsak@google.com> on 2012-08-21
Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch implements automatic DOM transactions in UndoManager
by recording changes in tree structure, attributes, and character data
of nodes under undo scope host.

Tests: editing/undomanager/automatic-transaction-attribute.html
       editing/undomanager/automatic-transaction-data.html
       editing/undomanager/automatic-transaction-node.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMTransaction.h:
(WebCore::DOMTransaction::addTransactionStep):
(DOMTransaction):
* bindings/v8/DOMTransaction.cpp:
(DOMTransactionScope):
(WebCore::DOMTransactionScope::DOMTransactionScope):
(WebCore::DOMTransactionScope::~DOMTransactionScope):
(WebCore):
(WebCore::DOMTransaction::apply):
(WebCore::DOMTransaction::unapply):
(WebCore::DOMTransaction::reapply):
* bindings/v8/DOMTransaction.h:
(WebCore::DOMTransaction::addTransactionStep):
(DOMTransaction):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):
(WebCore::willRemoveChildren):
(WebCore::updateTreeAfterInsertion):
* dom/Element.cpp:
(WebCore::Element::willModifyAttribute):
* editing/DOMTransactionStep.cpp: Added.
(WebCore):
(WebCore::NodeInsertingDOMTransactionStep::NodeInsertingDOMTransactionStep):
(WebCore::NodeInsertingDOMTransactionStep::create):
(WebCore::NodeInsertingDOMTransactionStep::unapply):
(WebCore::NodeInsertingDOMTransactionStep::reapply):
(WebCore::NodeRemovingDOMTransactionStep::NodeRemovingDOMTransactionStep):
(WebCore::NodeRemovingDOMTransactionStep::create):
(WebCore::NodeRemovingDOMTransactionStep::unapply):
(WebCore::NodeRemovingDOMTransactionStep::reapply):
(WebCore::DataReplacingDOMTransactionStep::DataReplacingDOMTransactionStep):
(WebCore::DataReplacingDOMTransactionStep::create):
(WebCore::DataReplacingDOMTransactionStep::unapply):
(WebCore::DataReplacingDOMTransactionStep::reapply):
(WebCore::AttrChangingDOMTransactionStep::AttrChangingDOMTransactionStep):
(WebCore::AttrChangingDOMTransactionStep::create):
(WebCore::AttrChangingDOMTransactionStep::unapply):
(WebCore::AttrChangingDOMTransactionStep::reapply):
* editing/DOMTransactionStep.h: Added.
(WebCore):
(DOMTransactionStep):
(WebCore::DOMTransactionStep::~DOMTransactionStep):
(NodeInsertingDOMTransactionStep):
(NodeRemovingDOMTransactionStep):
(DataReplacingDOMTransactionStep):
(AttrChangingDOMTransactionStep):
* editing/UndoManager.cpp:
(WebCore):
(WebCore::UndoManager::isRecordingAutomaticTransaction):
(WebCore::UndoManager::addTransactionStep):
* editing/UndoManager.h:
(WebCore):
(WebCore::UndoManager::setRecordingDOMTransaction):
(UndoManager):

LayoutTests:

* editing/undomanager/automatic-transaction-attribute-expected.txt: Added.
* editing/undomanager/automatic-transaction-attribute.html: Added.
* editing/undomanager/automatic-transaction-data-expected.txt: Added.
* editing/undomanager/automatic-transaction-data.html: Added.
* editing/undomanager/automatic-transaction-node-expected.txt: Added.
* editing/undomanager/automatic-transaction-node.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

Add test expectations for regression in r126250. See bug 94667.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Added file somehow missed by garden-o-matic in last rebaseline.

* platform/chromium/fast/canvas/canvas-strokeRect-alpha-shadow-expected.txt: Added.

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