| OLD | NEW |
| 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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1282 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) { | 1282 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) { |
| 1283 if (isFocusable() && document()->focusedNode() == this) | 1283 if (isFocusable() && document()->focusedNode() == this) |
| 1284 document()->updateFocusAppearanceSoon(false /* don't restore sel
ection */); | 1284 document()->updateFocusAppearanceSoon(false /* don't restore sel
ection */); |
| 1285 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); | 1285 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); |
| 1286 } | 1286 } |
| 1287 } | 1287 } |
| 1288 } | 1288 } |
| 1289 | 1289 |
| 1290 void Element::unregisterNamedFlowContentNode() | 1290 void Element::unregisterNamedFlowContentNode() |
| 1291 { | 1291 { |
| 1292 if (document()->cssRegionsEnabled() && inNamedFlow() && document()->renderVi
ew()) | 1292 if (RuntimeEnabledFeatures::cssRegionsEnabled() && inNamedFlow() && document
()->renderView()) |
| 1293 document()->renderView()->flowThreadController()->unregisterNamedFlowCon
tentNode(this); | 1293 document()->renderView()->flowThreadController()->unregisterNamedFlowCon
tentNode(this); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 void Element::detach() | 1296 void Element::detach() |
| 1297 { | 1297 { |
| 1298 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; | 1298 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; |
| 1299 unregisterNamedFlowContentNode(); | 1299 unregisterNamedFlowContentNode(); |
| 1300 cancelFocusAppearanceUpdate(); | 1300 cancelFocusAppearanceUpdate(); |
| 1301 if (hasRareData()) { | 1301 if (hasRareData()) { |
| 1302 ElementRareData* data = elementRareData(); | 1302 ElementRareData* data = elementRareData(); |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 (!RuntimeEnabledFeatures::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: { |
| 2543 DEFINE_STATIC_LOCAL(AtomicString, fitState, ("fit", AtomicString::Constr
uctFromLiteral)); | 2541 DEFINE_STATIC_LOCAL(AtomicString, fitState, ("fit", AtomicString::Constr
uctFromLiteral)); |
| 2544 return fitState; | 2542 return fitState; |
| 2545 } | 2543 } |
| 2546 case RenderRegion::RegionEmpty: { | 2544 case RenderRegion::RegionEmpty: { |
| 2547 DEFINE_STATIC_LOCAL(AtomicString, emptyState, ("empty", AtomicString::Co
nstructFromLiteral)); | 2545 DEFINE_STATIC_LOCAL(AtomicString, emptyState, ("empty", AtomicString::Co
nstructFromLiteral)); |
| 2548 return emptyState; | 2546 return emptyState; |
| 2549 } | 2547 } |
| 2550 case RenderRegion::RegionOverset: { | 2548 case RenderRegion::RegionOverset: { |
| 2551 DEFINE_STATIC_LOCAL(AtomicString, overflowState, ("overset", AtomicStrin
g::ConstructFromLiteral)); | 2549 DEFINE_STATIC_LOCAL(AtomicString, overflowState, ("overset", AtomicStrin
g::ConstructFromLiteral)); |
| 2552 return overflowState; | 2550 return overflowState; |
| 2553 } | 2551 } |
| 2554 case RenderRegion::RegionUndefined: | 2552 case RenderRegion::RegionUndefined: |
| 2555 return undefinedState; | 2553 return undefinedState; |
| 2556 } | 2554 } |
| 2557 | 2555 |
| 2558 ASSERT_NOT_REACHED(); | 2556 ASSERT_NOT_REACHED(); |
| 2559 return undefinedState; | 2557 return undefinedState; |
| 2560 } | 2558 } |
| 2561 | 2559 |
| 2562 Vector<RefPtr<Range> > Element::webkitGetRegionFlowRanges() const | 2560 Vector<RefPtr<Range> > Element::webkitGetRegionFlowRanges() const |
| 2563 { | 2561 { |
| 2564 document()->updateLayoutIgnorePendingStylesheets(); | 2562 document()->updateLayoutIgnorePendingStylesheets(); |
| 2565 | 2563 |
| 2566 Vector<RefPtr<Range> > rangeObjects; | 2564 Vector<RefPtr<Range> > rangeObjects; |
| 2567 if (document()->cssRegionsEnabled() && renderer() && renderer()->isRenderReg
ion()) { | 2565 if (RuntimeEnabledFeatures::cssRegionsEnabled() && renderer() && renderer()-
>isRenderRegion()) { |
| 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 Loading... |
| 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 |
| OLD | NEW |