Changeset 141588 in webkit
- Timestamp:
- Feb 1, 2013 7:01:34 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r141578 r141588 1 2013-02-01 Geoffrey Garen <ggaren@apple.com> 2 3 Added TriState to WTF and started using it in one place 4 https://bugs.webkit.org/show_bug.cgi?id=108628 5 6 Reviewed by Beth Dakin. 7 8 * runtime/PrototypeMap.h: 9 (JSC::PrototypeMap::isPrototype): Use TriState instead of boolean. In 10 response to review feedback, this is an attempt to clarify that our 11 'true' condition is actually just a 'maybe'. 12 13 * runtime/PrototypeMap.h: 14 (PrototypeMap): 15 (JSC::PrototypeMap::isPrototype): 16 1 17 2013-02-01 Alexis Menard <alexis@webkit.org> 2 18 -
trunk/Source/JavaScriptCore/runtime/PrototypeMap.h
r141050 r141588 28 28 29 29 #include "WeakGCMap.h" 30 #include <wtf/TriState.h> 30 31 31 32 namespace JSC { … … 40 41 void clearEmptyObjectStructureForPrototype(JSObject*, unsigned inlineCapacity); 41 42 void addPrototype(JSObject*); 42 bool isPrototype(JSObject*); // Returns a conservative estimate.43 TriState isPrototype(JSObject*) const; // Returns a conservative estimate. 43 44 44 45 private: … … 48 49 }; 49 50 50 inline bool PrototypeMap::isPrototype(JSObject* object)51 inline TriState PrototypeMap::isPrototype(JSObject* object) const 51 52 { 52 return m_prototypes.contains(object); 53 if (!m_prototypes.contains(object)) 54 return FalseTriState; 55 56 // We know that 'object' was used as a prototype at one time, so be 57 // conservative and say that it might still be so. (It would be expensive 58 // to find out for sure, and we don't know of any cases where being precise 59 // would improve performance.) 60 return MixedTriState; 53 61 } 54 62 -
trunk/Source/WTF/ChangeLog
r141586 r141588 1 2013-02-01 Geoffrey Garen <ggaren@apple.com> 2 3 Added TriState to WTF and started using it in one place 4 https://bugs.webkit.org/show_bug.cgi?id=108628 5 6 Reviewed by Beth Dakin. 7 8 Useful for expressing "maybe" conditions in a boolean context. 9 10 * WTF.xcodeproj/project.pbxproj: 11 * wtf/TriState.h: Added. 12 (WTF): 13 1 14 2013-02-01 Patrick Gansterer <paroga@webkit.org> 2 15 -
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
r141308 r141588 33 33 143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; }; 34 34 143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (); }; }; 35 149EF16316BBFE0D000A4331 /* TriState.h in Headers */ = {isa = PBXBuildFile; fileRef = 149EF16216BBFE0D000A4331 /* TriState.h */; settings = {ATTRIBUTES = (Private, ); }; }; 35 36 14F3B0F715E45E4600210069 /* SaturatedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */; settings = {ATTRIBUTES = (); }; }; 36 37 1A6BB769162F300500DD16DB /* StreamBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6BB768162F300500DD16DB /* StreamBuffer.h */; }; … … 311 312 FEDACD3D1630F83F00C69634 /* StackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDACD3B1630F83F00C69634 /* StackStats.cpp */; }; 312 313 FEDACD3E1630F83F00C69634 /* StackStats.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDACD3C1630F83F00C69634 /* StackStats.h */; }; 313 FE43302716A7ADC300D1585D /* TypeSafeEnum.h in Headers */ = {isa = PBXBuildFile; fileRef = FE43302616A7ADC300D1585D /* TypeSafeEnum.h */; };314 314 /* End PBXBuildFile section */ 315 315 … … 336 336 143F611D1565F0F900DB514A /* RAMSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RAMSize.cpp; sourceTree = "<group>"; }; 337 337 143F611E1565F0F900DB514A /* RAMSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMSize.h; sourceTree = "<group>"; }; 338 149EF16216BBFE0D000A4331 /* TriState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriState.h; sourceTree = "<group>"; }; 338 339 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaturatedArithmetic.h; sourceTree = "<group>"; }; 339 340 1A6BB768162F300500DD16DB /* StreamBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = "<group>"; }; … … 624 625 FEDACD3B1630F83F00C69634 /* StackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackStats.cpp; sourceTree = "<group>"; }; 625 626 FEDACD3C1630F83F00C69634 /* StackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackStats.h; sourceTree = "<group>"; }; 626 FE43302616A7ADC300D1585D /* TypeSafeEnum.h */ = {isa = PBXFileReference; fileEncoding = 4; path = TypeSafeEnum.h; sourceTree = "<group>"; };627 627 /* End PBXFileReference section */ 628 628 … … 870 870 A8A4733E151A825B004123FF /* ThreadSafeRefCounted.h */, 871 871 A8A4733F151A825B004123FF /* ThreadSpecific.h */, 872 149EF16216BBFE0D000A4331 /* TriState.h */, 872 873 A8A47341151A825B004123FF /* TypedArrayBase.h */, 873 FE43302616A7ADC300D1585D /* TypeSafeEnum.h */,874 874 A8A47342151A825B004123FF /* TypeTraits.cpp */, 875 875 A8A47343151A825B004123FF /* TypeTraits.h */, … … 1230 1230 A8A47455151A825B004123FF /* ThreadSpecific.h in Headers */, 1231 1231 A8A47457151A825B004123FF /* TypedArrayBase.h in Headers */, 1232 FE43302716A7ADC300D1585D /* TypeSafeEnum.h in Headers */,1233 1232 A8A47459151A825B004123FF /* TypeTraits.h in Headers */, 1234 1233 A8A4745C151A825B004123FF /* Uint16Array.h in Headers */, … … 1263 1262 A8A47446151A825B004123FF /* WTFString.h in Headers */, 1264 1263 A8A47487151A825B004123FF /* WTFThreadData.h in Headers */, 1264 149EF16316BBFE0D000A4331 /* TriState.h in Headers */, 1265 1265 ); 1266 1266 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/ChangeLog
r141579 r141588 1 2013-02-01 Geoffrey Garen <ggaren@apple.com> 2 3 Added TriState to WTF and started using it in one place 4 https://bugs.webkit.org/show_bug.cgi?id=108628 5 6 Reviewed by Beth Dakin. 7 8 * editing/EditingStyle.h: 9 (WebCore): Moved TriState to WTF so it can be used in more places. 10 1 11 2013-02-01 Pavel Feldman <pfeldman@chromium.org> 2 12 -
trunk/Source/WebCore/editing/EditingStyle.h
r137370 r141588 1 1 /* 2 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 37 38 #include <wtf/RefCounted.h> 38 39 #include <wtf/RefPtr.h> 40 #include <wtf/TriState.h> 39 41 #include <wtf/Vector.h> 40 42 #include <wtf/text/WTFString.h> … … 56 58 class StyledElement; 57 59 class VisibleSelection; 58 59 enum TriState { FalseTriState, TrueTriState, MixedTriState };60 60 61 61 class EditingStyle : public RefCounted<EditingStyle> {
Note: See TracChangeset
for help on using the changeset viewer.