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

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

Issue 240063003: Revert "A sizes attribute parser" (https://codereview.chromium.org/224733011) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/MediaValues.cpp ('k') | Source/core/css/MediaValuesCached.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MediaValuesCached_h
6 #define MediaValuesCached_h
7
8 #include "core/css/MediaValues.h"
9
10 namespace WebCore {
11
12 class MediaValuesCached FINAL : public MediaValues {
13 public:
14 struct MediaValuesCachedData {
15 // Members variables must be thread safe, since they're copied to the pa rser thread
16 int viewportWidth;
17 int viewportHeight;
18 int deviceWidth;
19 int deviceHeight;
20 float devicePixelRatio;
21 int colorBitsPerComponent;
22 int monochromeBitsPerComponent;
23 PointerDeviceType pointer;
24 int defaultFontSize;
25 int computedFontSize;
26 bool hasXHeight;
27 double xHeight;
28 double zeroWidth;
29 bool threeDEnabled;
30 bool scanMediaType;
31 bool screenMediaType;
32 bool printMediaType;
33 bool strictMode;
34 };
35
36 static PassRefPtr<MediaValues> create(Document&);
37 static PassRefPtr<MediaValues> create(LocalFrame*, RenderStyle*);
38 static PassRefPtr<MediaValues> create(MediaValuesCachedData&);
39 virtual PassRefPtr<MediaValues> copy() const OVERRIDE;
40 virtual bool isSafeToSendToAnotherThread() const OVERRIDE;
41 virtual bool computeLength(double value, unsigned short type, int& result) c onst OVERRIDE;
42
43 virtual int viewportWidth() const OVERRIDE;
44 virtual int viewportHeight() const OVERRIDE;
45 virtual int deviceWidth() const OVERRIDE;
46 virtual int deviceHeight() const OVERRIDE;
47 virtual float devicePixelRatio() const OVERRIDE;
48 virtual int colorBitsPerComponent() const OVERRIDE;
49 virtual int monochromeBitsPerComponent() const OVERRIDE;
50 virtual PointerDeviceType pointer() const OVERRIDE;
51 virtual bool threeDEnabled() const OVERRIDE;
52 virtual bool scanMediaType() const OVERRIDE;
53 virtual bool screenMediaType() const OVERRIDE;
54 virtual bool printMediaType() const OVERRIDE;
55 virtual bool strictMode() const OVERRIDE;
56 virtual Document* document() const OVERRIDE;
57 virtual bool hasValues() const OVERRIDE;
58
59 protected:
60 MediaValuesCached(LocalFrame*, RenderStyle*);
61 MediaValuesCached(const MediaValuesCachedData&);
62
63 MediaValuesCachedData m_data;
64 };
65
66 } // namespace
67
68 #endif // MediaValuesCached_h
OLDNEW
« no previous file with comments | « Source/core/css/MediaValues.cpp ('k') | Source/core/css/MediaValuesCached.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698