OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 #include "platform/network/ResourceRequest.h" | 181 #include "platform/network/ResourceRequest.h" |
182 #include "platform/scroll/ScrollbarTheme.h" | 182 #include "platform/scroll/ScrollbarTheme.h" |
183 #include "platform/scroll/ScrollTypes.h" | 183 #include "platform/scroll/ScrollTypes.h" |
184 #include "platform/weborigin/KURL.h" | 184 #include "platform/weborigin/KURL.h" |
185 #include "platform/weborigin/SchemeRegistry.h" | 185 #include "platform/weborigin/SchemeRegistry.h" |
186 #include "platform/weborigin/SecurityPolicy.h" | 186 #include "platform/weborigin/SecurityPolicy.h" |
187 #include "public/platform/Platform.h" | 187 #include "public/platform/Platform.h" |
188 #include "public/platform/WebFileSystem.h" | 188 #include "public/platform/WebFileSystem.h" |
189 #include "public/platform/WebFloatPoint.h" | 189 #include "public/platform/WebFloatPoint.h" |
190 #include "public/platform/WebFloatRect.h" | 190 #include "public/platform/WebFloatRect.h" |
191 #include "public/platform/WebLayer.h" | |
191 #include "public/platform/WebPoint.h" | 192 #include "public/platform/WebPoint.h" |
192 #include "public/platform/WebRect.h" | 193 #include "public/platform/WebRect.h" |
193 #include "public/platform/WebSize.h" | 194 #include "public/platform/WebSize.h" |
194 #include "public/platform/WebURLError.h" | 195 #include "public/platform/WebURLError.h" |
195 #include "public/platform/WebVector.h" | 196 #include "public/platform/WebVector.h" |
196 #include "wtf/CurrentTime.h" | 197 #include "wtf/CurrentTime.h" |
197 #include "wtf/HashMap.h" | 198 #include "wtf/HashMap.h" |
198 | 199 |
199 using namespace WebCore; | 200 using namespace WebCore; |
200 | 201 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 | 549 |
549 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypesMask) const | 550 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypesMask) const |
550 { | 551 { |
551 // The URL to the icon may be in the header. As such, only | 552 // The URL to the icon may be in the header. As such, only |
552 // ask the loader for the icon if it's finished loading. | 553 // ask the loader for the icon if it's finished loading. |
553 if (frame()->loader().state() == FrameStateComplete) | 554 if (frame()->loader().state() == FrameStateComplete) |
554 return frame()->document()->iconURLs(iconTypesMask); | 555 return frame()->document()->iconURLs(iconTypesMask); |
555 return WebVector<WebIconURL>(); | 556 return WebVector<WebIconURL>(); |
556 } | 557 } |
557 | 558 |
559 void WebFrameImpl::setWebLayer(WebLayer* webLayer) | |
560 { | |
561 if (frame()) { | |
eseidel
2013/12/11 18:50:01
early return is generally preferred:
if (!frame())
kenrb
2013/12/11 22:44:56
Done.
| |
562 if (frame()->platformLayer()) | |
563 GraphicsLayer::unregisterContentsLayer(frame()->platformLayer()); | |
564 if (webLayer) | |
565 GraphicsLayer::registerContentsLayer(webLayer); | |
566 frame()->setPlatformLayer(webLayer); | |
567 frame()->ownerElement()->setNeedsStyleRecalc(WebCore::SubtreeStyleChange , WebCore::StyleChangeFromRenderer); | |
eseidel
2013/12/11 18:50:01
I don't think you want to be scheduling your own s
kenrb
2013/12/11 22:44:56
The goal is to trigger a layout so that the new la
| |
568 } | |
569 } | |
570 | |
558 WebSize WebFrameImpl::scrollOffset() const | 571 WebSize WebFrameImpl::scrollOffset() const |
559 { | 572 { |
560 FrameView* view = frameView(); | 573 FrameView* view = frameView(); |
561 if (!view) | 574 if (!view) |
562 return WebSize(); | 575 return WebSize(); |
563 return view->scrollOffset(); | 576 return view->scrollOffset(); |
564 } | 577 } |
565 | 578 |
566 WebSize WebFrameImpl::minimumScrollOffset() const | 579 WebSize WebFrameImpl::minimumScrollOffset() const |
567 { | 580 { |
(...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2504 | 2517 |
2505 // There is a possibility that the frame being detached was the only | 2518 // There is a possibility that the frame being detached was the only |
2506 // pending one. We need to make sure final replies can be sent. | 2519 // pending one. We need to make sure final replies can be sent. |
2507 flushCurrentScopingEffort(m_findRequestIdentifier); | 2520 flushCurrentScopingEffort(m_findRequestIdentifier); |
2508 | 2521 |
2509 cancelPendingScopingEffort(); | 2522 cancelPendingScopingEffort(); |
2510 } | 2523 } |
2511 } | 2524 } |
2512 | 2525 |
2513 } // namespace blink | 2526 } // namespace blink |
OLD | NEW |