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

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

Issue 300223009: Implement basic parts of hit regions on canvas2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: take clipRegion into account Created 6 years, 6 months 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "core/frame/EventHandlerRegistry.h" 82 #include "core/frame/EventHandlerRegistry.h"
83 #include "core/frame/FrameView.h" 83 #include "core/frame/FrameView.h"
84 #include "core/frame/LocalFrame.h" 84 #include "core/frame/LocalFrame.h"
85 #include "core/frame/Settings.h" 85 #include "core/frame/Settings.h"
86 #include "core/html/HTMLContentElement.h" 86 #include "core/html/HTMLContentElement.h"
87 #include "core/html/HTMLIFrameElement.h" 87 #include "core/html/HTMLIFrameElement.h"
88 #include "core/html/HTMLInputElement.h" 88 #include "core/html/HTMLInputElement.h"
89 #include "core/html/HTMLMediaElement.h" 89 #include "core/html/HTMLMediaElement.h"
90 #include "core/html/HTMLSelectElement.h" 90 #include "core/html/HTMLSelectElement.h"
91 #include "core/html/HTMLTextAreaElement.h" 91 #include "core/html/HTMLTextAreaElement.h"
92 #include "core/html/canvas/CanvasRenderingContext2D.h"
92 #include "core/html/forms/FormController.h" 93 #include "core/html/forms/FormController.h"
93 #include "core/html/shadow/ShadowElementNames.h" 94 #include "core/html/shadow/ShadowElementNames.h"
94 #include "core/html/shadow/TextControlInnerElements.h" 95 #include "core/html/shadow/TextControlInnerElements.h"
95 #include "core/inspector/InspectorClient.h" 96 #include "core/inspector/InspectorClient.h"
96 #include "core/inspector/InspectorConsoleAgent.h" 97 #include "core/inspector/InspectorConsoleAgent.h"
97 #include "core/inspector/InspectorController.h" 98 #include "core/inspector/InspectorController.h"
98 #include "core/inspector/InspectorCounters.h" 99 #include "core/inspector/InspectorCounters.h"
99 #include "core/inspector/InspectorFrontendChannel.h" 100 #include "core/inspector/InspectorFrontendChannel.h"
100 #include "core/inspector/InspectorInstrumentation.h" 101 #include "core/inspector/InspectorInstrumentation.h"
101 #include "core/inspector/InspectorOverlay.h" 102 #include "core/inspector/InspectorOverlay.h"
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 webtype = blink::ConnectionTypeOther; 2369 webtype = blink::ConnectionTypeOther;
2369 } else if (type == "none") { 2370 } else if (type == "none") {
2370 webtype = blink::ConnectionTypeNone; 2371 webtype = blink::ConnectionTypeNone;
2371 } else { 2372 } else {
2372 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type)); 2373 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type));
2373 return; 2374 return;
2374 } 2375 }
2375 networkStateNotifier().setWebConnectionTypeForTest(webtype); 2376 networkStateNotifier().setWebConnectionTypeForTest(webtype);
2376 } 2377 }
2377 2378
2379 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context)
2380 {
2381 if (!context)
2382 return -1;
2383
2384 return context->hitRegionsCount();
2385 }
2386
2378 } // namespace WebCore 2387 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698