MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / setStateByFlag

Function setStateByFlag

cpp/webdriver-interactions/event_firing_thread.cpp:108–125  ·  view source on GitHub ↗

Helper method to update the state of a given flag according to a toggle.

Source from the content-addressed store, hash-verified

106
107// Helper method to update the state of a given flag according to a toggle.
108static void setStateByFlag(bool shouldSetFlag, UINT flagValue)
109{
110 if (!gEnablePersistentEventFiring) {
111 // Persistent event firing is disabled.
112 return;
113 }
114 if ((hConstantEventsThread == NULL) || (EVENT_FIRING_DATA == NULL)) {
115 return;
116 }
117
118 WPARAM currentInputState = EVENT_FIRING_DATA->getInputDevicesState();
119 if (shouldSetFlag) {
120 currentInputState |= flagValue;
121 } else {
122 currentInputState = currentInputState & (~flagValue);
123 }
124 EVENT_FIRING_DATA->setInputDevicesState(currentInputState);
125}
126
127void updateShiftKeyState(bool isShiftPressed)
128{

Callers 2

updateShiftKeyStateFunction · 0.85

Calls 2

getInputDevicesStateMethod · 0.80
setInputDevicesStateMethod · 0.80

Tested by

no test coverage detected