Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc

Issue 2723023003: Revert of [LayoutNG] Move remaining ng_units structs to their own files (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc b/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
deleted file mode 100644
index e5f711bacb67d42b1452d8de0fdf2610c7a8d14f..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/layout/ng/ng_exclusion.h"
-
-#include "wtf/text/WTFString.h"
-
-namespace blink {
-
-bool NGExclusion::operator==(const NGExclusion& other) const {
- return std::tie(other.rect, other.type) == std::tie(rect, type);
-}
-
-String NGExclusion::ToString() const {
- return String::format("Rect: %s Type: %d", rect.ToString().ascii().data(),
- type);
-}
-
-std::ostream& operator<<(std::ostream& stream, const NGExclusion& value) {
- return stream << value.ToString();
-}
-
-NGExclusions::NGExclusions()
- : last_left_float(nullptr), last_right_float(nullptr) {}
-
-NGExclusions::NGExclusions(const NGExclusions& other) {
- for (const auto& exclusion : other.storage)
- Add(*exclusion);
-}
-
-void NGExclusions::Add(const NGExclusion& exclusion) {
- storage.push_back(WTF::makeUnique<NGExclusion>(exclusion));
- if (exclusion.type == NGExclusion::kFloatLeft) {
- last_left_float = storage.rbegin()->get();
- } else if (exclusion.type == NGExclusion::kFloatRight) {
- last_right_float = storage.rbegin()->get();
- }
-}
-
-inline NGExclusions& NGExclusions::operator=(const NGExclusions& other) {
- storage.clear();
- last_left_float = nullptr;
- last_right_float = nullptr;
- for (const auto& exclusion : other.storage)
- Add(*exclusion);
- return *this;
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_exclusion.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_floating_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698