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

Side by Side Diff: Source/core/css/MediaValuesDynamic.h

Issue 242883002: Remove MediaValues' dependency on RenderStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified minimal recalc tests to represent reduced recalc. Created 6 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MediaValuesDynamic_h 5 #ifndef MediaValuesDynamic_h
6 #define MediaValuesDynamic_h 6 #define MediaValuesDynamic_h
7 7
8 #include "core/css/MediaValues.h" 8 #include "core/css/MediaValues.h"
9 9
10 namespace WebCore { 10 namespace WebCore {
11 11
12 class Document; 12 class Document;
13 13
14 class MediaValuesDynamic FINAL : public MediaValues { 14 class MediaValuesDynamic FINAL : public MediaValues {
15 public: 15 public:
16 static PassRefPtr<MediaValues> create(Document&); 16 static PassRefPtr<MediaValues> create(PassRefPtr<LocalFrame>);
17 static PassRefPtr<MediaValues> create(PassRefPtr<LocalFrame>, PassRefPtr<Ren derStyle>);
18 virtual PassRefPtr<MediaValues> copy() const OVERRIDE; 17 virtual PassRefPtr<MediaValues> copy() const OVERRIDE;
19 virtual bool isSafeToSendToAnotherThread() const OVERRIDE; 18 virtual bool isSafeToSendToAnotherThread() const OVERRIDE;
20 virtual bool computeLength(double value, unsigned short type, int& result) c onst OVERRIDE; 19 virtual bool computeLength(double value, unsigned short type, int& result) c onst OVERRIDE;
21 20
22 virtual int viewportWidth() const OVERRIDE; 21 virtual int viewportWidth() const OVERRIDE;
23 virtual int viewportHeight() const OVERRIDE; 22 virtual int viewportHeight() const OVERRIDE;
24 virtual int deviceWidth() const OVERRIDE; 23 virtual int deviceWidth() const OVERRIDE;
25 virtual int deviceHeight() const OVERRIDE; 24 virtual int deviceHeight() const OVERRIDE;
26 virtual float devicePixelRatio() const OVERRIDE; 25 virtual float devicePixelRatio() const OVERRIDE;
27 virtual int colorBitsPerComponent() const OVERRIDE; 26 virtual int colorBitsPerComponent() const OVERRIDE;
28 virtual int monochromeBitsPerComponent() const OVERRIDE; 27 virtual int monochromeBitsPerComponent() const OVERRIDE;
29 virtual PointerDeviceType pointer() const OVERRIDE; 28 virtual PointerDeviceType pointer() const OVERRIDE;
30 virtual bool threeDEnabled() const OVERRIDE; 29 virtual bool threeDEnabled() const OVERRIDE;
31 virtual bool scanMediaType() const OVERRIDE; 30 virtual bool scanMediaType() const OVERRIDE;
32 virtual bool screenMediaType() const OVERRIDE; 31 virtual bool screenMediaType() const OVERRIDE;
33 virtual bool printMediaType() const OVERRIDE; 32 virtual bool printMediaType() const OVERRIDE;
34 virtual bool strictMode() const OVERRIDE; 33 virtual bool strictMode() const OVERRIDE;
35 virtual Document* document() const OVERRIDE; 34 virtual Document* document() const OVERRIDE;
36 virtual bool hasValues() const OVERRIDE; 35 virtual bool hasValues() const OVERRIDE;
37 36
38 protected: 37 protected:
39 MediaValuesDynamic(PassRefPtr<LocalFrame>, PassRefPtr<RenderStyle>); 38 MediaValuesDynamic(PassRefPtr<LocalFrame>);
40 39
41 RefPtr<RenderStyle> m_style;
42 RefPtr<LocalFrame> m_frame; 40 RefPtr<LocalFrame> m_frame;
43 }; 41 };
44 42
45 } // namespace 43 } // namespace
46 44
47 #endif // MediaValuesDynamic_h 45 #endif // MediaValuesDynamic_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698