| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 9 * rights reserved. | 9 * rights reserved. |
| 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 view_ = view; | 299 view_ = view; |
| 300 } | 300 } |
| 301 | 301 |
| 302 void LocalFrame::CreateView(const IntSize& viewport_size, | 302 void LocalFrame::CreateView(const IntSize& viewport_size, |
| 303 const Color& background_color, | 303 const Color& background_color, |
| 304 ScrollbarMode horizontal_scrollbar_mode, | 304 ScrollbarMode horizontal_scrollbar_mode, |
| 305 bool horizontal_lock, | 305 bool horizontal_lock, |
| 306 ScrollbarMode vertical_scrollbar_mode, | 306 ScrollbarMode vertical_scrollbar_mode, |
| 307 bool vertical_lock) { | 307 bool vertical_lock) { |
| 308 ASSERT(this); | 308 DCHECK(this); |
| 309 ASSERT(GetPage()); | 309 DCHECK(GetPage()); |
| 310 | 310 |
| 311 bool is_local_root = this->IsLocalRoot(); | 311 bool is_local_root = this->IsLocalRoot(); |
| 312 | 312 |
| 313 if (is_local_root && View()) | 313 if (is_local_root && View()) |
| 314 View()->SetParentVisible(false); | 314 View()->SetParentVisible(false); |
| 315 | 315 |
| 316 SetView(nullptr); | 316 SetView(nullptr); |
| 317 | 317 |
| 318 FrameView* frame_view = nullptr; | 318 FrameView* frame_view = nullptr; |
| 319 if (is_local_root) { | 319 if (is_local_root) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 332 SetView(frame_view); | 332 SetView(frame_view); |
| 333 | 333 |
| 334 frame_view->UpdateBaseBackgroundColorRecursively(background_color); | 334 frame_view->UpdateBaseBackgroundColorRecursively(background_color); |
| 335 | 335 |
| 336 if (is_local_root) | 336 if (is_local_root) |
| 337 frame_view->SetParentVisible(true); | 337 frame_view->SetParentVisible(true); |
| 338 | 338 |
| 339 // FIXME: Not clear what the right thing for OOPI is here. | 339 // FIXME: Not clear what the right thing for OOPI is here. |
| 340 if (!OwnerLayoutItem().IsNull()) { | 340 if (!OwnerLayoutItem().IsNull()) { |
| 341 HTMLFrameOwnerElement* owner = DeprecatedLocalOwner(); | 341 HTMLFrameOwnerElement* owner = DeprecatedLocalOwner(); |
| 342 ASSERT(owner); | 342 DCHECK(owner); |
| 343 // FIXME: OOPI might lead to us temporarily lying to a frame and telling it | 343 // FIXME: OOPI might lead to us temporarily lying to a frame and telling it |
| 344 // that it's owned by a FrameOwner that knows nothing about it. If we're | 344 // that it's owned by a FrameOwner that knows nothing about it. If we're |
| 345 // lying to this frame, don't let it clobber the existing widget. | 345 // lying to this frame, don't let it clobber the existing widget. |
| 346 if (owner->ContentFrame() == this) | 346 if (owner->ContentFrame() == this) |
| 347 owner->SetWidget(frame_view); | 347 owner->SetWidget(frame_view); |
| 348 } | 348 } |
| 349 | 349 |
| 350 if (Owner()) | 350 if (Owner()) |
| 351 View()->SetCanHaveScrollbars(Owner()->ScrollingMode() != | 351 View()->SetCanHaveScrollbars(Owner()->ScrollingMode() != |
| 352 kScrollbarAlwaysOff); | 352 kScrollbarAlwaysOff); |
| 353 } | 353 } |
| 354 | 354 |
| 355 LocalFrame::~LocalFrame() { | 355 LocalFrame::~LocalFrame() { |
| 356 // Verify that the FrameView has been cleared as part of detaching | 356 // Verify that the FrameView has been cleared as part of detaching |
| 357 // the frame owner. | 357 // the frame owner. |
| 358 ASSERT(!view_); | 358 DCHECK(!view_); |
| 359 } | 359 } |
| 360 | 360 |
| 361 DEFINE_TRACE(LocalFrame) { | 361 DEFINE_TRACE(LocalFrame) { |
| 362 visitor->Trace(instrumenting_agents_); | 362 visitor->Trace(instrumenting_agents_); |
| 363 visitor->Trace(performance_monitor_); | 363 visitor->Trace(performance_monitor_); |
| 364 visitor->Trace(loader_); | 364 visitor->Trace(loader_); |
| 365 visitor->Trace(navigation_scheduler_); | 365 visitor->Trace(navigation_scheduler_); |
| 366 visitor->Trace(view_); | 366 visitor->Trace(view_); |
| 367 visitor->Trace(dom_window_); | 367 visitor->Trace(dom_window_); |
| 368 visitor->Trace(page_popup_owner_); | 368 visitor->Trace(page_popup_owner_); |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 std::unique_ptr<DragImage> LocalFrame::NodeImage(Node& node) { | 744 std::unique_ptr<DragImage> LocalFrame::NodeImage(Node& node) { |
| 745 DraggedNodeImageBuilder image_node(*this, node); | 745 DraggedNodeImageBuilder image_node(*this, node); |
| 746 return image_node.CreateImage(); | 746 return image_node.CreateImage(); |
| 747 } | 747 } |
| 748 | 748 |
| 749 std::unique_ptr<DragImage> LocalFrame::DragImageForSelection(float opacity) { | 749 std::unique_ptr<DragImage> LocalFrame::DragImageForSelection(float opacity) { |
| 750 if (!Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsRange()) | 750 if (!Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsRange()) |
| 751 return nullptr; | 751 return nullptr; |
| 752 | 752 |
| 753 view_->UpdateAllLifecyclePhasesExceptPaint(); | 753 view_->UpdateAllLifecyclePhasesExceptPaint(); |
| 754 ASSERT(GetDocument()->IsActive()); | 754 DCHECK(GetDocument()->IsActive()); |
| 755 | 755 |
| 756 FloatRect painting_rect = FloatRect(Selection().Bounds()); | 756 FloatRect painting_rect = FloatRect(Selection().Bounds()); |
| 757 GlobalPaintFlags paint_flags = | 757 GlobalPaintFlags paint_flags = |
| 758 kGlobalPaintSelectionOnly | kGlobalPaintFlattenCompositingLayers; | 758 kGlobalPaintSelectionOnly | kGlobalPaintFlattenCompositingLayers; |
| 759 | 759 |
| 760 PaintRecordBuilder builder(DeviceSpaceBounds(painting_rect, *this)); | 760 PaintRecordBuilder builder(DeviceSpaceBounds(painting_rect, *this)); |
| 761 view_->PaintContents(builder.Context(), paint_flags, | 761 view_->PaintContents(builder.Context(), paint_flags, |
| 762 EnclosingIntRect(painting_rect)); | 762 EnclosingIntRect(painting_rect)); |
| 763 return CreateDragImage(*this, opacity, kDoNotRespectImageOrientation, | 763 return CreateDragImage(*this, opacity, kDoNotRespectImageOrientation, |
| 764 painting_rect, builder, PropertyTreeState::Root()); | 764 painting_rect, builder, PropertyTreeState::Root()); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 if (Client() && | 966 if (Client() && |
| 967 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) { | 967 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) { |
| 968 params.MutableResourceRequest().SetPreviewsState( | 968 params.MutableResourceRequest().SetPreviewsState( |
| 969 params.GetResourceRequest().GetPreviewsState() | | 969 params.GetResourceRequest().GetPreviewsState() | |
| 970 WebURLRequest::kClientLoFiOn); | 970 WebURLRequest::kClientLoFiOn); |
| 971 params.SetAllowImagePlaceholder(); | 971 params.SetAllowImagePlaceholder(); |
| 972 } | 972 } |
| 973 } | 973 } |
| 974 | 974 |
| 975 } // namespace blink | 975 } // namespace blink |
| OLD | NEW |