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

Unified Diff: Source/core/dom/NamedFlow.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/NamedFlow.h ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NamedFlow.cpp
diff --git a/Source/core/dom/NamedFlow.cpp b/Source/core/dom/NamedFlow.cpp
index a5b579526050c4448f4164da017e55b898496eae..00519a12aa13ead3270d508c52af3ef58019df5c 100644
--- a/Source/core/dom/NamedFlow.cpp
+++ b/Source/core/dom/NamedFlow.cpp
@@ -103,7 +103,7 @@ int NamedFlow::firstEmptyRegionIndex() const
RenderRegionList::const_iterator iter = regionList.begin();
for (int index = 0; iter != regionList.end(); ++index, ++iter) {
const RenderRegion* renderRegion = *iter;
- if (renderRegion->regionState() == RenderRegion::RegionEmpty)
+ if (renderRegion->regionOversetState() == RegionEmpty)
return index;
}
return -1;
@@ -217,6 +217,19 @@ void NamedFlow::dispatchRegionLayoutUpdateEvent()
dispatchEvent(event);
}
+void NamedFlow::dispatchRegionOversetChangeEvent()
+{
+ ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
+
+ // If the flow is in the "NULL" state the event should not be dispatched any more.
+ if (flowState() == FlowStateNull)
+ return;
+
+ RefPtr<Event> event = UIEvent::create(eventNames().webkitregionoversetchangeEvent, false, false, m_flowManager->document()->defaultView(), 0);
+
+ dispatchEvent(event);
+}
+
const AtomicString& NamedFlow::interfaceName() const
{
return eventNames().interfaceForNamedFlow;
« no previous file with comments | « Source/core/dom/NamedFlow.h ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698