| Index: Source/core/layout/line/GlyphOverflow.h
|
| diff --git a/Source/core/layout/line/GlyphOverflow.h b/Source/core/layout/line/GlyphOverflow.h
|
| index 28c8005eada518c1e821143a88f3c6b32e6cb308..f13382f1327e7e476c88e6c15ee4440be7134370 100644
|
| --- a/Source/core/layout/line/GlyphOverflow.h
|
| +++ b/Source/core/layout/line/GlyphOverflow.h
|
| @@ -27,7 +27,7 @@
|
|
|
| #include "platform/geometry/FloatRect.h"
|
| #include "wtf/Allocator.h"
|
| -#include <math.h>
|
| +#include <algorithm>
|
|
|
| namespace blink {
|
|
|
| @@ -38,7 +38,6 @@ struct GlyphOverflow {
|
| , right(0)
|
| , top(0)
|
| , bottom(0)
|
| - , computeBounds(false)
|
| {
|
| }
|
|
|
| @@ -49,21 +48,19 @@ struct GlyphOverflow {
|
|
|
| void setFromBounds(const FloatRect& bounds, float ascent, float descent, float textWidth)
|
| {
|
| - top = ceilf(computeBounds ? -bounds.y() : std::max(0.0f, -bounds.y() - ascent));
|
| - bottom = ceilf(computeBounds ? bounds.maxY() : std::max(0.0f, bounds.maxY() - descent));
|
| + top = ceilf(std::max(0.0f, -bounds.y() - ascent));
|
| + bottom = ceilf(std::max(0.0f, bounds.maxY() - descent));
|
| left = ceilf(std::max(0.0f, -bounds.x()));
|
| right = ceilf(std::max(0.0f, bounds.maxX() - textWidth));
|
| }
|
|
|
| - // If computeBounds, top and bottom are the maximum heights of the glyphs above and below the baseline, respectively.
|
| - // Otherwise they are the amounts of glyph overflows exceeding the font metrics' ascent and descent, respectively.
|
| + // Top and bottom are the amounts of glyph overflows exceeding the font metrics' ascent and descent, respectively.
|
| // Left and right are the amounts of glyph overflows exceeding the left and right edge of normal layout boundary, respectively.
|
| // All fields are in absolute number of pixels rounded up to the nearest integer.
|
| int left;
|
| int right;
|
| int top;
|
| int bottom;
|
| - bool computeBounds;
|
| };
|
|
|
| } // namespace blink
|
|
|