Bug 37297

Summary: [Chromium] need an implementation of LayoutTestController::computedStyleIncludingVisitedInfo
Product: WebKit Reporter: Ojan Vafai <ojan>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: benjamin, dglazkov, fishd, japhet, morrita
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 58000    

Description Ojan Vafai 2010-04-08 16:17:50 PDT
http://trac.webkit.org/changeset/57292

I think we need to expose
  bool WebBindings::getElement(NPObject* range, WebElement* webElement)
in order for TestShell's LayoutTestController to be able to get an Element out of the CPPArgumentList.

Then it's just a matter of returning RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true) as a V8Object.
Comment 1 Ojan Vafai 2010-04-09 18:43:30 PDT
Nate, any chance I can convince you to take this on? You're much more familiar with V8 and bindings-related code than I am.
Comment 2 Nate Chapin 2010-04-12 16:00:09 PDT
I can't promise a solution by end of week, but otherwise, yes, you can convince me.
Comment 3 Darin Fisher (:fishd, Google) 2010-04-13 21:31:12 PDT
Instead of getElement, how about getNode since that will be more generically useful?  Then, we can use WebNode::isElementNode to determine if a downcast to WebElement is safe.
Comment 4 Hajime Morrita 2011-04-06 20:30:30 PDT
Is it possible to have test-specific Node JS API?

It looks like: 
interface Node ...{
...
    [LayoutTest] String computedStyleIncludingVisitedInfo()
...
}

Using Node or Element with LayoutTestController is tedious especially for Qt 
because Qt uses QObject reflection to bind  LayoutTestController into JS.

Other possible way to move part of LayoutTestController inside WebCore.
My last attempt didn't get enough attention though?
https://bugs.webkit.org/show_bug.cgi?id=42612
Comment 5 Benjamin Poulain 2013-02-14 20:37:15 PST
This could be of interest to you: https://bugs.webkit.org/show_bug.cgi?id=109772
One more thing to fix and that should work for Chromium.
Comment 6 Benjamin Poulain 2013-02-14 20:37:29 PST

*** This bug has been marked as a duplicate of bug 109772 ***