Commit c0f7f289 authored by ch.dumez@samsung.com's avatar ch.dumez@samsung.com

Hide RenderBox::isBox() / RenderText::isText()

Hide RenderBox::isBox() / RenderText::isText() to catch useless type checks
at compile time.

R=pdr@chromium.org

Review URL: https://codereview.chromium.org/425503002

git-svn-id: svn://svn.chromium.org/blink/trunk@179037 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4cd36f4d
...@@ -731,7 +731,8 @@ private: ...@@ -731,7 +731,8 @@ private:
void invalidatePaintIfNeeded(const PaintInvalidationState&, const RenderLayerModelObject& newPaintInvalidationContainer); void invalidatePaintIfNeeded(const PaintInvalidationState&, const RenderLayerModelObject& newPaintInvalidationContainer);
private: bool isBox() const WTF_DELETED_FUNCTION; // This will catch anyone doing an unnecessary check.
// The width/height of the contents + borders + padding. The x/y location is relative to our container (which is not always our parent). // The width/height of the contents + borders + padding. The x/y location is relative to our container (which is not always our parent).
LayoutRect m_frameRect; LayoutRect m_frameRect;
......
...@@ -182,6 +182,8 @@ private: ...@@ -182,6 +182,8 @@ private:
void secureText(UChar mask); void secureText(UChar mask);
bool isText() const WTF_DELETED_FUNCTION; // This will catch anyone doing an unnecessary check.
// We put the bitfield first to minimize padding on 64-bit. // We put the bitfield first to minimize padding on 64-bit.
bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines. bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n'). bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n').
......
...@@ -57,7 +57,6 @@ void TrailingObjects::updateMidpointsForTrailingObjects(LineMidpointState& lineM ...@@ -57,7 +57,6 @@ void TrailingObjects::updateMidpointsForTrailingObjects(LineMidpointState& lineM
currentMidpoint += 2; currentMidpoint += 2;
} }
} else if (!lBreak.object()) { } else if (!lBreak.object()) {
ASSERT(m_whitespace->isText());
ASSERT(collapseFirstSpace == CollapseFirstSpace); ASSERT(collapseFirstSpace == CollapseFirstSpace);
// Add a new end midpoint that stops right at the very end. // Add a new end midpoint that stops right at the very end.
unsigned length = m_whitespace->textLength(); unsigned length = m_whitespace->textLength();
......
Markdown is supported
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