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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc

Issue 2811783002: [LayoutNG] Move inline files to the inline directory (Closed)
Patch Set: Fix unit tests Created 3 years, 8 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
Index: third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc b/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
deleted file mode 100644
index 0fbd4ab9df8513b84dbb758eb0eac12939d5dee4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/layout/ng/ng_bidi_paragraph.h"
-
-#include "core/layout/ng/ng_inline_node.h"
-#include "core/style/ComputedStyle.h"
-#include "platform/text/ICUError.h"
-
-namespace blink {
-
-NGBidiParagraph::~NGBidiParagraph() {
- ubidi_close(ubidi_);
-}
-
-bool NGBidiParagraph::SetParagraph(const String& text,
- const ComputedStyle& block_style) {
- DCHECK(!ubidi_);
- ubidi_ = ubidi_open();
- ICUError error;
- ubidi_setPara(
- ubidi_, text.Characters16(), text.length(),
- block_style.GetUnicodeBidi() == UnicodeBidi::kPlaintext
- ? UBIDI_DEFAULT_LTR
- : (block_style.Direction() == TextDirection::kRtl ? UBIDI_RTL
- : UBIDI_LTR),
- nullptr, &error);
- if (U_FAILURE(error)) {
- NOTREACHED();
- ubidi_close(ubidi_);
- ubidi_ = nullptr;
- return false;
- }
- return true;
-}
-
-unsigned NGBidiParagraph::GetLogicalRun(unsigned start,
- UBiDiLevel* level) const {
- int32_t end;
- ubidi_getLogicalRun(ubidi_, start, &end, level);
- return end;
-}
-
-void NGBidiParagraph::IndicesInVisualOrder(
- const Vector<UBiDiLevel, 32>& levels,
- Vector<int32_t, 32>* indices_in_visual_order_out) {
- // Check the size before passing the raw pointers to ICU.
- CHECK_EQ(levels.size(), indices_in_visual_order_out->size());
- ubidi_reorderVisual(levels.Data(), levels.size(),
- indices_in_visual_order_out->Data());
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698