| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 clip_layer_ = compositor_support->CreateLayer(); | 91 clip_layer_ = compositor_support->CreateLayer(); |
| 92 clip_layer_->SetTransformOrigin(WebFloatPoint3D()); | 92 clip_layer_->SetTransformOrigin(WebFloatPoint3D()); |
| 93 clip_layer_->AddChild(content_layer_->Layer()); | 93 clip_layer_->AddChild(content_layer_->Layer()); |
| 94 | 94 |
| 95 compositor_player_ = CompositorAnimationPlayer::Create(); | 95 compositor_player_ = CompositorAnimationPlayer::Create(); |
| 96 DCHECK(compositor_player_); | 96 DCHECK(compositor_player_); |
| 97 compositor_player_->SetAnimationDelegate(this); | 97 compositor_player_->SetAnimationDelegate(this); |
| 98 if (owning_web_view_->LinkHighlightsTimeline()) | 98 if (owning_web_view_->LinkHighlightsTimeline()) |
| 99 owning_web_view_->LinkHighlightsTimeline()->PlayerAttached(*this); | 99 owning_web_view_->LinkHighlightsTimeline()->PlayerAttached(*this); |
| 100 | 100 |
| 101 CompositorElementId element_id = CreateCompositorElementId( | 101 CompositorElementId element_id = CompositorElementIdFromDOMNodeId( |
| 102 DOMNodeIds::IdForNode(node), CompositorSubElementId::kLinkHighlight); | 102 DOMNodeIds::IdForNode(node), |
| 103 CompositorElementIdNamespace::kLinkHighlight); |
| 103 compositor_player_->AttachElement(element_id); | 104 compositor_player_->AttachElement(element_id); |
| 104 content_layer_->Layer()->SetDrawsContent(true); | 105 content_layer_->Layer()->SetDrawsContent(true); |
| 105 content_layer_->Layer()->SetOpacity(1); | 106 content_layer_->Layer()->SetOpacity(1); |
| 106 content_layer_->Layer()->SetElementId(element_id); | 107 content_layer_->Layer()->SetElementId(element_id); |
| 107 geometry_needs_update_ = true; | 108 geometry_needs_update_ = true; |
| 108 } | 109 } |
| 109 | 110 |
| 110 LinkHighlightImpl::~LinkHighlightImpl() { | 111 LinkHighlightImpl::~LinkHighlightImpl() { |
| 111 if (compositor_player_->IsElementAttached()) | 112 if (compositor_player_->IsElementAttached()) |
| 112 compositor_player_->DetachElement(); | 113 compositor_player_->DetachElement(); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 404 |
| 404 WebLayer* LinkHighlightImpl::Layer() { | 405 WebLayer* LinkHighlightImpl::Layer() { |
| 405 return ClipLayer(); | 406 return ClipLayer(); |
| 406 } | 407 } |
| 407 | 408 |
| 408 CompositorAnimationPlayer* LinkHighlightImpl::CompositorPlayer() const { | 409 CompositorAnimationPlayer* LinkHighlightImpl::CompositorPlayer() const { |
| 409 return compositor_player_.get(); | 410 return compositor_player_.get(); |
| 410 } | 411 } |
| 411 | 412 |
| 412 } // namespace blink | 413 } // namespace blink |
| OLD | NEW |