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

Unified Diff: Source/core/layout/line/InlineBox.h

Issue 1294483002: [Line Layout API] Convert InlineBox::boxModelObject to new API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/api/LineLayoutItem.h ('k') | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineBox.h
diff --git a/Source/core/layout/line/InlineBox.h b/Source/core/layout/line/InlineBox.h
index 8a69e9bace1041aa7200e829c6a6d4bb075e25a1..d23980a3a1da66874ff61ae008f8c7358a1fc590 100644
--- a/Source/core/layout/line/InlineBox.h
+++ b/Source/core/layout/line/InlineBox.h
@@ -23,6 +23,7 @@
#include "core/layout/LayoutBoxModelObject.h"
#include "core/layout/LayoutObject.h"
+#include "core/layout/api/LineLayoutBoxModel.h"
#include "core/layout/api/LineLayoutItem.h"
#include "core/layout/api/SelectionState.h"
#include "platform/graphics/paint/DisplayItemClient.h"
@@ -167,7 +168,7 @@ public:
InlineBox* nextLeafChildIgnoringLineBreak() const;
InlineBox* prevLeafChildIgnoringLineBreak() const;
- // TODO(pilgrim) convert all callers to lineLayoutItem, replace m_layoutObject with m_lineLayoutItem, remove layoutObject()
+ // TODO(pilgrim): This will be removed as part of the Line Layout API refactoring crbug.com/499321
LayoutObject& layoutObject() const { return m_layoutObject; }
LineLayoutItem lineLayoutItem() const { return LineLayoutItem(&m_layoutObject); }
@@ -270,14 +271,22 @@ public:
EVerticalAlign verticalAlign() const { return lineLayoutItem().isText() ? ComputedStyle::initialVerticalAlign() : lineLayoutItem().style(m_bitfields.firstLine())->verticalAlign(); }
- // Use with caution! The type is not checked!
- LayoutBoxModelObject* boxModelObject() const
+ // TODO(pilgrim) remove this
+ LayoutBoxModelObject* deprecatedBoxModelObject() const
{
if (!lineLayoutItem().isText())
return toLayoutBoxModelObject(&layoutObject());
return 0;
}
+ // Use with caution! The type is not checked!
+ LineLayoutBoxModel boxModelObject() const
+ {
+ if (!lineLayoutItem().isText())
+ return LineLayoutBoxModel(toLayoutBoxModelObject(&layoutObject()));
+ return LineLayoutBoxModel(nullptr);
+ }
+
LayoutPoint locationIncludingFlipping();
// Converts from a rect in the logical space of the InlineBox to one in the physical space
« no previous file with comments | « Source/core/layout/api/LineLayoutItem.h ('k') | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698