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

Side by Side Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 17176018: [CSS Regions] Add new regionOversetChange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Integrated styling fixes Created 7 years, 6 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/NamedFlow.cpp ('k') | Source/core/rendering/RegionOversetState.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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 return inspectorStyle->buildObjectForStyle(); 1583 return inspectorStyle->buildObjectForStyle();
1584 } 1584 }
1585 1585
1586 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > InspectorCSSAgent::bui ldArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int documentNodeId) 1586 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > InspectorCSSAgent::bui ldArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int documentNodeId)
1587 { 1587 {
1588 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > regions = TypeBuilder: :Array<TypeBuilder::CSS::Region>::create(); 1588 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > regions = TypeBuilder: :Array<TypeBuilder::CSS::Region>::create();
1589 1589
1590 for (unsigned i = 0; i < regionList->length(); ++i) { 1590 for (unsigned i = 0; i < regionList->length(); ++i) {
1591 TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset; 1591 TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset;
1592 1592
1593 switch (toElement(regionList->item(i))->renderRegion()->regionState()) { 1593 switch (toElement(regionList->item(i))->renderRegion()->regionOversetSta te()) {
1594 case RenderRegion::RegionFit: 1594 case RegionFit:
1595 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Fit; 1595 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Fit;
1596 break; 1596 break;
1597 case RenderRegion::RegionEmpty: 1597 case RegionEmpty:
1598 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Empty; 1598 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Empty;
1599 break; 1599 break;
1600 case RenderRegion::RegionOverset: 1600 case RegionOverset:
1601 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Overset; 1601 regionOverset = TypeBuilder::CSS::Region::RegionOverset::Overset;
1602 break; 1602 break;
1603 case RenderRegion::RegionUndefined: 1603 case RegionUndefined:
1604 continue; 1604 continue;
1605 default: 1605 default:
1606 ASSERT_NOT_REACHED(); 1606 ASSERT_NOT_REACHED();
1607 continue; 1607 continue;
1608 } 1608 }
1609 1609
1610 RefPtr<TypeBuilder::CSS::Region> region = TypeBuilder::CSS::Region::crea te() 1610 RefPtr<TypeBuilder::CSS::Region> region = TypeBuilder::CSS::Region::crea te()
1611 .setRegionOverset(regionOverset) 1611 .setRegionOverset(regionOverset)
1612 // documentNodeId was previously asserted 1612 // documentNodeId was previously asserted
1613 .setNodeId(m_domAgent->pushNodeToFrontend(errorString, documentNodeI d, regionList->item(i))); 1613 .setNodeId(m_domAgent->pushNodeToFrontend(errorString, documentNodeI d, regionList->item(i)));
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 documentsToChange.add(element->ownerDocument()); 1688 documentsToChange.add(element->ownerDocument());
1689 } 1689 }
1690 1690
1691 m_nodeIdToForcedPseudoState.clear(); 1691 m_nodeIdToForcedPseudoState.clear();
1692 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it) 1692 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it)
1693 (*it)->styleResolverChanged(RecalcStyleImmediately); 1693 (*it)->styleResolverChanged(RecalcStyleImmediately);
1694 } 1694 }
1695 1695
1696 } // namespace WebCore 1696 } // namespace WebCore
1697 1697
OLDNEW
« no previous file with comments | « Source/core/dom/NamedFlow.cpp ('k') | Source/core/rendering/RegionOversetState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698