| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * 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. |
| 9 * | 9 * |
| 10 * 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, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class HitTestRequest; | 34 class HitTestRequest; |
| 35 class HitTestResult; | 35 class HitTestResult; |
| 36 class InlineFlowBox; | 36 class InlineFlowBox; |
| 37 class LayoutObject; | 37 class LayoutObject; |
| 38 class RootInlineBox; | 38 class RootInlineBox; |
| 39 | 39 |
| 40 enum MarkLineBoxes { kMarkLineBoxesDirty, kDontMarkLineBoxes }; | 40 enum MarkLineBoxes { kMarkLineBoxesDirty, kDontMarkLineBoxes }; |
| 41 | 41 |
| 42 enum class LineVerticalPositionType { |
| 43 // TextTop and TextBottom are the top/bottom of the content area. |
| 44 // This is where 'vertical-align: text-top/text-bottom' aligns to. |
| 45 // This is explicitly undefined in CSS2. |
| 46 // https://drafts.csswg.org/css2/visudet.html#inline-non-replaced |
| 47 TextTop, |
| 48 TextBottom, |
| 49 // Em height as being discussed in Font Metrics API. |
| 50 // https://drafts.css-houdini.org/font-metrics-api-1/#fontmetrics |
| 51 TopOfEmHeight, |
| 52 BottomOfEmHeight |
| 53 }; |
| 54 |
| 55 // Returns whether the position type is CSS "line-over"; i.e., ascender side |
| 56 // or "top" side of a line box. |
| 57 // https://drafts.csswg.org/css-writing-modes-3/#line-over |
| 58 static inline bool IsLineOverSide(LineVerticalPositionType type) { |
| 59 return type == LineVerticalPositionType::TextTop || |
| 60 type == LineVerticalPositionType::TopOfEmHeight; |
| 61 } |
| 62 |
| 42 // InlineBox represents a rectangle that occurs on a line. It corresponds to | 63 // InlineBox represents a rectangle that occurs on a line. It corresponds to |
| 43 // some LayoutObject (i.e., it represents a portion of that LayoutObject). | 64 // some LayoutObject (i.e., it represents a portion of that LayoutObject). |
| 44 class CORE_EXPORT InlineBox : public DisplayItemClient { | 65 class CORE_EXPORT InlineBox : public DisplayItemClient { |
| 45 WTF_MAKE_NONCOPYABLE(InlineBox); | 66 WTF_MAKE_NONCOPYABLE(InlineBox); |
| 46 | 67 |
| 47 public: | 68 public: |
| 48 InlineBox(LineLayoutItem obj) | 69 InlineBox(LineLayoutItem obj) |
| 49 : next_(nullptr), | 70 : next_(nullptr), |
| 50 prev_(nullptr), | 71 prev_(nullptr), |
| 51 parent_(nullptr), | 72 parent_(nullptr), |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 | 566 |
| 546 } // namespace blink | 567 } // namespace blink |
| 547 | 568 |
| 548 #ifndef NDEBUG | 569 #ifndef NDEBUG |
| 549 // Outside the WebCore namespace for ease of invocation from gdb. | 570 // Outside the WebCore namespace for ease of invocation from gdb. |
| 550 void showTree(const blink::InlineBox*); | 571 void showTree(const blink::InlineBox*); |
| 551 void showLineTree(const blink::InlineBox*); | 572 void showLineTree(const blink::InlineBox*); |
| 552 #endif | 573 #endif |
| 553 | 574 |
| 554 #endif // InlineBox_h | 575 #endif // InlineBox_h |
| OLD | NEW |