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

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

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Allow text as child of the LayoutView, since it can happen with display: contents Created 4 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3049 3049
3050 if (!node()) 3050 if (!node())
3051 return nullptr; 3051 return nullptr;
3052 3052
3053 Element* element = Traversal<Element>::firstAncestorOrSelf(*node()); 3053 Element* element = Traversal<Element>::firstAncestorOrSelf(*node());
3054 if (!element) 3054 if (!element)
3055 return nullptr; 3055 return nullptr;
3056 3056
3057 if (pseudoStyleRequest.pseudoId == PseudoIdFirstLineInherited) { 3057 if (pseudoStyleRequest.pseudoId == PseudoIdFirstLineInherited) {
3058 RefPtr<ComputedStyle> result = 3058 RefPtr<ComputedStyle> result =
3059 document().ensureStyleResolver().styleForElement(element, parentStyle, 3059 document().ensureStyleResolver().styleForElement(
3060 DisallowStyleSharing); 3060 element, parentStyle, parentStyle, DisallowStyleSharing);
3061 result->setStyleType(PseudoIdFirstLineInherited); 3061 result->setStyleType(PseudoIdFirstLineInherited);
3062 return result.release(); 3062 return result.release();
3063 } 3063 }
3064 3064
3065 return document().ensureStyleResolver().pseudoStyleForElement( 3065 return document().ensureStyleResolver().pseudoStyleForElement(
3066 element, pseudoStyleRequest, parentStyle); 3066 element, pseudoStyleRequest, parentStyle, parentStyle);
3067 } 3067 }
3068 3068
3069 PassRefPtr<ComputedStyle> 3069 PassRefPtr<ComputedStyle>
3070 LayoutObject::getUncachedPseudoStyleFromParentOrShadowHost() const { 3070 LayoutObject::getUncachedPseudoStyleFromParentOrShadowHost() const {
3071 if (!node()) 3071 if (!node())
3072 return nullptr; 3072 return nullptr;
3073 3073
3074 if (ShadowRoot* root = node()->containingShadowRoot()) { 3074 if (ShadowRoot* root = node()->containingShadowRoot()) {
3075 if (root->type() == ShadowRootType::UserAgent) { 3075 if (root->type() == ShadowRootType::UserAgent) {
3076 if (Element* shadowHost = node()->ownerShadowHost()) { 3076 if (Element* shadowHost = node()->ownerShadowHost()) {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 const blink::LayoutObject* root = object1; 3502 const blink::LayoutObject* root = object1;
3503 while (root->parent()) 3503 while (root->parent())
3504 root = root->parent(); 3504 root = root->parent();
3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3506 } else { 3506 } else {
3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3508 } 3508 }
3509 } 3509 }
3510 3510
3511 #endif 3511 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698