| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
     ights Reserved. | 2  * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
     ights Reserved. | 
| 3  * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
     bile.com/) | 3  * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
     bile.com/) | 
| 4  * | 4  * | 
| 5  * This library is free software; you can redistribute it and/or | 5  * This library is free software; you can redistribute it and/or | 
| 6  * modify it under the terms of the GNU Library General Public | 6  * modify it under the terms of the GNU Library General Public | 
| 7  * License as published by the Free Software Foundation; either | 7  * License as published by the Free Software Foundation; either | 
| 8  * version 2 of the License, or (at your option) any later version. | 8  * version 2 of the License, or (at your option) any later version. | 
| 9  * This library is distributed in the hope that it will be useful, | 9  * This library is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 33 #include "core/frame/FrameConsole.h" | 33 #include "core/frame/FrameConsole.h" | 
| 34 #include "core/frame/FrameHost.h" | 34 #include "core/frame/FrameHost.h" | 
| 35 #include "core/frame/FrameView.h" | 35 #include "core/frame/FrameView.h" | 
| 36 #include "core/frame/RemoteFrame.h" | 36 #include "core/frame/RemoteFrame.h" | 
| 37 #include "core/frame/RemoteFrameView.h" | 37 #include "core/frame/RemoteFrameView.h" | 
| 38 #include "core/frame/Settings.h" | 38 #include "core/frame/Settings.h" | 
| 39 #include "core/html/HTMLMediaElement.h" | 39 #include "core/html/HTMLMediaElement.h" | 
| 40 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" | 
| 41 #include "core/layout/LayoutView.h" | 41 #include "core/layout/LayoutView.h" | 
| 42 #include "core/layout/TextAutosizer.h" | 42 #include "core/layout/TextAutosizer.h" | 
|  | 43 #include "core/layout/svg/SVGResourcesCache.h" | 
| 43 #include "core/page/AutoscrollController.h" | 44 #include "core/page/AutoscrollController.h" | 
| 44 #include "core/page/ChromeClient.h" | 45 #include "core/page/ChromeClient.h" | 
| 45 #include "core/page/ContextMenuController.h" | 46 #include "core/page/ContextMenuController.h" | 
| 46 #include "core/page/DragController.h" | 47 #include "core/page/DragController.h" | 
| 47 #include "core/page/FocusController.h" | 48 #include "core/page/FocusController.h" | 
| 48 #include "core/page/PointerLockController.h" | 49 #include "core/page/PointerLockController.h" | 
| 49 #include "core/page/ValidationMessageClient.h" | 50 #include "core/page/ValidationMessageClient.h" | 
| 50 #include "core/page/scrolling/ScrollingCoordinator.h" | 51 #include "core/page/scrolling/ScrollingCoordinator.h" | 
| 51 #include "core/paint/PaintLayer.h" | 52 #include "core/paint/PaintLayer.h" | 
|  | 53 #include "platform/graphics/ColorSpaceProfile.h" | 
| 52 #include "platform/graphics/GraphicsLayer.h" | 54 #include "platform/graphics/GraphicsLayer.h" | 
|  | 55 #include "platform/graphics/GraphicsScreen.h" | 
| 53 #include "platform/plugins/PluginData.h" | 56 #include "platform/plugins/PluginData.h" | 
| 54 #include "public/platform/Platform.h" | 57 #include "public/platform/Platform.h" | 
| 55 | 58 | 
| 56 namespace blink { | 59 namespace blink { | 
| 57 | 60 | 
| 58 // static | 61 // static | 
| 59 WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& Page::allPages() | 62 WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& Page::allPages() | 
| 60 { | 63 { | 
| 61     DEFINE_STATIC_LOCAL(WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>
     >, allPages, ()); | 64     DEFINE_STATIC_LOCAL(WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>
     >, allPages, ()); | 
| 62     return allPages; | 65     return allPages; | 
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 321 | 324 | 
| 322     m_deviceScaleFactor = scaleFactor; | 325     m_deviceScaleFactor = scaleFactor; | 
| 323     setNeedsRecalcStyleInAllFrames(); | 326     setNeedsRecalcStyleInAllFrames(); | 
| 324 | 327 | 
| 325     if (mainFrame() && mainFrame()->isLocalFrame()) | 328     if (mainFrame() && mainFrame()->isLocalFrame()) | 
| 326         deprecatedLocalMainFrame()->deviceScaleFactorChanged(); | 329         deprecatedLocalMainFrame()->deviceScaleFactorChanged(); | 
| 327 } | 330 } | 
| 328 | 331 | 
| 329 void Page::setDeviceColorProfile(const Vector<char>& profile) | 332 void Page::setDeviceColorProfile(const Vector<char>& profile) | 
| 330 { | 333 { | 
| 331     // FIXME: implement. | 334     if (!RuntimeEnabledFeatures::imageColorProfilesEnabled()) | 
|  | 335         return; | 
|  | 336 | 
|  | 337     fprintf(stderr, "\nWebCore::Page %p setDeviceColorProfile begins\n", this); | 
|  | 338     fflush(stderr); | 
|  | 339 | 
|  | 340     setScreenColorProfile(reinterpret_cast<int64_t>(this), profile.data(), profi
     le.size()); | 
|  | 341 | 
|  | 342     setCurrentScreenId(reinterpret_cast<int64_t>(this)); | 
|  | 343 | 
|  | 344     for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
     ) { | 
|  | 345         if (!frame->isLocalFrame()) | 
|  | 346             continue; | 
|  | 347 | 
|  | 348         if (LayoutView* layoutView = toLocalFrame(frame)->document()->layoutView
     ()) | 
|  | 349             layoutView->invalidatePaintForViewAndCompositedLayers(true); | 
|  | 350 | 
|  | 351         // Clear the SVG pattern cache: see crbug.com/531258 | 
|  | 352         SVGResourcesCache::invalidateAllResources(*toLocalFrame(frame)->document
     ()); | 
|  | 353 | 
|  | 354         RELEASE_ASSERT(currentScreenId() == reinterpret_cast<int64_t>(this)); | 
|  | 355     } | 
|  | 356 | 
|  | 357     animator().scheduleVisualUpdate(); | 
|  | 358 | 
|  | 359     fprintf(stderr, "WebCore::Page %p setDeviceColorProfile ends\n\n", this); | 
|  | 360     fflush(stderr); | 
|  | 361 | 
|  | 362     setCurrentScreenId(0); | 
| 332 } | 363 } | 
| 333 | 364 | 
| 334 void Page::resetDeviceColorProfileForTesting() | 365 void Page::resetDeviceColorProfileForTesting() | 
| 335 { | 366 { | 
|  | 367     if (RuntimeEnabledFeatures::imageColorProfilesEnabled()) { | 
|  | 368         fprintf(stderr, "\nWebCore::Page %ld resetDeviceColorProfileForTesting\n
     ", (long int)this); | 
|  | 369         fflush(stderr); | 
|  | 370     } | 
|  | 371 | 
|  | 372     removeScreenColorProfile(reinterpret_cast<int64_t>(this)); | 
|  | 373 | 
| 336     RuntimeEnabledFeatures::setImageColorProfilesEnabled(false); | 374     RuntimeEnabledFeatures::setImageColorProfilesEnabled(false); | 
| 337 } | 375 } | 
| 338 | 376 | 
| 339 void Page::allVisitedStateChanged() | 377 void Page::allVisitedStateChanged() | 
| 340 { | 378 { | 
| 341     for (const Page* page : ordinaryPages()) { | 379     for (const Page* page : ordinaryPages()) { | 
| 342         for (Frame* frame = page->m_mainFrame; frame; frame = frame->tree().trav
     erseNext()) { | 380         for (Frame* frame = page->m_mainFrame; frame; frame = frame->tree().trav
     erseNext()) { | 
| 343             if (frame->isLocalFrame()) | 381             if (frame->isLocalFrame()) | 
| 344                 toLocalFrame(frame)->document()->visitedLinkState().invalidateSt
     yleForAllLinks(); | 382                 toLocalFrame(frame)->document()->visitedLinkState().invalidateSt
     yleForAllLinks(); | 
| 345         } | 383         } | 
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 592     if (m_memoryPurgeController) | 630     if (m_memoryPurgeController) | 
| 593         m_memoryPurgeController->unregisterClient(this); | 631         m_memoryPurgeController->unregisterClient(this); | 
| 594 #endif | 632 #endif | 
| 595 | 633 | 
| 596     if (m_scrollingCoordinator) | 634     if (m_scrollingCoordinator) | 
| 597         m_scrollingCoordinator->willBeDestroyed(); | 635         m_scrollingCoordinator->willBeDestroyed(); | 
| 598 | 636 | 
| 599     chromeClient().chromeDestroyed(); | 637     chromeClient().chromeDestroyed(); | 
| 600     if (m_validationMessageClient) | 638     if (m_validationMessageClient) | 
| 601         m_validationMessageClient->willBeDestroyed(); | 639         m_validationMessageClient->willBeDestroyed(); | 
|  | 640 | 
|  | 641     removeScreenColorProfile(reinterpret_cast<int64_t>(this)); | 
| 602     m_mainFrame = nullptr; | 642     m_mainFrame = nullptr; | 
| 603 | 643 | 
| 604     Page::notifyContextDestroyed(); | 644     Page::notifyContextDestroyed(); | 
| 605 } | 645 } | 
| 606 | 646 | 
| 607 Page::PageClients::PageClients() | 647 Page::PageClients::PageClients() | 
| 608     : chromeClient(nullptr) | 648     : chromeClient(nullptr) | 
| 609     , contextMenuClient(nullptr) | 649     , contextMenuClient(nullptr) | 
| 610     , editorClient(nullptr) | 650     , editorClient(nullptr) | 
| 611     , dragClient(nullptr) | 651     , dragClient(nullptr) | 
| 612     , spellCheckerClient(nullptr) | 652     , spellCheckerClient(nullptr) | 
| 613 { | 653 { | 
| 614 } | 654 } | 
| 615 | 655 | 
| 616 Page::PageClients::~PageClients() | 656 Page::PageClients::~PageClients() | 
| 617 { | 657 { | 
| 618 } | 658 } | 
| 619 | 659 | 
| 620 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; | 660 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; | 
| 621 | 661 | 
| 622 } // namespace blink | 662 } // namespace blink | 
| OLD | NEW | 
|---|