Re: I think XUL overlays should also ignore query strings.

2015-08-27 Thread Boris Zbarsky

On 8/17/15 2:06 PM, Philip Chee wrote:

Yes we now have a CloneIgnoringRef. How difficult is it to make a
clone-ignoring-query?


More difficult than one would assume, because any time nsIURI is changed 
we have to jump through hoops to keep the serialization/deserialization 
code in principals that sessionstore relies on happy.  It's doable, but 
it needs to be done pretty carefully...


-Boris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-17 Thread Philip Chee
On 16/08/2015 13:31, Anne van Kesteren wrote:
 On Sat, Aug 15, 2015 at 9:48 PM, Philip Chee philip.c...@gmail.com wrote:
 The first question that occurs to me is what is the rationale? Can we
 revisit this in 2015 to see if the original reason still holds?
 
 Well, we want to get rid of XUL. I'm not sure it makes much sense to
 revisit any of its design decisions at this point.

XUL isn't going away immediately. In the meantime my use cases are still
valid.

Phil

-- 
Philip Chee phi...@aleytys.pc.my, philip.c...@gmail.com
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-17 Thread Philip Chee
On 17/08/2015 02:56, Neil wrote:
 Philip Chee wrote:
 
 The first question that occurs to me is what is the rationale? Can
 we revisit this in 2015 to see if the original reason still holds?
 
 Back then ignoring the hash or the search were equally complicated; 
 nowadays ignoring the hash is relatively easy.

Yes we now have a CloneIgnoringRef. How difficult is it to make a
clone-ignoring-query? I mean for an experienced C++ developer and not a
C++ Dummies like myself.

Phil

-- 
Philip Chee phi...@aleytys.pc.my, philip.c...@gmail.com
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-17 Thread Philip Chee
On 17/08/2015 00:53, Adam Moore wrote:
 Seems like this has more to do with the overlay system than XUL
 itself. Losing the ability to add overlays to customize the browser
 chrome would be brutal, and a move away from XUL shouldn't be done at
 the expense of what the ecosystem provides today for people who need
 to customize the browser.

 On Sat, Aug 15, 2015 at 10:31 PM, Anne van Kesteren
 ann...@annevk.nl wrote:
 
 On Sat, Aug 15, 2015 at 9:48 PM, Philip Chee
 philip.c...@gmail.com wrote:
 The first question that occurs to me is what is the rationale?
 Can we revisit this in 2015 to see if the original reason still
 holds?
 
 Well, we want to get rid of XUL. I'm not sure it makes much sense
 to revisit any of its design decisions at this point.

The actual question I wanted to ask is: Are there any objections to me
or some other contributor to make overlays ignore query part as well?

 I think the ignorequery proposal would be really useful -- today,
 these customizations are bypassed if the user adds an arbitrary param
 to the uri, which rarely is what was intended.

After thinking about this for a bit I don't think we need an additional
flag. This is how I think it should work.

overlay foo.xul bar.xul
*1 Overlay code ignores query strings

overlay foo.xul?type=baz bar.xul
*2 Overlay code must match the whole URL including query string.

In the case of (2) the existing behaviour is unchanged.

1a. for overlaid items that don't normally take query strings the
existing behaviour is unchanged.

1b. foo.xul takes a query string but the developer doesn't include the
query string in their overlay. Overlays that didn't get applied now get
applied. But then this is probably what the developer wanted in the
first place.

Phil

-- 
Philip Chee phi...@aleytys.pc.my, philip.c...@gmail.com
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-17 Thread Valentin Gosu
On 17 August 2015 at 20:06, Philip Chee philip.c...@gmail.com wrote:

 On 17/08/2015 02:56, Neil wrote:
  Philip Chee wrote:
 
  The first question that occurs to me is what is the rationale? Can
  we revisit this in 2015 to see if the original reason still holds?
 
  Back then ignoring the hash or the search were equally complicated;
  nowadays ignoring the hash is relatively easy.

 Yes we now have a CloneIgnoringRef. How difficult is it to make a
 clone-ignoring-query? I mean for an experienced C++ developer and not a
 C++ Dummies like myself.


I don't know if this would solve the initial issue with XUL overlays, but
adding CloneIgnoringRef is definitely possible.
In the meantime, I think you can achieve the same result with the following
code:
nsCOMPtrnsIURL url = do_QueryInterface(uri);
url-SetQuery(EmptyCString());
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-17 Thread Gijs Kruitbosch

As others have said, XUL is going away.

It is not going away tomorrow.

We should be careful about if and how we invest here, so usecases are 
important.



On 15/08/2015 20:48, Philip Chee wrote:

Use case 1:

chrome://foo/content/bar.xul?a=bc=d
This could be written as
chrome://foo/content/bar.xul?c=da=b

So I would need to overlay both
chrome://foo/content/bar.xul?a=bc=d
chrome://foo/content/bar.xul?c=da=b


Which foo/bar are we talking about? I can't think of anything Firefox 
ships that uses querystrings for chrome:// URLs. This could be a problem 
for add-ons, but so far that is a theory, and you haven't provided a 
concrete example.



Use case 2:
about:config supports the following syntax:
about:config?filter=string
Where string could potentially be any valid UTF-8 string.


This functionality isn't exposed in any way. If I had a choice, I would 
sooner remove that functionality which, IMO, has very little if any 
usecases (websites can't link to about:config anyway, and nothing in 
chrome links to it, so this is just the difference of typing this in the 
address bar vs. typing it in the filter box).



These don't seem like particularly strong usecases for changing anything 
here.


~ Gijs
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-16 Thread Adam Moore
Seems like this has more to do with the overlay system than XUL itself.
Losing the ability to add overlays to customize the browser chrome would be
brutal, and a move away from XUL shouldn't be done at the expense of what
the ecosystem provides today for people who need to customize the browser.

I think the ignorequery proposal would be really useful -- today, these
customizations are bypassed if the user adds an arbitrary param to the uri,
which rarely is what was intended.

On Sat, Aug 15, 2015 at 10:31 PM, Anne van Kesteren ann...@annevk.nl
wrote:

 On Sat, Aug 15, 2015 at 9:48 PM, Philip Chee philip.c...@gmail.com
 wrote:
  The first question that occurs to me is what is the rationale? Can we
  revisit this in 2015 to see if the original reason still holds?

 Well, we want to get rid of XUL. I'm not sure it makes much sense to
 revisit any of its design decisions at this point.


 --
 https://annevankesteren.nl/
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-16 Thread Neil

Philip Chee wrote:


The first question that occurs to me is what is the rationale? Can we revisit 
this in 2015 to see if the original reason still holds?

Back then ignoring the hash or the search were equally complicated; 
nowadays ignoring the hash is relatively easy.


Anne van Kesteren wrote:


Philip Chee wrote:
 


Can we revisit this in 2015 to see if the original reason still holds?
   


Well, we want to get rid of XUL. I'm not sure it makes much sense to revisit 
any of its design decisions at this point.


Then why don't you object to bug 1034999?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-15 Thread Anne van Kesteren
On Sat, Aug 15, 2015 at 9:48 PM, Philip Chee philip.c...@gmail.com wrote:
 The first question that occurs to me is what is the rationale? Can we
 revisit this in 2015 to see if the original reason still holds?

Well, we want to get rid of XUL. I'm not sure it makes much sense to
revisit any of its design decisions at this point.


-- 
https://annevankesteren.nl/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform