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

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

Issue 18080016: [CSS Regions] Elements in a region should be assignable to a named flow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed failing test (fullscreen issue), added SVG test Created 7 years, 5 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
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementRareData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 1378 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
1379 unregisterNamedFlowContentNode(); 1379 unregisterNamedFlowContentNode();
1380 cancelFocusAppearanceUpdate(); 1380 cancelFocusAppearanceUpdate();
1381 if (hasRareData()) { 1381 if (hasRareData()) {
1382 ElementRareData* data = elementRareData(); 1382 ElementRareData* data = elementRareData();
1383 data->setPseudoElement(BEFORE, 0); 1383 data->setPseudoElement(BEFORE, 0);
1384 data->setPseudoElement(AFTER, 0); 1384 data->setPseudoElement(AFTER, 0);
1385 data->setIsInCanvasSubtree(false); 1385 data->setIsInCanvasSubtree(false);
1386 data->resetComputedStyle(); 1386 data->resetComputedStyle();
1387 data->resetDynamicRestyleObservations(); 1387 data->resetDynamicRestyleObservations();
1388 data->setIsInsideRegion(false);
1388 } 1389 }
1389 if (ElementShadow* shadow = this->shadow()) 1390 if (ElementShadow* shadow = this->shadow())
1390 shadow->detach(context); 1391 shadow->detach(context);
1391 ContainerNode::detach(context); 1392 ContainerNode::detach(context);
1392 } 1393 }
1393 1394
1394 bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderS tyle* newStyle) 1395 bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderS tyle* newStyle)
1395 { 1396 {
1396 ASSERT(currentStyle == renderStyle()); 1397 ASSERT(currentStyle == renderStyle());
1397 ASSERT(renderer()); 1398 ASSERT(renderer());
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 bool Element::isInCanvasSubtree() const 2325 bool Element::isInCanvasSubtree() const
2325 { 2326 {
2326 return hasRareData() && elementRareData()->isInCanvasSubtree(); 2327 return hasRareData() && elementRareData()->isInCanvasSubtree();
2327 } 2328 }
2328 2329
2329 bool Element::isUnresolvedCustomElement() 2330 bool Element::isUnresolvedCustomElement()
2330 { 2331 {
2331 return isCustomElement() && document()->registry()->isUnresolved(this); 2332 return isCustomElement() && document()->registry()->isUnresolved(this);
2332 } 2333 }
2333 2334
2335 void Element::setIsInsideRegion(bool value)
2336 {
2337 if (value == isInsideRegion())
2338 return;
2339
2340 ensureElementRareData()->setIsInsideRegion(value);
2341 }
2342
2343 bool Element::isInsideRegion() const
2344 {
2345 return hasRareData() ? elementRareData()->isInsideRegion() : false;
2346 }
2347
2334 void Element::setRegionOversetState(RegionOversetState state) 2348 void Element::setRegionOversetState(RegionOversetState state)
2335 { 2349 {
2336 ensureElementRareData()->setRegionOversetState(state); 2350 ensureElementRareData()->setRegionOversetState(state);
2337 } 2351 }
2338 2352
2339 RegionOversetState Element::regionOversetState() const 2353 RegionOversetState Element::regionOversetState() const
2340 { 2354 {
2341 return hasRareData() ? elementRareData()->regionOversetState() : RegionUndef ined; 2355 return hasRareData() ? elementRareData()->regionOversetState() : RegionUndef ined;
2342 } 2356 }
2343 2357
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 } 2636 }
2623 2637
2624 RenderRegion* Element::renderRegion() const 2638 RenderRegion* Element::renderRegion() const
2625 { 2639 {
2626 if (renderer() && renderer()->isRenderRegion()) 2640 if (renderer() && renderer()->isRenderRegion())
2627 return toRenderRegion(renderer()); 2641 return toRenderRegion(renderer());
2628 2642
2629 return 0; 2643 return 0;
2630 } 2644 }
2631 2645
2646 bool Element::shouldMoveToFlowThread(RenderStyle* styleToUse) const
2647 {
2648 ASSERT(styleToUse);
2649
2650 if (FullscreenController::isActiveFullScreenElement(this))
2651 return false;
2652
2653 if (isInShadowTree())
2654 return false;
2655
2656 if (styleToUse->flowThread().isEmpty())
2657 return false;
2658
2659 return !isRegisteredWithNamedFlow();
2660 }
2661
2632 const AtomicString& Element::webkitRegionOverset() const 2662 const AtomicString& Element::webkitRegionOverset() const
2633 { 2663 {
2634 document()->updateLayoutIgnorePendingStylesheets(); 2664 document()->updateLayoutIgnorePendingStylesheets();
2635 2665
2636 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral)); 2666 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral));
2637 if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderRegion()) 2667 if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderRegion())
2638 return undefinedState; 2668 return undefinedState;
2639 2669
2640 switch (renderRegion()->regionOversetState()) { 2670 switch (renderRegion()->regionOversetState()) {
2641 case RegionFit: { 2671 case RegionFit: {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
3566 return 0; 3596 return 0;
3567 } 3597 }
3568 3598
3569 Attribute* UniqueElementData::attributeItem(unsigned index) 3599 Attribute* UniqueElementData::attributeItem(unsigned index)
3570 { 3600 {
3571 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3601 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3572 return &m_attributeVector.at(index); 3602 return &m_attributeVector.at(index);
3573 } 3603 }
3574 3604
3575 } // namespace WebCore 3605 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698