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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineBox.h

Issue 1625683003: [Line Layout API] Some harder SVGTextLayoutEngine changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_api_easy_svg
Patch Set: readd null check with new isNull() method on LineLayoutItem Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 InlineBox* nextLeafChild() const; 165 InlineBox* nextLeafChild() const;
166 InlineBox* prevLeafChild() const; 166 InlineBox* prevLeafChild() const;
167 167
168 // Helper functions for editing and hit-testing code. 168 // Helper functions for editing and hit-testing code.
169 // FIXME: These two functions should be moved to RenderedPosition once the c ode to convert between 169 // FIXME: These two functions should be moved to RenderedPosition once the c ode to convert between
170 // Position and inline box, offset pair is moved to RenderedPosition. 170 // Position and inline box, offset pair is moved to RenderedPosition.
171 InlineBox* nextLeafChildIgnoringLineBreak() const; 171 InlineBox* nextLeafChildIgnoringLineBreak() const;
172 InlineBox* prevLeafChildIgnoringLineBreak() const; 172 InlineBox* prevLeafChildIgnoringLineBreak() const;
173 173
174 // TODO(pilgrim): This will be removed as part of the Line Layout API refact oring crbug.com/499321
175 LayoutObject& layoutObject() const { return m_layoutObject; }
176 LineLayoutItem lineLayoutItem() const { return LineLayoutItem(&m_layoutObjec t); } 174 LineLayoutItem lineLayoutItem() const { return LineLayoutItem(&m_layoutObjec t); }
177 175
178 InlineFlowBox* parent() const 176 InlineFlowBox* parent() const
179 { 177 {
180 ASSERT(!m_hasBadParent); 178 ASSERT(!m_hasBadParent);
181 return m_parent; 179 return m_parent;
182 } 180 }
183 void setParent(InlineFlowBox* par) { m_parent = par; } 181 void setParent(InlineFlowBox* par) { m_parent = par; }
184 182
185 const RootInlineBox& root() const; 183 const RootInlineBox& root() const;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 signed expansion() { return m_bitfields.expansion(); } 417 signed expansion() { return m_bitfields.expansion(); }
420 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } 418 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); }
421 419
422 // For InlineFlowBox and InlineTextBox 420 // For InlineFlowBox and InlineTextBox
423 bool extracted() const { return m_bitfields.extracted(); } 421 bool extracted() const { return m_bitfields.extracted(); }
424 422
425 LayoutPoint m_topLeft; 423 LayoutPoint m_topLeft;
426 LayoutUnit m_logicalWidth; 424 LayoutUnit m_logicalWidth;
427 425
428 private: 426 private:
427 LayoutObject& layoutObject() const { return m_layoutObject; }
428
429 InlineBoxBitfields m_bitfields; 429 InlineBoxBitfields m_bitfields;
430 430
431 #if ENABLE(ASSERT) 431 #if ENABLE(ASSERT)
432 bool m_hasBadParent; 432 bool m_hasBadParent;
433 #endif 433 #endif
434 }; 434 };
435 435
436 #if !ENABLE(ASSERT) 436 #if !ENABLE(ASSERT)
437 inline InlineBox::~InlineBox() 437 inline InlineBox::~InlineBox()
438 { 438 {
(...skipping 15 matching lines...) Expand all
454 454
455 } // namespace blink 455 } // namespace blink
456 456
457 #ifndef NDEBUG 457 #ifndef NDEBUG
458 // Outside the WebCore namespace for ease of invocation from gdb. 458 // Outside the WebCore namespace for ease of invocation from gdb.
459 void showTree(const blink::InlineBox*); 459 void showTree(const blink::InlineBox*);
460 void showLineTree(const blink::InlineBox*); 460 void showLineTree(const blink::InlineBox*);
461 #endif 461 #endif
462 462
463 #endif // InlineBox_h 463 #endif // InlineBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698