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

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

Issue 644813005: Floating point MQs should not match. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added max/min tests Created 6 years, 2 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 blink { 10 namespace blink {
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(Document&);
17 static PassRefPtr<MediaValues> create(LocalFrame*); 17 static PassRefPtr<MediaValues> create(LocalFrame*);
18 virtual PassRefPtr<MediaValues> copy() const override; 18 virtual PassRefPtr<MediaValues> copy() const override;
19 virtual bool isSafeToSendToAnotherThread() const override; 19 virtual bool isSafeToSendToAnotherThread() const override;
20 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, int& r esult) const override; 20 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, int& r esult) const override;
21 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, double & result) const override; 21 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, float& result) const override;
22 22
23 virtual int viewportWidth() const override; 23 virtual int viewportWidth() const override;
24 virtual int viewportHeight() const override; 24 virtual int viewportHeight() const override;
25 virtual int deviceWidth() const override; 25 virtual int deviceWidth() const override;
26 virtual int deviceHeight() const override; 26 virtual int deviceHeight() const override;
27 virtual float devicePixelRatio() const override; 27 virtual float devicePixelRatio() const override;
28 virtual int colorBitsPerComponent() const override; 28 virtual int colorBitsPerComponent() const override;
29 virtual int monochromeBitsPerComponent() const override; 29 virtual int monochromeBitsPerComponent() const override;
30 virtual PointerType primaryPointerType() const override; 30 virtual PointerType primaryPointerType() const override;
31 virtual int availablePointerTypes() const override; 31 virtual int availablePointerTypes() const override;
(...skipping 10 matching lines...) Expand all
42 42
43 // This raw ptr is safe, as MediaValues would not outlive MediaQueryEvaluato r, and 43 // This raw ptr is safe, as MediaValues would not outlive MediaQueryEvaluato r, and
44 // MediaQueryEvaluator is reset on |Document::detach|. 44 // MediaQueryEvaluator is reset on |Document::detach|.
45 // FIXME: Oilpan: This raw ptr should be changed to a Member when LocalFrame is migrated to the heap. 45 // FIXME: Oilpan: This raw ptr should be changed to a Member when LocalFrame is migrated to the heap.
46 LocalFrame* m_frame; 46 LocalFrame* m_frame;
47 }; 47 };
48 48
49 } // namespace 49 } // namespace
50 50
51 #endif // MediaValuesDynamic_h 51 #endif // MediaValuesDynamic_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698