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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2366243002: Remove all ordering requirements in CSSValueKeywords.in (WIP) (Closed)
Patch Set: Some mor efixes Created 4 years, 1 month 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 for (auto& item : toCSSValueList(value)) { 784 for (auto& item : toCSSValueList(value)) {
785 ContentData* nextContent = nullptr; 785 ContentData* nextContent = nullptr;
786 if (item->isImageGeneratorValue() || item->isImageSetValue() || 786 if (item->isImageGeneratorValue() || item->isImageSetValue() ||
787 item->isImageValue()) { 787 item->isImageValue()) {
788 nextContent = 788 nextContent =
789 ContentData::create(state.styleImage(CSSPropertyContent, *item)); 789 ContentData::create(state.styleImage(CSSPropertyContent, *item));
790 } else if (item->isCounterValue()) { 790 } else if (item->isCounterValue()) {
791 const CSSCounterValue* counterValue = toCSSCounterValue(item.get()); 791 const CSSCounterValue* counterValue = toCSSCounterValue(item.get());
792 EListStyleType listStyleType = NoneListStyle; 792 EListStyleType listStyleType = NoneListStyle;
793 CSSValueID listStyleIdent = counterValue->listStyle(); 793 CSSValueID listStyleIdent = counterValue->listStyle();
794 if (listStyleIdent != CSSValueNone) 794 if (listStyleIdent != CSSValueNone) {
795 listStyleType = 795 listStyleType =
796 static_cast<EListStyleType>(listStyleIdent - CSSValueDisc); 796 CSSValueIDToPlatformEnum<EListStyleType>(listStyleIdent);
797 }
797 std::unique_ptr<CounterContent> counter = wrapUnique(new CounterContent( 798 std::unique_ptr<CounterContent> counter = wrapUnique(new CounterContent(
798 AtomicString(counterValue->identifier()), listStyleType, 799 AtomicString(counterValue->identifier()), listStyleType,
799 AtomicString(counterValue->separator()))); 800 AtomicString(counterValue->separator())));
800 nextContent = ContentData::create(std::move(counter)); 801 nextContent = ContentData::create(std::move(counter));
801 } else if (item->isIdentifierValue()) { 802 } else if (item->isIdentifierValue()) {
802 QuoteType quoteType; 803 QuoteType quoteType;
803 switch (toCSSIdentifierValue(*item).getValueID()) { 804 switch (toCSSIdentifierValue(*item).getValueID()) {
804 default: 805 default:
805 NOTREACHED(); 806 NOTREACHED();
806 case CSSValueOpenQuote: 807 case CSSValueOpenQuote:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 } 1033 }
1033 } 1034 }
1034 1035
1035 void StyleBuilderFunctions::applyInheritCSSPropertyPosition( 1036 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(
1036 StyleResolverState& state) { 1037 StyleResolverState& state) {
1037 if (!state.parentNode()->isDocumentNode()) 1038 if (!state.parentNode()->isDocumentNode())
1038 state.style()->setPosition(state.parentStyle()->position()); 1039 state.style()->setPosition(state.parentStyle()->position());
1039 } 1040 }
1040 1041
1041 } // namespace blink 1042 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698