<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[176431] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/176431">176431</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2014-11-20 18:27:20 -0800 (Thu, 20 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removed the custom allocator for PODRedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=138942

Reviewed by Sam Weinig.

bmalloc is fast enough.

* WebCore.xcodeproj/project.pbxproj:
* platform/PODArena.h: Removed.
* platform/PODFreeListArena.h: Removed. This is the point of the patch.

* platform/PODIntervalTree.h:
(WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
of removing our custom allocator, we can no longer have a special
&quot;I'm not initialized yet&quot; state. Instead, the tree either exists or not,
like an idiomatic C++ object.

* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.

(WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
destructor because we can no longer rely on the arena destructor
implicitly freeing our tree nodes.

Side note: This change basically removes the whole reason for having
a purpose-built tree for POD data. We should probably remove this whole
data structure in a follow-up patch, and just use a standard tree.

(WebCore::PODRedBlackTree::clear):
(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::remove):
(WebCore::PODRedBlackTree::contains):
(WebCore::PODRedBlackTree::visitInorder):
(WebCore::PODRedBlackTree::size):
(WebCore::PODRedBlackTree::checkInvariants):
(WebCore::PODRedBlackTree::dump):
(WebCore::PODRedBlackTree::deleteNode):
(WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
ourselves as fast allocated so we get the bmalloc goodness.

(WebCore::PODRedBlackTree::isInitialized): Deleted.
(WebCore::PODRedBlackTree::initIfNeeded): Deleted.

* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clear):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::FloatingObjects::placedFloatsTree):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
weird behavior in which it was valid to use some of its APIs without
first initializing it, but not others. It's not really possible to model
that behavior with normal C++ objects that use new/delete, so instead
I added some explicit NULL checks.

* rendering/FloatingObjects.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena): Deleted.
* rendering/RenderView.h: Removed custom-allocator-related cruft.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformPODIntervalTreeh">trunk/Source/WebCore/platform/PODIntervalTree.h</a></li>
<li><a href="#trunkSourceWebCoreplatformPODRedBlackTreeh">trunk/Source/WebCore/platform/PODRedBlackTree.h</a></li>
<li><a href="#trunkSourceWebCorerenderingFloatingObjectscpp">trunk/Source/WebCore/rendering/FloatingObjects.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingFloatingObjectsh">trunk/Source/WebCore/rendering/FloatingObjects.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlowThreadcpp">trunk/Source/WebCore/rendering/RenderFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformPODArenah">trunk/Source/WebCore/platform/PODArena.h</a></li>
<li><a href="#trunkSourceWebCoreplatformPODFreeListArenah">trunk/Source/WebCore/platform/PODFreeListArena.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/ChangeLog        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2014-11-20  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Removed the custom allocator for PODRedBlackTree
+        https://bugs.webkit.org/show_bug.cgi?id=138942
+
+        Reviewed by Sam Weinig.
+
+        bmalloc is fast enough.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/PODArena.h: Removed.
+        * platform/PODFreeListArena.h: Removed. This is the point of the patch.
+
+        * platform/PODIntervalTree.h:
+        (WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
+        of removing our custom allocator, we can no longer have a special
+        &quot;I'm not initialized yet&quot; state. Instead, the tree either exists or not,
+        like an idiomatic C++ object.
+
+        * platform/PODRedBlackTree.h:
+        (WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.
+
+        (WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
+        destructor because we can no longer rely on the arena destructor
+        implicitly freeing our tree nodes.
+
+        Side note: This change basically removes the whole reason for having
+        a purpose-built tree for POD data. We should probably remove this whole
+        data structure in a follow-up patch, and just use a standard tree.
+
+        (WebCore::PODRedBlackTree::clear):
+        (WebCore::PODRedBlackTree::add):
+        (WebCore::PODRedBlackTree::remove):
+        (WebCore::PODRedBlackTree::contains):
+        (WebCore::PODRedBlackTree::visitInorder):
+        (WebCore::PODRedBlackTree::size):
+        (WebCore::PODRedBlackTree::checkInvariants):
+        (WebCore::PODRedBlackTree::dump):
+        (WebCore::PODRedBlackTree::deleteNode):
+        (WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
+        ourselves as fast allocated so we get the bmalloc goodness.
+
+        (WebCore::PODRedBlackTree::isInitialized): Deleted.
+        (WebCore::PODRedBlackTree::initIfNeeded): Deleted.
+
+        * rendering/FloatingObjects.cpp:
+        (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
+        (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
+        (WebCore::FloatingObjects::FloatingObjects):
+        (WebCore::FloatingObjects::clear):
+        (WebCore::FloatingObjects::addPlacedObject):
+        (WebCore::FloatingObjects::removePlacedObject):
+        (WebCore::FloatingObjects::computePlacedFloatsTree):
+        (WebCore::FloatingObjects::placedFloatsTree):
+        (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
+        (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
+        (WebCore::FloatingObjects::logicalLeftOffset):
+        (WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
+        weird behavior in which it was valid to use some of its APIs without
+        first initializing it, but not others. It's not really possible to model
+        that behavior with normal C++ objects that use new/delete, so instead
+        I added some explicit NULL checks.
+
+        * rendering/FloatingObjects.h:
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::intervalArena): Deleted.
+        * rendering/RenderView.h: Removed custom-allocator-related cruft.
+
</ins><span class="cx"> 2014-11-20  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Support unprefixed animation event types
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -980,7 +980,6 @@
</span><span class="cx">                 1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */; };
</span><span class="cx">                 1F3C3BEA135CAF3C00B8C1AC /* MediaControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C3BE8135CAF3C00B8C1AC /* MediaControls.cpp */; };
</span><span class="cx">                 1F3C3BEB135CAF3C00B8C1AC /* MediaControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C3BE9135CAF3C00B8C1AC /* MediaControls.h */; };
</span><del>-                1F3F19531499CA7600A5AEA7 /* PODFreeListArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3F19521499CA7600A5AEA7 /* PODFreeListArena.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 1F72BF0A187FD4490009BCB3 /* TileControllerMemoryHandlerIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F72BF08187FD4270009BCB3 /* TileControllerMemoryHandlerIOS.cpp */; };
</span><span class="cx">                 1F72BF0B187FD45C0009BCB3 /* TileControllerMemoryHandlerIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F72BF09187FD4270009BCB3 /* TileControllerMemoryHandlerIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1FAFBF1815A5FA6E00083A20 /* UTIUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1FAFBF1715A5FA5200083A20 /* UTIUtilities.mm */; };
</span><span class="lines">@@ -5317,7 +5316,6 @@
</span><span class="cx">                 BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */; };
</span><span class="cx">                 BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */; };
</span><span class="cx">                 BCB92D4F1293550B00C8387F /* FontBaseline.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB92D4E1293550B00C8387F /* FontBaseline.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                BCBB8AB813F1AFB000734DF0 /* PODArena.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB413F1AFB000734DF0 /* PODArena.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 BCBB8AB913F1AFB000734DF0 /* PODInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB513F1AFB000734DF0 /* PODInterval.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BCBB8ABA13F1AFB000734DF0 /* PODIntervalTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BCBB8ABB13F1AFB000734DF0 /* PODRedBlackTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7978,7 +7976,6 @@
</span><span class="cx">                 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = &quot;compiled.mach-o.dylib&quot;; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = &quot;&lt;absolute&gt;&quot;; };
</span><span class="cx">                 1F3C3BE8135CAF3C00B8C1AC /* MediaControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControls.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1F3C3BE9135CAF3C00B8C1AC /* MediaControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControls.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1F3F19521499CA7600A5AEA7 /* PODFreeListArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODFreeListArena.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1F72BF08187FD4270009BCB3 /* TileControllerMemoryHandlerIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TileControllerMemoryHandlerIOS.cpp; path = ios/TileControllerMemoryHandlerIOS.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1F72BF09187FD4270009BCB3 /* TileControllerMemoryHandlerIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TileControllerMemoryHandlerIOS.h; path = ios/TileControllerMemoryHandlerIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1FAFBF1615A5FA5200083A20 /* UTIUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTIUtilities.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12748,7 +12745,6 @@
</span><span class="cx">                 BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCB92D4E1293550B00C8387F /* FontBaseline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontBaseline.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BCBB8AB413F1AFB000734DF0 /* PODArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODArena.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 BCBB8AB513F1AFB000734DF0 /* PODInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODInterval.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODIntervalTree.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODRedBlackTree.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21478,8 +21474,6 @@
</span><span class="cx">                                 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
</span><span class="cx">                                 1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
</span><span class="cx">                                 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
</span><del>-                                BCBB8AB413F1AFB000734DF0 /* PODArena.h */,
-                                1F3F19521499CA7600A5AEA7 /* PODFreeListArena.h */,
</del><span class="cx">                                 BCBB8AB513F1AFB000734DF0 /* PODInterval.h */,
</span><span class="cx">                                 BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */,
</span><span class="cx">                                 BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */,
</span><span class="lines">@@ -25667,8 +25661,6 @@
</span><span class="cx">                                 71E2183A17359FB8006E6E4D /* PlugInsResources.h in Headers */,
</span><span class="cx">                                 1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */,
</span><span class="cx">                                 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */,
</span><del>-                                BCBB8AB813F1AFB000734DF0 /* PODArena.h in Headers */,
-                                1F3F19531499CA7600A5AEA7 /* PODFreeListArena.h in Headers */,
</del><span class="cx">                                 BCBB8AB913F1AFB000734DF0 /* PODInterval.h in Headers */,
</span><span class="cx">                                 BCBB8ABA13F1AFB000734DF0 /* PODIntervalTree.h in Headers */,
</span><span class="cx">                                 BCBB8ABB13F1AFB000734DF0 /* PODRedBlackTree.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPODArenah"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/PODArena.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PODArena.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/platform/PODArena.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -1,67 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PODArena_h
-#define PODArena_h
-
-#include &lt;stdint.h&gt;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/FastMalloc.h&gt;
-#include &lt;wtf/Noncopyable.h&gt;
-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-
-// An arena which allocates only Plain Old Data (POD), or classes and
-// structs bottoming out in Plain Old Data. NOTE: the constructors of
-// the objects allocated in this arena are called, but _not_ their
-// destructors.
-
-class PODArena : public RefCounted&lt;PODArena&gt; {
-protected:
-    virtual ~PODArena() { }
-    friend class WTF::RefCounted&lt;PODArena&gt;;
-
-    // Returns the alignment requirement for classes and structs on the
-    // current platform.
-    template &lt;class T&gt; static size_t minAlignment()
-    {
-        return std::alignment_of&lt;T&gt;::value;
-    }
-
-    // Rounds up the given allocation size to the specified alignment.
-    size_t roundUp(size_t size, size_t alignment)
-    {
-        ASSERT(!(alignment % 2));
-        return (size + alignment - 1) &amp; ~(alignment - 1);
-    }
-};
-
-} // namespace WebCore
-
-#endif // PODArena_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformPODFreeListArenah"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/PODFreeListArena.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PODFreeListArena.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/platform/PODFreeListArena.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -1,192 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef PODFreeListArena_h
-#define PODFreeListArena_h
-
-#include &quot;PODArena.h&quot;
-
-namespace WebCore {
-
-template &lt;class T&gt;
-class PODFreeListArena : public PODArena {
-public:
-    static PassRefPtr&lt;PODFreeListArena&gt; create()
-    {
-        return adoptRef(new PODFreeListArena);
-    }
-
-    template&lt;class Argument1Type&gt; T* allocateObject(const Argument1Type&amp; argument1)
-    {
-#if defined(ADDRESS_SANITIZER)
-        return new T(argument1);
-#else
-        size_t roundedSize = roundUp(sizeof(T), minAlignment&lt;T&gt;());
-        void* ptr = allocate(roundedSize);
-        if (ptr) {
-            // Use placement operator new to allocate a T at this location.
-            new(ptr) T(argument1);
-        }
-        return static_cast&lt;T*&gt;(ptr);
-#endif
-    }
-
-    void freeObject(T* ptr)
-    {
-#if defined(ADDRESS_SANITIZER)
-        delete ptr;
-#else
-        for (typename Vector&lt;OwnPtr&lt;FreeListChunk&gt;&gt;::const_iterator it = m_chunks.begin(), end = m_chunks.end(); it != end; ++it) {
-            FreeListChunk* chunk = static_cast&lt;FreeListChunk*&gt;(it-&gt;get());
-            if (chunk-&gt;contains(ptr))
-                chunk-&gt;free(ptr);
-        }
-#endif
-    }
-
-private:
-    // The initial size of allocated chunks; increases as necessary to
-    // satisfy large allocations. Mainly public for unit tests.
-    enum {
-        DefaultChunkSize = 16384
-    };
-
-    PODFreeListArena()
-        : m_current(0)
-        , m_currentChunkSize(DefaultChunkSize)
-    {
-    }
-
-    void* allocate(size_t size)
-    {
-        void* ptr = 0;
-        if (m_current) {
-            // First allocate from the current chunk.
-            ptr = m_current-&gt;allocate(size);
-            if (!ptr) {
-                // Check if we can allocate from other chunks' free list.
-                for (typename Vector&lt;OwnPtr&lt;FreeListChunk&gt;&gt;::const_iterator it = m_chunks.begin(), end = m_chunks.end(); it != end; ++it) {
-                    FreeListChunk* chunk = static_cast&lt;FreeListChunk*&gt;(it-&gt;get());
-                    if (chunk-&gt;hasFreeList()) {
-                        ptr = chunk-&gt;allocate(size);
-                        if (ptr)
-                            break;
-                    }
-                }
-            }
-        }
-
-        if (!ptr) {
-            if (size &gt; m_currentChunkSize)
-                m_currentChunkSize = size;
-            m_chunks.append(adoptPtr(new FreeListChunk(m_currentChunkSize)));
-            m_current = m_chunks.last().get();
-            ptr = m_current-&gt;allocate(size);
-        }
-        return ptr;
-    }
-
-    // Manages a chunk of memory and individual allocations out of it.
-    class FreeListChunk {
-        WTF_MAKE_NONCOPYABLE(FreeListChunk);
-
-        struct FreeCell {
-            FreeCell *m_next;
-        };
-    public:
-        explicit FreeListChunk(size_t size)
-            : m_size(size)
-            , m_currentOffset(0)
-            , m_freeList(0)
-        {
-            m_base = static_cast&lt;uint8_t*&gt;(fastMalloc(size));
-        }
-
-        // Frees the memory allocated from the Allocator in the
-        // constructor.
-        ~FreeListChunk()
-        {
-            fastFree(m_base);
-        }
-
-        // Returns a pointer to &quot;size&quot; bytes of storage, or 0 if this
-        // Chunk could not satisfy the allocation.
-        void* allocate(size_t size)
-        {
-            if (m_freeList) {
-                // Reuse a cell from the free list.
-                void *cell = m_freeList;
-                m_freeList = m_freeList-&gt;m_next;
-                return cell;
-            }
-
-            // Check for overflow
-            if (m_currentOffset + size &lt; m_currentOffset)
-                return 0;
-
-            if (m_currentOffset + size &gt; m_size)
-                return 0;
-
-            void* result = m_base + m_currentOffset;
-            m_currentOffset += size;
-            return result;
-        }
-
-        void free(void* ptr)
-        {
-            // Add the pointer to free list.
-            ASSERT(contains(ptr));
-
-            FreeCell* cell = reinterpret_cast&lt;FreeCell*&gt;(ptr);
-            cell-&gt;m_next = m_freeList;
-            m_freeList = cell;
-        }
-
-        bool contains(void* ptr) const
-        {
-            return ptr &gt;= m_base &amp;&amp; ptr &lt; m_base + m_size;
-        }
-
-        bool hasFreeList() const
-        {
-            return m_freeList;
-        }
-
-    private:
-        uint8_t* m_base;
-        size_t m_size;
-        size_t m_currentOffset;
-
-        FreeCell *m_freeList;
-    };
-
-    FreeListChunk* m_current;
-    size_t m_currentChunkSize;
-    Vector&lt;OwnPtr&lt;FreeListChunk&gt;&gt; m_chunks;
-};
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformPODIntervalTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PODIntervalTree.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PODIntervalTree.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/platform/PODIntervalTree.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #ifndef PODIntervalTree_h
</span><span class="cx"> #define PODIntervalTree_h
</span><span class="cx"> 
</span><del>-#include &quot;PODArena.h&quot;
</del><span class="cx"> #include &quot;PODInterval.h&quot;
</span><span class="cx"> #include &quot;PODRedBlackTree.h&quot;
</span><span class="cx"> #include &quot;ValueToString.h&quot;
</span><span class="lines">@@ -67,6 +66,7 @@
</span><span class="cx"> // intervals in the tree.
</span><span class="cx"> template&lt;class T, class UserData = void*&gt;
</span><span class="cx"> class PODIntervalTree : public PODRedBlackTree&lt;PODInterval&lt;T, UserData&gt;&gt; {
</span><ins>+    WTF_MAKE_FAST_ALLOCATED;
</ins><span class="cx">     WTF_MAKE_NONCOPYABLE(PODIntervalTree);
</span><span class="cx"> public:
</span><span class="cx">     // Typedef to reduce typing when declaring intervals to be stored in
</span><span class="lines">@@ -74,24 +74,12 @@
</span><span class="cx">     typedef PODInterval&lt;T, UserData&gt; IntervalType;
</span><span class="cx">     typedef PODIntervalSearchAdapter&lt;T, UserData&gt; IntervalSearchAdapterType;
</span><span class="cx"> 
</span><del>-    PODIntervalTree(UninitializedTreeEnum unitializedTree)
-        : PODRedBlackTree&lt;IntervalType&gt;(unitializedTree)
-    {
-        init();
-    }
-    
</del><span class="cx">     PODIntervalTree()
</span><span class="cx">         : PODRedBlackTree&lt;IntervalType&gt;()
</span><span class="cx">     {
</span><span class="cx">         init();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    explicit PODIntervalTree(PassRefPtr&lt;PODArena&gt; arena)
-        : PODRedBlackTree&lt;IntervalType&gt;(arena)
-    {
-        init();
-    }
-
</del><span class="cx">     // Returns all intervals in the tree which overlap the given query
</span><span class="cx">     // interval. The returned intervals are sorted by increasing low
</span><span class="cx">     // endpoint.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPODRedBlackTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PODRedBlackTree.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PODRedBlackTree.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/platform/PODRedBlackTree.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -72,7 +72,6 @@
</span><span class="cx"> #ifndef PODRedBlackTree_h
</span><span class="cx"> #define PODRedBlackTree_h
</span><span class="cx"> 
</span><del>-#include &quot;PODFreeListArena.h&quot;
</del><span class="cx"> #include &quot;ValueToString.h&quot;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="lines">@@ -85,12 +84,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-enum UninitializedTreeEnum {
-    UninitializedTree
-};
-
</del><span class="cx"> template&lt;class T&gt;
</span><span class="cx"> class PODRedBlackTree {
</span><ins>+    WTF_MAKE_FAST_ALLOCATED;
</ins><span class="cx"> public:
</span><span class="cx">     class Node;
</span><span class="cx"> 
</span><span class="lines">@@ -102,11 +98,7 @@
</span><span class="cx">         virtual ~Visitor() { }
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    // Constructs a new red-black tree without allocating an arena.
-    // isInitialized will return false in this case. initIfNeeded can be used
-    // to init the structure. This constructor is usefull for creating
-    // lazy initialized tree.
-    explicit PODRedBlackTree(UninitializedTreeEnum)
</del><ins>+    PODRedBlackTree()
</ins><span class="cx">         : m_root(0)
</span><span class="cx">         , m_needsFullOrderingComparisons(false)
</span><span class="cx"> #ifndef NDEBUG
</span><span class="lines">@@ -115,69 +107,28 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Constructs a new red-black tree, allocating temporary objects
-    // from a newly constructed PODFreeListArena.
-    PODRedBlackTree()
-        : m_arena(PODFreeListArena&lt;Node&gt;::create())
-        , m_root(0)
-        , m_needsFullOrderingComparisons(false)
-#ifndef NDEBUG
-        , m_verboseDebugging(false)
-#endif
</del><ins>+    virtual ~PODRedBlackTree()
</ins><span class="cx">     {
</span><ins>+        clear();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Constructs a new red-black tree, allocating temporary objects
-    // from the given PODArena.
-    explicit PODRedBlackTree(PassRefPtr&lt;PODFreeListArena&lt;Node&gt;&gt; arena)
-        : m_arena(arena)
-        , m_root(0)
-        , m_needsFullOrderingComparisons(false)
-#ifndef NDEBUG
-        , m_verboseDebugging(false)
-#endif
-    {
-    }
-
-    virtual ~PODRedBlackTree() { }
-
</del><span class="cx">     // Clearing will delete the contents of the tree. After this call
</span><span class="cx">     // isInitialized will return false.
</span><span class="cx">     void clear()
</span><span class="cx">     {
</span><span class="cx">         markFree(m_root);
</span><del>-        m_arena = 0;
</del><span class="cx">         m_root = 0;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    bool isInitialized() const
-    {
-        return m_arena;
-    }
-    
-    void initIfNeeded()
-    {
-        if (!m_arena)
-            m_arena = PODFreeListArena&lt;Node&gt;::create();
-    }
-
-    void initIfNeeded(PODFreeListArena&lt;Node&gt;* arena)
-    {
-        if (!m_arena)
-            m_arena = arena;
-    }
-
</del><span class="cx">     void add(const T&amp; data)
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
-        Node* node = m_arena-&gt;template allocateObject&lt;T&gt;(data);
</del><ins>+        Node* node = new Node(data);
</ins><span class="cx">         insertNode(node);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Returns true if the datum was found in the tree.
</span><span class="cx">     bool remove(const T&amp; data)
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
</del><span class="cx">         Node* node = treeSearch(data);
</span><span class="cx">         if (node) {
</span><span class="cx">             deleteNode(node);
</span><span class="lines">@@ -188,13 +139,11 @@
</span><span class="cx"> 
</span><span class="cx">     bool contains(const T&amp; data) const
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
</del><span class="cx">         return treeSearch(data);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void visitInorder(Visitor* visitor) const
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
</del><span class="cx">         if (!m_root)
</span><span class="cx">             return;
</span><span class="cx">         visitInorderImpl(m_root, visitor);
</span><span class="lines">@@ -202,7 +151,6 @@
</span><span class="cx"> 
</span><span class="cx">     int size() const
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
</del><span class="cx">         Counter counter;
</span><span class="cx">         visitInorder(&amp;counter);
</span><span class="cx">         return counter.count();
</span><span class="lines">@@ -216,7 +164,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool checkInvariants() const
</span><span class="cx">     {
</span><del>-        ASSERT(isInitialized());
</del><span class="cx">         int blackCount;
</span><span class="cx">         return checkInvariantsFromNode(m_root, &amp;blackCount);
</span><span class="cx">     }
</span><span class="lines">@@ -226,8 +173,7 @@
</span><span class="cx">     // debugging purposes.
</span><span class="cx">     void dump() const
</span><span class="cx">     {
</span><del>-        if (m_arena)
-            dumpFromNode(m_root, 0);
</del><ins>+        dumpFromNode(m_root, 0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Turns on or off verbose debugging of the tree, causing many
</span><span class="lines">@@ -248,6 +194,7 @@
</span><span class="cx">     // an internal concept; users of the tree deal only with the data
</span><span class="cx">     // they store in it.
</span><span class="cx">     class Node {
</span><ins>+        WTF_MAKE_FAST_ALLOCATED;
</ins><span class="cx">         WTF_MAKE_NONCOPYABLE(Node);
</span><span class="cx">     public:
</span><span class="cx">         // Constructor. Newly-created nodes are colored red.
</span><span class="lines">@@ -695,7 +642,7 @@
</span><span class="cx">         if (y-&gt;color() == Black)
</span><span class="cx">             deleteFixup(x, xParent);
</span><span class="cx"> 
</span><del>-        m_arena-&gt;freeObject(y);
</del><ins>+        delete y;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Visits the subtree rooted at the given node in order.
</span><span class="lines">@@ -717,7 +664,7 @@
</span><span class="cx">             markFree(node-&gt;left());
</span><span class="cx">         if (node-&gt;right())
</span><span class="cx">             markFree(node-&gt;right());
</span><del>-        m_arena-&gt;freeObject(node);
</del><ins>+        delete node;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     //----------------------------------------------------------------------
</span><span class="lines">@@ -810,7 +757,6 @@
</span><span class="cx">     //----------------------------------------------------------------------
</span><span class="cx">     // Data members
</span><span class="cx"> 
</span><del>-    RefPtr&lt;PODFreeListArena&lt;Node&gt;&gt; m_arena;
</del><span class="cx">     Node* m_root;
</span><span class="cx">     bool m_needsFullOrderingComparisons;
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingFloatingObjectscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/FloatingObjects.cpp (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/FloatingObjects.cpp        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/rendering/FloatingObjects.cpp        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -236,7 +236,8 @@
</span><span class="cx"> LayoutUnit FloatingObjects::findNextFloatLogicalBottomBelow(LayoutUnit logicalHeight)
</span><span class="cx"> {
</span><span class="cx">     FindNextFloatLogicalBottomAdapter adapter(m_renderer, logicalHeight);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     return adapter.nextShapeLogicalBottom();
</span><span class="cx"> }
</span><span class="lines">@@ -244,14 +245,14 @@
</span><span class="cx"> LayoutUnit FloatingObjects::findNextFloatLogicalBottomBelowForBlock(LayoutUnit logicalHeight)
</span><span class="cx"> {
</span><span class="cx">     FindNextFloatLogicalBottomAdapter adapter(m_renderer, logicalHeight);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     return adapter.nextLogicalBottom();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatingObjects::FloatingObjects(const RenderBlockFlow&amp; renderer)
</span><del>-    : m_placedFloatsTree(UninitializedTree)
-    , m_leftObjectsCount(0)
</del><ins>+    : m_leftObjectsCount(0)
</ins><span class="cx">     , m_rightObjectsCount(0)
</span><span class="cx">     , m_horizontalWritingMode(renderer.isHorizontalWritingMode())
</span><span class="cx">     , m_renderer(renderer)
</span><span class="lines">@@ -274,7 +275,7 @@
</span><span class="cx"> void FloatingObjects::clear()
</span><span class="cx"> {
</span><span class="cx">     m_set.clear();
</span><del>-    m_placedFloatsTree.clear();
</del><ins>+    m_placedFloatsTree = nullptr;
</ins><span class="cx">     m_leftObjectsCount = 0;
</span><span class="cx">     m_rightObjectsCount = 0;
</span><span class="cx"> }
</span><span class="lines">@@ -321,8 +322,8 @@
</span><span class="cx">     ASSERT(!floatingObject-&gt;isInPlacedTree());
</span><span class="cx"> 
</span><span class="cx">     floatingObject-&gt;setIsPlaced(true);
</span><del>-    if (m_placedFloatsTree.isInitialized())
-        m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
</del><ins>+    if (m_placedFloatsTree)
+        m_placedFloatsTree-&gt;add(intervalForFloatingObject(floatingObject));
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     floatingObject-&gt;setIsInPlacedTree(true);
</span><span class="lines">@@ -333,8 +334,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(floatingObject-&gt;isPlaced() &amp;&amp; floatingObject-&gt;isInPlacedTree());
</span><span class="cx"> 
</span><del>-    if (m_placedFloatsTree.isInitialized()) {
-        bool removed = m_placedFloatsTree.remove(intervalForFloatingObject(floatingObject));
</del><ins>+    if (m_placedFloatsTree) {
+        bool removed = m_placedFloatsTree-&gt;remove(intervalForFloatingObject(floatingObject));
</ins><span class="cx">         ASSERT_UNUSED(removed, removed);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -368,28 +369,30 @@
</span><span class="cx"> 
</span><span class="cx"> void FloatingObjects::computePlacedFloatsTree()
</span><span class="cx"> {
</span><del>-    ASSERT(!m_placedFloatsTree.isInitialized());
</del><ins>+    ASSERT(!m_placedFloatsTree);
</ins><span class="cx">     if (m_set.isEmpty())
</span><span class="cx">         return;
</span><del>-    m_placedFloatsTree.initIfNeeded(m_renderer.view().intervalArena());
</del><ins>+
+    m_placedFloatsTree = std::make_unique&lt;FloatingObjectTree&gt;();
</ins><span class="cx">     for (auto it = m_set.begin(), end = m_set.end(); it != end; ++it) {
</span><span class="cx">         FloatingObject* floatingObject = it-&gt;get();
</span><span class="cx">         if (floatingObject-&gt;isPlaced())
</span><del>-            m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
</del><ins>+            m_placedFloatsTree-&gt;add(intervalForFloatingObject(floatingObject));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline const FloatingObjectTree&amp; FloatingObjects::placedFloatsTree()
</del><ins>+inline const FloatingObjectTree* FloatingObjects::placedFloatsTree()
</ins><span class="cx"> {
</span><del>-    if (!m_placedFloatsTree.isInitialized())
</del><ins>+    if (!m_placedFloatsTree)
</ins><span class="cx">         computePlacedFloatsTree();
</span><del>-    return m_placedFloatsTree;
</del><ins>+    return m_placedFloatsTree.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit FloatingObjects::logicalLeftOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit *heightRemaining)
</span><span class="cx"> {
</span><span class="cx">     ComputeFloatOffsetForFloatLayoutAdapter&lt;FloatingObject::FloatLeft&gt; adapter(m_renderer, logicalTop, logicalTop, fixedOffset);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     if (heightRemaining)
</span><span class="cx">         *heightRemaining = adapter.heightRemaining();
</span><span class="lines">@@ -400,7 +403,8 @@
</span><span class="cx"> LayoutUnit FloatingObjects::logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit *heightRemaining)
</span><span class="cx"> {
</span><span class="cx">     ComputeFloatOffsetForFloatLayoutAdapter&lt;FloatingObject::FloatRight&gt; adapter(m_renderer, logicalTop, logicalTop, fixedOffset);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     if (heightRemaining)
</span><span class="cx">         *heightRemaining = adapter.heightRemaining();
</span><span class="lines">@@ -411,7 +415,8 @@
</span><span class="cx"> LayoutUnit FloatingObjects::logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
</span><span class="cx"> {
</span><span class="cx">     ComputeFloatOffsetForLineLayoutAdapter&lt;FloatingObject::FloatLeft&gt; adapter(m_renderer, logicalTop, logicalTop + logicalHeight, fixedOffset);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     return adapter.offset();
</span><span class="cx"> }
</span><span class="lines">@@ -419,7 +424,8 @@
</span><span class="cx"> LayoutUnit FloatingObjects::logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
</span><span class="cx"> {
</span><span class="cx">     ComputeFloatOffsetForLineLayoutAdapter&lt;FloatingObject::FloatRight&gt; adapter(m_renderer, logicalTop, logicalTop + logicalHeight, fixedOffset);
</span><del>-    placedFloatsTree().allOverlapsWithAdapter(adapter);
</del><ins>+    if (const FloatingObjectTree* placedFloatsTree = this-&gt;placedFloatsTree())
+        placedFloatsTree-&gt;allOverlapsWithAdapter(adapter);
</ins><span class="cx"> 
</span><span class="cx">     return std::min(fixedOffset, adapter.offset());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingFloatingObjectsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/FloatingObjects.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/FloatingObjects.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/rendering/FloatingObjects.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -115,7 +115,6 @@
</span><span class="cx"> 
</span><span class="cx"> typedef PODInterval&lt;LayoutUnit, FloatingObject*&gt; FloatingObjectInterval;
</span><span class="cx"> typedef PODIntervalTree&lt;LayoutUnit, FloatingObject*&gt; FloatingObjectTree;
</span><del>-typedef PODFreeListArena&lt;PODRedBlackTree&lt;FloatingObjectInterval&gt;::Node&gt; IntervalArena;
</del><span class="cx"> 
</span><span class="cx"> // FIXME: This is really the same thing as FloatingObjectSet.
</span><span class="cx"> // Change clients to use that set directly, and replace the moveAllToFloatInfoMap function with a takeSet function.
</span><span class="lines">@@ -151,13 +150,13 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void computePlacedFloatsTree();
</span><del>-    const FloatingObjectTree&amp; placedFloatsTree();
</del><ins>+    const FloatingObjectTree* placedFloatsTree();
</ins><span class="cx">     void increaseObjectsCount(FloatingObject::Type);
</span><span class="cx">     void decreaseObjectsCount(FloatingObject::Type);
</span><span class="cx">     FloatingObjectInterval intervalForFloatingObject(FloatingObject*);
</span><span class="cx"> 
</span><span class="cx">     FloatingObjectSet m_set;
</span><del>-    FloatingObjectTree m_placedFloatsTree;
</del><ins>+    std::unique_ptr&lt;FloatingObjectTree&gt; m_placedFloatsTree;
</ins><span class="cx">     unsigned m_leftObjectsCount;
</span><span class="cx">     unsigned m_rightObjectsCount;
</span><span class="cx">     bool m_horizontalWritingMode;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -1017,7 +1017,6 @@
</span><span class="cx">     bool emptyRegionsSegment = false;
</span><span class="cx">     // FIXME: Optimize not to clear the interval all the time. This implies manually managing the tree nodes lifecycle.
</span><span class="cx">     m_regionIntervalTree.clear();
</span><del>-    m_regionIntervalTree.initIfNeeded();
</del><span class="cx">     for (auto&amp; region : m_regionList) {
</span><span class="cx">         // If we find an empty auto-height region, clear the computedAutoHeight value.
</span><span class="cx">         if (emptyRegionsSegment &amp;&amp; region-&gt;hasAutoLogicalHeight())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -1327,13 +1327,6 @@
</span><span class="cx">     currentFlowThread-&gt;popFlowThreadLayoutState();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntervalArena* RenderView::intervalArena()
-{
-    if (!m_intervalArena)
-        m_intervalArena = IntervalArena::create();
-    return m_intervalArena.get();
-}
-
</del><span class="cx"> ImageQualityController&amp; RenderView::imageQualityController()
</span><span class="cx"> {
</span><span class="cx">     if (!m_imageQualityController)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (176430 => 176431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2014-11-21 02:10:33 UTC (rev 176430)
+++ trunk/Source/WebCore/rendering/RenderView.h        2014-11-21 02:27:20 UTC (rev 176431)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="cx"> #include &quot;LayoutState.h&quot;
</span><del>-#include &quot;PODFreeListArena.h&quot;
</del><span class="cx"> #include &quot;Region.h&quot;
</span><span class="cx"> #include &quot;RenderBlockFlow.h&quot;
</span><span class="cx"> #include &quot;SelectionSubtreeRoot.h&quot;
</span><span class="lines">@@ -203,8 +202,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</span><span class="cx"> 
</span><del>-    IntervalArena* intervalArena();
-
</del><span class="cx">     IntSize viewportSizeForCSSViewportUnits() const;
</span><span class="cx"> 
</span><span class="cx">     void setRenderQuoteHead(RenderQuote* head) { m_renderQuoteHead = head; }
</span><span class="lines">@@ -354,7 +351,6 @@
</span><span class="cx">     unsigned m_layoutStateDisableCount;
</span><span class="cx">     std::unique_ptr&lt;RenderLayerCompositor&gt; m_compositor;
</span><span class="cx">     std::unique_ptr&lt;FlowThreadController&gt; m_flowThreadController;
</span><del>-    RefPtr&lt;IntervalArena&gt; m_intervalArena;
</del><span class="cx"> 
</span><span class="cx">     RenderQuote* m_renderQuoteHead;
</span><span class="cx">     unsigned m_renderCounterCount;
</span></span></pre>
</div>
</div>

</body>
</html>