blob: d5c687de2ca47eb18044649a7f05aaf120be3f96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2018 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 "third_party/blink/renderer/core/layout/custom/custom_layout_child.h"
#include "third_party/blink/renderer/core/css/cssom/prepopulated_computed_style_property_map.h"
#include "third_party/blink/renderer/core/layout/custom/css_layout_definition.h"
#include "third_party/blink/renderer/core/layout/custom/custom_layout_fragment_request.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
namespace blink {
CustomLayoutChild::CustomLayoutChild(const CSSLayoutDefinition& definition,
LayoutBox* box)
: box_(box),
style_map_(new PrepopulatedComputedStylePropertyMap(
box->GetDocument(),
box->StyleRef(),
box->GetNode(),
definition.ChildNativeInvalidationProperties(),
definition.ChildCustomInvalidationProperties())) {}
CustomLayoutFragmentRequest* CustomLayoutChild::layoutNextFragment(
const CustomLayoutConstraintsOptions& options) {
return new CustomLayoutFragmentRequest(this, options);
}
void CustomLayoutChild::Trace(blink::Visitor* visitor) {
visitor->Trace(style_map_);
ScriptWrappable::Trace(visitor);
}
} // namespace blink
|