Remove -[WKContentView setViewportSize:]
https://bugs.webkit.org/show_bug.cgi?id=129071

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-19
Reviewed by Enrica Casucci.

I forgot to clean that up.

* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fieldset:disabled > legend:first-child legend input should not be disabled
https://bugs.webkit.org/show_bug.cgi?id=129068

Reviewed by Andreas Kling.

Source/WebCore: 

An input element inside a disabled fieldset element is ordinarily disabled unless it's inside
a legend element that is the first of its kind to appear in the fieldset's child node list.

Prior to this patch, an input element inside such a legend element was erroneously disabled if
we had another legend element between the two as in <fieldset disabled><legend><legend><input>.

Fixed the bug by correcting the algorithm in updateAncestorDisabledState.

Test: fast/forms/fieldset/fieldset-disabled-2.html

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState):

LayoutTests: 

Added a new regression test.

* fast/forms/fieldset/fieldset-disabled-2-expected.txt: Added.
* fast/forms/fieldset/fieldset-disabled-2.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Debug build fix after r164401. Removed a bogus assertion in comparePositions.
When either position is anchored at a detached node, they don't have a tree scope in common.

* editing/htmlediting.cpp:
(WebCore::comparePositions):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[UI-Side Compositing] 6% of main thread time spent copying LayerProperties when adding to hash table
https://bugs.webkit.org/show_bug.cgi?id=129074

Reviewed by Tim Horton.

Make RemoteLayerTreeTransaction::LayerProperties smaller and not copied by
value everywhere.

Put some big members into unique_ptrs, and store unique_ptrs
in the hash of layerID to properties.

Clean up member variable order of LayerProperties to improve packing.

Also have applyPropertiesToLayer() take references to things to avoid
copies.

* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::changedLayers):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
(WebKit::dumpChangedLayers):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::create):
(PlatformCALayerRemote::PlatformCALayerRemote):
(PlatformCALayerRemote::clone):
(PlatformCALayerRemote::recursiveBuildTransaction):
(PlatformCALayerRemote::ensureBackingStore):
(PlatformCALayerRemote::setNeedsDisplay):
(PlatformCALayerRemote::transform):
(PlatformCALayerRemote::setTransform):
(PlatformCALayerRemote::sublayerTransform):
(PlatformCALayerRemote::setSublayerTransform):
(PlatformCALayerRemote::setFilters):
(PlatformCALayerRemote::enumerateRectsBeingDrawn):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid sending redundant layer properties to the UI process, and avoid allocation of RemoteLayerBackingStore unless we need it
https://bugs.webkit.org/show_bug.cgi?id=129076

Reviewed by Tim Horton.

Normally we rely on GraphicsLayerCA to avoid redundant property
setting on PlatformCALayers, but for contents layers GraphicsLayerCA
sets properties on every update.

Make PlatformCALayerRemote more efficient in this case by not
setting dirty flags for unchanged property sets.

Also avoid creation of RemoteLayerBackingStore unless we
actually need one.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::ensureBackingStore):
(PlatformCALayerRemote::updateBackingStore):
(PlatformCALayerRemote::setBounds):
(PlatformCALayerRemote::setPosition):
(PlatformCALayerRemote::setAnchorPoint):
(PlatformCALayerRemote::setMasksToBounds):
(PlatformCALayerRemote::setAcceleratesDrawing):
(PlatformCALayerRemote::setBorderWidth):
(PlatformCALayerRemote::setBorderColor):
(PlatformCALayerRemote::setContentsScale):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fieldset:disabled fieldset > legend:first-child input should be disabled
https://bugs.webkit.org/show_bug.cgi?id=129077

Reviewed by Antti Koivisto.

Source/WebCore: 

Similar to r164403. When a fieldset inside a disabled fieldset, input elements inside
the inner fieldset's first legend element child should be disabled.

Test: fast/forms/fieldset/fieldset-disabled-2.html

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend): Fixed the bug where it was returning the first
legend element descendent. It should be the first legend element _child_.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState): Fixed the algorithm
to look for any ancestor fieldset that has been disabled instead of the first fieldset
ancestor and checking its disabledness.

LayoutTests: 

Added a test case.o

* fast/forms/fieldset/fieldset-disabled-2-expected.txt:
* fast/forms/fieldset/fieldset-disabled-2.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WTF::StringBuilder::append()

https://bugs.webkit.org/show_bug.cgi?id=125817
<rdar://problem/15671883>

Reviewed by Oliver Hunt.

* wtf/text/StringBuilder.cpp:
(WTF::expandedCapacity):
Ensure that we return a new capacity of at least 'requiredLength' in
the case where requiredLength is large. Also, use unsigned rather than
size_t for the parameters and the return value, as callers pass
unsigned arguments and treat the result as an unsigned int.

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