flow - Dave's Blog

Search
My timeline on Mastodon

Scrollbars in EdgeHtml WebView and Edge browser

2019 Aug 22, 5:35

The scrollbars in UWP WebView and in Edge have different default behavior leading to many emails to my team. (Everything I talk about here is for the EdgeHtml based WebView and Edge browser and does not apply to the Chromium based Edge browser and WebView2).

There is a Edge only -ms-overflow-style CSS property that controls scroll behavior. We have a different default for this in the WebView as compared to the Edge browser. If you want the appearance of the scrollbar in the WebView to match the browser then you must explicitly set that CSS property. The Edge browser default is scrollbar which gives us a Windows desktop styled non-auto-hiding scrollbar. The WebView default is -ms-autohiding-scrollbar which gives a sort of compromise between desktop and UWP app scrollbar behavior. In this configuration it is auto-hiding. When used with the mouse you'll get Windows desktop styled scrollbars and when used with touch you'll get the UWP styled scrollbars.

Since WebViews are intended to be used in apps this style is the default in order to better match the app's scrollbars. However this difference between the browser and WebView has led to confusion.

Here’s an -ms-overflow-style JSFiddle showing the difference between the two styles. Try it in the Edge browser and in WebView. An easy way to try it in the Edge WebView is using the JavaScript Browser.

PermalinkComments

Tweet from David Risney

2016 Apr 26, 4:03
Use -Verbose in your .ps1: add [CmdletBinding()] to the top then use Write-Verbose "msg" http://stackoverflow.com/a/11275302?stw=2 
PermalinkComments

Tweet from David_Risney

2015 Mar 3, 11:27
StackOverflow Qs on the little known C++ "operators" --> and =! http://stackoverflow.com/questions/1642028 … http://stackoverflow.com/questions/21029174 …
PermalinkComments

ios - Capture image via captureStillImageAsynchronouslyFromConnection with no shutter sound - Stack Overflow

2014 May 24, 2:42

The best hack I’ve seen in a while. With no way to disable the shutter sound from the capture photo API, the developer creates the inverse waveform of the shutter sound and plays it at the same time to cancel out the shutter sound.

PermalinkCommentstechnical humor ios photo sound

laughingsquid: Time Travel in Movies Flowchart

2013 Apr 15, 3:41


laughingsquid:

Time Travel in Movies Flowchart

PermalinkCommentstime-travel movies chart movie bttf

math - What is JavaScript's Max Int? What's the highest Integer value a Number can go to without losing precision? - Stack Overflow

2013 Feb 5, 11:23

In JavaScript numbers are 64bit floating point numbers which have 53 bits of mantissa. That means you can accurately represent [-2^53, 2^53] as integers in JavaScript. Aka [-9007199254740992, 9007199254740992].

PermalinkCommentsjavascript math integer technical programming

Patent Office tries “Stack Overflow for patents” to find prior art | Ars Technica

2012 Sep 20, 2:27

Welcome news. Glad to hear they’re looking for improvements.

… the USPTO has also worked with Stack Exchange, … to create a new site called Ask Patents. … Examiners or others looking for prior art can post questions about a specific application, and members of the general public can respond with evidence that an applicant was not the first to invent the subject matter of the application.

PermalinkCommentsip law patent stack-exchange technical uspto

HTTP Compression Documentation Reference

2012 Jun 13, 3:08
There's a lot of name reuse in HTTP compression so I've made the following to help myself keep it straight.
HTTP Content Coding Token gzip deflate compress
An encoding format produced by the file compression program "gzip" (GNU zip) The "zlib" format as described in RFC 1950. The encoding format produced by the common UNIX file compression program "compress".
Data Format GZIP file format ZLIB Compressed Data Format The compress program's file format
Compression Method Deflate compression method LZW
Deflate consists of LZ77 and Huffman coding

Compress doesn't seem to be supported by popular current browsers, possibly due to its past with patents.

Deflate isn't done correctly all the time. Some servers would send the deflate data format instead of the zlib data format and at least some versions of Internet Explorer expect deflate data format instead of zlib data format.

PermalinkCommentscompress compression deflate gzip http http-header technical zlib

A Dad’s Plea To Developers Of iPad Apps For Children (smashingmagazine.com)

2012 Mar 12, 7:02

Set of issues run into by children using iPad apps.  Should be generally appropriate though:

Designing apps for children is extremely hard. Not only is quality, age-appropriate content hard to create, but designing the flow and interaction of these apps is made more difficult because designers must refrain from implementing advanced gestures, which would only confuse and frustrate kids (and, by extension, their parents). Yet all apps can and should adhere to certain basics. Hopefully, the four guidelines discussed here can become fixtures of all children’s apps.

PermalinkCommentstechnical ui ipad design children programming

Musée McCord Museum’s photostream on Flickr.

2012 Jan 15, 10:37


Foot race, Dawson City, YT, about 1900Cricket match, McGill campus, Montreal, QC, about 1890Football game on campus, McGill University, Montreal, QC, about 1900S. S. "Nascopie" at sealing grounds, 1927

Musée McCord Museum’s photostream on Flickr.

PermalinkCommentsphoto old-timey black-and-white history

Show request's timestamp in Fiddler? - Stack Overflow

2012 Jan 13, 2:33PermalinkCommentstechnical fiddler http debug tool timestamp

Bug Spotting: Ctors with default parameters

2011 Dec 1, 4:59

The following code compiled just fine but did not at all act in the manner I expected:

BOOL CheckForThing(__in CObj *pObj, __in IFigMgr* pFigMgr, __in_opt LPCWSTR url)
{
BOOL fCheck = FALSE;
if (SubCheck(pObj))
{
...
I’m calling SubCheck which looks like:
bool SubCheck(const CObj& obj);

Did you spot the bug? As you can see I should be passing in *pObj not pObj since the method takes a const CObj& not a CObj*. But then why does it compile?

It works because CObj has a constructor with all but one param with default values and CObj is derived from IUnknown:

CObj(__in_opt IUnknown * pUnkOuter, __in_opt LPCWSTR pszUrl = NULL);
Accordingly C++ uses this constructor as an implicit conversion operator. So instead of passing in my CObj, I end up creating a new CObj on the stack passing in the CObj I wanted as the outer object which has a number of issues.

The lesson is unless you really want this behavior, don't make constructors with all but 1 or 0 default parameters. If you need to do that consider using the 'explicit' keyword on the constructor.

More info about forcing single argument constructors to be explicit is available on stack overflow.

PermalinkCommentsc++ technical bug programming

Bug Spotting: Smart pointers and parameter evaluation order

2011 Oct 19, 5:58PermalinkCommentsc++ technical bug programming smart-pointer cpp

What are all the common undefined behaviour that a C++ programmer should know about? - Stack Overflow

2011 May 2, 7:33I recalled that the order of function/method parameter evaluation was not specified by C++ standard, but I didn't know the more general rule and the associated implications for the double check locking construct. Interesting.PermalinkCommentstechnical c++ programming

Flowchart: Understanding the Web, for Fans of Charles Dickens | Fast Company

2010 Oct 28, 8:26Time travel, flow charts, and humor.PermalinkCommentsflowchart time-travel humor image

Microsoft sends flowers to Internet Explorer 6 funeral

2010 Mar 4, 10:58IE team sends flowers to the IE6 funeral. Humorous.
PermalinkCommentshumor funeral ie ie6 web browser microsoft

WPAD Server Fiddler Extension

2010 Jan 5, 7:42

I've made a WPAD server Fiddler extension and in a fit of creativity I've named it: WPAD Server Fiddler Extension.

Of course you know about Fiddler, Eric's awesome HTTP debugger tool, the HTTP proxy that lets you inspect, visualize and modify the HTTP traffic that flows through it. And on the subject you've probably definitely heard of WPAD, the Web Proxy Auto Discovery protocol that allows web browsers like IE to use DHCP or DNS to automatically discover HTTP proxies on their network. While working on a particularly nasty WPAD bug towards the end of IE8 I really wished I had a way to see the WPAD requests and responses and modify PAC responses in Fiddler. Well the wishes of me of the past are now fulfilled by present day me as this Fiddler extension will respond to WPAD DHCP requests telling those clients (by default) that Fiddler is their proxy.

When I started working on this project I didn't really understand how DHCP worked especially with respect to WPAD. I won't bore you with my misconceptions: it works by having your one DHCP server on your network respond to regular DHCP requests as well as WPAD DHCP requests. And Windows I've found runs a DHCP client service (you can start/stop it via Start|Run|'services.msc', scroll to DHCP Client or via the command line with "net start/stop 'DHCP Client'") that caches DHCP server responses making it just slightly more difficult to test and debug my extension. If a Windows app uses the DHCP client APIs to ask for the WPAD option, this service will send out a DHCP request and take the first DHCP server response it gets. That means that if you're on a network with a DHCP server, my extension will be racing to respond to the client. If the DHCP server wins then the client ignores the WPAD response from my extension.

Various documents and tools I found useful while working on this:

PermalinkCommentsproxy fiddler http technical debug wpad pac tool dhcp

Life Expectancy in America | FlowingData

2009 Oct 6, 2:40Changes in life expectancy in America - with graphs!PermalinkCommentsvisualization statistics life-expectancy health america age

Flowers Installed

2009 Sep 27, 11:28

sequelguy posted a photo:

Flowers Installed

Sarah planted the flowers in the yard

PermalinkCommentsflowers sarah yard

Flowers Pre-Installation

2009 Sep 27, 11:28

sequelguy posted a photo:

Flowers Pre-Installation

PermalinkCommentsflowers
Older Entries Creative Commons License Some rights reserved.