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 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 if (frame_->GetDocument()->Printing()) | 3033 if (frame_->GetDocument()->Printing()) |
3034 return; | 3034 return; |
3035 if (!print_context_) | 3035 if (!print_context_) |
3036 print_context_ = new PrintContext(frame_); | 3036 print_context_ = new PrintContext(frame_); |
3037 if (frame_->GetSettings()) | 3037 if (frame_->GetSettings()) |
3038 frame_->GetSettings()->SetShouldPrintBackgrounds(true); | 3038 frame_->GetSettings()->SetShouldPrintBackgrounds(true); |
3039 bool is_us = DefaultLanguage() == "en-US"; | 3039 bool is_us = DefaultLanguage() == "en-US"; |
3040 int width = is_us ? kLetterPortraitPageWidth : kA4PortraitPageWidth; | 3040 int width = is_us ? kLetterPortraitPageWidth : kA4PortraitPageWidth; |
3041 int height = is_us ? kLetterPortraitPageHeight : kA4PortraitPageHeight; | 3041 int height = is_us ? kLetterPortraitPageHeight : kA4PortraitPageHeight; |
3042 FloatRect page_rect(0, 0, width, height); | 3042 FloatRect page_rect(0, 0, width, height); |
3043 print_context_->begin(page_rect.Width(), page_rect.Height()); | 3043 print_context_->BeginPrintMode(page_rect.Width(), page_rect.Height()); |
3044 float dummy_height; | 3044 float dummy_height; |
3045 print_context_->ComputePageRects(page_rect, 0, 0, 1.0, dummy_height); | 3045 print_context_->ComputePageRects(page_rect, 0, 0, 1.0, dummy_height); |
3046 DispatchEventsForPrintingOnAllFrames(); | 3046 DispatchEventsForPrintingOnAllFrames(); |
3047 } | 3047 } |
3048 | 3048 |
3049 void FrameView::ClearPrintContext() { | 3049 void FrameView::ClearPrintContext() { |
3050 if (!print_context_) | 3050 if (!print_context_) |
3051 return; | 3051 return; |
3052 print_context_->end(); | 3052 print_context_->EndPrintMode(); |
3053 print_context_.Clear(); | 3053 print_context_.Clear(); |
3054 } | 3054 } |
3055 | 3055 |
3056 // TODO(leviw): We don't assert lifecycle information from documents in child | 3056 // TODO(leviw): We don't assert lifecycle information from documents in child |
3057 // PluginViews. | 3057 // PluginViews. |
3058 void FrameView::UpdateLifecyclePhasesInternal( | 3058 void FrameView::UpdateLifecyclePhasesInternal( |
3059 DocumentLifecycle::LifecycleState target_state) { | 3059 DocumentLifecycle::LifecycleState target_state) { |
3060 if (current_update_lifecycle_phases_target_state_ != | 3060 if (current_update_lifecycle_phases_target_state_ != |
3061 DocumentLifecycle::kUninitialized) { | 3061 DocumentLifecycle::kUninitialized) { |
3062 NOTREACHED() << "FrameView::updateLifecyclePhasesInternal() reentrance"; | 3062 NOTREACHED() << "FrameView::updateLifecyclePhasesInternal() reentrance"; |
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 void FrameView::SetAnimationHost( | 5374 void FrameView::SetAnimationHost( |
5375 std::unique_ptr<CompositorAnimationHost> host) { | 5375 std::unique_ptr<CompositorAnimationHost> host) { |
5376 animation_host_ = std::move(host); | 5376 animation_host_ = std::move(host); |
5377 } | 5377 } |
5378 | 5378 |
5379 LayoutUnit FrameView::CaretWidth() const { | 5379 LayoutUnit FrameView::CaretWidth() const { |
5380 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5380 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5381 } | 5381 } |
5382 | 5382 |
5383 } // namespace blink | 5383 } // namespace blink |
OLD | NEW |