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

Side by Side Diff: third_party/WebKit/Source/core/observer/ResizeObserverEntry.h

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ResizeObserverEntry_h
6 #define ResizeObserverEntry_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/observer/ResizeObservation.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class Element;
15
16 class ResizeObserverEntry final : public GarbageCollectedFinalized<ResizeObserve rEntry>, public ScriptWrappable {
17 DEFINE_WRAPPERTYPEINFO();
18 public:
19 ResizeObserverEntry(Element * target) :
20 m_target(target),
21 m_clientWidth(target->clientWidth()),
22 m_clientHeight(target->clientHeight())
23 {
24 }
25 virtual ~ResizeObserverEntry() {};
szager1 2016/05/23 19:49:12 Unnecessary destructor.
atotic1 2016/05/25 00:15:54 Done.
26
27 Element* target() const { return m_target.get(); }
28 int clientWidth() const { return m_clientWidth; }
szager1 2016/05/23 19:49:12 s/int/float/
atotic1 2016/05/25 00:15:54 Will do when clientWidth gets rewritten.
29 int clientHeight() const { return m_clientHeight; }
30
31 DECLARE_VIRTUAL_TRACE();
32
33 private:
34 Member<Element> m_target;
35 int m_clientWidth;
szager1 2016/05/23 19:49:12 s/int/LayoutUnit/
atotic1 2016/05/25 00:15:54 Will do when clientWidth gets rewritten.
36 int m_clientHeight;
37 };
38
39 } // namespace blink
40
41 #endif // ResizeObserverEntry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698