| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. |
| 3 * All rights reserved. |
| 3 * | 4 * |
| 4 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 8 * | 9 * |
| 9 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 virtual ~InlineBox(); | 85 virtual ~InlineBox(); |
| 85 | 86 |
| 86 virtual void destroy(); | 87 virtual void destroy(); |
| 87 | 88 |
| 88 virtual void deleteLine(); | 89 virtual void deleteLine(); |
| 89 virtual void extractLine(); | 90 virtual void extractLine(); |
| 90 virtual void attachLine(); | 91 virtual void attachLine(); |
| 91 | 92 |
| 92 virtual bool isLineBreak() const { return false; } | 93 virtual bool isLineBreak() const { return false; } |
| 93 | 94 |
| 94 // These methods are called when the caller wants to move the position of Inli
neBox without full layout of it. | 95 // These methods are called when the caller wants to move the position of |
| 95 // The implementation should update the position of the whole subtree (e.g. po
sition of descendants and overflow etc. | 96 // InlineBox without full layout of it. The implementation should update the |
| 96 // should also be moved accordingly). | 97 // position of the whole subtree (e.g. position of descendants and overflow |
| 98 // etc. should also be moved accordingly). |
| 97 virtual void move(const LayoutSize& delta); | 99 virtual void move(const LayoutSize& delta); |
| 98 DISABLE_CFI_PERF void moveInLogicalDirection( | 100 DISABLE_CFI_PERF void moveInLogicalDirection( |
| 99 const LayoutSize& deltaInLogicalDirection) { | 101 const LayoutSize& deltaInLogicalDirection) { |
| 100 move(isHorizontal() ? deltaInLogicalDirection | 102 move(isHorizontal() ? deltaInLogicalDirection |
| 101 : deltaInLogicalDirection.transposedSize()); | 103 : deltaInLogicalDirection.transposedSize()); |
| 102 } | 104 } |
| 103 void moveInInlineDirection(LayoutUnit delta) { | 105 void moveInInlineDirection(LayoutUnit delta) { |
| 104 moveInLogicalDirection(LayoutSize(delta, LayoutUnit())); | 106 moveInLogicalDirection(LayoutSize(delta, LayoutUnit())); |
| 105 } | 107 } |
| 106 void moveInBlockDirection(LayoutUnit delta) { | 108 void moveInBlockDirection(LayoutUnit delta) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 m_prev = prev; | 199 m_prev = prev; |
| 198 } | 200 } |
| 199 bool nextOnLineExists() const; | 201 bool nextOnLineExists() const; |
| 200 | 202 |
| 201 virtual bool isLeaf() const { return true; } | 203 virtual bool isLeaf() const { return true; } |
| 202 | 204 |
| 203 InlineBox* nextLeafChild() const; | 205 InlineBox* nextLeafChild() const; |
| 204 InlineBox* prevLeafChild() const; | 206 InlineBox* prevLeafChild() const; |
| 205 | 207 |
| 206 // Helper functions for editing and hit-testing code. | 208 // Helper functions for editing and hit-testing code. |
| 207 // FIXME: These two functions should be moved to RenderedPosition once the cod
e to convert between | 209 // FIXME: These two functions should be moved to RenderedPosition once the |
| 208 // Position and inline box, offset pair is moved to RenderedPosition. | 210 // code to convert between Position and inline box, offset pair is moved to |
| 211 // RenderedPosition. |
| 209 InlineBox* nextLeafChildIgnoringLineBreak() const; | 212 InlineBox* nextLeafChildIgnoringLineBreak() const; |
| 210 InlineBox* prevLeafChildIgnoringLineBreak() const; | 213 InlineBox* prevLeafChildIgnoringLineBreak() const; |
| 211 | 214 |
| 212 LineLayoutItem getLineLayoutItem() const { return m_lineLayoutItem; } | 215 LineLayoutItem getLineLayoutItem() const { return m_lineLayoutItem; } |
| 213 | 216 |
| 214 InlineFlowBox* parent() const { | 217 InlineFlowBox* parent() const { |
| 215 ASSERT(!m_hasBadParent); | 218 ASSERT(!m_hasBadParent); |
| 216 return m_parent; | 219 return m_parent; |
| 217 } | 220 } |
| 218 void setParent(InlineFlowBox* par) { m_parent = par; } | 221 void setParent(InlineFlowBox* par) { m_parent = par; } |
| 219 | 222 |
| 220 const RootInlineBox& root() const; | 223 const RootInlineBox& root() const; |
| 221 RootInlineBox& root(); | 224 RootInlineBox& root(); |
| 222 | 225 |
| 223 // x() is the left side of the box in the containing block's coordinate system
. | 226 // x() is the left side of the box in the containing block's coordinate |
| 227 // system. |
| 224 void setX(LayoutUnit x) { m_topLeft.setX(x); } | 228 void setX(LayoutUnit x) { m_topLeft.setX(x); } |
| 225 LayoutUnit x() const { return m_topLeft.x(); } | 229 LayoutUnit x() const { return m_topLeft.x(); } |
| 226 LayoutUnit left() const { return m_topLeft.x(); } | 230 LayoutUnit left() const { return m_topLeft.x(); } |
| 227 | 231 |
| 228 // y() is the top side of the box in the containing block's coordinate system. | 232 // y() is the top side of the box in the containing block's coordinate system. |
| 229 void setY(LayoutUnit y) { m_topLeft.setY(y); } | 233 void setY(LayoutUnit y) { m_topLeft.setY(y); } |
| 230 LayoutUnit y() const { return m_topLeft.y(); } | 234 LayoutUnit y() const { return m_topLeft.y(); } |
| 231 LayoutUnit top() const { return m_topLeft.y(); } | 235 LayoutUnit top() const { return m_topLeft.y(); } |
| 232 | 236 |
| 233 const LayoutPoint& topLeft() const { return m_topLeft; } | 237 const LayoutPoint& topLeft() const { return m_topLeft; } |
| 234 | 238 |
| 235 LayoutUnit width() const { | 239 LayoutUnit width() const { |
| 236 return isHorizontal() ? logicalWidth() : logicalHeight(); | 240 return isHorizontal() ? logicalWidth() : logicalHeight(); |
| 237 } | 241 } |
| 238 LayoutUnit height() const { | 242 LayoutUnit height() const { |
| 239 return isHorizontal() ? logicalHeight() : logicalWidth(); | 243 return isHorizontal() ? logicalHeight() : logicalWidth(); |
| 240 } | 244 } |
| 241 LayoutSize size() const { return LayoutSize(width(), height()); } | 245 LayoutSize size() const { return LayoutSize(width(), height()); } |
| 242 LayoutUnit right() const { return left() + width(); } | 246 LayoutUnit right() const { return left() + width(); } |
| 243 LayoutUnit bottom() const { return top() + height(); } | 247 LayoutUnit bottom() const { return top() + height(); } |
| 244 | 248 |
| 245 // The logicalLeft position is the left edge of the line box in a horizontal l
ine and the top edge in a vertical line. | 249 // The logicalLeft position is the left edge of the line box in a horizontal |
| 250 // line and the top edge in a vertical line. |
| 246 LayoutUnit logicalLeft() const { | 251 LayoutUnit logicalLeft() const { |
| 247 return isHorizontal() ? m_topLeft.x() : m_topLeft.y(); | 252 return isHorizontal() ? m_topLeft.x() : m_topLeft.y(); |
| 248 } | 253 } |
| 249 LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); } | 254 LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); } |
| 250 void setLogicalLeft(LayoutUnit left) { | 255 void setLogicalLeft(LayoutUnit left) { |
| 251 if (isHorizontal()) | 256 if (isHorizontal()) |
| 252 setX(left); | 257 setX(left); |
| 253 else | 258 else |
| 254 setY(left); | 259 setY(left); |
| 255 } | 260 } |
| 256 int pixelSnappedLogicalLeft() const { return logicalLeft().toInt(); } | 261 int pixelSnappedLogicalLeft() const { return logicalLeft().toInt(); } |
| 257 int pixelSnappedLogicalRight() const { return logicalRight().ceil(); } | 262 int pixelSnappedLogicalRight() const { return logicalRight().ceil(); } |
| 258 int pixelSnappedLogicalTop() const { return logicalTop().toInt(); } | 263 int pixelSnappedLogicalTop() const { return logicalTop().toInt(); } |
| 259 int pixelSnappedLogicalBottom() const { return logicalBottom().ceil(); } | 264 int pixelSnappedLogicalBottom() const { return logicalBottom().ceil(); } |
| 260 | 265 |
| 261 // The logicalTop[ position is the top edge of the line box in a horizontal li
ne and the left edge in a vertical line. | 266 // The logicalTop[ position is the top edge of the line box in a horizontal |
| 267 // line and the left edge in a vertical line. |
| 262 LayoutUnit logicalTop() const { | 268 LayoutUnit logicalTop() const { |
| 263 return isHorizontal() ? m_topLeft.y() : m_topLeft.x(); | 269 return isHorizontal() ? m_topLeft.y() : m_topLeft.x(); |
| 264 } | 270 } |
| 265 LayoutUnit logicalBottom() const { return logicalTop() + logicalHeight(); } | 271 LayoutUnit logicalBottom() const { return logicalTop() + logicalHeight(); } |
| 266 void setLogicalTop(LayoutUnit top) { | 272 void setLogicalTop(LayoutUnit top) { |
| 267 if (isHorizontal()) | 273 if (isHorizontal()) |
| 268 setY(top); | 274 setY(top); |
| 269 else | 275 else |
| 270 setX(top); | 276 setX(top); |
| 271 } | 277 } |
| 272 | 278 |
| 273 // The logical width is our extent in the line's overall inline direction, i.e
., width for horizontal text and height for vertical text. | 279 // The logical width is our extent in the line's overall inline direction, |
| 280 // i.e., width for horizontal text and height for vertical text. |
| 274 void setLogicalWidth(LayoutUnit w) { m_logicalWidth = w; } | 281 void setLogicalWidth(LayoutUnit w) { m_logicalWidth = w; } |
| 275 LayoutUnit logicalWidth() const { return m_logicalWidth; } | 282 LayoutUnit logicalWidth() const { return m_logicalWidth; } |
| 276 | 283 |
| 277 // The logical height is our extent in the block flow direction, i.e., height
for horizontal text and width for vertical text. | 284 // The logical height is our extent in the block flow direction, i.e., height |
| 285 // for horizontal text and width for vertical text. |
| 278 LayoutUnit logicalHeight() const; | 286 LayoutUnit logicalHeight() const; |
| 279 | 287 |
| 280 LayoutRect logicalFrameRect() const { | 288 LayoutRect logicalFrameRect() const { |
| 281 return isHorizontal() ? LayoutRect(m_topLeft.x(), m_topLeft.y(), | 289 return isHorizontal() ? LayoutRect(m_topLeft.x(), m_topLeft.y(), |
| 282 m_logicalWidth, logicalHeight()) | 290 m_logicalWidth, logicalHeight()) |
| 283 : LayoutRect(m_topLeft.y(), m_topLeft.x(), | 291 : LayoutRect(m_topLeft.y(), m_topLeft.x(), |
| 284 m_logicalWidth, logicalHeight()); | 292 m_logicalWidth, logicalHeight()); |
| 285 } | 293 } |
| 286 | 294 |
| 287 virtual int baselinePosition(FontBaseline baselineType) const; | 295 virtual int baselinePosition(FontBaseline baselineType) const; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 355 |
| 348 // Use with caution! The type is not checked! | 356 // Use with caution! The type is not checked! |
| 349 LineLayoutBoxModel boxModelObject() const { | 357 LineLayoutBoxModel boxModelObject() const { |
| 350 if (!getLineLayoutItem().isText()) | 358 if (!getLineLayoutItem().isText()) |
| 351 return LineLayoutBoxModel(m_lineLayoutItem); | 359 return LineLayoutBoxModel(m_lineLayoutItem); |
| 352 return LineLayoutBoxModel(nullptr); | 360 return LineLayoutBoxModel(nullptr); |
| 353 } | 361 } |
| 354 | 362 |
| 355 LayoutPoint locationIncludingFlipping() const; | 363 LayoutPoint locationIncludingFlipping() const; |
| 356 | 364 |
| 357 // Converts from a rect in the logical space of the InlineBox to one in the ph
ysical space | 365 // Converts from a rect in the logical space of the InlineBox to one in the |
| 358 // of the containing block. The logical space of an InlineBox may be transpose
d for vertical text and | 366 // physical space of the containing block. The logical space of an InlineBox |
| 359 // flipped for right-to-left text. | 367 // may be transposed for vertical text and flipped for right-to-left text. |
| 360 void logicalRectToPhysicalRect(LayoutRect&) const; | 368 void logicalRectToPhysicalRect(LayoutRect&) const; |
| 361 | 369 |
| 362 // TODO(szager): The Rect versions should return a rect, not modify the argume
nt. | 370 // TODO(szager): The Rect versions should return a rect, not modify the |
| 371 // argument. |
| 363 void flipForWritingMode(FloatRect&) const; | 372 void flipForWritingMode(FloatRect&) const; |
| 364 FloatPoint flipForWritingMode(const FloatPoint&) const; | 373 FloatPoint flipForWritingMode(const FloatPoint&) const; |
| 365 void flipForWritingMode(LayoutRect&) const; | 374 void flipForWritingMode(LayoutRect&) const; |
| 366 LayoutPoint flipForWritingMode(const LayoutPoint&) const; | 375 LayoutPoint flipForWritingMode(const LayoutPoint&) const; |
| 367 | 376 |
| 368 bool knownToHaveNoOverflow() const { | 377 bool knownToHaveNoOverflow() const { |
| 369 return m_bitfields.knownToHaveNoOverflow(); | 378 return m_bitfields.knownToHaveNoOverflow(); |
| 370 } | 379 } |
| 371 void clearKnownToHaveNoOverflow(); | 380 void clearKnownToHaveNoOverflow(); |
| 372 | 381 |
| 373 bool dirOverride() const { return m_bitfields.dirOverride(); } | 382 bool dirOverride() const { return m_bitfields.dirOverride(); } |
| 374 void setDirOverride(bool dirOverride) { | 383 void setDirOverride(bool dirOverride) { |
| 375 m_bitfields.setDirOverride(dirOverride); | 384 m_bitfields.setDirOverride(dirOverride); |
| 376 } | 385 } |
| 377 | 386 |
| 378 // Set all LineLayoutItems in the inline box subtree should do full paint inva
lidation. | 387 // Set all LineLayoutItems in the inline box subtree should do full paint |
| 388 // invalidation. |
| 379 void setShouldDoFullPaintInvalidationRecursively(); | 389 void setShouldDoFullPaintInvalidationRecursively(); |
| 380 | 390 |
| 381 #define ADD_BOOLEAN_BITFIELD(name, Name) \ | 391 #define ADD_BOOLEAN_BITFIELD(name, Name) \ |
| 382 private: \ | 392 private: \ |
| 383 unsigned m_##name : 1; \ | 393 unsigned m_##name : 1; \ |
| 384 \ | 394 \ |
| 385 public: \ | 395 public: \ |
| 386 bool name() const { return m_##name; } \ | 396 bool name() const { return m_##name; } \ |
| 387 void set##Name(bool name) { m_##name = name; } | 397 void set##Name(bool name) { m_##name = name; } |
| 388 | 398 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 405 m_endsWithBreak(false), | 415 m_endsWithBreak(false), |
| 406 m_hasSelectedChildrenOrCanHaveLeadingExpansion(false), | 416 m_hasSelectedChildrenOrCanHaveLeadingExpansion(false), |
| 407 m_knownToHaveNoOverflow(true), | 417 m_knownToHaveNoOverflow(true), |
| 408 m_hasEllipsisBoxOrHyphen(false), | 418 m_hasEllipsisBoxOrHyphen(false), |
| 409 m_dirOverride(false), | 419 m_dirOverride(false), |
| 410 m_isText(false), | 420 m_isText(false), |
| 411 m_determinedIfNextOnLineExists(false), | 421 m_determinedIfNextOnLineExists(false), |
| 412 m_nextOnLineExists(false), | 422 m_nextOnLineExists(false), |
| 413 m_expansion(0) {} | 423 m_expansion(0) {} |
| 414 | 424 |
| 415 // Some of these bits are actually for subclasses and moved here to compact
the structures. | 425 // Some of these bits are actually for subclasses and moved here to compact |
| 426 // the structures. |
| 416 // for this class | 427 // for this class |
| 417 ADD_BOOLEAN_BITFIELD(firstLine, FirstLine); | 428 ADD_BOOLEAN_BITFIELD(firstLine, FirstLine); |
| 418 ADD_BOOLEAN_BITFIELD(constructed, Constructed); | 429 ADD_BOOLEAN_BITFIELD(constructed, Constructed); |
| 419 | 430 |
| 420 private: | 431 private: |
| 421 unsigned | 432 // The maximium bidi level is 62: |
| 422 m_bidiEmbeddingLevel : 6; // The maximium bidi level is 62: http://unic
ode.org/reports/tr9/#Explicit_Levels_and_Directions | 433 // http://unicode.org/reports/tr9/#Explicit_Levels_and_Directions |
| 434 unsigned m_bidiEmbeddingLevel : 6; |
| 423 | 435 |
| 424 public: | 436 public: |
| 425 unsigned char bidiEmbeddingLevel() const { return m_bidiEmbeddingLevel; } | 437 unsigned char bidiEmbeddingLevel() const { return m_bidiEmbeddingLevel; } |
| 426 void setBidiEmbeddingLevel(unsigned char bidiEmbeddingLevel) { | 438 void setBidiEmbeddingLevel(unsigned char bidiEmbeddingLevel) { |
| 427 m_bidiEmbeddingLevel = bidiEmbeddingLevel; | 439 m_bidiEmbeddingLevel = bidiEmbeddingLevel; |
| 428 } | 440 } |
| 429 | 441 |
| 430 ADD_BOOLEAN_BITFIELD(dirty, Dirty); | 442 ADD_BOOLEAN_BITFIELD(dirty, Dirty); |
| 431 ADD_BOOLEAN_BITFIELD(extracted, Extracted); | 443 ADD_BOOLEAN_BITFIELD(extracted, Extracted); |
| 432 ADD_BOOLEAN_BITFIELD(hasVirtualLogicalHeight, HasVirtualLogicalHeight); | 444 ADD_BOOLEAN_BITFIELD(hasVirtualLogicalHeight, HasVirtualLogicalHeight); |
| 433 ADD_BOOLEAN_BITFIELD(isHorizontal, IsHorizontal); | 445 ADD_BOOLEAN_BITFIELD(isHorizontal, IsHorizontal); |
| 434 // for RootInlineBox | 446 // for RootInlineBox |
| 435 ADD_BOOLEAN_BITFIELD(endsWithBreak, | 447 ADD_BOOLEAN_BITFIELD(endsWithBreak, |
| 436 EndsWithBreak); // Whether the line ends with a <br>. | 448 EndsWithBreak); // Whether the line ends with a <br>. |
| 437 // shared between RootInlineBox and InlineTextBox | 449 // shared between RootInlineBox and InlineTextBox |
| 438 ADD_BOOLEAN_BITFIELD(hasSelectedChildrenOrCanHaveLeadingExpansion, | 450 ADD_BOOLEAN_BITFIELD(hasSelectedChildrenOrCanHaveLeadingExpansion, |
| 439 HasSelectedChildrenOrCanHaveLeadingExpansion); | 451 HasSelectedChildrenOrCanHaveLeadingExpansion); |
| 440 | 452 |
| 441 // This boolean will never be set if there is potential for overflow, | 453 // This boolean will never be set if there is potential for overflow, but it |
| 442 // but it will be eagerly cleared in the opposite case. As such, it's | 454 // will be eagerly cleared in the opposite case. As such, it's a |
| 443 // a conservative tracking of the absence of overflow. | 455 // conservative tracking of the absence of overflow. |
| 444 // | 456 // |
| 445 // For whether we have overflow, callers should use m_overflow on | 457 // For whether we have overflow, callers should use m_overflow on |
| 446 // InlineFlowBox. | 458 // InlineFlowBox. |
| 447 ADD_BOOLEAN_BITFIELD(knownToHaveNoOverflow, KnownToHaveNoOverflow); | 459 ADD_BOOLEAN_BITFIELD(knownToHaveNoOverflow, KnownToHaveNoOverflow); |
| 448 ADD_BOOLEAN_BITFIELD(hasEllipsisBoxOrHyphen, HasEllipsisBoxOrHyphen); | 460 ADD_BOOLEAN_BITFIELD(hasEllipsisBoxOrHyphen, HasEllipsisBoxOrHyphen); |
| 449 // for InlineTextBox | 461 // for InlineTextBox |
| 450 ADD_BOOLEAN_BITFIELD(dirOverride, DirOverride); | 462 ADD_BOOLEAN_BITFIELD(dirOverride, DirOverride); |
| 451 ADD_BOOLEAN_BITFIELD( | 463 // Whether or not this object represents text with a non-zero height. |
| 452 isText, | 464 // Includes non-image list markers, text boxes. |
| 453 IsText); // Whether or not this object represents text with a non-zero
height. Includes non-image list markers, text boxes. | 465 ADD_BOOLEAN_BITFIELD(isText, IsText); |
| 454 | 466 |
| 455 private: | 467 private: |
| 456 mutable unsigned m_determinedIfNextOnLineExists : 1; | 468 mutable unsigned m_determinedIfNextOnLineExists : 1; |
| 457 | 469 |
| 458 public: | 470 public: |
| 459 bool determinedIfNextOnLineExists() const { | 471 bool determinedIfNextOnLineExists() const { |
| 460 return m_determinedIfNextOnLineExists; | 472 return m_determinedIfNextOnLineExists; |
| 461 } | 473 } |
| 462 void setDeterminedIfNextOnLineExists( | 474 void setDeterminedIfNextOnLineExists( |
| 463 bool determinedIfNextOnLineExists) const { | 475 bool determinedIfNextOnLineExists) const { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 476 private: | 488 private: |
| 477 unsigned m_expansion : 12; // for justified text | 489 unsigned m_expansion : 12; // for justified text |
| 478 | 490 |
| 479 public: | 491 public: |
| 480 signed expansion() const { return m_expansion; } | 492 signed expansion() const { return m_expansion; } |
| 481 void setExpansion(signed expansion) { m_expansion = expansion; } | 493 void setExpansion(signed expansion) { m_expansion = expansion; } |
| 482 }; | 494 }; |
| 483 #undef ADD_BOOLEAN_BITFIELD | 495 #undef ADD_BOOLEAN_BITFIELD |
| 484 | 496 |
| 485 private: | 497 private: |
| 486 // Converts the given (top-left) position from the logical space of the Inline
Box to the physical space of the | 498 // Converts the given (top-left) position from the logical space of the |
| 487 // containing block. The size indicates the size of the box whose point is bei
ng flipped. | 499 // InlineBox to the physical space of the containing block. The size indicates |
| 500 // the size of the box whose point is being flipped. |
| 488 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, | 501 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, |
| 489 const LayoutSize&) const; | 502 const LayoutSize&) const; |
| 490 | 503 |
| 491 void setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); | 504 void setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); |
| 492 | 505 |
| 493 InlineBoxBitfields m_bitfields; | 506 InlineBoxBitfields m_bitfields; |
| 494 | 507 |
| 495 InlineBox* m_next; // The next element on the same line as us. | 508 InlineBox* m_next; // The next element on the same line as us. |
| 496 InlineBox* m_prev; // The previous element on the same line as us. | 509 InlineBox* m_prev; // The previous element on the same line as us. |
| 497 | 510 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 #if ENABLE(ASSERT) | 563 #if ENABLE(ASSERT) |
| 551 inline void InlineBox::setHasBadParent() { | 564 inline void InlineBox::setHasBadParent() { |
| 552 m_hasBadParent = true; | 565 m_hasBadParent = true; |
| 553 } | 566 } |
| 554 #endif | 567 #endif |
| 555 | 568 |
| 556 #define DEFINE_INLINE_BOX_TYPE_CASTS(typeName) \ | 569 #define DEFINE_INLINE_BOX_TYPE_CASTS(typeName) \ |
| 557 DEFINE_TYPE_CASTS(typeName, InlineBox, box, box->is##typeName(), \ | 570 DEFINE_TYPE_CASTS(typeName, InlineBox, box, box->is##typeName(), \ |
| 558 box.is##typeName()) | 571 box.is##typeName()) |
| 559 | 572 |
| 560 // Allow equality comparisons of InlineBox's by reference or pointer, interchang
eably. | 573 // Allow equality comparisons of InlineBox's by reference or pointer, |
| 574 // interchangeably. |
| 561 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(InlineBox) | 575 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(InlineBox) |
| 562 | 576 |
| 563 } // namespace blink | 577 } // namespace blink |
| 564 | 578 |
| 565 #ifndef NDEBUG | 579 #ifndef NDEBUG |
| 566 // Outside the WebCore namespace for ease of invocation from gdb. | 580 // Outside the WebCore namespace for ease of invocation from gdb. |
| 567 void showTree(const blink::InlineBox*); | 581 void showTree(const blink::InlineBox*); |
| 568 void showLineTree(const blink::InlineBox*); | 582 void showLineTree(const blink::InlineBox*); |
| 569 #endif | 583 #endif |
| 570 | 584 |
| 571 #endif // InlineBox_h | 585 #endif // InlineBox_h |
| OLD | NEW |