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 SkDisplayable_DEFINED |
michael@0 | 11 | #define SkDisplayable_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkOperand.h" |
michael@0 | 14 | #ifdef SK_DEBUG |
michael@0 | 15 | #include "SkString.h" |
michael@0 | 16 | #endif |
michael@0 | 17 | #include "SkIntArray.h" |
michael@0 | 18 | #include "SkRect.h" |
michael@0 | 19 | #include "SkTDArray.h" |
michael@0 | 20 | |
michael@0 | 21 | class SkAnimateMaker; |
michael@0 | 22 | class SkApply; |
michael@0 | 23 | class SkEvents; |
michael@0 | 24 | struct SkMemberInfo; |
michael@0 | 25 | struct SkScriptValue; |
michael@0 | 26 | class SkOpArray; // compiled scripting experiment |
michael@0 | 27 | union SkOperand2; // compiled scripting experiment |
michael@0 | 28 | |
michael@0 | 29 | class SkDisplayable { |
michael@0 | 30 | public: |
michael@0 | 31 | #ifdef SK_DEBUG |
michael@0 | 32 | SkDisplayable(); |
michael@0 | 33 | #endif |
michael@0 | 34 | virtual ~SkDisplayable(); |
michael@0 | 35 | virtual bool addChild(SkAnimateMaker& , SkDisplayable* child); |
michael@0 | 36 | virtual bool canContainDependents() const; |
michael@0 | 37 | virtual bool childrenNeedDisposing() const; |
michael@0 | 38 | virtual void clearBounder(); |
michael@0 | 39 | virtual bool contains(SkDisplayable* ); |
michael@0 | 40 | virtual SkDisplayable* contains(const SkString& ); |
michael@0 | 41 | virtual SkDisplayable* deepCopy(SkAnimateMaker* ); |
michael@0 | 42 | virtual void dirty(); |
michael@0 | 43 | #ifdef SK_DUMP_ENABLED |
michael@0 | 44 | virtual void dump(SkAnimateMaker* ); |
michael@0 | 45 | void dumpAttrs(SkAnimateMaker* ); |
michael@0 | 46 | void dumpBase(SkAnimateMaker* ); |
michael@0 | 47 | void dumpChildren(SkAnimateMaker* maker, bool closedAngle = false ); |
michael@0 | 48 | void dumpEnd(SkAnimateMaker* ); |
michael@0 | 49 | virtual void dumpEvents(); |
michael@0 | 50 | #endif |
michael@0 | 51 | virtual bool enable( SkAnimateMaker& ); |
michael@0 | 52 | virtual void enableBounder(); |
michael@0 | 53 | virtual void executeFunction(SkDisplayable* , int functionIndex, |
michael@0 | 54 | SkTDArray<SkScriptValue>& , SkDisplayTypes , SkScriptValue* ); |
michael@0 | 55 | void executeFunction(SkDisplayable* , const SkMemberInfo* , |
michael@0 | 56 | SkTypedArray* , SkScriptValue* ); |
michael@0 | 57 | virtual void executeFunction2(SkDisplayable* , int functionIndex, |
michael@0 | 58 | SkOpArray* params , SkDisplayTypes , SkOperand2* ); // compiled scripting experiment |
michael@0 | 59 | virtual void getBounds(SkRect* ); |
michael@0 | 60 | virtual const SkFunctionParamType* getFunctionsParameters(); |
michael@0 | 61 | virtual const SkMemberInfo* getMember(int index); |
michael@0 | 62 | virtual const SkMemberInfo* getMember(const char name[]); |
michael@0 | 63 | const SkFunctionParamType* getParameters(const SkMemberInfo* info, |
michael@0 | 64 | int* paramCount); |
michael@0 | 65 | virtual SkDisplayable* getParent() const; |
michael@0 | 66 | virtual bool getProperty(int index, SkScriptValue* value) const; |
michael@0 | 67 | virtual bool getProperty2(int index, SkOperand2* value) const; // compiled scripting experiment |
michael@0 | 68 | virtual SkDisplayTypes getType() const; |
michael@0 | 69 | virtual bool hasEnable() const; |
michael@0 | 70 | bool isAnimate() const { |
michael@0 | 71 | SkDisplayTypes type = getType(); |
michael@0 | 72 | return type == SkType_Animate || type == SkType_Set; } |
michael@0 | 73 | bool isApply() const { return getType() == SkType_Apply; } |
michael@0 | 74 | bool isColor() const { return getType() == SkType_Color; } |
michael@0 | 75 | virtual bool isDrawable() const; |
michael@0 | 76 | bool isGroup() const { return getType() == SkType_Group || |
michael@0 | 77 | getType() == SkType_Save || getType() == SkType_DrawTo || |
michael@0 | 78 | getType() == SkType_SaveLayer; } |
michael@0 | 79 | bool isMatrix() const { return getType() == SkType_Matrix; } |
michael@0 | 80 | virtual bool isPaint() const { return getType() == SkType_Paint; } |
michael@0 | 81 | virtual bool isPath() const { return false; } |
michael@0 | 82 | bool isPost() const { return getType() == SkType_Post; } |
michael@0 | 83 | virtual void onEndElement(SkAnimateMaker& ); |
michael@0 | 84 | virtual const SkMemberInfo* preferredChild(SkDisplayTypes type); |
michael@0 | 85 | virtual bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ); |
michael@0 | 86 | virtual void setChildHasID(); |
michael@0 | 87 | virtual bool setParent(SkDisplayable* ); |
michael@0 | 88 | virtual bool setProperty(int index, SkScriptValue& ); |
michael@0 | 89 | void setReference(const SkMemberInfo* info, SkDisplayable* ref); |
michael@0 | 90 | #ifdef SK_DEBUG |
michael@0 | 91 | bool isDataInput() const { return getType() == SkType_DataInput; }; |
michael@0 | 92 | bool isEvent() const { return getType() == SkType_Event; } |
michael@0 | 93 | virtual bool isMatrixPart() const { return false; } |
michael@0 | 94 | bool isPatch() const { return getType() == SkType_3D_Patch; } |
michael@0 | 95 | virtual bool isPaintPart() const { return false; } |
michael@0 | 96 | virtual bool isPathPart() const { return false; } |
michael@0 | 97 | virtual void validate(); |
michael@0 | 98 | SkString _id; |
michael@0 | 99 | const char* id; |
michael@0 | 100 | // static int fAllocationCount; |
michael@0 | 101 | static SkTDDisplayableArray fAllocations; |
michael@0 | 102 | #else |
michael@0 | 103 | void validate() {} |
michael@0 | 104 | #endif |
michael@0 | 105 | #ifdef SK_DUMP_ENABLED |
michael@0 | 106 | private: |
michael@0 | 107 | void dumpValues(const SkMemberInfo* info, SkDisplayTypes type, SkOperand op, SkOperand blankOp, |
michael@0 | 108 | SkOperand op2, SkOperand blankOp2); |
michael@0 | 109 | #endif |
michael@0 | 110 | }; |
michael@0 | 111 | |
michael@0 | 112 | #endif // SkDisplayable_DEFINED |