gecko-dev/browser/base/content/pageinfo/pageInfo.xhtml
Emilio Cobos Álvarez 185bbd28bd Bug 1887063 - Use VibrancyManager / regular CSS to implement the unified toolbar looks. r=mstange,mac-reviewers,desktop-theme-reviewers,places-reviewers,dao
This is simpler given we only have a couple of windows with these looks,
and removes the dual mode of the ToolbarWindow class.

We just draw the title into the window frame and rely on CSS reserving
enough space (exposed as a new -moz-mac-titlebar-height environment
variable).

We remove the toolbox and toolbar appearance values on mac, now that
they do nothing (toolbar did, but it didn't support dark mode and is
effectively unused).

Differential Revision: https://phabricator.services.mozilla.com/D205469
2024-03-30 10:29:39 +00:00

418 lines
16 KiB
HTML

<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
data-l10n-id="page-info-window"
data-l10n-attrs="style"
windowtype="Browser:page-info"
#ifdef XP_MACOSX
drawtitle="true"
chromemargin="0,0,0,0"
#endif
onload="onLoadPageInfo()"
align="stretch"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<linkset>
<html:link
rel="stylesheet"
href="chrome://browser/content/pageinfo/pageInfo.css"
/>
<html:link rel="stylesheet" href="chrome://browser/skin/pageInfo.css" />
<html:link rel="localization" href="browser/pageInfo.ftl"/>
</linkset>
#ifdef XP_MACOSX
#include ../macWindow.inc.xhtml
#else
<script src="chrome://global/content/globalOverlay.js"/>
<script src="chrome://global/content/editMenuOverlay.js"/>
<script src="chrome://browser/content/utilityOverlay.js"/>
#endif
<script src="chrome://global/content/contentAreaUtils.js"/>
<script src="chrome://global/content/treeUtils.js"/>
<script src="chrome://browser/content/pageinfo/pageInfo.js"/>
<script src="chrome://browser/content/pageinfo/permissions.js"/>
<script src="chrome://browser/content/pageinfo/security.js"/>
<stringbundleset id="pageinfobundleset">
<stringbundle id="pkiBundle" src="chrome://pippki/locale/pippki.properties"/>
<stringbundle id="browserBundle" src="chrome://browser/locale/browser.properties"/>
</stringbundleset>
<commandset id="pageInfoCommandSet">
<command id="cmd_close" oncommand="window.close();"/>
<command id="cmd_help" oncommand="doHelpButton();"/>
</commandset>
<keyset id="pageInfoKeySet">
<key data-l10n-id="close-dialog" data-l10n-attrs="key" modifiers="accel" command="cmd_close"/>
<key keycode="VK_ESCAPE" command="cmd_close"/>
#ifdef XP_MACOSX
<key key="." modifiers="meta" command="cmd_close"/>
#else
<key keycode="VK_F1" command="cmd_help"/>
#endif
<key data-l10n-id="copy" data-l10n-attrs="key" modifiers="accel" command="cmd_copy"/>
<key data-l10n-id="select-all" data-l10n-attrs="key" modifiers="accel" command="cmd_selectAll"/>
<key data-l10n-id="select-all" data-l10n-attrs="key" modifiers="alt" command="cmd_selectAll"/>
</keyset>
<menupopup id="picontext">
<menuitem id="menu_selectall" data-l10n-id="menu-select-all" command="cmd_selectAll"/>
<menuitem id="menu_copy" data-l10n-id="menu-copy" command="cmd_copy"/>
</menupopup>
<vbox id="topBar">
<radiogroup id="viewGroup" class="chromeclass-toolbar" orient="horizontal">
<radio id="generalTab" data-l10n-id="general-tab"
oncommand="showTab('general');"/>
<radio id="mediaTab" data-l10n-id="media-tab"
oncommand="showTab('media');" hidden="true"/>
<radio id="permTab" data-l10n-id="perm-tab"
oncommand="showTab('perm');"/>
<radio id="securityTab" data-l10n-id="security-tab"
oncommand="showTab('security');"/>
</radiogroup>
</vbox>
<deck id="mainDeck" flex="1">
<!-- General page information -->
<vbox id="generalPanel">
<table id="generalTable" xmlns="http://www.w3.org/1999/xhtml">
<tr id="generalTitle">
<th>
<xul:label control="titletext" data-l10n-id="general-title"/>
</th>
<td>
<input readonly="readonly" id="titletext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="generalURLRow">
<th>
<xul:label control="urltext" data-l10n-id="general-url"/>
</th>
<td>
<input readonly="readonly" id="urltext"/>
</td>
</tr>
<tr class="tableSeparator"/>
<tr id="generalTypeRow">
<th>
<xul:label control="typetext" data-l10n-id="general-type"/>
</th>
<td>
<input readonly="readonly" id="typetext"/>
</td>
</tr>
<tr id="generalModeRow">
<th>
<xul:label control="modetext" data-l10n-id="general-mode"/>
</th>
<td>
<input readonly="readonly" id="modetext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="generalEncodingRow">
<th>
<xul:label control="encodingtext" data-l10n-id="general-encoding"/>
</th>
<td>
<input readonly="readonly" id="encodingtext"/>
</td>
</tr>
<tr id="generalSizeRow">
<th>
<xul:label control="sizetext" data-l10n-id="general-size"/>
</th>
<td>
<input readonly="readonly" id="sizetext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="generalReferrerRow">
<th>
<xul:label control="refertext" data-l10n-id="general-referrer"/>
</th>
<td>
<input readonly="readonly" id="refertext"/>
</td>
</tr>
<tr class="tableSeparator"/>
<tr id="generalModifiedRow">
<th>
<xul:label control="modifiedtext" data-l10n-id="general-modified"/>
</th>
<td>
<input readonly="readonly" id="modifiedtext"/>
</td>
</tr>
</table>
<separator class="thin"/>
<vbox id="metaTags" flex="1">
<label control="metatree" id="metaTagsCaption" class="header"/>
<tree id="metatree" flex="1" hidecolumnpicker="true" contextmenu="picontext">
<treecols>
<treecol id="meta-name" data-l10n-id="general-meta-name"
persist="width" style="flex: 1 auto;"
onclick="gMetaView.onPageMediaSort('meta-name');"/>
<splitter class="tree-splitter"/>
<treecol id="meta-content" data-l10n-id="general-meta-content"
persist="width" style="flex: 4 4 auto"
onclick="gMetaView.onPageMediaSort('meta-content');"/>
</treecols>
<treechildren id="metatreechildren" flex="1"/>
</tree>
</vbox>
<hbox pack="end">
<button command="cmd_help" data-l10n-id="help-button" class="help-button"/>
</hbox>
</vbox>
<!-- Media information -->
<vbox id="mediaPanel">
<tree id="imagetree" onselect="onImageSelect();" contextmenu="picontext"
ondragstart="onBeginLinkDrag(event, 'image-address', 'image-alt')">
<treecols>
<treecol primary="true" persist="width" style="flex: 10 10 auto"
width="10" id="image-address" data-l10n-id="media-address"
onclick="gImageView.onPageMediaSort('image-address');"/>
<splitter class="tree-splitter"/>
<treecol persist="hidden width" style="flex: 2 2 auto"
width="2" id="image-type" data-l10n-id="media-type"
onclick="gImageView.onPageMediaSort('image-type');"/>
<splitter class="tree-splitter"/>
<treecol hidden="true" persist="hidden width" style="flex: 2 2 auto"
width="2" id="image-size" data-l10n-id="media-size" value="size"
onclick="gImageView.onPageMediaSort('image-size');"/>
<splitter class="tree-splitter"/>
<treecol hidden="true" persist="hidden width" style="flex: 4 4 auto"
width="4" id="image-alt" data-l10n-id="media-alt-header"
onclick="gImageView.onPageMediaSort('image-alt');"/>
<splitter class="tree-splitter"/>
<treecol hidden="true" persist="hidden width" style="flex: 1 1 auto"
width="1" id="image-count" data-l10n-id="media-count"
onclick="gImageView.onPageMediaSort('image-count');"/>
</treecols>
<treechildren id="imagetreechildren" flex="1"/>
</tree>
<splitter orient="vertical" id="mediaSplitter" resizebefore="sibling" resizeafter="none" />
<vbox flex="1" id="mediaPreviewBox" collapsed="true">
<table id="mediaTable" xmlns="http://www.w3.org/1999/xhtml">
<tr id="mediaLocationRow">
<th>
<xul:label control="imageurltext" data-l10n-id="media-location"/>
</th>
<td>
<input readonly="readonly" id="imageurltext"/>
</td>
</tr>
<tr id="mediaTypeRow">
<th>
<xul:label control="imagetypetext" data-l10n-id="general-type"/>
</th>
<td>
<input id="imagetypetext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="mediaSizeRow">
<th>
<xul:label control="imagesizetext" data-l10n-id="general-size"/>
</th>
<td>
<input readonly="readonly" id="imagesizetext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="mediaDimensionRow">
<th>
<xul:label control="imagedimensiontext" data-l10n-id="media-dimension"/>
</th>
<td>
<input readonly="readonly" id="imagedimensiontext" data-l10n-attrs="value"/>
</td>
</tr>
<tr id="mediaTextRow">
<th>
<xul:label control="imagetext" data-l10n-id="media-text"/>
</th>
<td>
<input readonly="readonly" id="imagetext"/>
</td>
</tr>
<tr id="mediaLongdescRow">
<th>
<xul:label control="imagelongdesctext" data-l10n-id="media-long-desc"/>
</th>
<td>
<input readonly="readonly" id="imagelongdesctext"/>
</td>
</tr>
</table>
<hbox id="imageSaveBox" align="end">
<spacer id="imageSaveBoxSpacer" flex="1"/>
<button data-l10n-id="media-select-all"
id="selectallbutton"
oncommand="doSelectAllMedia();"/>
<button data-l10n-id="media-save-as"
id="imagesaveasbutton"
oncommand="saveMedia();"/>
</hbox>
<vbox id="imagecontainerbox" flex="1">
<hbox id="theimagecontainer">
<image id="thepreviewimage"/>
</hbox>
<hbox id="brokenimagecontainer" pack="center" collapsed="true">
<image id="brokenimage" src="resource://gre-resources/broken-image.png"/>
</hbox>
</vbox>
</vbox>
<hbox id="mediaSaveBox" collapsed="true">
<spacer id="mediaSaveBoxSpacer" flex="1"/>
<button data-l10n-id="media-save-image-as"
id="mediasaveasbutton"
oncommand="saveMedia();"/>
</hbox>
<hbox pack="end">
<button command="cmd_help" data-l10n-id="help-button" class="help-button"/>
</hbox>
</vbox>
<!-- Permissions -->
<vbox id="permPanel">
<hbox id="permHostBox">
<label data-l10n-id="permissions-for" control="hostText" />
<html:input id="hostText" class="header" readonly="readonly"/>
</hbox>
<vbox id="permList" flex="1"/>
<hbox pack="end">
<button command="cmd_help" data-l10n-id="help-button" class="help-button"/>
</hbox>
</vbox>
<!-- Security & Privacy -->
<vbox id="securityPanel">
<!-- Identity Section -->
<groupbox>
<label class="header" data-l10n-id="security-view-identity"/>
<table xmlns="http://www.w3.org/1999/xhtml">
<!-- Domain -->
<tr>
<th>
<xul:label data-l10n-id="security-view-identity-domain"
control="security-identity-domain-value"/>
</th>
<td>
<input id="security-identity-domain-value" readonly="readonly"/>
</td>
</tr>
<!-- Owner -->
<tr>
<th>
<xul:label id="security-identity-owner-label"
class="fieldLabel"
data-l10n-id="security-view-identity-owner"
control="security-identity-owner-value"/>
</th>
<td>
<input id="security-identity-owner-value" readonly="readonly" data-l10n-attrs="value"/>
</td>
</tr>
<!-- Verifier -->
<tr>
<th>
<xul:label data-l10n-id="security-view-identity-verifier"
control="security-identity-verifier-value"/>
</th>
<td>
<div class="table-split-column">
<input id="security-identity-verifier-value" readonly="readonly"
data-l10n-attrs="value"/>
<xul:button id="security-view-cert" data-l10n-id="security-view"
collapsed="true"
oncommand="security.viewCert();"/>
</div>
</td>
</tr>
<!-- Certificate Validity -->
<tr id="security-identity-validity-row">
<th>
<xul:label data-l10n-id="security-view-identity-validity"
control="security-identity-validity-value"/>
</th>
<td>
<input id="security-identity-validity-value" readonly="readonly"/>
</td>
</tr>
</table>
</groupbox>
<!-- Privacy & History section -->
<groupbox>
<label class="header" data-l10n-id="security-view-privacy"/>
<table id="securityTable" xmlns="http://www.w3.org/1999/xhtml">
<!-- History -->
<tr>
<th>
<xul:label control="security-privacy-history-value" data-l10n-id="security-view-privacy-history-value"/>
</th>
<td>
<xul:label id="security-privacy-history-value"
data-l10n-id="security-view-unknown"/>
</td>
</tr>
<!-- Site Data & Cookies -->
<tr id="security-privacy-sitedata-row">
<th>
<xul:label control="security-privacy-sitedata-value" data-l10n-id="security-view-privacy-sitedata-value"/>
</th>
<td>
<div class="table-split-column">
<xul:label id="security-privacy-sitedata-value" data-l10n-id="security-view-unknown"/>
<xul:button id="security-clear-sitedata"
disabled="true"
data-l10n-id="security-view-privacy-clearsitedata"
oncommand="security.clearSiteData();"/>
</div>
</td>
</tr>
<!-- Passwords -->
<tr>
<th>
<xul:label control="security-privacy-passwords-value" data-l10n-id="security-view-privacy-passwords-value"/>
</th>
<td>
<div class="table-split-column">
<xul:label id="security-privacy-passwords-value"
data-l10n-id="security-view-unknown"/>
<xul:button id="security-view-password"
data-l10n-id="security-view-privacy-viewpasswords"
oncommand="security.viewPasswords();"/>
</div>
</td>
</tr>
</table>
</groupbox>
<!-- Technical Details section -->
<groupbox>
<label class="header" data-l10n-id="security-view-technical"/>
<label id="security-technical-shortform"/>
<description id="security-technical-longform1"/>
<description id="security-technical-longform2"/>
<description id="security-technical-certificate-transparency"/>
</groupbox>
<hbox pack="end">
<button command="cmd_help" data-l10n-id="help-button" class="help-button"/>
</hbox>
</vbox>
<!-- Others added by overlay -->
</deck>
</window>