[New Multicolumn] Nested columns not working at all.
https://bugs.webkit.org/show_bug.cgi?id=131805

Reviewed by Dean Jackson.

Add support for nested pagination contexts, allowing for an arbitrary level
of nesting of multicolumn layouts. There were a number of things that had to
be patched in order for this to work.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
Make sure RenderMultiColumnFlowThreads just return null for regions at any
block offset. Individual region sets will be created as you cross ancestor
regions eventually, so this is just getting in the way.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
Add a new helper method for obtaining an enclosingPaginationLayer when
constrained by some root. This function ensures you don't accidentally
cross your subtree root when looking for enclosing pagination layers.

(WebCore::RenderLayer::collectFragments):
Patch collectFragments to know how to recur to collect ancestor fragments
in order to apply nested splitting as you cross pagination boundaries.

(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::LayerFragment::LayerFragment):
(WebCore::LayerFragment::setRects):
(WebCore::LayerFragment::moveBy):
(WebCore::LayerFragment::intersect):
Improve the LayerFragment so that it caches transformed bounding boxes as
well. This is needed to fix intersectsDamageRect so that it doesn't grab
the wrong bounding box when checking inline layers that are paginated.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
Ignore inserted flow threads inside an ancestor flow thread, since we only
care about what the sets do.
        
* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
Make sure that nested flow thread layers return themselves when a child
is inserted directly under them.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r167713.
https://bugs.webkit.org/show_bug.cgi?id=132070

broke hundreds of tests (Requested by thorton on #webkit).

Reverted changeset:

"[OS X] Make checking if a font is the system font more
robust"
https://bugs.webkit.org/show_bug.cgi?id=132030
http://trac.webkit.org/changeset/167713

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
https://bugs.webkit.org/show_bug.cgi?id=113058

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Before sharing CSS properties with an element in the cache, we need to
check that the new element is suitable for this, just like we check
elements before inserting them into the cache.

Test: fast/css/identical-logical-height-decl.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):

LayoutTests:
* fast/css/identical-logical-height-decl-expected.html: Added.
* fast/css/identical-logical-height-decl.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
<https://webkit.org/b/132065>
<rdar://problem/16110687>

Add a platformGarbageCollectNow() helper function to IOSurfacePool that
triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
and discardAllSurfaces().

This lets us drop all otherwise-unused 420f surfaces on memory pressure.

Reviewed by Tim Horton.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::discardAllSurfaces):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
(WebCore::IOSurfacePool::platformGarbageCollectNow):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
https://bugs.webkit.org/show_bug.cgi?id=132069

Reviewed by Dean Jackson.


Source/WebCore: 
This is imported from a patch Morten did for Blink, but I had to change it a fair
bit. deleteLines() is used to handle simple line box layout instead of just calling
deleteLineBoxTree.
        
I also had to disable the layout state to stop asserts on repaint when the children
get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
LayoutStateDisabler to stop the assert.

Added fast/multicol/inline-children-crash.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):

LayoutTests: 
* fast/multicol/inline-children-crash-expected.txt: Added.
* fast/multicol/inline-children-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
https://bugs.webkit.org/show_bug.cgi?id=132040

Add support for encoding/decoding NSUInteger arguments.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-04-23
Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Assertion failure in huge-column-count.html
https://bugs.webkit.org/show_bug.cgi?id=132071

Reviewed by Dean Jackson.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
Remove the code that returned 0 here, since we're going to patch a lower-level
function to catch all cases.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getRegionRangeForBox):
Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
are what should have ranges... the flow thread needs to just be ignored.



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