Commit 4bba7d42 authored by antti@apple.com's avatar antti@apple.com
Browse files

Add RenderObject bit for isBR().

https://bugs.webkit.org/show_bug.cgi?id=121494

Reviewed by Andreas Kling.

It is no longer piggybacking on isText() flag and is now hot in inline layout.

* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
* rendering/RenderBR.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::setIsBR):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a37b5591
2013-09-17 Antti Koivisto <antti@apple.com>
Add RenderObject bit for isBR().
https://bugs.webkit.org/show_bug.cgi?id=121494
Reviewed by Andreas Kling.
It is no longer piggybacking on isText() flag and is now hot in inline layout.
* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
* rendering/RenderBR.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::setIsBR):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2013-09-17 Andreas Kling <akling@apple.com>
 
Export some missing symbols for Internals after RenderArena& change.
......@@ -36,6 +36,7 @@ RenderBR::RenderBR(Element* element)
, m_inlineBoxWrapper(nullptr)
, m_cachedLineHeight(invalidLineHeight)
{
setIsBR();
}
RenderBR::~RenderBR()
......
......@@ -50,8 +50,6 @@ public:
virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRIDE;
private:
virtual bool isBR() const OVERRIDE { return true; }
virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE;
virtual int caretMinOffset() const OVERRIDE;
virtual int caretMaxOffset() const OVERRIDE;
......
......@@ -343,7 +343,6 @@ public:
bool isPseudoElement() const { return node() && node()->isPseudoElement(); }
virtual bool isBR() const { return false; }
virtual bool isBoxModelObject() const { return false; }
virtual bool isCounter() const { return false; }
virtual bool isQuote() const { return false; }
......@@ -568,6 +567,7 @@ public:
bool isPositioned() const { return m_bitfields.isPositioned(); }
bool isText() const { return !m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); }
bool isBR() const { return m_bitfields.isBR(); }
bool isBox() const { return m_bitfields.isBox(); }
bool isRenderView() const { return m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); }
bool isInline() const { return m_bitfields.isInline(); } // inline object
......@@ -700,6 +700,7 @@ public:
virtual bool computeBackgroundIsKnownToBeObscured() { return false; }
void setIsText() { ASSERT(!isBox()); m_bitfields.setIsTextOrRenderView(true); }
void setIsBR() { m_bitfields.setIsBR(true); }
void setIsBox() { m_bitfields.setIsBox(true); }
void setIsRenderView() { ASSERT(isBox()); m_bitfields.setIsTextOrRenderView(true); }
void setReplaced(bool b = true) { m_bitfields.setIsReplaced(b); }
......@@ -1099,6 +1100,7 @@ private:
, m_isBox(false)
, m_isInline(true)
, m_isReplaced(false)
, m_isBR(false)
, m_horizontalWritingMode(true)
, m_isDragging(false)
, m_hasLayer(false)
......@@ -1116,7 +1118,7 @@ private:
{
}
// 31 bits have been used here. There is one bit available.
// 32 bits have been used here. There are no bits available.
ADD_BOOLEAN_BITFIELD(needsLayout, NeedsLayout);
ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovementLayout);
ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
......@@ -1130,6 +1132,7 @@ private:
ADD_BOOLEAN_BITFIELD(isBox, IsBox);
ADD_BOOLEAN_BITFIELD(isInline, IsInline);
ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced);
ADD_BOOLEAN_BITFIELD(isBR, IsBR);
ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode);
ADD_BOOLEAN_BITFIELD(isDragging, IsDragging);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment