summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderRubyBase.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/RenderRubyBase.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/RenderRubyBase.h')
-rw-r--r--Source/WebCore/rendering/RenderRubyBase.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/Source/WebCore/rendering/RenderRubyBase.h b/Source/WebCore/rendering/RenderRubyBase.h
index 0e1f0c396..977dd7708 100644
--- a/Source/WebCore/rendering/RenderRubyBase.h
+++ b/Source/WebCore/rendering/RenderRubyBase.h
@@ -28,8 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderRubyBase_h
-#define RenderRubyBase_h
+#pragma once
#include "RenderBlockFlow.h"
@@ -39,28 +38,44 @@ class RenderRubyRun;
class RenderRubyBase final : public RenderBlockFlow {
public:
- RenderRubyBase(Document&, PassRef<RenderStyle>);
+ RenderRubyBase(Document&, RenderStyle&&);
virtual ~RenderRubyBase();
- virtual const char* renderName() const { return "RenderRubyBase (anonymous)"; }
+ const char* renderName() const override { return "RenderRubyBase (anonymous)"; }
+
+ RenderRubyRun* rubyRun() const;
+
+ void setIsAfterExpansion(bool isAfterExpansion) { m_isAfterExpansion = isAfterExpansion; }
+ bool isAfterExpansion() { return m_isAfterExpansion; }
+
+ void setInitialOffset(float initialOffset) { m_initialOffset = initialOffset; }
- virtual bool isRubyBase() const { return true; }
+ void reset()
+ {
+ m_initialOffset = 0;
+ m_isAfterExpansion = true;
+ }
+
+ void cachePriorCharactersIfNeeded(const LazyLineBreakIterator&) override;
private:
- virtual bool isChildAllowed(const RenderObject&, const RenderStyle&) const;
- virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
- virtual void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const;
+ bool isRubyBase() const override { return true; }
+ bool isChildAllowed(const RenderObject&, const RenderStyle&) const override;
+ ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override;
+ void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const override;
+ void mergeChildrenWithBase(RenderRubyBase& toBlock);
void moveChildren(RenderRubyBase* toBase, RenderObject* beforeChild = 0);
void moveInlineChildren(RenderRubyBase* toBase, RenderObject* beforeChild = 0);
void moveBlockChildren(RenderRubyBase* toBase, RenderObject* beforeChild = 0);
- RenderRubyRun* rubyRun() const;
-
// Allow RenderRubyRun to manipulate the children within ruby bases.
friend class RenderRubyRun;
+
+ float m_initialOffset;
+ unsigned m_isAfterExpansion : 1;
};
} // namespace WebCore
-#endif // RenderRubyBase_h
+SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderRubyBase, isRubyBase())