|
|
Created:
8 years, 9 months ago by chebert Modified:
8 years, 8 months ago CC:
rdevlin.cronin_gmail.com, mitchellwrosen, clark.duvall, clintstaley Base URL:
http://git.chromium.org/chromium/src.git@master Visibility:
Public. |
Description3D CSS webkit effects were not fully functional, as the compositor is disabled for the Chrome UI. So instead of using the VirtualURL, we use the URL.
BUG=114652
TEST=Use extension that replaces new tab page and uses webkit CSS 3D effects
-webkit-transform and -webkit-backface-hidden
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127177
Patch Set 1 #Patch Set 2 : Moved GetURL call to GetWebkitPrefs #Patch Set 3 : Robust code. #Patch Set 4 : Final changes #
Total comments: 2
Patch Set 5 : Comment changed. #
Total comments: 2
Patch Set 6 : Style fix. #Messages
Total messages: 26 (0 generated)
GetWebkitPrefs() now uses GetURL() instaed of GetVirtualURL() since the compositor is disabled for the Chrome UI scheme.
I have no idea what the consequences of this change are. John? Also, please use a meaningful comment as the description.
Sorry for the many patches. In the future I will be more careful. After some more investigation. I decided it would have a much smaller impact on the overall code-base if I moved the called the controller_.GetActiveEntry()->GetURL() method directly from the GetWebkitPrefs() method. Thank you for your time reviewing this.
I still don't know enough to review this. aa?
Looks correct to me. Christopher, can you verify that: a) You saw the bug without this change b) You didn't see the bug with the change c) The URL in the bug case was chrome://<something> and the Virtual URL was chrome-extension://<something>
LGTM assuming a, b, and c are correct (I would ask for a test, but I don't think it is possible to programmatically test whether a 3d effect was actually applied)
I don't know enough about the different between GetVirtualURL() and GetURL(). I'll defer to Brett
On 2012/03/09 07:04:58, Aaron Boodman wrote: > LGTM assuming a, b, and c are correct > > (I would ask for a test, but I don't think it is possible to programmatically > test whether a 3d effect was actually applied) a) (Done.) b) (Done.) c) For c, I am getting the reverse of what you are saying. URL: chrome-extension://gmakclhlaohagmomceoonfkmjfapfbca/bug%20example.html Virtual URL: chrome://newtab/ From what I have read, it seems to me like the Virtual URL would be a simplified (nice-looking) version of the real URL. Did you perhaps mean to say that the URL would be chrome-extension://<something> and the Virtual URL would be chrome://<something> ?
On 2012/03/10 19:11:40, chebert wrote: > From what I have read, it seems to me like the Virtual URL would be a simplified > (nice-looking) version of the real URL. > Did you perhaps mean to say that the URL would be chrome-extension://<something> > and the Virtual URL would be chrome://<something> ? Yeah, that's what I meant. LGTM
adding brettw
This doesn't seem right. Doesn't this have the effect of enabling the compositor for chrome: pages? If that's what we want to do, shouldn't we enable the compositor on chrome pages rather than faking what URL to use at some random other layer? And the point of disabling the compositor for chrome pages was, I believe, that we specifically did not want the compositor enabled for the new tab page since this causes another process spin-up.
From the patch, I don't see how this is limited to extensions. And if it did, this isn't the right place.
It appears most of the virtual URLs have gone away. It used to be if you went to "about:plugins" the actual URL would be "chrome://plugins" but we would keep the virtual URL as "about:plugins" so that's what the user would see. It looks like we've removed most of these cases. Looking through the code, it looks like virtual URLs are still used for interstitials and view-source. I guess neither of these matter for this case, so maybe it's OK to key off of the real URL. I don't actually see any reason for the static GetWebKitPrefs, do you? Code search doesn't come up with any callers. I wonder if we can just move all of the static code into the member function and then get the URL we need out of the navigation entry when we need it. This will give us more flexibility in implementing these policies since all URLs will be accessible, and we'll have one less function.
When I was compiling, I noticed that interstitial_page_impl.cc makes a call to the static implementation of GetWebkitPrefs on its tab_ object. What do we want to do about this?
I seem, poop. Okay, let's go with your original patch then, but can you put a comment where we call GetWebKitPrefs that we want to base compositing off of the real URL of the page, rather than the display URL?
And would you also mind changing the static call in the interstitial page code to TabContents::GetWebKitPrefs so it's more clear this is the static version? That's what tripped me up on this.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/96520...
Presubmit check for 9652022-12001 failed and returned exit status 1. Running presubmit commit checks ... ** Presubmit ERRORS ** Missing LGTM from an OWNER for files in these directories: content/browser
LGTM with comment change. http://codereview.chromium.org/9652022/diff/12001/content/browser/tab_content... File content/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/9652022/diff/12001/content/browser/tab_content... content/browser/tab_contents/tab_contents.cc:2297: // We want to base compositing off the real URL, rather than the display URL. "compositing" -> this code has nothing to do with compositing. You should say "We want to base the page config off of..." or something like that.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/96520...
Failed to request the patch to try. Please note that binary filesare still unsupported at the moment, this is being worked on. Thanks for your patience. HTTP Error 500: <html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>500 Server Error</title> </head> <body text=#000000 bgcolor=#ffffff> <h1>Error: Server Error</h1> <h2>The server encountered an error and could not complete your request.<p>If the problem persists, please <A HREF="http://code.google.com/appengine/community.html">report</A> your problem and mention this error message and the query that caused it.</h2> <h2></h2> </body></html>
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/96520...
Change committed as 127177
http://codereview.chromium.org/9652022/diff/19001/content/browser/tab_content... File content/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/9652022/diff/19001/content/browser/tab_content... content/browser/tab_contents/tab_contents.cc:2323: GURL url = controller_.GetActiveEntry() operators go at end of line, not beginning of new line
Thanks again for the review! http://codereview.chromium.org/9652022/diff/12001/content/browser/tab_content... File content/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/9652022/diff/12001/content/browser/tab_content... content/browser/tab_contents/tab_contents.cc:2297: // We want to base compositing off the real URL, rather than the display URL. On 2012/03/15 19:02:10, brettw wrote: > "compositing" -> this code has nothing to do with compositing. You should say > "We want to base the page config off of..." or something like that. Done. http://codereview.chromium.org/9652022/diff/19001/content/browser/tab_content... File content/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/9652022/diff/19001/content/browser/tab_content... content/browser/tab_contents/tab_contents.cc:2323: GURL url = controller_.GetActiveEntry() On 2012/03/19 21:47:15, Evan Stade wrote: > operators go at end of line, not beginning of new line Done. |