Commit 6cb577ef authored by mitz@apple.com's avatar mitz@apple.com

Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused

an assertion failure in Document::updateStyleIfNeeded().

Source/WebCore: 

* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::didRemoveNamedFlow):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::getFlowByName):
(WebCore):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::didRemoveNamedFlowImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::didRemoveNamedFlow):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
(WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
(WebInspector.CSSStyleModel.prototype._namedFlowCreated.callback):
(WebInspector.CSSStyleModel.prototype._namedFlowCreated):
(WebInspector.CSSStyleModel.prototype._namedFlowRemoved.callback):
(WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
(WebInspector.CSSDispatcher.prototype.namedFlowCreated):
(WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
(WebInspector.NamedFlow):
(WebInspector.NamedFlow.parsePayloadArray):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):

LayoutTests: 

* inspector/styles/protocol-css-regions-commands-expected.txt:
* inspector/styles/protocol-css-regions-commands.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0dd46922
2012-09-04 Dan Bernstein <mitz@apple.com>
Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused
an assertion failure in Document::updateStyleIfNeeded().
* inspector/styles/protocol-css-regions-commands-expected.txt:
* inspector/styles/protocol-css-regions-commands.html:
2012-09-04 Simon Fraser <simon.fraser@apple.com> 2012-09-04 Simon Fraser <simon.fraser@apple.com>
Regression: Heap-use-after-free in WebCore::FrameView::scrollContentsFastPath Regression: Heap-use-after-free in WebCore::FrameView::scrollContentsFastPath
...@@ -4,11 +4,9 @@ getNamedFlowCollection Bug 91607 ...@@ -4,11 +4,9 @@ getNamedFlowCollection Bug 91607
getFlowByName Bug 91855 getFlowByName Bug 91855
namedFlowCreated Bug 92739 namedFlowCreated Bug 92739
namedFlowRemoved Bug 92739 namedFlowRemoved Bug 92739
regionLayoutUpdated Bug 93443
This text is from CSS Named Flow "flow3".
Running: testGetNamedFlowCollection Running: testGetNamedFlowCollection1
=== CSS Named Flows in main document === === CSS Named Flows in main document ===
* Named Flow "flow1" * Named Flow "flow1"
Content Elements: 1 Content Elements: 1
...@@ -20,26 +18,23 @@ Regions: 2 ...@@ -20,26 +18,23 @@ Regions: 2
Content Elements: 1 Content Elements: 1
Regions: 1 Regions: 1
Running: testGetNamedFlowCollectionWithInvalidDocument Running: testGetNamedFlowCollection2
=== CSS Named Flows in #fake-document === === CSS Named Flows in #fake-document ===
#fake-document is not a document #fake-document is not a document
Running: testGetFlowByName Running: testGetFlowByName1
=== Named Flow "flow2" from main document === === Named Flow "flow2" from main document ===
* Named Flow "flow2" * Named Flow "flow2"
Content Elements: 1 Content Elements: 1
Regions: 2 Regions: 2
Running: testGetFlowByNameWithInvalidName Running: testGetFlowByName2
=== Name Flow "flow4" from main document === === Name Flow "flow4" from main document ===
There is no Named Flow "flow4" in the main document There is no Named Flow "flow4" in the main document
Running: testNamedFlowCreated Running: testNamedFlowCreated
NamedFlowCreated: "tmpNamedFlow" NamedFlowCreated: "tmpNamedFlow"
Running: testRegionLayoutUpdated
RegionLayoutUpdated: "flow3"
Running: testNamedFlowRemoved Running: testNamedFlowRemoved
NamedFlowRemoved: "tmpNamedFlow" NamedFlowRemoved: "tmpNamedFlow"
...@@ -21,32 +21,24 @@ function createDynamicElements() ...@@ -21,32 +21,24 @@ function createDynamicElements()
function createNamedFlow() function createNamedFlow()
{ {
var article = document.createElement("article"); var article = document.createElement("article");
var div = document.createElement("div");
article.id = "tmpArticle"; article.id = "tmpArticle";
article.style["-webkit-flow-into"] = "tmpNamedFlow"; article.style.webkitFlowInto = "tmpNamedFlow";
article.textContent = "This text is from CSS Named Flow \"tmpNamedFlow\"";
div.id = "tmpDiv";
div.style["-webkit-flow-from"] = "tmpNamedFlow";
div.style["height"] = "5px";
div.style["width"] = "20px";
document.body.appendChild(article); document.body.appendChild(article);
document.body.appendChild(div);
} }
function removeNamedFlow() function removeNamedFlow()
{ {
document.body.removeChild(document.getElementById("tmpArticle")); var article = document.getElementById("tmpArticle");
document.body.removeChild(document.getElementById("tmpDiv"));
document.body.removeChild(article);
} }
function test() function test()
{ {
WebInspector.showPanel("elements"); WebInspector.showPanel("elements");
InspectorTest.runTestSuite([ InspectorTest.runTestSuite([
function testGetNamedFlowCollection(next) function testGetNamedFlowCollection1(next)
{ {
WebInspector.domAgent.requestDocument(documentCallback); WebInspector.domAgent.requestDocument(documentCallback);
...@@ -55,20 +47,16 @@ function test() ...@@ -55,20 +47,16 @@ function test()
WebInspector.cssModel.getNamedFlowCollectionAsync(document.id, namedFlowCallback); WebInspector.cssModel.getNamedFlowCollectionAsync(document.id, namedFlowCallback);
} }
function namedFlowCallback(namedFlowMap) function namedFlowCallback(namedFlows)
{ {
InspectorTest.addResult("=== CSS Named Flows in main document ==="); InspectorTest.addResult("=== CSS Named Flows in main document ===");
if (!namedFlowMap) { if (!namedFlows) {
InspectorTest.addResult("[!] Failed to get Named Flows"); InspectorTest.addResult("[!] Failed to get Named Flows");
InspectorTest.completeTest(); InspectorTest.completeTest();
return; return;
} }
namedFlows = [];
for (var flowName in namedFlowMap)
namedFlows.push(namedFlowMap[flowName]);
namedFlows.sort(function (nf1, nf2) { namedFlows.sort(function (nf1, nf2) {
return ((nf1.name == nf2.name) ? 0 : ((nf1.name > nf2.name) ? 1 : -1)); return ((nf1.name == nf2.name) ? 0 : ((nf1.name > nf2.name) ? 1 : -1));
}); });
...@@ -80,7 +68,7 @@ function test() ...@@ -80,7 +68,7 @@ function test()
} }
}, },
function testGetNamedFlowCollectionWithInvalidDocument(next) function testGetNamedFlowCollection2(next)
{ {
WebInspector.domAgent.requestDocument(documentCallback); WebInspector.domAgent.requestDocument(documentCallback);
...@@ -94,11 +82,11 @@ function test() ...@@ -94,11 +82,11 @@ function test()
WebInspector.cssModel.getNamedFlowCollectionAsync(nodeId, namedFlowCallback); WebInspector.cssModel.getNamedFlowCollectionAsync(nodeId, namedFlowCallback);
} }
function namedFlowCallback(namedFlowMap) function namedFlowCallback(namedFlows)
{ {
InspectorTest.addResult("=== CSS Named Flows in #fake-document ==="); InspectorTest.addResult("=== CSS Named Flows in #fake-document ===");
if (namedFlowMap) { if (namedFlows) {
InspectorTest.addResult("[!] Failed"); InspectorTest.addResult("[!] Failed");
InspectorTest.completeTest(); InspectorTest.completeTest();
return; return;
...@@ -109,7 +97,7 @@ function test() ...@@ -109,7 +97,7 @@ function test()
} }
}, },
function testGetFlowByName(next) function testGetFlowByName1(next)
{ {
WebInspector.domAgent.requestDocument(documentCallback); WebInspector.domAgent.requestDocument(documentCallback);
...@@ -134,7 +122,7 @@ function test() ...@@ -134,7 +122,7 @@ function test()
} }
}, },
function testGetFlowByNameWithInvalidName(next) function testGetFlowByName2(next)
{ {
WebInspector.domAgent.requestDocument(documentCallback); WebInspector.domAgent.requestDocument(documentCallback);
...@@ -165,29 +153,15 @@ function test() ...@@ -165,29 +153,15 @@ function test()
function callback(event) function callback(event)
{ {
if (event.data.name !== "tmpNamedFlow")
return;
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowCreated, callback, this); WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowCreated, callback, this);
InspectorTest.addResult("NamedFlowCreated: \"tmpNamedFlow\""); if (event.data.name !== "tmpNamedFlow") {
next(); Inspector.addResult("[!] Failed");
} InspectorTest.completeTest();
},
function testRegionLayoutUpdated(next)
{
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.RegionLayoutUpdated, callback, this);
InspectorTest.evaluateInPage("document.getElementById(\"region3\").style[\"width\"] = \"200px\"");
function callback(event)
{
if (event.data.name !== "flow3")
return; return;
}
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.RegionLayoutUpdated, callback, this); InspectorTest.addResult("NamedFlowCreated: \"tmpNamedFlow\"");
InspectorTest.addResult("RegionLayoutUpdated: \"flow3\"");
next(); next();
} }
}, },
...@@ -199,10 +173,12 @@ function test() ...@@ -199,10 +173,12 @@ function test()
function callback(event) function callback(event)
{ {
if (event.data.flowName !== "tmpNamedFlow")
return;
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowRemoved, callback, this); WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowRemoved, callback, this);
if (event.data.name !== "tmpNamedFlow") {
Inspector.addResult("[!] Failed");
InspectorTest.completeTest();
return;
}
InspectorTest.addResult("NamedFlowRemoved: \"tmpNamedFlow\""); InspectorTest.addResult("NamedFlowRemoved: \"tmpNamedFlow\"");
next(); next();
...@@ -228,7 +204,6 @@ Tests the following commands and events: ...@@ -228,7 +204,6 @@ Tests the following commands and events:
<li>getFlowByName <a href="https://bugs.webkit.org/show_bug.cgi?id=91855">Bug 91855</a></li> <li>getFlowByName <a href="https://bugs.webkit.org/show_bug.cgi?id=91855">Bug 91855</a></li>
<li>namedFlowCreated <a href="https://bugs.webkit.org/show_bug.cgi?id=92739">Bug 92739</a></li> <li>namedFlowCreated <a href="https://bugs.webkit.org/show_bug.cgi?id=92739">Bug 92739</a></li>
<li>namedFlowRemoved <a href="https://bugs.webkit.org/show_bug.cgi?id=92739">Bug 92739</a></li> <li>namedFlowRemoved <a href="https://bugs.webkit.org/show_bug.cgi?id=92739">Bug 92739</a></li>
<li>regionLayoutUpdated <a href="https://bugs.webkit.org/show_bug.cgi?id=93443">Bug 93443</a></li>
</ul> </ul>
</p> </p>
...@@ -241,10 +216,8 @@ Tests the following commands and events: ...@@ -241,10 +216,8 @@ Tests the following commands and events:
<div style="-webkit-flow-from: flow2"></div> <div style="-webkit-flow-from: flow2"></div>
<div style="-webkit-flow-from: flow2"></div> <div style="-webkit-flow-from: flow2"></div>
<article style="-webkit-flow-into: flow3"> <article style="-webkit-flow-into: flow3"></article>
This text is from CSS Named Flow "flow3". <div style="-webkit-flow-from: flow3"></div>
</article>
<div id="region3" style="-webkit-flow-from: flow3; height: 20px; width: 5px"></div>
<div id="fake-document"></div> <div id="fake-document"></div>
......
2012-09-04 Dan Bernstein <mitz@apple.com>
Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused
an assertion failure in Document::updateStyleIfNeeded().
* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::didRemoveNamedFlow):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::getFlowByName):
(WebCore):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::didRemoveNamedFlowImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::didRemoveNamedFlow):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
(WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
(WebInspector.CSSStyleModel.prototype._namedFlowCreated.callback):
(WebInspector.CSSStyleModel.prototype._namedFlowCreated):
(WebInspector.CSSStyleModel.prototype._namedFlowRemoved.callback):
(WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
(WebInspector.CSSDispatcher.prototype.namedFlowCreated):
(WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
(WebInspector.NamedFlow):
(WebInspector.NamedFlow.parsePayloadArray):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
2012-09-04 Simon Fraser <simon.fraser@apple.com> 2012-09-04 Simon Fraser <simon.fraser@apple.com>
Regression: Heap-use-after-free in WebCore::FrameView::scrollContentsFastPath Regression: Heap-use-after-free in WebCore::FrameView::scrollContentsFastPath
...@@ -81,7 +81,7 @@ PassRefPtr<WebKitNamedFlow> NamedFlowCollection::ensureFlowWithName(const String ...@@ -81,7 +81,7 @@ PassRefPtr<WebKitNamedFlow> NamedFlowCollection::ensureFlowWithName(const String
RefPtr<WebKitNamedFlow> newFlow = WebKitNamedFlow::create(this, flowName); RefPtr<WebKitNamedFlow> newFlow = WebKitNamedFlow::create(this, flowName);
m_namedFlows.add(newFlow.get()); m_namedFlows.add(newFlow.get());
InspectorInstrumentation::didCreateNamedFlow(m_document, newFlow.get()); InspectorInstrumentation::didCreateNamedFlow(m_document, newFlow->name());
return newFlow.release(); return newFlow.release();
} }
...@@ -95,9 +95,9 @@ void NamedFlowCollection::discardNamedFlow(WebKitNamedFlow* namedFlow) ...@@ -95,9 +95,9 @@ void NamedFlowCollection::discardNamedFlow(WebKitNamedFlow* namedFlow)
ASSERT(namedFlow->flowState() == WebKitNamedFlow::FlowStateNull); ASSERT(namedFlow->flowState() == WebKitNamedFlow::FlowStateNull);
ASSERT(m_namedFlows.contains(namedFlow)); ASSERT(m_namedFlows.contains(namedFlow));
InspectorInstrumentation::willRemoveNamedFlow(m_document, namedFlow);
m_namedFlows.remove(namedFlow); m_namedFlows.remove(namedFlow);
InspectorInstrumentation::didRemoveNamedFlow(m_document, namedFlow->name());
} }
void NamedFlowCollection::documentDestroyed() void NamedFlowCollection::documentDestroyed()
......
...@@ -2412,6 +2412,18 @@ ...@@ -2412,6 +2412,18 @@
], ],
"description": "Returns the Named Flows from the document.", "description": "Returns the Named Flows from the document.",
"hidden": true "hidden": true
},
{
"name": "getFlowByName",
"parameters": [
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
{ "name": "name", "type": "string", "description": "Named Flow identifier." }
],
"returns": [
{ "name": "namedFlow", "$ref": "NamedFlow", "description": "A Named Flow." }
],
"description": "Returns the Named Flow identified by the given name",
"hidden": true
} }
], ],
"events": [ "events": [
...@@ -2429,7 +2441,8 @@ ...@@ -2429,7 +2441,8 @@
{ {
"name": "namedFlowCreated", "name": "namedFlowCreated",
"parameters": [ "parameters": [
{ "name": "namedFlow", "$ref": "NamedFlow", "description": "The new Named Flow." } { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
{ "name": "namedFlow", "type": "string", "description": "Identifier of the new Named Flow." }
], ],
"description": "Fires when a Named Flow is created.", "description": "Fires when a Named Flow is created.",
"hidden": true "hidden": true
...@@ -2438,18 +2451,10 @@ ...@@ -2438,18 +2451,10 @@
"name": "namedFlowRemoved", "name": "namedFlowRemoved",
"parameters": [ "parameters": [
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." }, { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
{ "name": "flowName", "type": "string", "description": "Identifier of the removed Named Flow." } { "name": "namedFlow", "type": "string", "description": "Identifier of the removed Named Flow." }
], ],
"description": "Fires when a Named Flow is removed: has no associated content nodes and regions.", "description": "Fires when a Named Flow is removed: has no associated content nodes and regions.",
"hidden": true "hidden": true
},
{
"name": "regionLayoutUpdated",
"parameters": [
{ "name": "namedFlow", "$ref": "NamedFlow", "description": "The Named Flow whose layout may have changed." }
],
"description": "Fires when a Named Flow's layout may have changed.",
"hidden": true
} }
] ]
}, },
......
...@@ -537,33 +537,22 @@ void InspectorCSSAgent::mediaQueryResultChanged() ...@@ -537,33 +537,22 @@ void InspectorCSSAgent::mediaQueryResultChanged()
m_frontend->mediaQueryResultChanged(); m_frontend->mediaQueryResultChanged();
} }
void InspectorCSSAgent::didCreateNamedFlow(Document* document, WebKitNamedFlow* namedFlow) void InspectorCSSAgent::didCreateNamedFlow(Document* document, const AtomicString& name)
{ {
int documentNodeId = documentNodeWithRequestedFlowsId(document); int nodeId = m_domAgent->boundNodeId(document);
if (!documentNodeId) if (!nodeId || !m_namedFlowCollectionsRequested.contains(nodeId))
return; return;
ErrorString errorString; m_frontend->namedFlowCreated(nodeId, name.string());
m_frontend->namedFlowCreated(buildObjectForNamedFlow(&errorString, namedFlow, documentNodeId));
} }
void InspectorCSSAgent::willRemoveNamedFlow(Document* document, WebKitNamedFlow* namedFlow) void InspectorCSSAgent::didRemoveNamedFlow(Document* document, const AtomicString& name)
{ {
int documentNodeId = documentNodeWithRequestedFlowsId(document); int nodeId = m_domAgent->boundNodeId(document);
if (!documentNodeId) if (!nodeId || !m_namedFlowCollectionsRequested.contains(nodeId))
return; return;
m_frontend->namedFlowRemoved(documentNodeId, namedFlow->name().string()); m_frontend->namedFlowRemoved(nodeId, name.string());
}
void InspectorCSSAgent::didUpdateRegionLayout(Document* document, WebKitNamedFlow* namedFlow)
{
int documentNodeId = documentNodeWithRequestedFlowsId(document);
if (!documentNodeId)
return;
ErrorString errorString;
m_frontend->regionLayoutUpdated(buildObjectForNamedFlow(&errorString, namedFlow, documentNodeId));
} }
bool InspectorCSSAgent::forcePseudoState(Element* element, CSSSelector::PseudoType pseudoType) bool InspectorCSSAgent::forcePseudoState(Element* element, CSSSelector::PseudoType pseudoType)
...@@ -839,16 +828,32 @@ void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int doc ...@@ -839,16 +828,32 @@ void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int doc
return; return;
m_namedFlowCollectionsRequested.add(documentNodeId); m_namedFlowCollectionsRequested.add(documentNodeId);
Vector<RefPtr<WebKitNamedFlow> > namedFlowsVector = document->namedFlows()->namedFlows(); Vector<RefPtr<WebKitNamedFlow> > namedFlowsVector = document->namedFlows()->namedFlows();
RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> > namedFlows = TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>::create(); RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> > namedFlows = TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>::create();
for (Vector<RefPtr<WebKitNamedFlow> >::iterator it = namedFlowsVector.begin(); it != namedFlowsVector.end(); ++it) for (Vector<RefPtr<WebKitNamedFlow> >::iterator it = namedFlowsVector.begin(); it != namedFlowsVector.end(); ++it)
namedFlows->addItem(buildObjectForNamedFlow(errorString, it->get(), documentNodeId)); namedFlows->addItem(buildObjectForNamedFlow(errorString, it->get(), documentNodeId));
result = namedFlows.release(); result = namedFlows.release();
} }
void InspectorCSSAgent::getFlowByName(ErrorString* errorString, int documentNodeId, const String& flowName, RefPtr<TypeBuilder::CSS::NamedFlow>& result)
{
Document* document = m_domAgent->assertDocument(errorString, documentNodeId);
if (!document)
return;
WebKitNamedFlow* webkitNamedFlow = document->namedFlows()->flowByName(flowName);
if (!webkitNamedFlow) {
*errorString = "No target CSS Named Flow found";
return;
}
RefPtr<WebKitNamedFlow> protector(webkitNamedFlow);
result = buildObjectForNamedFlow(errorString, webkitNamedFlow, documentNodeId);
}
void InspectorCSSAgent::startSelectorProfiler(ErrorString*) void InspectorCSSAgent::startSelectorProfiler(ErrorString*)
{ {
m_currentSelectorProfile = adoptPtr(new SelectorProfile()); m_currentSelectorProfile = adoptPtr(new SelectorProfile());
...@@ -928,15 +933,6 @@ Element* InspectorCSSAgent::elementForId(ErrorString* errorString, int nodeId) ...@@ -928,15 +933,6 @@ Element* InspectorCSSAgent::elementForId(ErrorString* errorString, int nodeId)
return toElement(node); return toElement(node);
} }
int InspectorCSSAgent::documentNodeWithRequestedFlowsId(Document* document)
{
int documentNodeId = m_domAgent->boundNodeId(document);
if (!documentNodeId || !m_namedFlowCollectionsRequested.contains(documentNodeId))
return 0;
return documentNodeId;
}
void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>* result) void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>* result)
{ {
InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet)); InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
......
...@@ -99,9 +99,8 @@ public: ...@@ -99,9 +99,8 @@ public:
virtual void disable(ErrorString*); virtual void disable(ErrorString*);
void reset(); void reset();
void mediaQueryResultChanged(); void mediaQueryResultChanged();
void didCreateNamedFlow(Document*, WebKitNamedFlow*); void didCreateNamedFlow(Document*, const AtomicString& name);
void willRemoveNamedFlow(Document*, WebKitNamedFlow*); void didRemoveNamedFlow(Document*, const AtomicString& name);
void didUpdateRegionLayout(Document*, WebKitNamedFlow*);
virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&); virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> >&);
virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attributes); virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attributes);
...@@ -117,6 +116,7 @@ public: ...@@ -117,6 +116,7 @@ public:
virtual void getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo> >& result); virtual void getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo> >& result);
virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<InspectorArray>& forcedPseudoClasses); virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<InspectorArray>& forcedPseudoClasses);
virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result); virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result);
virtual void getFlowByName(ErrorString*, int documentNodeId, const String& flowName, RefPtr<TypeBuilder::CSS::NamedFlow>& result);
virtual void startSelectorProfiler(ErrorString*); virtual void startSelectorProfiler(ErrorString*);
virtual void stopSelectorProfiler(ErrorString*, RefPtr<TypeBuilder::CSS::SelectorProfile>&); virtual void stopSelectorProfiler(ErrorString