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

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: rebase 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..5db0d072d7ac31cad2a0f59da4ec3bff519474d7 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"
@@ -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
leviw_travelin_and_unemployed 2015/08/14 22:28:15 Nit: there should be a colon after the TODO(pilgri
+ 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