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

Side by Side Diff: Source/core/layout/LayoutRubyRun.h

Issue 1304993003: Fix Japanese line breaking rule before and after ruby (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mac_chromium_rel_ng bot is stuck, re-upload to see if it fixes 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/ruby/line-break-ruby.html ('k') | Source/core/layout/LayoutRubyRun.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void layout() override; 55 void layout() override;
56 56
57 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; 57 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
58 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride; 58 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride;
59 void removeChild(LayoutObject* child) override; 59 void removeChild(LayoutObject* child) override;
60 60
61 void getOverhang(bool firstLine, LayoutObject* startLayoutObject, LayoutObje ct* endLayoutObject, int& startOverhang, int& endOverhang) const; 61 void getOverhang(bool firstLine, LayoutObject* startLayoutObject, LayoutObje ct* endLayoutObject, int& startOverhang, int& endOverhang) const;
62 62
63 static LayoutRubyRun* staticCreateRubyRun(const LayoutObject* parentRuby); 63 static LayoutRubyRun* staticCreateRubyRun(const LayoutObject* parentRuby);
64 64
65 bool canBreakBefore(const LazyLineBreakIterator&) const;
66
65 const char* name() const override { return "LayoutRubyRun"; } 67 const char* name() const override { return "LayoutRubyRun"; }
66 68
67 protected: 69 protected:
68 LayoutRubyBase* createRubyBase() const; 70 LayoutRubyBase* createRubyBase() const;
69 71
70 private: 72 private:
71 LayoutRubyRun(); 73 LayoutRubyRun();
72 74
73 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectRubyRun || LayoutBlockFlow::isOfType(type); } 75 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectRubyRun || LayoutBlockFlow::isOfType(type); }
74 bool createsAnonymousWrapper() const override { return true; } 76 bool createsAnonymousWrapper() const override { return true; }
75 void removeLeftoverAnonymousBlock(LayoutBlock*) override { } 77 void removeLeftoverAnonymousBlock(LayoutBlock*) override { }
76 }; 78 };
77 79
78 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutRubyRun, isRubyRun()); 80 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutRubyRun, isRubyRun());
79 81
80 } // namespace blink 82 } // namespace blink
81 83
82 #endif // LayoutRubyRun_h 84 #endif // LayoutRubyRun_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/ruby/line-break-ruby.html ('k') | Source/core/layout/LayoutRubyRun.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698