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

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

Issue 851593002: Delete RenderSelectionInfo and other selection rect 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) 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 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; 137 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override;
138 138
139 // Block flows subclass availableWidth to handle multi column layout (shrink ing the width available to children when laying out.) 139 // Block flows subclass availableWidth to handle multi column layout (shrink ing the width available to children when laying out.)
140 virtual LayoutUnit availableLogicalWidth() const override final; 140 virtual LayoutUnit availableLogicalWidth() const override final;
141 141
142 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; 142 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const;
143 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; 143 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const;
144 144
145 virtual bool shouldPaintSelectionGaps() const override final; 145 virtual bool shouldPaintSelectionGaps() const override final;
146 GapRects selectionGapRectsForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer);
147 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint & rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 146 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint & rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
148 RenderObject* selObj, LayoutUnit logicalL eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); 147 RenderObject* selObj, LayoutUnit logicalL eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*);
149 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 148 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
150 RenderObject* selObj, LayoutUnit logical Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); 149 RenderObject* selObj, LayoutUnit logical Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*);
151 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); 150 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap);
152 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; 151 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const;
153 152
154 virtual void setSelectionState(SelectionState) override; 153 virtual void setSelectionState(SelectionState) override;
155 154
156 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co nst LayoutRect& logicalRect); 155 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co nst LayoutRect& logicalRect);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 289
291 void paintSelection(PaintInfo&, const LayoutPoint&); 290 void paintSelection(PaintInfo&, const LayoutPoint&);
292 void paintCarets(PaintInfo&, const LayoutPoint&); 291 void paintCarets(PaintInfo&, const LayoutPoint&);
293 292
294 bool hasCaret() const; 293 bool hasCaret() const;
295 294
296 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 295 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
297 // children. 296 // children.
298 virtual RenderBlock* firstLineBlock() const override; 297 virtual RenderBlock* firstLineBlock() const override;
299 298
300 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) override final 299 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) final;
301 {
302 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer) ;
303 }
304 bool isSelectionRoot() const; 300 bool isSelectionRoot() const;
305 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock, 301 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock,
306 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0); 302 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0);
307 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 303 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
308 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); 304 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*);
309 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 305 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
310 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ; 306 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ;
311 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position); 307 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position);
312 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position); 308 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position);
313 309
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // member variables out of RenderBlock and into RenderBlockFlow. 346 // member variables out of RenderBlock and into RenderBlockFlow.
351 friend class RenderBlockFlow; 347 friend class RenderBlockFlow;
352 friend class RenderParagraph; 348 friend class RenderParagraph;
353 }; 349 };
354 350
355 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 351 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
356 352
357 } // namespace blink 353 } // namespace blink
358 354
359 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ 355 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698