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

Side by Side Diff: sky/engine/core/rendering/RenderObject.h

Issue 847303003: Delete selection paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 }; 569 };
570 570
571 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 571 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
572 572
573 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0 573 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0
574 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 574 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
575 // methods. 575 // methods.
576 const RenderLayerModelObject* containerForPaintInvalidation() const; 576 const RenderLayerModelObject* containerForPaintInvalidation() const;
577 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const; 577 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const;
578 578
579 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of
580 // that rect in the coordinate space of paintInvalidationContainer.
581 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
582
583 virtual unsigned length() const { return 1; } 579 virtual unsigned length() const { return 1; }
584 580
585 // FIXME(sky): Remove 581 // FIXME(sky): Remove
586 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); } 582 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); }
587 583
588 bool isTransparent() const { return style()->hasOpacity(); } 584 bool isTransparent() const { return style()->hasOpacity(); }
589 float opacity() const { return style()->opacity(); } 585 float opacity() const { return style()->opacity(); }
590 586
591 enum SelectionState { 587 enum SelectionState {
592 SelectionNone, // The object is not selected. 588 SelectionNone, // The object is not selected.
593 SelectionStart, // The object either contains the start of a selection r un or is the start of a run 589 SelectionStart, // The object either contains the start of a selection r un or is the start of a run
594 SelectionInside, // The object is fully encompassed by a selection run 590 SelectionInside, // The object is fully encompassed by a selection run
595 SelectionEnd, // The object either contains the end of a selection run o r is the end of a run 591 SelectionEnd, // The object either contains the end of a selection run o r is the end of a run
596 SelectionBoth // The object contains an entire run or is the sole select ed object in that run 592 SelectionBoth // The object contains an entire run or is the sole select ed object in that run
597 }; 593 };
598 594
599 // The current selection state for an object. For blocks, the state refers to the state of the leaf 595 // The current selection state for an object. For blocks, the state refers to the state of the leaf
600 // descendants (as described above in the SelectionState enum declaration). 596 // descendants (as described above in the SelectionState enum declaration).
601 SelectionState selectionState() const { return m_bitfields.selectionState(); } 597 SelectionState selectionState() const { return m_bitfields.selectionState(); }
602 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); } 598 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); }
603 inline void setSelectionStateIfNeeded(SelectionState); 599 inline void setSelectionStateIfNeeded(SelectionState);
604 bool canUpdateSelectionOnRootLineBoxes(); 600 bool canUpdateSelectionOnRootLineBoxes();
605 601
606 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest
607 // possible bounding box for the selection. The rect returned is in the coor dinate space of the paint invalidation container's backing.
608 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* /*paintInvalidationContainer*/, bool /*clipToVisibleContent*/ = true) { r eturn LayoutRect(); }
609
610 virtual bool canBeSelectionLeaf() const { return false; } 602 virtual bool canBeSelectionLeaf() const { return false; }
611 bool hasSelectedChildren() const { return selectionState() != SelectionNone; } 603 bool hasSelectedChildren() const { return selectionState() != SelectionNone; }
612 604
613 bool isSelectable() const; 605 bool isSelectable() const;
614 // Obtains the selection colors that should be used when painting a selectio n. 606 // Obtains the selection colors that should be used when painting a selectio n.
615 Color selectionBackgroundColor() const; 607 Color selectionBackgroundColor() const;
616 Color selectionForegroundColor() const; 608 Color selectionForegroundColor() const;
617 Color selectionEmphasisMarkColor() const; 609 Color selectionEmphasisMarkColor() const;
618 610
619 // Whether or not a given block needs to paint selection gaps. 611 // Whether or not a given block needs to paint selection gaps.
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 void showTree(const blink::RenderObject*); 1005 void showTree(const blink::RenderObject*);
1014 void showLineTree(const blink::RenderObject*); 1006 void showLineTree(const blink::RenderObject*);
1015 void showRenderTree(const blink::RenderObject* object1); 1007 void showRenderTree(const blink::RenderObject* object1);
1016 // We don't make object2 an optional parameter so that showRenderTree 1008 // We don't make object2 an optional parameter so that showRenderTree
1017 // can be called from gdb easily. 1009 // can be called from gdb easily.
1018 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1010 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1019 1011
1020 #endif 1012 #endif
1021 1013
1022 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 1014 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698