Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2006 The Android Open Source Project |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | #ifndef SkDrawGroup_DEFINED |
michael@0 | 11 | #define SkDrawGroup_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkDrawable.h" |
michael@0 | 14 | #include "SkIntArray.h" |
michael@0 | 15 | #include "SkMemberInfo.h" |
michael@0 | 16 | |
michael@0 | 17 | class SkGroup : public SkDrawable { //interface for schema element <g> |
michael@0 | 18 | public: |
michael@0 | 19 | DECLARE_MEMBER_INFO(Group); |
michael@0 | 20 | SkGroup(); |
michael@0 | 21 | virtual ~SkGroup(); |
michael@0 | 22 | virtual bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; |
michael@0 | 23 | virtual bool contains(SkDisplayable* ); |
michael@0 | 24 | SkGroup* copy(); |
michael@0 | 25 | SkBool copySet(int index); |
michael@0 | 26 | virtual SkDisplayable* deepCopy(SkAnimateMaker* ); |
michael@0 | 27 | virtual bool doEvent(SkDisplayEvent::Kind , SkEventState* state ); |
michael@0 | 28 | virtual bool draw(SkAnimateMaker& ); |
michael@0 | 29 | #ifdef SK_DUMP_ENABLED |
michael@0 | 30 | virtual void dump(SkAnimateMaker* ); |
michael@0 | 31 | virtual void dumpDrawables(SkAnimateMaker* ); |
michael@0 | 32 | virtual void dumpEvents(); |
michael@0 | 33 | #endif |
michael@0 | 34 | int findGroup(SkDrawable* drawable, SkTDDrawableArray** list, |
michael@0 | 35 | SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList); |
michael@0 | 36 | virtual bool enable(SkAnimateMaker& ); |
michael@0 | 37 | SkTDDrawableArray* getChildren() { return &fChildren; } |
michael@0 | 38 | SkGroup* getOriginal() { return fOriginal; } |
michael@0 | 39 | virtual bool hasEnable() const; |
michael@0 | 40 | virtual void initialize(); |
michael@0 | 41 | SkBool isACopy() { return fOriginal != NULL; } |
michael@0 | 42 | void markCopyClear(int index); |
michael@0 | 43 | void markCopySet(int index); |
michael@0 | 44 | void markCopySize(int index); |
michael@0 | 45 | bool markedForDelete(int index) const { return (fCopies[index >> 5] & 1 << (index & 0x1f)) == 0; } |
michael@0 | 46 | void reset(); |
michael@0 | 47 | bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ); |
michael@0 | 48 | virtual void setSteps(int steps); |
michael@0 | 49 | #ifdef SK_DEBUG |
michael@0 | 50 | virtual void validate(); |
michael@0 | 51 | #endif |
michael@0 | 52 | protected: |
michael@0 | 53 | bool ifCondition(SkAnimateMaker& maker, SkDrawable* drawable, |
michael@0 | 54 | SkString& conditionString); |
michael@0 | 55 | SkString condition; |
michael@0 | 56 | SkString enableCondition; |
michael@0 | 57 | SkTDDrawableArray fChildren; |
michael@0 | 58 | SkTDDrawableArray* fParentList; |
michael@0 | 59 | SkTDIntArray fCopies; |
michael@0 | 60 | SkGroup* fOriginal; |
michael@0 | 61 | private: |
michael@0 | 62 | typedef SkDrawable INHERITED; |
michael@0 | 63 | }; |
michael@0 | 64 | |
michael@0 | 65 | class SkSave: public SkGroup { |
michael@0 | 66 | DECLARE_MEMBER_INFO(Save); |
michael@0 | 67 | virtual bool draw(SkAnimateMaker& ); |
michael@0 | 68 | private: |
michael@0 | 69 | typedef SkGroup INHERITED; |
michael@0 | 70 | }; |
michael@0 | 71 | |
michael@0 | 72 | #endif // SkDrawGroup_DEFINED |