gfx/skia/trunk/src/animator/SkDisplayInclude.cpp

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 #include "SkDisplayInclude.h"
michael@0 11 #include "SkAnimateMaker.h"
michael@0 12 #include "SkAnimator.h"
michael@0 13
michael@0 14 #if 0
michael@0 15 #undef SK_MEMBER
michael@0 16 #define SK_MEMBER(_member, _type) \
michael@0 17 { #_member, SK_OFFSETOF(BASE_CLASS::_A, _member), SkType_##_type, \
michael@0 18 sizeof(((BASE_CLASS::_A*) 0)->_member) / sizeof(SkScalar) }
michael@0 19 #endif
michael@0 20
michael@0 21 #if SK_USE_CONDENSED_INFO == 0
michael@0 22
michael@0 23 const SkMemberInfo SkInclude::fInfo[] = {
michael@0 24 SK_MEMBER(src, String)
michael@0 25 };
michael@0 26
michael@0 27 #endif
michael@0 28
michael@0 29 DEFINE_GET_MEMBER(SkInclude);
michael@0 30
michael@0 31 //SkInclude::SkInclude() {
michael@0 32 // src.init();
michael@0 33 //}
michael@0 34
michael@0 35 //SkInclude::~SkInclude() {
michael@0 36 // src.unref();
michael@0 37 //}
michael@0 38
michael@0 39 bool SkInclude::enable(SkAnimateMaker & ) {
michael@0 40 return true;
michael@0 41 }
michael@0 42
michael@0 43 bool SkInclude::hasEnable() const {
michael@0 44 return true;
michael@0 45 }
michael@0 46
michael@0 47 void SkInclude::onEndElement(SkAnimateMaker& maker) {
michael@0 48 maker.fInInclude = true;
michael@0 49 if (src.size() == 0 || maker.decodeURI(src.c_str()) == false) {
michael@0 50 if (maker.getErrorCode() != SkXMLParserError::kNoError || maker.getNativeCode() != -1) {
michael@0 51 maker.setInnerError(&maker, src);
michael@0 52 maker.setErrorCode(SkDisplayXMLParserError::kInInclude);
michael@0 53 } else {
michael@0 54 maker.setErrorNoun(src);
michael@0 55 maker.setErrorCode(SkDisplayXMLParserError::kIncludeNameUnknownOrMissing);
michael@0 56 }
michael@0 57 }
michael@0 58 maker.fInInclude = false;
michael@0 59 }

mercurial