Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 1775013003: Implement -webkit-box-reflect as a filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make msvc dbg happy Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. 357 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n.
358 LayoutRect physicalBoundingBox(const LayoutPoint& offsetFromRoot) const; 358 LayoutRect physicalBoundingBox(const LayoutPoint& offsetFromRoot) const;
359 LayoutRect physicalBoundingBox(const PaintLayer* ancestorLayer) const; 359 LayoutRect physicalBoundingBox(const PaintLayer* ancestorLayer) const;
360 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const L ayoutPoint& offsetFromRoot) const; 360 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const L ayoutPoint& offsetFromRoot) const;
361 LayoutRect fragmentsBoundingBox(const PaintLayer* ancestorLayer) const; 361 LayoutRect fragmentsBoundingBox(const PaintLayer* ancestorLayer) const;
362 362
363 LayoutRect boundingBoxForCompositingOverlapTest() const; 363 LayoutRect boundingBoxForCompositingOverlapTest() const;
364 364
365 // If true, this layer's children are included in its bounds for overlap tes ting. 365 // If true, this layer's children are included in its bounds for overlap tes ting.
366 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around. 366 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around.
367 bool overlapBoundsIncludeChildren() const { return hasFilter() && layoutObje ct()->style()->filter().hasFilterThatMovesPixels(); } 367 bool overlapBoundsIncludeChildren() const;
368 368
369 // MaybeIncludeTransformForAncestorLayer means that a transform on |ancestor Layer| may be applied to the bounding box, 369 // MaybeIncludeTransformForAncestorLayer means that a transform on |ancestor Layer| may be applied to the bounding box,
370 // in particular if paintsWithTransform() is true. 370 // in particular if paintsWithTransform() is true.
371 enum CalculateBoundsOptions { 371 enum CalculateBoundsOptions {
372 MaybeIncludeTransformForAncestorLayer, 372 MaybeIncludeTransformForAncestorLayer,
373 NeverIncludeTransformForAncestorLayer, 373 NeverIncludeTransformForAncestorLayer,
374 }; 374 };
375 LayoutRect boundingBoxForCompositing(const PaintLayer* ancestorLayer = 0, Ca lculateBoundsOptions = MaybeIncludeTransformForAncestorLayer) const; 375 LayoutRect boundingBoxForCompositing(const PaintLayer* ancestorLayer = 0, Ca lculateBoundsOptions = MaybeIncludeTransformForAncestorLayer) const;
376 376
377 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; } 377 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; }
(...skipping 20 matching lines...) Expand all
398 // Note that this transform does not have the perspective-origin baked in. 398 // Note that this transform does not have the perspective-origin baked in.
399 TransformationMatrix perspectiveTransform() const; 399 TransformationMatrix perspectiveTransform() const;
400 FloatPoint perspectiveOrigin() const; 400 FloatPoint perspectiveOrigin() const;
401 bool preserves3D() const { return layoutObject()->style()->transformStyle3D( ) == TransformStyle3DPreserve3D; } 401 bool preserves3D() const { return layoutObject()->style()->transformStyle3D( ) == TransformStyle3DPreserve3D; }
402 bool has3DTransform() const { return m_rareData && m_rareData->transform && !m_rareData->transform->isAffine(); } 402 bool has3DTransform() const { return m_rareData && m_rareData->transform && !m_rareData->transform->isAffine(); }
403 403
404 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 404 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959
405 bool shouldPreserve3D() const { return !layoutObject()->hasReflection() && l ayoutObject()->style()->transformStyle3D() == TransformStyle3DPreserve3D; } 405 bool shouldPreserve3D() const { return !layoutObject()->hasReflection() && l ayoutObject()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
406 406
407 void filterNeedsPaintInvalidation(); 407 void filterNeedsPaintInvalidation();
408 bool hasFilter() const { return layoutObject()->hasFilter(); } 408
409 // Returns |true| if any property that renders using filter operations is
410 // used (including, but not limited to, 'filter').
411 bool hasFilterInducingProperty() const { return layoutObject()->hasFilterInd ucingProperty(); }
409 412
410 void* operator new(size_t); 413 void* operator new(size_t);
411 // Only safe to call from LayoutBoxModelObject::destroyLayer() 414 // Only safe to call from LayoutBoxModelObject::destroyLayer()
412 void operator delete(void*); 415 void operator delete(void*);
413 416
414 CompositingState compositingState() const; 417 CompositingState compositingState() const;
415 418
416 // This returns true if our document is in a phase of its lifestyle during w hich 419 // This returns true if our document is in a phase of its lifestyle during w hich
417 // compositing state may legally be read. 420 // compositing state may legally be read.
418 bool isAllowedToQueryCompositingState() const; 421 bool isAllowedToQueryCompositingState() const;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 462 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
460 463
461 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; } 464 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; }
462 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; } 465 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; }
463 466
464 FilterOperations computeFilterOperations(const ComputedStyle&) const; 467 FilterOperations computeFilterOperations(const ComputedStyle&) const;
465 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const ; 468 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const ;
466 bool paintsWithFilters() const; 469 bool paintsWithFilters() const;
467 bool paintsWithBackdropFilters() const; 470 bool paintsWithBackdropFilters() const;
468 FilterEffect* lastFilterEffect() const; 471 FilterEffect* lastFilterEffect() const;
472 bool hasFilterOutsets() const;
469 FilterOutsets filterOutsets() const; 473 FilterOutsets filterOutsets() const;
470 474
471 PaintLayerFilterInfo* filterInfo() const { return m_rareData ? m_rareData->f ilterInfo.get() : nullptr; } 475 PaintLayerFilterInfo* filterInfo() const { return m_rareData ? m_rareData->f ilterInfo.get() : nullptr; }
472 PaintLayerFilterInfo& ensureFilterInfo(); 476 PaintLayerFilterInfo& ensureFilterInfo();
473 477
474 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt yle); 478 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt yle);
475 479
476 Node* enclosingNode() const; 480 Node* enclosingNode() const;
477 481
478 bool isInTopLayer() const; 482 bool isInTopLayer() const;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 863
860 } // namespace blink 864 } // namespace blink
861 865
862 #ifndef NDEBUG 866 #ifndef NDEBUG
863 // Outside the WebCore namespace for ease of invocation from gdb. 867 // Outside the WebCore namespace for ease of invocation from gdb.
864 void showLayerTree(const blink::PaintLayer*); 868 void showLayerTree(const blink::PaintLayer*);
865 void showLayerTree(const blink::LayoutObject*); 869 void showLayerTree(const blink::LayoutObject*);
866 #endif 870 #endif
867 871
868 #endif // Layer_h 872 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698