Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 191565 Details for
Bug 130078
[patch]
fix
patch (text/plain), 12.08 KB, created by
Robert O'Callahan (:roc) (email my personal email if necessary)
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Robert O'Callahan (:roc) (email my personal email if necessary)
Size:
12.08 KB
patch
obsolete
>Index: layout/base/nsDocumentViewer.cpp >=================================================================== >RCS file: /home/rocallahan/mozilla-cvs-mirror/mozilla/layout/base/nsDocumentViewer.cpp,v >retrieving revision 1.441 >diff -u -t -p -1 -2 -r1.441 nsDocumentViewer.cpp >--- layout/base/nsDocumentViewer.cpp 30 Jul 2005 20:57:07 -0000 1.441 >+++ layout/base/nsDocumentViewer.cpp 4 Aug 2005 05:02:41 -0000 >@@ -2101,55 +2101,24 @@ DocumentViewerImpl::MakeWindow(nsIWidget > // Reset the bounds offset so the root view is set to 0,0. The > // offset is specified in nsIViewManager::Init above. > // Besides, layout will reset the root view to (0,0) during reflow, > // so changing it to 0,0 eliminates placing the root view in the > // wrong place initially. > tbounds.x = 0; > tbounds.y = 0; > > // Create a child window of the parent that is our "root view/window" > // if aParentWidget has a view, we'll hook our view manager up to its view tree > nsIView* containerView = nsView::GetViewFor(aParentWidget); > >- if (containerView) { >- // see if the containerView has already been hooked into a foreign view manager hierarchy >- // if it has, then we have to hook into the hierarchy too otherwise bad things will happen. >- nsIViewManager* containerVM = containerView->GetViewManager(); >- nsIView* pView = containerView; >- do { >- pView = pView->GetParent(); >- } while (pView && pView->GetViewManager() == containerVM); >- >- if (!pView) { >- // OK, so the container is not already hooked up into a foreign view manager hierarchy. >- // That means we can choose not to hook ourselves up. >- // >- // If the parent container is a chrome shell then we won't hook into its view >- // tree. This will improve performance a little bit (especially given scrolling/painting perf bugs) >- // but is really just for peace of mind. This check can be removed if we want to support fancy >- // chrome effects like transparent controls floating over content, transparent Web browsers, and >- // things like that, and the perf bugs are fixed. >- nsCOMPtr<nsIDocShellTreeItem> container(do_QueryReferent(mContainer)); >- nsCOMPtr<nsIDocShellTreeItem> parentContainer; >- PRInt32 itemType; >- if (nsnull == container >- || NS_FAILED(container->GetParent(getter_AddRefs(parentContainer))) >- || nsnull == parentContainer >- || NS_FAILED(parentContainer->GetItemType(&itemType)) >- || itemType != nsIDocShellTreeItem::typeContent) { >- containerView = nsnull; >- } >- } >- } >- > // Create a view > nsIView* view = mViewManager->CreateView(tbounds, containerView); > if (!view) > return NS_ERROR_OUT_OF_MEMORY; > > // pass in a native widget to be the parent widget ONLY if the view hierarchy will stand alone. > // otherwise the view will find its own parent widget and "do the right thing" to > // establish a parent/child widget relationship > rv = view->CreateWidget(kWidgetCID, nsnull, > containerView != nsnull ? nsnull : aParentWidget->GetNativeData(NS_NATIVE_WIDGET), > PR_TRUE, PR_FALSE); > if (NS_FAILED(rv)) >Index: toolkit/content/widgets/browser.xml >=================================================================== >RCS file: /home/rocallahan/mozilla-cvs-mirror/mozilla/toolkit/content/widgets/browser.xml,v >retrieving revision 1.68 >diff -u -t -p -1 -2 -r1.68 browser.xml >--- toolkit/content/widgets/browser.xml 25 Jul 2005 22:09:38 -0000 1.68 >+++ toolkit/content/widgets/browser.xml 4 Aug 2005 05:02:41 -0000 >@@ -303,25 +303,25 @@ > > <property name="contentDocument" > onget="return this.webNavigation.document;" > readonly="true"/> > > <property name="contentTitle" > onget="return Components.lookupMethod(this.contentDocument, 'title').call(this.contentDocument);" > readonly="true"/> > > <field name="mPrefs" readonly="true"> > Components.classes['@mozilla.org/preferences-service;1'] > .getService(Components.interfaces.nsIPrefService) >- .getBranch(null); >+ .getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); > </field> > > <field name="mAtomService" readonly="true"> > Components.classes['@mozilla.org/atom-service;1'] > .getService(Components.interfaces.nsIAtomService); > </field> > > <field name="_mStrBundle">null</field> > > <property name="mStrBundle"> > <getter> > <![CDATA[ >@@ -561,24 +561,27 @@ > catch (e) { > } > try { > var securityUI = this.securityUI; > } > catch (e) { > } > > // Listen for first load for lazy attachment to form fill controller > this.addEventListener("pageshow", this.onPageShow, true); > this.addEventListener("pagehide", this.onPageHide, true); > this.addEventListener("DOMPopupBlocked", this.onPopupBlocked, false); >+ >+ mPrefs.addObserver("browser.display.background_color", this, false); >+ this.observe(null, "nsPref:changed", "browser.display.background_color"); > ]]> > </constructor> > > <destructor> > <![CDATA[ > this.destroy(); > ]]> > </destructor> > > <!-- This is necessary because the destructor doesn't always get called when > we are removed from a tabbrowser. This will be explicitly called by tabbrowser --> > <method name="destroy"> >@@ -601,34 +604,40 @@ > this.mDragDropHandler.detach(); > this.mDragDropHandler = null; > > this.detachFormFill(); > > this.securityUI = null; > this._fastFind = null; > this._webBrowserFind = null; > > this.removeEventListener("pageshow", this.onPageShow, true); > this.removeEventListener("pagehide", this.onPageHide, true); > this.removeEventListener("DOMPopupBlocked", this.onPopupBlocked, true); >+ this.mPrefs.removeObserver("browser.display.background_color", this); > ]]> > </body> > </method> > > <method name="observe"> > <parameter name="aSubject"/> > <parameter name="aTopic"/> > <parameter name="aState"/> > <body> > <![CDATA[ >+ if (aTopic == "nsPref:changed" && aState == "browser.display.background_color") { >+ this.style.backgroundColor = this.mPrefs.getCharPref("browser.display.background_color"); >+ return; >+ } >+ > if (aTopic != "browser:purge-session-history") > return; > > // place the entry at current index at the end of the history list, so it won't get removed > if (this.sessionHistory.index < this.sessionHistory.count - 1) { > var indexEntry = this.sessionHistory.getEntryAtIndex(this.sessionHistory.index, false); > this.sessionHistory.QueryInterface(Components.interfaces.nsISHistoryInternal); > indexEntry.QueryInterface(Components.interfaces.nsISHEntry); > this.sessionHistory.addEntry(indexEntry, true); > } > > var purge = this.sessionHistory.count; >Index: xpfe/global/resources/content/bindings/browser.xml >=================================================================== >RCS file: /home/rocallahan/mozilla-cvs-mirror/mozilla/xpfe/global/resources/content/bindings/browser.xml,v >retrieving revision 1.40 >diff -u -t -p -1 -2 -r1.40 browser.xml >--- xpfe/global/resources/content/bindings/browser.xml 28 Jul 2005 13:44:23 -0000 1.40 >+++ xpfe/global/resources/content/bindings/browser.xml 4 Aug 2005 05:02:55 -0000 >@@ -33,25 +33,25 @@ > - decision by deleting the provisions above and replace them with the notice > - and other provisions required by the GPL or the LGPL. If you do not delete > - the provisions above, a recipient may use your version of this file under > - the terms of any one of the MPL, the GPL or the LGPL. > - > - ***** END LICENSE BLOCK ***** --> > > <bindings id="browserBindings" > xmlns="http://www.mozilla.org/xbl" > xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> > > <binding id="browser" extends="xul:browser"> >- <implementation type="application/x-javascript" implements="nsIAccessibleProvider"> >+ <implementation type="application/x-javascript" implements="nsIAccessibleProvider, nsIObserver"> > <property name="accessible"> > <getter> > <![CDATA[ > var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService); > return accService.createOuterDocAccessible(this); > ]]> > </getter> > </property> > > <property name="canGoBack" > onget="return this.webNavigation.canGoBack;" > readonly="true"/> >@@ -247,25 +247,25 @@ > > <property name="contentDocument" > onget="return this.webNavigation.document;" > readonly="true"/> > > <property name="contentTitle" > onget="return this.contentDocument.title;" > readonly="true"/> > > <field name="mPrefs" readonly="true"> > Components.classes['@mozilla.org/preferences-service;1'] > .getService(Components.interfaces.nsIPrefService) >- .getBranch(null); >+ .getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); > </field> > > <field name="mAtomService" readonly="true"> > Components.classes['@mozilla.org/atom-service;1'] > .getService(Components.interfaces.nsIAtomService); > </field> > > <field name="_mStrBundle">null</field> > > <property name="mStrBundle"> > <getter> > <![CDATA[ >@@ -353,24 +353,27 @@ > catch (e) { > } > try { > const SECUREBROWSERUI_CONTRACTID = "@mozilla.org/secure_browser_ui;1"; > if (!this.hasAttribute("disablesecurity") && > SECUREBROWSERUI_CONTRACTID in Components.classes) { > var securityUI = Components.classes[SECUREBROWSERUI_CONTRACTID].createInstance(Components.interfaces.nsISecureBrowserUI); > securityUI.init(this.contentWindow); > } > } > catch (e) { > } >+ >+ mPrefs.addObserver("browser.display.background_color", this, false); >+ this.observe(null, "nsPref:changed", "browser.display.background_color"); > ]]> > </constructor> > > <destructor> > <![CDATA[ > this.destroy(); > ]]> > </destructor> > > <!-- This is necessary because the destructor is not called > promptly when we are removed from a tabbrowser. This will be > explicitly called by tabbrowser --> >@@ -380,27 +383,42 @@ > if (this.mDestroyed) > return; > this.mDestroyed = true; > > if (this.mDragDropHandler) > this.mDragDropHandler.detach(); > this.mDragDropHandler = null; > > this.securityUI = null; > this.focusedWindow = null; > this.focusedElement = null; > this._webBrowserFind = null; >+ this.mPrefs.removeObserver("browser.display.background_color", this); > ]]> > </body> > </method> >+ >+ <method name="observe"> >+ <parameter name="aSubject"/> >+ <parameter name="aTopic"/> >+ <parameter name="aState"/> >+ <body> >+ <![CDATA[ >+ if (aTopic == "nsPref:changed" && aState == "browser.display.background_color") { >+ this.style.backgroundColor = this.mPrefs.getCharPref("browser.display.background_color"); >+ return; >+ } >+ ]]> >+ </body> >+ </method> > </implementation> > > <handlers> > <handler event="keypress" keycode="VK_F7" group="system"> > <![CDATA[ > if (event.getPreventDefault() || !event.isTrusted) > return; > > // Toggle browse with caret mode > var browseWithCaretOn = false; > var warn = true; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
dbaron
: review+
dbaron
: superreview+
Actions:
View
|
Diff
|
Review
Attachments on
bug 130078
:
130172
|
191565
|
206053
|
209787
|
220348
|
220737
|
241004
|
260724
|
260725
|
285010
|
285029
|
425945
|
425946
|
427177
|
449631
|
449633
|
453999
|
454424
|
454426
|
455299
|
462530
|
464587
|
465752
|
467516
|
468409