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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 14178009: Remove CSS_REGIONS compile flag from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rework patch after https://codereview.chromium.org/14324009 Created 7 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 * 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) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 } 2521 }
2522 2522
2523 RenderRegion* Element::renderRegion() const 2523 RenderRegion* Element::renderRegion() const
2524 { 2524 {
2525 if (renderer() && renderer()->isRenderRegion()) 2525 if (renderer() && renderer()->isRenderRegion())
2526 return toRenderRegion(renderer()); 2526 return toRenderRegion(renderer());
2527 2527
2528 return 0; 2528 return 0;
2529 } 2529 }
2530 2530
2531 #if ENABLE(CSS_REGIONS)
2532
2533 const AtomicString& Element::webkitRegionOverset() const 2531 const AtomicString& Element::webkitRegionOverset() const
2534 { 2532 {
2535 document()->updateLayoutIgnorePendingStylesheets(); 2533 document()->updateLayoutIgnorePendingStylesheets();
2536 2534
2537 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral)); 2535 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral));
2538 if (!document()->cssRegionsEnabled() || !renderRegion()) 2536 if (!document()->cssRegionsEnabled() || !renderRegion())
2539 return undefinedState; 2537 return undefinedState;
2540 2538
2541 switch (renderRegion()->regionState()) { 2539 switch (renderRegion()->regionState()) {
2542 case RenderRegion::RegionFit: { 2540 case RenderRegion::RegionFit: {
(...skipping 23 matching lines...) Expand all
2566 Vector<RefPtr<Range> > rangeObjects; 2564 Vector<RefPtr<Range> > rangeObjects;
2567 if (document()->cssRegionsEnabled() && renderer() && renderer()->isRenderReg ion()) { 2565 if (document()->cssRegionsEnabled() && renderer() && renderer()->isRenderReg ion()) {
2568 RenderRegion* region = toRenderRegion(renderer()); 2566 RenderRegion* region = toRenderRegion(renderer());
2569 if (region->isValid()) 2567 if (region->isValid())
2570 region->getRanges(rangeObjects); 2568 region->getRanges(rangeObjects);
2571 } 2569 }
2572 2570
2573 return rangeObjects; 2571 return rangeObjects;
2574 } 2572 }
2575 2573
2576 #endif
2577
2578 #ifndef NDEBUG 2574 #ifndef NDEBUG
2579 bool Element::fastAttributeLookupAllowed(const QualifiedName& name) const 2575 bool Element::fastAttributeLookupAllowed(const QualifiedName& name) const
2580 { 2576 {
2581 if (name == HTMLNames::styleAttr) 2577 if (name == HTMLNames::styleAttr)
2582 return false; 2578 return false;
2583 2579
2584 #if ENABLE(SVG) 2580 #if ENABLE(SVG)
2585 if (isSVGElement()) 2581 if (isSVGElement())
2586 return !static_cast<const SVGElement*>(this)->isAnimatableAttribute(name ); 2582 return !static_cast<const SVGElement*>(this)->isAnimatableAttribute(name );
2587 #endif 2583 #endif
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 return 0; 3109 return 0;
3114 } 3110 }
3115 3111
3116 Attribute* UniqueElementData::attributeItem(unsigned index) 3112 Attribute* UniqueElementData::attributeItem(unsigned index)
3117 { 3113 {
3118 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3114 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3119 return &m_attributeVector.at(index); 3115 return &m_attributeVector.at(index);
3120 } 3116 }
3121 3117
3122 } // namespace WebCore 3118 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698