Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineBox.h

Issue 2643413002: Fix 'text-underline-position: under' to use em height ascent/descent (Closed)
Patch Set: Rebaseline Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 static inline bool IsOverSide(LineVerticalPositionType type) {
eae 2017/05/01 16:21:48 Above might be a better term than Over as over cou
kojii 2017/05/02 22:56:52 Ah, didn't know "over" could mean that. I meant th
56 return type == LineVerticalPositionType::TextTop ||
57 type == LineVerticalPositionType::TopOfEmHeight;
58 }
59
42 // InlineBox represents a rectangle that occurs on a line. It corresponds to 60 // InlineBox represents a rectangle that occurs on a line. It corresponds to
43 // some LayoutObject (i.e., it represents a portion of that LayoutObject). 61 // some LayoutObject (i.e., it represents a portion of that LayoutObject).
44 class CORE_EXPORT InlineBox : public DisplayItemClient { 62 class CORE_EXPORT InlineBox : public DisplayItemClient {
45 WTF_MAKE_NONCOPYABLE(InlineBox); 63 WTF_MAKE_NONCOPYABLE(InlineBox);
46 64
47 public: 65 public:
48 InlineBox(LineLayoutItem obj) 66 InlineBox(LineLayoutItem obj)
49 : next_(nullptr), 67 : next_(nullptr),
50 prev_(nullptr), 68 prev_(nullptr),
51 parent_(nullptr), 69 parent_(nullptr),
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 563
546 } // namespace blink 564 } // namespace blink
547 565
548 #ifndef NDEBUG 566 #ifndef NDEBUG
549 // Outside the WebCore namespace for ease of invocation from gdb. 567 // Outside the WebCore namespace for ease of invocation from gdb.
550 void showTree(const blink::InlineBox*); 568 void showTree(const blink::InlineBox*);
551 void showLineTree(const blink::InlineBox*); 569 void showLineTree(const blink::InlineBox*);
552 #endif 570 #endif
553 571
554 #endif // InlineBox_h 572 #endif // InlineBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698