// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_DOM_WHITESPACE_ATTACHER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_WHITESPACE_ATTACHER_H_ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/platform/heap/member.h" namespace blink { class Element; class LayoutObject; class Node; class Text; // The WhitespaceAttacher is used during the layout tree rebuild to lazily re- // attach whitespace LayoutObjects when necessary. For more details about white- // space LayoutObjects, see the WhitespaceLayoutObjects.md file in this // directory. // // As RebuildLayoutTree walks from last to first child, we track the last text // node, or the last skipped display:contents element we have seen. These are // reset to null as soon as we encounter an in-flow element. // // If the tracked text node needed a (re-)attach, we call // ReattachWhitespaceSiblings once we visit or re-attach the first preceding // in-flow. // // If we re-attach a preceding in-flow, we also call ReattachWhitespaceSiblings // since the need for a succeeding whitespace LayoutObject may change. class CORE_EXPORT WhitespaceAttacher { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_DOM_WHITESPACE_ATTACHER_H_