| 479 | } |
| 480 | |
| 481 | bool Element::GetComputedStyle(IHTMLCSSStyleDeclaration** computed_style) { |
| 482 | HRESULT hr = S_OK; |
| 483 | CComPtr<IHTMLDocument2> doc; |
| 484 | int status_code = this->GetContainingDocument(false, &doc); |
| 485 | if (status_code == WD_SUCCESS) { |
| 486 | CComPtr<IHTMLWindow2> window; |
| 487 | hr = doc->get_parentWindow(&window); |
| 488 | if (SUCCEEDED(hr) && window) { |
| 489 | CComPtr<IHTMLWindow7> style_window; |
| 490 | hr = window->QueryInterface<IHTMLWindow7>(&style_window); |
| 491 | if (SUCCEEDED(hr) && style_window) { |
| 492 | CComPtr<IHTMLDOMNode> node; |
| 493 | hr = this->element_->QueryInterface<IHTMLDOMNode>(&node); |
| 494 | if (SUCCEEDED(hr) && node) { |
| 495 | hr = style_window->getComputedStyle(node, NULL, computed_style); |
| 496 | if (SUCCEEDED(hr) && computed_style) { |
| 497 | return true; |
| 498 | } |
| 499 | } |
| 500 | } |
| 501 | } |
| 502 | } |
| 503 | return false; |
| 504 | } |
| 505 | |
| 506 | bool Element::IsEditable() { |
| 507 | LOG(TRACE) << "Entering Element::IsEditable"; |
no test coverage detected