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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleTransformData.cpp

Issue 2917353002: [DO NOT LAND] Example snippet for crbug.com/729447.
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 DataEquivalent<TransformOperation>(rotate_, o.rotate_) && 54 DataEquivalent<TransformOperation>(rotate_, o.rotate_) &&
55 DataEquivalent<TransformOperation>(scale_, o.scale_); 55 DataEquivalent<TransformOperation>(scale_, o.scale_);
56 } 56 }
57 57
58 bool StyleTransformData::Has3DTransform() const { 58 bool StyleTransformData::Has3DTransform() const {
59 return operations_.Has3DOperation() || (translate_ && translate_->Z() != 0) || 59 return operations_.Has3DOperation() || (translate_ && translate_->Z() != 0) ||
60 (rotate_ && (rotate_->X() != 0 || rotate_->Y() != 0)) || 60 (rotate_ && (rotate_->X() != 0 || rotate_->Y() != 0)) ||
61 (scale_ && scale_->Z() != 1); 61 (scale_ && scale_->Z() != 1);
62 } 62 }
63 63
64 // Simple GC'd class
65 struct Cat : public GarbageCollected<Cat> { // (A)
66 DECLARE_TRACE();
67 };
68
69 // Simple class that uses a GC'd class.
70 template <class T>
71 struct Ptr {
72 T* ptr;
73 };
74
75 // Simple overloaded template functions
76 template <class T>
77 void meow(const T*) {}
78
79 template <class T>
80 void meow(const Ptr<T>&) {}
81
82 // Calls meow with explicit template parameters.
83 // Expect to call meow(const T*).
84 // error: [blink-gc] Class 'Ptr<blink::Cat>' contains invalid fields.
85 void boom() {
86 meow<Cat>(new Cat); // (B)
87 }
88
64 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698