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

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

Issue 741893002: Remove canCollapseAnonymousBlockChild. (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 * (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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override; 277 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override;
278 278
279 private: 279 private:
280 virtual RenderObjectChildList* virtualChildren() override final { return chi ldren(); } 280 virtual RenderObjectChildList* virtualChildren() override final { return chi ldren(); }
281 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); } 281 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); }
282 282
283 virtual const char* renderName() const override; 283 virtual const char* renderName() const override;
284 284
285 virtual bool isRenderBlock() const override final { return true; } 285 virtual bool isRenderBlock() const override final { return true; }
286 286
287 void makeChildrenNonInline(RenderObject* insertionPoint = 0);
288
289 static void collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock* ch ild);
290
291 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); } 287 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
292 288
293 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0); 289 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0);
294 290
295 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); 291 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&);
296 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); 292 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&);
297 293
298 void paintContents(PaintInfo&, const LayoutPoint&); 294 void paintContents(PaintInfo&, const LayoutPoint&);
299 void paintSelection(PaintInfo&, const LayoutPoint&); 295 void paintSelection(PaintInfo&, const LayoutPoint&);
300 void paintCarets(PaintInfo&, const LayoutPoint&); 296 void paintCarets(PaintInfo&, const LayoutPoint&);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 bool widthAvailableToChildrenHasChanged(); 335 bool widthAvailableToChildrenHasChanged();
340 336
341 protected: 337 protected:
342 bool createsBlockFormattingContext() const; 338 bool createsBlockFormattingContext() const;
343 339
344 // Adjust from painting offsets to the local coords of this renderer 340 // Adjust from painting offsets to the local coords of this renderer
345 void offsetForContents(LayoutPoint&) const; 341 void offsetForContents(LayoutPoint&) const;
346 342
347 virtual bool updateLogicalWidthAndColumnWidth(); 343 virtual bool updateLogicalWidthAndColumnWidth();
348 344
349 virtual bool canCollapseAnonymousBlockChild() const { return true; }
350
351 protected: 345 protected:
352 RenderObjectChildList m_children; 346 RenderObjectChildList m_children;
353 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t his block flow. For example, <div>Hello<br>world.</div> will have two total lin es for the <div>. 347 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t his block flow. For example, <div>Hello<br>world.</div> will have two total lin es for the <div>.
354 348
355 LayoutUnit m_pageLogicalOffset; 349 LayoutUnit m_pageLogicalOffset;
356 350
357 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in RenderBlockRareData since they are set too frequently. 351 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in RenderBlockRareData since they are set too frequently.
358 unsigned m_hasMarginAfterQuirk : 1; 352 unsigned m_hasMarginAfterQuirk : 1;
359 unsigned m_beingDestroyed : 1; 353 unsigned m_beingDestroyed : 1;
360 unsigned m_hasMarkupTruncation : 1; 354 unsigned m_hasMarkupTruncation : 1;
361 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1; 355 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1;
362 356
363 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock 357 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock
364 friend class LineBreaker; 358 friend class LineBreaker;
365 359
366 // FIXME: This is temporary as we move code that accesses block flow 360 // FIXME: This is temporary as we move code that accesses block flow
367 // member variables out of RenderBlock and into RenderBlockFlow. 361 // member variables out of RenderBlock and into RenderBlockFlow.
368 friend class RenderBlockFlow; 362 friend class RenderBlockFlow;
369 }; 363 };
370 364
371 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 365 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
372 366
373 } // namespace blink 367 } // namespace blink
374 368
375 #endif // RenderBlock_h 369 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlock.cpp » ('j') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698