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.
1 /*
2 * Copyright 2010 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8 #include "GrClipData.h"
10 #include "GrSurface.h"
11 #include "SkRect.h"
13 ///////////////////////////////////////////////////////////////////////////////
15 /**
16 * getConservativeBounds returns the conservative bounding box of the clip
17 * in device (as opposed to canvas) coordinates. If the bounding box is
18 * the result of purely intersections of rects (with an initial replace)
19 * isIntersectionOfRects will be set to true.
20 */
21 void GrClipData::getConservativeBounds(const GrSurface* surface,
22 SkIRect* devResult,
23 bool* isIntersectionOfRects) const {
24 SkRect devBounds;
26 fClipStack->getConservativeBounds(-fOrigin.fX,
27 -fOrigin.fY,
28 surface->width(),
29 surface->height(),
30 &devBounds,
31 isIntersectionOfRects);
33 devBounds.roundOut(devResult);
34 }