Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 { 2510 {
2511 LayoutObject* layoutObject = node->layoutObject(); 2511 LayoutObject* layoutObject = node->layoutObject();
2512 if (!layoutObject) 2512 if (!layoutObject)
2513 return false; 2513 return false;
2514 PaintLayer* layer = layoutObject->enclosingLayer(); 2514 PaintLayer* layer = layoutObject->enclosingLayer();
2515 if (!layer) 2515 if (!layer)
2516 return false; 2516 return false;
2517 ScrollableArea* scrollableArea = layer->scrollableArea(); 2517 ScrollableArea* scrollableArea = layer->scrollableArea();
2518 if (!scrollableArea) 2518 if (!scrollableArea)
2519 return false; 2519 return false;
2520 ScrollAnimatorBase* animator = layer->scrollableArea()->scrollAnimator(); 2520 return layer->scrollableArea()->scrollAnimator().setScrollbarsVisibleForTest ing(visible);
2521 if (!animator)
2522 return false;
2523
2524 return animator->setScrollbarsVisibleForTesting(visible);
2525 } 2521 }
2526 2522
2527 void Internals::forceRestrictIFramePermissions() 2523 void Internals::forceRestrictIFramePermissions()
2528 { 2524 {
2529 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); 2525 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
2530 } 2526 }
2531 2527
2532 double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, Exce ptionState& exceptionState) 2528 double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, Exce ptionState& exceptionState)
2533 { 2529 {
2534 Document* document = contextDocument(); 2530 Document* document = contextDocument();
(...skipping 13 matching lines...) Expand all
2548 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e)); 2544 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e));
2549 } 2545 }
2550 2546
2551 // TODO(liberato): remove once autoplay gesture override experiment concludes. 2547 // TODO(liberato): remove once autoplay gesture override experiment concludes.
2552 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) 2548 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element)
2553 { 2549 {
2554 element->triggerAutoplayViewportCheckForTesting(); 2550 element->triggerAutoplayViewportCheckForTesting();
2555 } 2551 }
2556 2552
2557 } // namespace blink 2553 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp ('k') | third_party/WebKit/Source/platform/Widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698