OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 if (root->GetType() == ShadowRootType::kOpen) | 2344 if (root->GetType() == ShadowRootType::kOpen) |
2345 return root->AssignedSlotFor(*this); | 2345 return root->AssignedSlotFor(*this); |
2346 } | 2346 } |
2347 return nullptr; | 2347 return nullptr; |
2348 } | 2348 } |
2349 | 2349 |
2350 void Node::SetFocused(bool flag) { | 2350 void Node::SetFocused(bool flag) { |
2351 GetDocument().UserActionElements().SetFocused(this, flag); | 2351 GetDocument().UserActionElements().SetFocused(this, flag); |
2352 } | 2352 } |
2353 | 2353 |
| 2354 void Node::SetHasFocusWithin(bool flag) { |
| 2355 GetDocument().UserActionElements().SetHasFocusWithin(this, flag); |
| 2356 } |
| 2357 |
2354 void Node::SetActive(bool flag) { | 2358 void Node::SetActive(bool flag) { |
2355 GetDocument().UserActionElements().SetActive(this, flag); | 2359 GetDocument().UserActionElements().SetActive(this, flag); |
2356 } | 2360 } |
2357 | 2361 |
2358 void Node::SetDragged(bool flag) { | 2362 void Node::SetDragged(bool flag) { |
2359 GetDocument().UserActionElements().SetDragged(this, flag); | 2363 GetDocument().UserActionElements().SetDragged(this, flag); |
2360 } | 2364 } |
2361 | 2365 |
2362 void Node::SetHovered(bool flag) { | 2366 void Node::SetHovered(bool flag) { |
2363 GetDocument().UserActionElements().SetHovered(this, flag); | 2367 GetDocument().UserActionElements().SetHovered(this, flag); |
(...skipping 17 matching lines...) Expand all Loading... |
2381 bool Node::IsUserActionElementHovered() const { | 2385 bool Node::IsUserActionElementHovered() const { |
2382 DCHECK(IsUserActionElement()); | 2386 DCHECK(IsUserActionElement()); |
2383 return GetDocument().UserActionElements().IsHovered(this); | 2387 return GetDocument().UserActionElements().IsHovered(this); |
2384 } | 2388 } |
2385 | 2389 |
2386 bool Node::IsUserActionElementFocused() const { | 2390 bool Node::IsUserActionElementFocused() const { |
2387 DCHECK(IsUserActionElement()); | 2391 DCHECK(IsUserActionElement()); |
2388 return GetDocument().UserActionElements().IsFocused(this); | 2392 return GetDocument().UserActionElements().IsFocused(this); |
2389 } | 2393 } |
2390 | 2394 |
| 2395 bool Node::IsUserActionElementHasFocusWithin() const { |
| 2396 DCHECK(IsUserActionElement()); |
| 2397 return GetDocument().UserActionElements().HasFocusWithin(this); |
| 2398 } |
| 2399 |
2391 void Node::SetCustomElementState(CustomElementState new_state) { | 2400 void Node::SetCustomElementState(CustomElementState new_state) { |
2392 CustomElementState old_state = GetCustomElementState(); | 2401 CustomElementState old_state = GetCustomElementState(); |
2393 | 2402 |
2394 switch (new_state) { | 2403 switch (new_state) { |
2395 case CustomElementState::kUncustomized: | 2404 case CustomElementState::kUncustomized: |
2396 NOTREACHED(); // Everything starts in this state | 2405 NOTREACHED(); // Everything starts in this state |
2397 return; | 2406 return; |
2398 | 2407 |
2399 case CustomElementState::kUndefined: | 2408 case CustomElementState::kUndefined: |
2400 DCHECK_EQ(CustomElementState::kUncustomized, old_state); | 2409 DCHECK_EQ(CustomElementState::kUncustomized, old_state); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 if (node) { | 2540 if (node) { |
2532 std::stringstream stream; | 2541 std::stringstream stream; |
2533 node->PrintNodePathTo(stream); | 2542 node->PrintNodePathTo(stream); |
2534 LOG(INFO) << stream.str(); | 2543 LOG(INFO) << stream.str(); |
2535 } else { | 2544 } else { |
2536 LOG(INFO) << "Cannot showNodePath for <null>"; | 2545 LOG(INFO) << "Cannot showNodePath for <null>"; |
2537 } | 2546 } |
2538 } | 2547 } |
2539 | 2548 |
2540 #endif | 2549 #endif |
OLD | NEW |