summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderRubyText.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/rendering/RenderRubyText.cpp
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/rendering/RenderRubyText.cpp')
-rw-r--r--Source/WebCore/rendering/RenderRubyText.cpp52
1 files changed, 2 insertions, 50 deletions
diff --git a/Source/WebCore/rendering/RenderRubyText.cpp b/Source/WebCore/rendering/RenderRubyText.cpp
index ecca08d64..24c722206 100644
--- a/Source/WebCore/rendering/RenderRubyText.cpp
+++ b/Source/WebCore/rendering/RenderRubyText.cpp
@@ -32,12 +32,11 @@
#include "config.h"
#include "RenderRubyText.h"
-#include "RenderRubyRun.h"
namespace WebCore {
-RenderRubyText::RenderRubyText(Element& element, Ref<RenderStyle>&& style)
- : RenderBlockFlow(element, WTFMove(style))
+RenderRubyText::RenderRubyText(Element& element, PassRef<RenderStyle> style)
+ : RenderBlockFlow(element, std::move(style))
{
}
@@ -45,12 +44,6 @@ RenderRubyText::~RenderRubyText()
{
}
-RenderRubyRun* RenderRubyText::rubyRun() const
-{
- ASSERT(parent());
- return downcast<RenderRubyRun>(parent());
-}
-
bool RenderRubyText::isChildAllowed(const RenderObject& child, const RenderStyle&) const
{
return child.isInline();
@@ -93,45 +86,4 @@ bool RenderRubyText::avoidsFloats() const
return true;
}
-bool RenderRubyText::canBreakBefore(const LazyLineBreakIterator& iterator) const
-{
- // FIXME: It would be nice to improve this so that it isn't just hard-coded, but lookahead in this
- // case is particularly problematic.
-
- if (!iterator.priorContextLength())
- return true;
- UChar ch = iterator.lastCharacter();
- ULineBreak lineBreak = (ULineBreak)u_getIntPropertyValue(ch, UCHAR_LINE_BREAK);
- // UNICODE LINE BREAKING ALGORITHM
- // http://www.unicode.org/reports/tr14/
- // And Requirements for Japanese Text Layout, 3.1.7 Characters Not Starting a Line
- // http://www.w3.org/TR/2012/NOTE-jlreq-20120403/#characters_not_starting_a_line
- switch (lineBreak) {
- case U_LB_NONSTARTER:
- case U_LB_CLOSE_PARENTHESIS:
- case U_LB_CLOSE_PUNCTUATION:
- case U_LB_EXCLAMATION:
- case U_LB_BREAK_SYMBOLS:
- case U_LB_INFIX_NUMERIC:
- case U_LB_ZWSPACE:
- case U_LB_WORD_JOINER:
- return false;
- default:
- break;
- }
- // Special care for Requirements for Japanese Text Layout
- switch (ch) {
- case 0x2019: // RIGHT SINGLE QUOTATION MARK
- case 0x201D: // RIGHT DOUBLE QUOTATION MARK
- case 0x00BB: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- case 0x2010: // HYPHEN
- case 0x2013: // EN DASH
- case 0x300C: // LEFT CORNER BRACKET
- return false;
- default:
- break;
- }
- return true;
-}
-
} // namespace WebCore