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

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

Issue 1161623004: Remove backface visibility (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c hildNeedsOverflowRecalcAfterStyleChange(); } 331 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c hildNeedsOverflowRecalcAfterStyleChange(); }
332 332
333 bool isSelectionBorder() const; 333 bool isSelectionBorder() const;
334 334
335 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl ip(); } 335 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl ip(); }
336 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); } 336 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); }
337 bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip(); } 337 bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip(); }
338 338
339 bool hasTransform() const { return m_bitfields.hasTransform(); } 339 bool hasTransform() const { return m_bitfields.hasTransform(); }
340 bool hasClipPath() const { return style() && style()->clipPath(); } 340 bool hasClipPath() const { return style() && style()->clipPath(); }
341 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili ty() == BackfaceVisibilityHidden; }
342 341
343 inline bool preservesNewline() const; 342 inline bool preservesNewline() const;
344 343
345 RenderView* view() const { return document().renderView(); }; 344 RenderView* view() const { return document().renderView(); };
346 FrameView* frameView() const { return document().view(); }; 345 FrameView* frameView() const { return document().view(); };
347 346
348 bool isRooted() const; 347 bool isRooted() const;
349 348
350 // TODO(ojan): Make this a reference now that it can't be null. 349 // TODO(ojan): Make this a reference now that it can't be null.
351 Node* node() const 350 Node* node() const
352 { 351 {
353 return m_node.get(); 352 return m_node.get();
354 } 353 }
355 354
356 Document& document() const { return m_node->document(); } 355 Document& document() const { return m_node->document(); }
357 LocalFrame* frame() const { return document().frame(); } 356 LocalFrame* frame() const { return document().frame(); }
358 357
359 // Returns the object containing this one. Can be different from parent for positioned elements. 358 // Returns the object containing this one. Can be different from parent for positioned elements.
360 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped 359 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped
361 // is true if the renderer returned is an ancestor of paintInvalidationConta iner. 360 // is true if the renderer returned is an ancestor of paintInvalidationConta iner.
362 RenderObject* container(const RenderBox* paintInvalidationContainer = 0, boo l* paintInvalidationContainerSkipped = 0) const; 361 RenderObject* container(const RenderBox* paintInvalidationContainer = 0, boo l* paintInvalidationContainerSkipped = 0) const;
363 362
364 // TODO(esprehn): Remove this.
365 RenderObject* hoverAncestor() const { return parent(); }
366
367 Element* offsetParent() const; 363 Element* offsetParent() const;
368 364
369 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); 365 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0);
370 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); 366 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0);
371 void clearNeedsLayout(); 367 void clearNeedsLayout();
372 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); 368 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0);
373 void setNeedsPositionedMovementLayout(); 369 void setNeedsPositionedMovementLayout();
374 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); 370 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in);
375 void clearPreferredLogicalWidthsDirty(); 371 void clearPreferredLogicalWidthsDirty();
376 void invalidateContainerPreferredLogicalWidths(); 372 void invalidateContainerPreferredLogicalWidths();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 }; 490 };
495 491
496 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 492 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
497 493
498 // Return the RenderBox in the container chain which is responsible for pain ting this object, or 0 494 // Return the RenderBox in the container chain which is responsible for pain ting this object, or 0
499 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 495 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
500 // methods. 496 // methods.
501 const RenderView* containerForPaintInvalidation() const; 497 const RenderView* containerForPaintInvalidation() const;
502 const RenderBox* adjustCompositedContainerForSpecialAncestors(const RenderBo x* paintInvalidationContainer) const; 498 const RenderBox* adjustCompositedContainerForSpecialAncestors(const RenderBo x* paintInvalidationContainer) const;
503 499
500 // Overriden by RenderText for character length, used in line layout code.
504 virtual unsigned length() const { return 1; } 501 virtual unsigned length() const { return 1; }
505 502
506 // FIXME(sky): Remove 503 // FIXME(sky): Remove
507 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); } 504 bool isFloatingOrOutOfFlowPositioned() const { return isOutOfFlowPositioned( ); }
508 505
509 bool isTransparent() const { return style()->hasOpacity(); } 506 bool isTransparent() const { return style()->hasOpacity(); }
510 float opacity() const { return style()->opacity(); } 507 float opacity() const { return style()->opacity(); }
511 508
512 enum SelectionState { 509 enum SelectionState {
513 SelectionNone, // The object is not selected. 510 SelectionNone, // The object is not selected.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 582
586 bool shouldUseTransformFromContainer(const RenderObject* container) const; 583 bool shouldUseTransformFromContainer(const RenderObject* container) const;
587 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const; 584 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const;
588 585
589 bool createsGroup() const { return isTransparent() || style()->hasFilter(); } 586 bool createsGroup() const { return isTransparent() || style()->hasFilter(); }
590 587
591 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderBox* /* paintContainer */ = 0) const { }; 588 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderBox* /* paintContainer */ = 0) const { };
592 589
593 RespectImageOrientationEnum shouldRespectImageOrientation() const; 590 RespectImageOrientationEnum shouldRespectImageOrientation() const;
594 591
595 bool isRelayoutBoundaryForInspector() const;
596
597 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); } 592 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); }
598 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); } 593 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); }
599 594
600 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); } 595 bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayout BecauseOfChildren(); }
601 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); } 596 void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutB ecauseOfChildren(b); }
602 597
603 void setNeedsOverflowRecalcAfterStyleChange(); 598 void setNeedsOverflowRecalcAfterStyleChange();
604 void markContainingBlocksForOverflowRecalc(); 599 void markContainingBlocksForOverflowRecalc();
605 600
606 protected: 601 protected:
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 void showTree(const blink::RenderObject*); 857 void showTree(const blink::RenderObject*);
863 void showLineTree(const blink::RenderObject*); 858 void showLineTree(const blink::RenderObject*);
864 void showRenderTree(const blink::RenderObject* object1); 859 void showRenderTree(const blink::RenderObject* object1);
865 // We don't make object2 an optional parameter so that showRenderTree 860 // We don't make object2 an optional parameter so that showRenderTree
866 // can be called from gdb easily. 861 // can be called from gdb easily.
867 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 862 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
868 863
869 #endif 864 #endif
870 865
871 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 866 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698