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

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

Issue 202633006: Use an unsigned of flags in ElementRareData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back clearHasPendingResources() Created 6 years, 9 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 | Annotate | Revision Log
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 { 220 {
221 ASSERT(hasRareData()); 221 ASSERT(hasRareData());
222 return static_cast<ElementRareData*>(rareData()); 222 return static_cast<ElementRareData*>(rareData());
223 } 223 }
224 224
225 inline ElementRareData& Element::ensureElementRareData() 225 inline ElementRareData& Element::ensureElementRareData()
226 { 226 {
227 return static_cast<ElementRareData&>(ensureRareData()); 227 return static_cast<ElementRareData&>(ensureRareData());
228 } 228 }
229 229
230 bool Element::hasElementFlagInternal(ElementFlags mask) const
231 {
232 ASSERT(hasRareData());
233 return elementRareData()->hasFlag(mask);
234 }
235
236 void Element::setElementFlag(ElementFlags mask, bool value)
237 {
238 if (!hasRareData() && !value)
239 return;
240 ensureElementRareData().setFlag(mask, value);
241 }
242
243 void Element::clearElementFlag(ElementFlags mask)
244 {
245 if (!hasRareData())
246 return;
247 elementRareData()->clearFlag(mask);
248 }
249
230 void Element::clearTabIndexExplicitlyIfNeeded() 250 void Element::clearTabIndexExplicitlyIfNeeded()
231 { 251 {
232 if (hasRareData()) 252 if (hasRareData())
233 elementRareData()->clearTabIndexExplicitly(); 253 elementRareData()->clearTabIndexExplicitly();
234 } 254 }
235 255
236 void Element::setTabIndexExplicitly(short tabIndex) 256 void Element::setTabIndexExplicitly(short tabIndex)
237 { 257 {
238 ensureElementRareData().setTabIndexExplicitly(tabIndex); 258 ensureElementRareData().setTabIndexExplicitly(tabIndex);
239 } 259 }
240 260
241 bool Element::supportsFocus() const
242 {
243 return hasRareData() && elementRareData()->tabIndexSetExplicitly();
244 }
245
246 short Element::tabIndex() const 261 short Element::tabIndex() const
247 { 262 {
248 return hasRareData() ? elementRareData()->tabIndex() : 0; 263 return hasRareData() ? elementRareData()->tabIndex() : 0;
249 } 264 }
250 265
251 bool Element::rendererIsFocusable() const 266 bool Element::rendererIsFocusable() const
252 { 267 {
253 // Elements in canvas fallback content are not rendered, but they are allowe d to be 268 // Elements in canvas fallback content are not rendered, but they are allowe d to be
254 // focusable as long as their canvas is displayed and visible. 269 // focusable as long as their canvas is displayed and visible.
255 if (isInCanvasSubtree()) { 270 if (isInCanvasSubtree()) {
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 if (wasInDocument) { 1391 if (wasInDocument) {
1377 if (hasPendingResources()) 1392 if (hasPendingResources())
1378 document().accessSVGExtensions().removeElementFromPendingResources(t his); 1393 document().accessSVGExtensions().removeElementFromPendingResources(t his);
1379 1394
1380 if (isUpgradedCustomElement()) 1395 if (isUpgradedCustomElement())
1381 CustomElement::didLeaveDocument(this, insertionPoint->document()); 1396 CustomElement::didLeaveDocument(this, insertionPoint->document());
1382 } 1397 }
1383 1398
1384 document().removeFromTopLayer(this); 1399 document().removeFromTopLayer(this);
1385 1400
1386 if (hasRareData()) 1401 clearElementFlag(IsInCanvasSubtree);
1387 elementRareData()->setIsInCanvasSubtree(false);
1388 } 1402 }
1389 1403
1390 void Element::attach(const AttachContext& context) 1404 void Element::attach(const AttachContext& context)
1391 { 1405 {
1392 ASSERT(document().inStyleRecalc()); 1406 ASSERT(document().inStyleRecalc());
1393 1407
1394 StyleResolverParentPusher parentPusher(*this); 1408 StyleResolverParentPusher parentPusher(*this);
1395 1409
1396 // We've already been through detach when doing an attach, but we might 1410 // We've already been through detach when doing an attach, but we might
1397 // need to clear any state that's been added since then. 1411 // need to clear any state that's been added since then.
(...skipping 20 matching lines...) Expand all
1418 parentPusher.push(); 1432 parentPusher.push();
1419 } 1433 }
1420 1434
1421 ContainerNode::attach(context); 1435 ContainerNode::attach(context);
1422 1436
1423 createPseudoElementIfNeeded(AFTER); 1437 createPseudoElementIfNeeded(AFTER);
1424 createPseudoElementIfNeeded(BACKDROP); 1438 createPseudoElementIfNeeded(BACKDROP);
1425 1439
1426 if (hasRareData()) { 1440 if (hasRareData()) {
1427 ElementRareData* data = elementRareData(); 1441 ElementRareData* data = elementRareData();
1428 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) { 1442 if (data->hasFlag(NeedsFocusAppearanceUpdateSoonAfterAttach)) {
1429 if (isFocusable() && document().focusedElement() == this) 1443 if (isFocusable() && document().focusedElement() == this)
1430 document().updateFocusAppearanceSoon(false /* don't restore sele ction */); 1444 document().updateFocusAppearanceSoon(false /* don't restore sele ction */);
1431 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); 1445 data->clearFlag(NeedsFocusAppearanceUpdateSoonAfterAttach);
1432 } 1446 }
1433 if (!renderer()) { 1447 if (!renderer()) {
1434 if (ActiveAnimations* activeAnimations = data->activeAnimations()) { 1448 if (ActiveAnimations* activeAnimations = data->activeAnimations()) {
1435 activeAnimations->cssAnimations().cancel(); 1449 activeAnimations->cssAnimations().cancel();
1436 activeAnimations->setAnimationStyleChange(false); 1450 activeAnimations->setAnimationStyleChange(false);
1437 } 1451 }
1438 } 1452 }
1439 } 1453 }
1440 1454
1441 InspectorInstrumentation::didRecalculateStyleForElement(this); 1455 InspectorInstrumentation::didRecalculateStyleForElement(this);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 // does not make sense to continue and update appearence. 2174 // does not make sense to continue and update appearence.
2161 protect = this; 2175 protect = this;
2162 if (!page->focusController().setFocusedElement(this, doc.frame(), type)) 2176 if (!page->focusController().setFocusedElement(this, doc.frame(), type))
2163 return; 2177 return;
2164 } 2178 }
2165 2179
2166 // Setting the focused node above might have invalidated the layout due to s cripts. 2180 // Setting the focused node above might have invalidated the layout due to s cripts.
2167 doc.updateLayoutIgnorePendingStylesheets(); 2181 doc.updateLayoutIgnorePendingStylesheets();
2168 2182
2169 if (!isFocusable()) { 2183 if (!isFocusable()) {
2170 ensureElementRareData().setNeedsFocusAppearanceUpdateSoonAfterAttach(tru e); 2184 setElementFlag(NeedsFocusAppearanceUpdateSoonAfterAttach);
2171 return; 2185 return;
2172 } 2186 }
2173 2187
2174 cancelFocusAppearanceUpdate(); 2188 cancelFocusAppearanceUpdate();
2175 updateFocusAppearance(restorePreviousSelection); 2189 updateFocusAppearance(restorePreviousSelection);
2176 } 2190 }
2177 2191
2178 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/) 2192 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
2179 { 2193 {
2180 if (isRootEditableElement()) { 2194 if (isRootEditableElement()) {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the 2509 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the
2496 // document tree and figure out when to destroy the computed style for s uch elements. 2510 // document tree and figure out when to destroy the computed style for s uch elements.
2497 return 0; 2511 return 0;
2498 2512
2499 ElementRareData& rareData = ensureElementRareData(); 2513 ElementRareData& rareData = ensureElementRareData();
2500 if (!rareData.computedStyle()) 2514 if (!rareData.computedStyle())
2501 rareData.setComputedStyle(document().styleForElementIgnoringPendingStyle sheets(this)); 2515 rareData.setComputedStyle(document().styleForElementIgnoringPendingStyle sheets(this));
2502 return pseudoElementSpecifier ? rareData.computedStyle()->getCachedPseudoSty le(pseudoElementSpecifier) : rareData.computedStyle(); 2516 return pseudoElementSpecifier ? rareData.computedStyle()->getCachedPseudoSty le(pseudoElementSpecifier) : rareData.computedStyle();
2503 } 2517 }
2504 2518
2505 void Element::setStyleAffectedByEmpty()
2506 {
2507 ensureElementRareData().setStyleAffectedByEmpty(true);
2508 }
2509
2510 void Element::setChildrenAffectedByFocus()
2511 {
2512 ensureElementRareData().setChildrenAffectedByFocus(true);
2513 }
2514
2515 void Element::setChildrenAffectedByHover()
2516 {
2517 ensureElementRareData().setChildrenAffectedByHover(true);
2518 }
2519
2520 void Element::setChildrenAffectedByActive()
2521 {
2522 ensureElementRareData().setChildrenAffectedByActive(true);
2523 }
2524
2525 void Element::setChildrenAffectedByDrag()
2526 {
2527 ensureElementRareData().setChildrenAffectedByDrag(true);
2528 }
2529
2530 void Element::setChildrenAffectedByFirstChildRules()
2531 {
2532 ensureElementRareData().setChildrenAffectedByFirstChildRules(true);
2533 }
2534
2535 void Element::setChildrenAffectedByLastChildRules()
2536 {
2537 ensureElementRareData().setChildrenAffectedByLastChildRules(true);
2538 }
2539
2540 void Element::setChildrenAffectedByDirectAdjacentRules()
2541 {
2542 ensureElementRareData().setChildrenAffectedByDirectAdjacentRules(true);
2543 }
2544
2545 void Element::setChildrenAffectedByForwardPositionalRules()
2546 {
2547 ensureElementRareData().setChildrenAffectedByForwardPositionalRules(true);
2548 }
2549
2550 void Element::setChildrenAffectedByBackwardPositionalRules()
2551 {
2552 ensureElementRareData().setChildrenAffectedByBackwardPositionalRules(true);
2553 }
2554
2555 void Element::setChildIndex(unsigned index) 2519 void Element::setChildIndex(unsigned index)
2556 { 2520 {
2557 ElementRareData& rareData = ensureElementRareData(); 2521 ElementRareData& rareData = ensureElementRareData();
2558 if (RenderStyle* style = renderStyle()) 2522 if (RenderStyle* style = renderStyle())
2559 style->setUnique(); 2523 style->setUnique();
2560 rareData.setChildIndex(index); 2524 rareData.setChildIndex(index);
2561 } 2525 }
2562 2526
2563 bool Element::childrenSupportStyleSharing() const
2564 {
2565 if (!hasRareData())
2566 return true;
2567 return !rareDataChildrenAffectedByFocus()
2568 && !rareDataChildrenAffectedByHover()
2569 && !rareDataChildrenAffectedByActive()
2570 && !rareDataChildrenAffectedByDrag()
2571 && !rareDataChildrenAffectedByFirstChildRules()
2572 && !rareDataChildrenAffectedByLastChildRules()
2573 && !rareDataChildrenAffectedByDirectAdjacentRules()
2574 && !rareDataChildrenAffectedByForwardPositionalRules()
2575 && !rareDataChildrenAffectedByBackwardPositionalRules();
2576 }
2577
2578 bool Element::rareDataStyleAffectedByEmpty() const
2579 {
2580 ASSERT(hasRareData());
2581 return elementRareData()->styleAffectedByEmpty();
2582 }
2583
2584 bool Element::rareDataChildrenAffectedByFocus() const
2585 {
2586 ASSERT(hasRareData());
2587 return elementRareData()->childrenAffectedByFocus();
2588 }
2589
2590 bool Element::rareDataChildrenAffectedByHover() const
2591 {
2592 ASSERT(hasRareData());
2593 return elementRareData()->childrenAffectedByHover();
2594 }
2595
2596 bool Element::rareDataChildrenAffectedByActive() const
2597 {
2598 ASSERT(hasRareData());
2599 return elementRareData()->childrenAffectedByActive();
2600 }
2601
2602 bool Element::rareDataChildrenAffectedByDrag() const
2603 {
2604 ASSERT(hasRareData());
2605 return elementRareData()->childrenAffectedByDrag();
2606 }
2607
2608 bool Element::rareDataChildrenAffectedByFirstChildRules() const
2609 {
2610 ASSERT(hasRareData());
2611 return elementRareData()->childrenAffectedByFirstChildRules();
2612 }
2613
2614 bool Element::rareDataChildrenAffectedByLastChildRules() const
2615 {
2616 ASSERT(hasRareData());
2617 return elementRareData()->childrenAffectedByLastChildRules();
2618 }
2619
2620 bool Element::rareDataChildrenAffectedByDirectAdjacentRules() const
2621 {
2622 ASSERT(hasRareData());
2623 return elementRareData()->childrenAffectedByDirectAdjacentRules();
2624 }
2625
2626 bool Element::rareDataChildrenAffectedByForwardPositionalRules() const
2627 {
2628 ASSERT(hasRareData());
2629 return elementRareData()->childrenAffectedByForwardPositionalRules();
2630 }
2631
2632 bool Element::rareDataChildrenAffectedByBackwardPositionalRules() const
2633 {
2634 ASSERT(hasRareData());
2635 return elementRareData()->childrenAffectedByBackwardPositionalRules();
2636 }
2637
2638 unsigned Element::rareDataChildIndex() const 2527 unsigned Element::rareDataChildIndex() const
2639 { 2528 {
2640 ASSERT(hasRareData()); 2529 ASSERT(hasRareData());
2641 return elementRareData()->childIndex(); 2530 return elementRareData()->childIndex();
2642 } 2531 }
2643 2532
2644 void Element::setIsInCanvasSubtree(bool isInCanvasSubtree)
2645 {
2646 ensureElementRareData().setIsInCanvasSubtree(isInCanvasSubtree);
2647 }
2648
2649 bool Element::isInCanvasSubtree() const
2650 {
2651 return hasRareData() && elementRareData()->isInCanvasSubtree();
2652 }
2653
2654 AtomicString Element::computeInheritedLanguage() const 2533 AtomicString Element::computeInheritedLanguage() const
2655 { 2534 {
2656 const Node* n = this; 2535 const Node* n = this;
2657 AtomicString value; 2536 AtomicString value;
2658 // The language property is inherited, so we iterate over the parents to fin d the first language. 2537 // The language property is inherited, so we iterate over the parents to fin d the first language.
2659 do { 2538 do {
2660 if (n->isElementNode()) { 2539 if (n->isElementNode()) {
2661 if (const ElementData* elementData = toElement(n)->elementData()) { 2540 if (const ElementData* elementData = toElement(n)->elementData()) {
2662 // Spec: xml:lang takes precedence -- http://www.w3.org/TR/xhtml 1/#C_7 2541 // Spec: xml:lang takes precedence -- http://www.w3.org/TR/xhtml 1/#C_7
2663 if (const Attribute* attribute = elementData->getAttributeItem(X MLNames::langAttr)) 2542 if (const Attribute* attribute = elementData->getAttributeItem(X MLNames::langAttr))
(...skipping 13 matching lines...) Expand all
2677 } 2556 }
2678 2557
2679 Locale& Element::locale() const 2558 Locale& Element::locale() const
2680 { 2559 {
2681 return document().getCachedLocale(computeInheritedLanguage()); 2560 return document().getCachedLocale(computeInheritedLanguage());
2682 } 2561 }
2683 2562
2684 void Element::cancelFocusAppearanceUpdate() 2563 void Element::cancelFocusAppearanceUpdate()
2685 { 2564 {
2686 if (hasRareData()) 2565 if (hasRareData())
2687 elementRareData()->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); 2566 clearElementFlag(NeedsFocusAppearanceUpdateSoonAfterAttach);
2688 if (document().focusedElement() == this) 2567 if (document().focusedElement() == this)
2689 document().cancelFocusAppearanceUpdate(); 2568 document().cancelFocusAppearanceUpdate();
2690 } 2569 }
2691 2570
2692 void Element::normalizeAttributes() 2571 void Element::normalizeAttributes()
2693 { 2572 {
2694 if (!hasAttributes()) 2573 if (!hasAttributes())
2695 return; 2574 return;
2696 // attributeCount() cannot be cached before the loop because the attributes 2575 // attributeCount() cannot be cached before the loop because the attributes
2697 // list is altered while iterating. 2576 // list is altered while iterating.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 void Element::webkitRequestFullscreen() 2725 void Element::webkitRequestFullscreen()
2847 { 2726 {
2848 FullscreenElementStack::from(document()).requestFullScreenForElement(this, A LLOW_KEYBOARD_INPUT, FullscreenElementStack::EnforceIFrameAllowFullScreenRequire ment); 2727 FullscreenElementStack::from(document()).requestFullScreenForElement(this, A LLOW_KEYBOARD_INPUT, FullscreenElementStack::EnforceIFrameAllowFullScreenRequire ment);
2849 } 2728 }
2850 2729
2851 void Element::webkitRequestFullScreen(unsigned short flags) 2730 void Element::webkitRequestFullScreen(unsigned short flags)
2852 { 2731 {
2853 FullscreenElementStack::from(document()).requestFullScreenForElement(this, ( flags | LEGACY_MOZILLA_REQUEST), FullscreenElementStack::EnforceIFrameAllowFullS creenRequirement); 2732 FullscreenElementStack::from(document()).requestFullScreenForElement(this, ( flags | LEGACY_MOZILLA_REQUEST), FullscreenElementStack::EnforceIFrameAllowFullS creenRequirement);
2854 } 2733 }
2855 2734
2856 bool Element::containsFullScreenElement() const
2857 {
2858 return hasRareData() && elementRareData()->containsFullScreenElement();
2859 }
2860
2861 void Element::setContainsFullScreenElement(bool flag) 2735 void Element::setContainsFullScreenElement(bool flag)
2862 { 2736 {
2863 ensureElementRareData().setContainsFullScreenElement(flag); 2737 setElementFlag(ContainsFullScreenElement, flag);
2864 setNeedsStyleRecalc(SubtreeStyleChange); 2738 setNeedsStyleRecalc(SubtreeStyleChange);
2865 } 2739 }
2866 2740
2867 static Element* parentCrossingFrameBoundaries(Element* element) 2741 static Element* parentCrossingFrameBoundaries(Element* element)
2868 { 2742 {
2869 ASSERT(element); 2743 ASSERT(element);
2870 return element->parentElement() ? element->parentElement() : element->docume nt().ownerElement(); 2744 return element->parentElement() ? element->parentElement() : element->docume nt().ownerElement();
2871 } 2745 }
2872 2746
2873 void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(boo l flag) 2747 void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(boo l flag)
2874 { 2748 {
2875 Element* element = this; 2749 Element* element = this;
2876 while ((element = parentCrossingFrameBoundaries(element))) 2750 while ((element = parentCrossingFrameBoundaries(element)))
2877 element->setContainsFullScreenElement(flag); 2751 element->setContainsFullScreenElement(flag);
2878 } 2752 }
2879 2753
2880 bool Element::isInTopLayer() const
2881 {
2882 return hasRareData() && elementRareData()->isInTopLayer();
2883 }
2884
2885 void Element::setIsInTopLayer(bool inTopLayer) 2754 void Element::setIsInTopLayer(bool inTopLayer)
2886 { 2755 {
2887 if (isInTopLayer() == inTopLayer) 2756 if (isInTopLayer() == inTopLayer)
2888 return; 2757 return;
2889 ensureElementRareData().setIsInTopLayer(inTopLayer); 2758 setElementFlag(IsInTopLayer, inTopLayer);
2890 2759
2891 // We must ensure a reattach occurs so the renderer is inserted in the corre ct sibling order under RenderView according to its 2760 // We must ensure a reattach occurs so the renderer is inserted in the corre ct sibling order under RenderView according to its
2892 // top layer position, or in its usual place if not in the top layer. 2761 // top layer position, or in its usual place if not in the top layer.
2893 lazyReattachIfAttached(); 2762 lazyReattachIfAttached();
2894 } 2763 }
2895 2764
2896 void Element::webkitRequestPointerLock() 2765 void Element::webkitRequestPointerLock()
2897 { 2766 {
2898 if (document().page()) 2767 if (document().page())
2899 document().page()->pointerLockController().requestPointerLock(this); 2768 document().page()->pointerLockController().requestPointerLock(this);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
3307 InputMethodContext& Element::inputMethodContext() 3176 InputMethodContext& Element::inputMethodContext()
3308 { 3177 {
3309 return ensureElementRareData().ensureInputMethodContext(toHTMLElement(this)) ; 3178 return ensureElementRareData().ensureInputMethodContext(toHTMLElement(this)) ;
3310 } 3179 }
3311 3180
3312 bool Element::hasInputMethodContext() const 3181 bool Element::hasInputMethodContext() const
3313 { 3182 {
3314 return hasRareData() && elementRareData()->hasInputMethodContext(); 3183 return hasRareData() && elementRareData()->hasInputMethodContext();
3315 } 3184 }
3316 3185
3317 bool Element::hasPendingResources() const
3318 {
3319 return hasRareData() && elementRareData()->hasPendingResources();
3320 }
3321
3322 void Element::setHasPendingResources()
3323 {
3324 ensureElementRareData().setHasPendingResources(true);
3325 }
3326
3327 void Element::clearHasPendingResources()
3328 {
3329 ensureElementRareData().setHasPendingResources(false);
3330 }
3331
3332 void Element::synchronizeStyleAttributeInternal() const 3186 void Element::synchronizeStyleAttributeInternal() const
3333 { 3187 {
3334 ASSERT(isStyledElement()); 3188 ASSERT(isStyledElement());
3335 ASSERT(elementData()); 3189 ASSERT(elementData());
3336 ASSERT(elementData()->m_styleAttributeIsDirty); 3190 ASSERT(elementData()->m_styleAttributeIsDirty);
3337 elementData()->m_styleAttributeIsDirty = false; 3191 elementData()->m_styleAttributeIsDirty = false;
3338 const StylePropertySet* inlineStyle = this->inlineStyle(); 3192 const StylePropertySet* inlineStyle = this->inlineStyle();
3339 const_cast<Element*>(this)->setSynchronizedLazyAttribute(styleAttr, 3193 const_cast<Element*>(this)->setSynchronizedLazyAttribute(styleAttr,
3340 inlineStyle ? AtomicString(inlineStyle->asText()) : nullAtom); 3194 inlineStyle ? AtomicString(inlineStyle->asText()) : nullAtom);
3341 } 3195 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3540 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3394 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3541 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3395 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3542 if (isHTMLOptionElement(*this) || isHTMLOptGroupElement(*this)) 3396 if (isHTMLOptionElement(*this) || isHTMLOptGroupElement(*this))
3543 return false; 3397 return false;
3544 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3398 if (FullscreenElementStack::isActiveFullScreenElement(this))
3545 return false; 3399 return false;
3546 return true; 3400 return true;
3547 } 3401 }
3548 3402
3549 } // namespace WebCore 3403 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698