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

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

Issue 953673002: Delete RenderLayerModelObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 class AffineTransform; 46 class AffineTransform;
47 class Cursor; 47 class Cursor;
48 class Document; 48 class Document;
49 class HitTestLocation; 49 class HitTestLocation;
50 class HitTestResult; 50 class HitTestResult;
51 class InlineBox; 51 class InlineBox;
52 class InlineFlowBox; 52 class InlineFlowBox;
53 class Position; 53 class Position;
54 class PositionWithAffinity; 54 class PositionWithAffinity;
55 class RenderBlock;
56 class RenderBox;
55 class RenderBoxModelObject; 57 class RenderBoxModelObject;
56 class RenderBlock;
57 class RenderGeometryMap; 58 class RenderGeometryMap;
58 class RenderLayer; 59 class RenderLayer;
59 class RenderLayerModelObject;
60 class RenderView; 60 class RenderView;
61 class TransformState; 61 class TransformState;
62 62
63 struct PaintInfo; 63 struct PaintInfo;
64 64
65 enum CursorDirective { 65 enum CursorDirective {
66 SetCursorBasedOnStyle, 66 SetCursorBasedOnStyle,
67 SetCursor, 67 SetCursor,
68 DoNotSetCursor 68 DoNotSetCursor
69 }; 69 };
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // RenderObjects are allocated out of the rendering partition. 252 // RenderObjects are allocated out of the rendering partition.
253 void* operator new(size_t); 253 void* operator new(size_t);
254 void operator delete(void*); 254 void operator delete(void*);
255 #endif 255 #endif
256 256
257 public: 257 public:
258 virtual bool isBoxModelObject() const { return false; } 258 virtual bool isBoxModelObject() const { return false; }
259 virtual bool isCanvas() const { return false; } 259 virtual bool isCanvas() const { return false; }
260 virtual bool isImage() const { return false; } 260 virtual bool isImage() const { return false; }
261 virtual bool isInlineBlock() const { return false; } 261 virtual bool isInlineBlock() const { return false; }
262 virtual bool isLayerModelObject() const { return false; }
263 virtual bool isRenderBlock() const { return false; } 262 virtual bool isRenderBlock() const { return false; }
264 virtual bool isRenderBlockFlow() const { return false; } 263 virtual bool isRenderBlockFlow() const { return false; }
265 virtual bool isRenderParagraph() const { return false; } 264 virtual bool isRenderParagraph() const { return false; }
266 virtual bool isRenderImage() const { return false; } 265 virtual bool isRenderImage() const { return false; }
267 virtual bool isRenderInline() const { return false; } 266 virtual bool isRenderInline() const { return false; }
268 virtual bool isRenderView() const { return false; } 267 virtual bool isRenderView() const { return false; }
269 268
270 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 269 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
271 270
272 bool alwaysCreateLineBoxesForRenderInline() const 271 bool alwaysCreateLineBoxesForRenderInline() const
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 { 371 {
373 return isAnonymous() ? 0 : m_node.get(); 372 return isAnonymous() ? 0 : m_node.get();
374 } 373 }
375 374
376 Document& document() const { return m_node->document(); } 375 Document& document() const { return m_node->document(); }
377 LocalFrame* frame() const { return document().frame(); } 376 LocalFrame* frame() const { return document().frame(); }
378 377
379 // Returns the object containing this one. Can be different from parent for positioned elements. 378 // Returns the object containing this one. Can be different from parent for positioned elements.
380 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped 379 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped
381 // is true if the renderer returned is an ancestor of paintInvalidationConta iner. 380 // is true if the renderer returned is an ancestor of paintInvalidationConta iner.
382 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const; 381 RenderObject* container(const RenderBox* paintInvalidationContainer = 0, boo l* paintInvalidationContainerSkipped = 0) const;
383 382
384 // TODO(esprehn): Remove this. 383 // TODO(esprehn): Remove this.
385 RenderObject* hoverAncestor() const { return parent(); } 384 RenderObject* hoverAncestor() const { return parent(); }
386 385
387 Element* offsetParent() const; 386 Element* offsetParent() const;
388 387
389 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); 388 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0);
390 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); 389 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0);
391 void clearNeedsLayout(); 390 void clearNeedsLayout();
392 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); 391 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 462
464 // Convert a local quad to absolute coordinates, taking transforms into acco unt. 463 // Convert a local quad to absolute coordinates, taking transforms into acco unt.
465 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0) const 464 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0) const
466 { 465 {
467 return localToContainerQuad(quad, 0, mode); 466 return localToContainerQuad(quad, 0, mode);
468 } 467 }
469 // Convert an absolute quad to local coordinates. 468 // Convert an absolute quad to local coordinates.
470 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0 ) const; 469 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0 ) const;
471 470
472 // Convert a local quad into the coordinate system of container, taking tran sforms into account. 471 // Convert a local quad into the coordinate system of container, taking tran sforms into account.
473 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec t* paintInvalidatinoContainer, MapCoordinatesFlags = 0) const; 472 FloatQuad localToContainerQuad(const FloatQuad&, const RenderBox* paintInval idatinoContainer, MapCoordinatesFlags = 0) const;
474 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb ject* paintInvalidationContainer, MapCoordinatesFlags = 0) const; 473 FloatPoint localToContainerPoint(const FloatPoint&, const RenderBox* paintIn validationContainer, MapCoordinatesFlags = 0) const;
475 474
476 // Return the offset from the container() renderer (excluding transforms). I n multi-column layout, 475 // Return the offset from the container() renderer (excluding transforms). I n multi-column layout,
477 // different offsets apply at different points, so return the offset that ap plies to the given point. 476 // different offsets apply at different points, so return the offset that ap plies to the given point.
478 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const; 477 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const;
479 // Return the offset from an object up the container() chain. Asserts that n one of the intermediate objects have transforms. 478 // Return the offset from an object up the container() chain. Asserts that n one of the intermediate objects have transforms.
480 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; 479 LayoutSize offsetFromAncestorContainer(const RenderObject*) const;
481 480
482 IntRect absoluteBoundingBoxRect() const; 481 IntRect absoluteBoundingBoxRect() const;
483 482
484 // Build an array of quads in absolute coords for line boxes 483 // Build an array of quads in absolute coords for line boxes
(...skipping 25 matching lines...) Expand all
510 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; 509 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const;
511 510
512 struct AppliedTextDecoration { 511 struct AppliedTextDecoration {
513 Color color; 512 Color color;
514 TextDecorationStyle style; 513 TextDecorationStyle style;
515 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio nStyleSolid) { } 514 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio nStyleSolid) { }
516 }; 515 };
517 516
518 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 517 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
519 518
520 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0 519 // Return the RenderBox in the container chain which is responsible for pain ting this object, or 0
521 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 520 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
522 // methods. 521 // methods.
523 const RenderLayerModelObject* containerForPaintInvalidation() const; 522 const RenderView* containerForPaintInvalidation() const;
524 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const; 523 const RenderBox* adjustCompositedContainerForSpecialAncestors(const RenderBo x* paintInvalidationContainer) const;
525 524
526 virtual unsigned length() const { return 1; } 525 virtual unsigned length() const { return 1; }
527 526
528 // FIXME(sky): Remove 527 // FIXME(sky): Remove
529 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); } 528 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); }
530 529
531 bool isTransparent() const { return style()->hasOpacity(); } 530 bool isTransparent() const { return style()->hasOpacity(); }
532 float opacity() const { return style()->opacity(); } 531 float opacity() const { return style()->opacity(); }
533 532
534 enum SelectionState { 533 enum SelectionState {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 void remove() { if (parent()) parent()->removeChild(this); } 591 void remove() { if (parent()) parent()->removeChild(this); }
593 592
594 bool supportsTouchAction() const; 593 bool supportsTouchAction() const;
595 594
596 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); } 595 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); }
597 596
598 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON E; } 597 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON E; }
599 598
600 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use 599 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use
601 // localToAbsolute/absoluteToLocal methods instead. 600 // localToAbsolute/absoluteToLocal methods instead.
602 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const; 601 virtual void mapLocalToContainer(const RenderBox* paintInvalidationContainer , TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const;
603 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst; 602 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst;
604 603
605 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ). 604 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ).
606 // Returns the renderer which was mapped to (container or ancestorToStopAt). 605 // Returns the renderer which was mapped to (container or ancestorToStopAt).
607 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const; 606 virtual const RenderObject* pushMappingToContainer(const RenderBox* ancestor ToStopAt, RenderGeometryMap&) const;
608 607
609 bool shouldUseTransformFromContainer(const RenderObject* container) const; 608 bool shouldUseTransformFromContainer(const RenderObject* container) const;
610 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const; 609 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const;
611 610
612 bool createsGroup() const { return isTransparent() || hasFilter(); } 611 bool createsGroup() const { return isTransparent() || hasFilter(); }
613 612
614 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { }; 613 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderBox* /* paintContainer */ = 0) const { };
615 614
616 RespectImageOrientationEnum shouldRespectImageOrientation() const; 615 RespectImageOrientationEnum shouldRespectImageOrientation() const;
617 616
618 bool isRelayoutBoundaryForInspector() const; 617 bool isRelayoutBoundaryForInspector() const;
619 618
620 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); } 619 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); }
621 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); } 620 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); }
622 621
623 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); } 622 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); }
624 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); } 623 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); }
(...skipping 17 matching lines...) Expand all
642 BoxSide, Color, int thickness, EBorderStyle, bool antialias); 641 BoxSide, Color, int thickness, EBorderStyle, bool antialias);
643 void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 642 void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
644 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias); 643 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias);
645 void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 644 void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
646 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias); 645 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias);
647 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 646 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
648 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); 647 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias);
649 648
650 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); 649 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*);
651 void paintOutline(PaintInfo&, const LayoutRect&); 650 void paintOutline(PaintInfo&, const LayoutRect&);
652 void addChildFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalO ffset, const RenderLayerModelObject* paintContainer) const; 651 void addChildFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalO ffset, const RenderBox* paintContainer) const;
653 652
654 virtual LayoutRect viewRect() const; 653 virtual LayoutRect viewRect() const;
655 654
656 void clearLayoutRootIfNeeded() const; 655 void clearLayoutRootIfNeeded() const;
657 virtual void willBeDestroyed(); 656 virtual void willBeDestroyed();
658 void postDestroy(); 657 void postDestroy();
659 658
660 void insertedIntoTree(); 659 void insertedIntoTree();
661 void willBeRemovedFromTree(); 660 void willBeRemovedFromTree();
662 661
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 void showTree(const blink::RenderObject*); 897 void showTree(const blink::RenderObject*);
899 void showLineTree(const blink::RenderObject*); 898 void showLineTree(const blink::RenderObject*);
900 void showRenderTree(const blink::RenderObject* object1); 899 void showRenderTree(const blink::RenderObject* object1);
901 // We don't make object2 an optional parameter so that showRenderTree 900 // We don't make object2 an optional parameter so that showRenderTree
902 // can be called from gdb easily. 901 // can be called from gdb easily.
903 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 902 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
904 903
905 #endif 904 #endif
906 905
907 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 906 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerStackingNode.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698