The implementation details are specific to the driver.
But you can notice the isDisplayed method up here in RemoteWebElement.
The method looks like this:
public boolean isDisplayed() {
Object value = execute(DriverCommand.IS_ELEMENT_DISPLAYED, ImmutableMap.of("id", id)) .getValue();
try {
return (Boolean) value;
} catch (ClassCastException ex) {
throw new WebDriverException("Returned value cannot be converted to Boolean: " + value, ex);
}
}
And the line:
execute(DriverCommand.IS_ELEMENT_DISPLAYED, ImmutableMap.of("id", id))
is purely driver-specific, as each driver has its own implementation of handling this operation
For example the SafariDriver, which works with extensions, therefore you'll find the implementation on the extension side.