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

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

Issue 700703002: Remove more float machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; 499 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override;
500 500
501 void removeFloatingOrPositionedChildFromBlockLists(); 501 void removeFloatingOrPositionedChildFromBlockLists();
502 502
503 RenderLayer* enclosingFloatPaintingLayer() const; 503 RenderLayer* enclosingFloatPaintingLayer() const;
504 504
505 virtual int firstLineBoxBaseline() const { return -1; } 505 virtual int firstLineBoxBaseline() const { return -1; }
506 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R eturns -1 if we should skip this box when computing the baseline of an inline-bl ock. 506 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R eturns -1 if we should skip this box when computing the baseline of an inline-bl ock.
507 507
508 virtual bool avoidsFloats() const;
509
510 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBox(); } 508 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBox(); }
511 509
512 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override; 510 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override;
513 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; 511 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override;
514 512
515 virtual LayoutUnit offsetLeft() const override; 513 virtual LayoutUnit offsetLeft() const override;
516 virtual LayoutUnit offsetTop() const override; 514 virtual LayoutUnit offsetTop() const override;
517 515
518 // These represent your location relative to your container as a physical of fset. 516 // These represent your location relative to your container as a physical of fset.
519 // In layout related methods you almost always want the logical location (e. g. x() and y()). 517 // In layout related methods you almost always want the logical location (e. g. x() and y()).
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 return 0; 560 return 0;
563 } 561 }
564 562
565 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir ection() == object->style()->direction(); } 563 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir ection() == object->style()->direction(); }
566 564
567 ShapeOutsideInfo* shapeOutsideInfo() const 565 ShapeOutsideInfo* shapeOutsideInfo() const
568 { 566 {
569 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t his) : 0; 567 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t his) : 0;
570 } 568 }
571 569
572 void markShapeOutsideDependentsForLayout()
573 {
574 if (isFloating())
575 removeFloatingOrPositionedChildFromBlockLists();
576 }
577
578 protected: 570 protected:
579 virtual void willBeDestroyed() override; 571 virtual void willBeDestroyed() override;
580 572
581 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o verride; 573 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o verride;
582 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride; 574 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride;
583 virtual void updateFromStyle() override; 575 virtual void updateFromStyle() override;
584 576
585 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 577 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
586 bool getBackgroundPaintedExtent(LayoutRect&) const; 578 bool getBackgroundPaintedExtent(LayoutRect&) const;
587 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; 579 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 if (UNLIKELY(inlineBoxWrapper() != 0)) 743 if (UNLIKELY(inlineBoxWrapper() != 0))
752 deleteLineBoxWrapper(); 744 deleteLineBoxWrapper();
753 } 745 }
754 746
755 ensureRareData().m_inlineBoxWrapper = boxWrapper; 747 ensureRareData().m_inlineBoxWrapper = boxWrapper;
756 } 748 }
757 749
758 } // namespace blink 750 } // namespace blink
759 751
760 #endif // RenderBox_h 752 #endif // RenderBox_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlockLineLayout.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698