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

Unified Diff: Source/core/layout/line/InlineFlowBox.cpp

Issue 1312713005: [Line Layout API] Add rubyBase to LineLayoutRubyRun (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 3 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/LineLayoutRubyRun.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 923e5209620899bc16fdffa61b7219ffd6d55bb6..ff6be5a28e25f95492c7cb212c1d32e509a045c6 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -32,6 +32,7 @@
#include "core/layout/LayoutRubyText.h"
#include "core/layout/LayoutView.h"
#include "core/layout/api/LineLayoutBox.h"
+#include "core/layout/api/LineLayoutRubyRun.h"
#include "core/layout/line/GlyphOverflow.h"
#include "core/layout/line/InlineTextBox.h"
#include "core/layout/line/RootInlineBox.h"
@@ -650,7 +651,7 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
else
hasAnnotationsAfter = true;
- LayoutRubyRun& rubyRun = toLayoutRubyRun(curr->layoutObject());
+ LineLayoutRubyRun rubyRun = LineLayoutRubyRun(curr->lineLayoutItem());
if (LayoutRubyBase* rubyBase = rubyRun.rubyBase()) {
LayoutUnit bottomRubyBaseLeading = (curr->logicalHeight() - rubyBase->logicalBottom()) + rubyBase->logicalHeight() - (rubyBase->lastRootBox() ? rubyBase->lastRootBox()->lineBottom() : LayoutUnit());
LayoutUnit topRubyBaseLeading = rubyBase->logicalTop() + (rubyBase->firstRootBox() ? rubyBase->firstRootBox()->lineTop() : LayoutUnit());
@@ -1143,7 +1144,7 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi
result = std::max(result, toInlineFlowBox(curr)->computeOverAnnotationAdjustment(allowedPosition));
if (curr->layoutObject().isReplaced() && curr->layoutObject().isRubyRun() && curr->layoutObject().style()->rubyPosition() == RubyPositionBefore) {
- LayoutRubyRun& rubyRun = toLayoutRubyRun(curr->layoutObject());
+ LineLayoutRubyRun rubyRun = LineLayoutRubyRun(curr->lineLayoutItem());
LayoutRubyText* rubyText = rubyRun.rubyText();
if (!rubyText)
continue;
@@ -1191,7 +1192,7 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos
result = std::max(result, toInlineFlowBox(curr)->computeUnderAnnotationAdjustment(allowedPosition));
if (curr->layoutObject().isReplaced() && curr->layoutObject().isRubyRun() && curr->layoutObject().style()->rubyPosition() == RubyPositionAfter) {
- LayoutRubyRun& rubyRun = toLayoutRubyRun(curr->layoutObject());
+ LineLayoutRubyRun rubyRun = LineLayoutRubyRun(curr->lineLayoutItem());
LayoutRubyText* rubyText = rubyRun.rubyText();
if (!rubyText)
continue;
« no previous file with comments | « Source/core/layout/api/LineLayoutRubyRun.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698