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

Side by Side Diff: Source/core/layout/line/RootInlineBox.cpp

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/line/RootInlineBox.h ('k') | Source/core/layout/shapes/ShapeOutsideInfo.h » ('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) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 return BidiStatus(static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatus Eor), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLastStrong), sta tic_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLast), m_lineBreakContext ); 520 return BidiStatus(static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatus Eor), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLastStrong), sta tic_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLast), m_lineBreakContext );
521 } 521 }
522 522
523 void RootInlineBox::setLineBreakInfo(LayoutObject* obj, unsigned breakPos, const BidiStatus& status) 523 void RootInlineBox::setLineBreakInfo(LayoutObject* obj, unsigned breakPos, const BidiStatus& status)
524 { 524 {
525 // When setting lineBreakObj, the LayoutObject must not be a RenderInline 525 // When setting lineBreakObj, the LayoutObject must not be a RenderInline
526 // with no line boxes, otherwise all sorts of invariants are broken later. 526 // with no line boxes, otherwise all sorts of invariants are broken later.
527 // This has security implications because if the LayoutObject does not 527 // This has security implications because if the LayoutObject does not
528 // point to at least one line box, then that RenderInline can be deleted 528 // point to at least one line box, then that RenderInline can be deleted
529 // later without resetting the lineBreakObj, leading to use-after-free. 529 // later without resetting the lineBreakObj, leading to use-after-free.
530 ASSERT_WITH_SECURITY_IMPLICATION(!obj || obj->isText() || !(obj->isRenderInl ine() && obj->isBox() && !toRenderBox(obj)->inlineBoxWrapper())); 530 ASSERT_WITH_SECURITY_IMPLICATION(!obj || obj->isText() || !(obj->isRenderInl ine() && obj->isBox() && !toLayoutBox(obj)->inlineBoxWrapper()));
531 531
532 m_lineBreakObj = obj; 532 m_lineBreakObj = obj;
533 m_lineBreakPos = breakPos; 533 m_lineBreakPos = breakPos;
534 m_lineBreakBidiStatusEor = status.eor; 534 m_lineBreakBidiStatusEor = status.eor;
535 m_lineBreakBidiStatusLastStrong = status.lastStrong; 535 m_lineBreakBidiStatusLastStrong = status.lastStrong;
536 m_lineBreakBidiStatusLast = status.last; 536 m_lineBreakBidiStatusLast = status.last;
537 m_lineBreakContext = status.context; 537 m_lineBreakContext = status.context;
538 } 538 }
539 539
540 EllipsisBox* RootInlineBox::ellipsisBox() const 540 EllipsisBox* RootInlineBox::ellipsisBox() const
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 #ifndef NDEBUG 852 #ifndef NDEBUG
853 const char* RootInlineBox::boxName() const 853 const char* RootInlineBox::boxName() const
854 { 854 {
855 return "RootInlineBox"; 855 return "RootInlineBox";
856 } 856 }
857 #endif 857 #endif
858 858
859 } // namespace blink 859 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/line/RootInlineBox.h ('k') | Source/core/layout/shapes/ShapeOutsideInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698