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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp

Issue 2727853002: [css-display] Support display: contents pseudo-elements.
Patch Set: [css-display] Support display: contents pseudos. Created 3 years, 8 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 LayoutTextFragment::~LayoutTextFragment() { 50 LayoutTextFragment::~LayoutTextFragment() {
51 ASSERT(!m_firstLetterPseudoElement); 51 ASSERT(!m_firstLetterPseudoElement);
52 } 52 }
53 53
54 LayoutTextFragment* LayoutTextFragment::createAnonymous(PseudoElement& pseudo, 54 LayoutTextFragment* LayoutTextFragment::createAnonymous(PseudoElement& pseudo,
55 StringImpl* text, 55 StringImpl* text,
56 unsigned start, 56 unsigned start,
57 unsigned length) { 57 unsigned length) {
58 LayoutTextFragment* fragment = 58 LayoutTextFragment* fragment =
59 new LayoutTextFragment(nullptr, text, start, length); 59 new LayoutTextFragment(nullptr, text, start, length);
60 fragment->setDocumentForAnonymous(&pseudo.document()); 60 fragment->setPseudoForAnonymous(pseudo);
61 if (length) 61 if (length)
62 pseudo.document().view()->incrementVisuallyNonEmptyCharacterCount(length); 62 pseudo.document().view()->incrementVisuallyNonEmptyCharacterCount(length);
63 return fragment; 63 return fragment;
64 } 64 }
65 65
66 LayoutTextFragment* LayoutTextFragment::createAnonymous(PseudoElement& pseudo, 66 LayoutTextFragment* LayoutTextFragment::createAnonymous(PseudoElement& pseudo,
67 StringImpl* text) { 67 StringImpl* text) {
68 return createAnonymous(pseudo, text, 0, text ? text->length() : 0); 68 return createAnonymous(pseudo, text, 0, text ? text->length() : 0);
69 } 69 }
70 70
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 LayoutObject::updateHitTestResult(result, point); 168 LayoutObject::updateHitTestResult(result, point);
169 169
170 // If we aren't part of a first-letter element, or if we 170 // If we aren't part of a first-letter element, or if we
171 // are part of first-letter but we're the remaining text then return. 171 // are part of first-letter but we're the remaining text then return.
172 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement()) 172 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement())
173 return; 173 return;
174 result.setInnerNode(firstLetterPseudoElement()); 174 result.setInnerNode(firstLetterPseudoElement());
175 } 175 }
176 176
177 } // namespace blink 177 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698