Title: [230466] trunk/Tools
Revision
230466
Author
za...@apple.com
Date
2018-04-09 20:03:28 -0700 (Mon, 09 Apr 2018)

Log Message

[LayoutReloaded] Remove Layout.InitialContainingBlock class
https://bugs.webkit.org/show_bug.cgi?id=184436

Reviewed by Antti Koivisto.

* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.establishesBlockFormattingContext):
* LayoutReloaded/LayoutTree/InitialBlockContainer.js: Removed.
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype.createTree):
* LayoutReloaded/test/index.html:

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (230465 => 230466)


--- trunk/Tools/ChangeLog	2018-04-10 02:42:27 UTC (rev 230465)
+++ trunk/Tools/ChangeLog	2018-04-10 03:03:28 UTC (rev 230466)
@@ -1,5 +1,19 @@
 2018-04-09  Zalan Bujtas  <za...@apple.com>
 
+        [LayoutReloaded] Remove Layout.InitialContainingBlock class
+        https://bugs.webkit.org/show_bug.cgi?id=184436
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/LayoutTree/Box.js:
+        (Layout.Box.prototype.establishesBlockFormattingContext):
+        * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Removed.
+        * LayoutReloaded/TreeBuilder.js:
+        (TreeBuilder.prototype.createTree):
+        * LayoutReloaded/test/index.html:
+
+2018-04-09  Zalan Bujtas  <za...@apple.com>
+
         [LayoutReloaded] Add support for inline-block.
         https://bugs.webkit.org/show_bug.cgi?id=184434
 

Modified: trunk/Tools/LayoutReloaded/LayoutTree/Box.js (230465 => 230466)


--- trunk/Tools/LayoutReloaded/LayoutTree/Box.js	2018-04-10 02:42:27 UTC (rev 230465)
+++ trunk/Tools/LayoutReloaded/LayoutTree/Box.js	2018-04-10 03:03:28 UTC (rev 230466)
@@ -150,6 +150,9 @@
     }
 
     establishesBlockFormattingContext() {
+        // Initial Containing Block always creates a new (inital) block formatting context.
+        if (!this.parent())
+            return true;
         // 9.4.1 Block formatting contexts
         // Floats, absolutely positioned elements, block containers (such as inline-blocks, table-cells, and table-captions)
         // that are not block boxes, and block boxes with 'overflow' other than 'visible' (except when that value has been propagated to the viewport)

Deleted: trunk/Tools/LayoutReloaded/LayoutTree/InitialBlockContainer.js (230465 => 230466)


--- trunk/Tools/LayoutReloaded/LayoutTree/InitialBlockContainer.js	2018-04-10 02:42:27 UTC (rev 230465)
+++ trunk/Tools/LayoutReloaded/LayoutTree/InitialBlockContainer.js	2018-04-10 03:03:28 UTC (rev 230466)
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-Layout.InitialBlockContainer = class InitialBlockContainer extends Layout.BlockContainer {
-    constructor(document, id, name) {
-        super(document, id);
-    }
-
-    establishesBlockFormattingContext() {
-        // ICB always creates a new (inital) block formatting context.
-        return true;
-    }
-}

Modified: trunk/Tools/LayoutReloaded/TreeBuilder.js (230465 => 230466)


--- trunk/Tools/LayoutReloaded/TreeBuilder.js	2018-04-10 02:42:27 UTC (rev 230465)
+++ trunk/Tools/LayoutReloaded/TreeBuilder.js	2018-04-10 03:03:28 UTC (rev 230466)
@@ -28,7 +28,7 @@
 
     createTree(document, renderTreeDump) {
         // Root.
-        let initialBlockContainer = new Layout.InitialBlockContainer(document, parseInt(renderTreeDump.substring(0, renderTreeDump.indexOf("("))));
+        let initialBlockContainer = new Layout.BlockContainer(document, parseInt(renderTreeDump.substring(0, renderTreeDump.indexOf("("))));
         initialBlockContainer.setRendererName("RenderView");
         renderTreeDump = renderTreeDump.substring(renderTreeDump.indexOf("|") + 1);
 

Modified: trunk/Tools/LayoutReloaded/test/index.html (230465 => 230466)


--- trunk/Tools/LayoutReloaded/test/index.html	2018-04-10 02:42:27 UTC (rev 230465)
+++ trunk/Tools/LayoutReloaded/test/index.html	2018-04-10 03:03:28 UTC (rev 230466)
@@ -99,7 +99,6 @@
 addJS("../LayoutTree/Box.js");
 addJS("../LayoutTree/Container.js");
 addJS("../LayoutTree/BlockContainer.js");
-addJS("../LayoutTree/InitialBlockContainer.js");
 addJS("../LayoutTree/InlineContainer.js");
 addJS("../LayoutTree/InlineBox.js");
 addJS("../LayoutTree/Text.js");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to