Add the viewport meta tag if not disabled from context-param

@param root
@param context
@param isProduction
3389
private void addMetaTags(UIViewRoot root, FacesContext context) {
		// Check context-param
		String viewportParam = BsfUtils.getInitParam(C.P_VIEWPORT, context);

		viewportParam = evalELIfPossible(viewportParam);
		String content = "width=device-width, initial-scale=1";
		if (!viewportParam.isEmpty() && isFalseOrNo(viewportParam))
			return;
		if (!viewportParam.isEmpty() && !isTrueOrYes(viewportParam))
			content = viewportParam;

		// Otherwise
		String viewportMeta = "<meta name=\"viewport\" content=\"" + content + "\"/>";
		UIOutput viewport = new UIOutput();
		viewport.setRendererType("javax.faces.Text");
		viewport.getAttributes().put("escape", false);
		viewport.setValue(viewportMeta);

		UIComponent header = findHeader(root);
		if (header != null) {
			header.getChildren().add(0, viewport);
		}
	}
117267
@NonNull
    @Override
    public final RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        final LayoutInflater inflater = LayoutInflater.from(parent.getContext());
        if (headerContent != null) {
            if (viewType == headerContent.getViewtype()) {
                final PeasyHeaderViewHolder header = headerContent.onCreateViewHolder(inflater, parent, viewType);
                if (header != null) {
                    header.bindWith(this, viewType);
                    return header;
                }
            }
        }
        if (footerContent != null) {
            if (viewType == footerContent.getViewtype()) {
                final PeasyFooterViewHolder footer = footerContent.onCreateViewHolder(inflater, parent, viewType);
                if (footer != null) {
                    footer.bindWith(this, viewType);
                    return footer;
                }
            }
        }
        final PeasyViewHolder vh = onCreateViewHolder(inflater, parent, viewType);
        vh.bindWith(this, viewType);
        return vh;
    }
658634
@Override
    public void doTag() throws JspException, IOException {
        LayoutTag layoutTag = (LayoutTag) findAncestorWithClass(this, LayoutTag.class);
        if (layoutTag == null) {
            throw new  IllegalStateException("div tag should be used in a layout tag inside.");
        }

        layoutTag.putDiv(name, TagUtils.toString(getJspBody()));
        logger.debug("div#{} put to layout#{}", name, layoutTag.getName());
    }
595664
@Override
	public void doTag() throws JspTagException, IOException {
		try {
			final PageContext pageContext = (PageContext)getJspContext();
			NavigationTreeRenderer.writeNavigationTree(
				pageContext.getServletContext(),
				pageContext.getELContext(),
				(HttpServletRequest)pageContext.getRequest(),
				(HttpServletResponse)pageContext.getResponse(),
				pageContext.getOut(),
				root,
				skipRoot,
				yuiConfig,
				includeElements,
				target,
				thisDomain,
				thisBook,
				thisPage,
				linksToDomain,
				linksToBook,
				linksToPage,
				maxDepth
			);
		} catch(ServletException e) {
			throw new JspTagException(e);
		}
	}
1228919
@Override
    public int doEndTag() throws JspException {
        Tag t = findAncestorWithClass(this, TransformSupport.class);
        if (t == null) {
            throw new JspTagException(
                    Resources.getMessage("PARAM_OUTSIDE_TRANSFORM"));
        }
        TransformSupport parent = (TransformSupport) t;

        Object value = this.value;
        if (value == null) {
            if (bodyContent == null || bodyContent.getString() == null) {
                value = "";
            } else {
                value = bodyContent.getString().trim();
            }
        }
        parent.addParameter(name, value);
        return EVAL_PAGE;
    }
761234
function getViewRoot(source) {
	const tokens = parse(source);

	let position = tokens.length;
	let tagDepth = 0;
	let tagName;
	let token;

	/**
	 * Loop backwards through the view's source and find the last closing tag
	 * and its matching opening tag to determine the view's root node position.
	 */
	while (token = tokens[--position]) {
		if (token.type !== TokenTypes.TagStart) {
			continue;
		}

		let tag = parseTag(position, tokens);

		// the last node in the source is a self-closing tag; use that
		if (!tagName && tag.self) {
			break;
		}

		// this is the last tag in the source; save the name and find its pair
		if (!tagName) {
			tagName = tag.name;
			tagDepth++;
			continue;
		}

		// ignore any tags with a different name
		if (tag.name !== tagName) {
			continue;
		}

		// increase tags' depth in the tree for closing tags
		if (!tag.open) {
			tagDepth++;
		}

		// decrease tags' depth in the tree for opening (not self-closing) tags
		if (tag.open && !tag.self) {
			tagDepth--;
		}

		// if the tag's depth reached 0, it means this is the opening tag
		if (tagDepth === 0) {
			break;
		}
	}

	token = tokens[position];

	return token ? token.start : 0;
}
1280814
private void addClassFrameTag(Content contentTree) {
        HtmlTree frame = HtmlTree.FRAME(configuration.topFile.getPath(), "classFrame",
                configuration.getText("doclet.Package_class_and_interface_descriptions"),
                SCROLL_YES);
        contentTree.addContent(frame);
    }
713672
function setupViewportChangeEvent(mediaQueries, eventRegistry, namespace) {
    var _loop_1 = function (viewport) {
        matchMedia(viewport.query).addListener(function (mediaQueryList) {
            if (mediaQueryList.matches) {
                fireViewportChangeEvent(viewport.name, eventRegistry, namespace);
            }
        });
    };
    for (var _i = 0, mediaQueries_1 = mediaQueries; _i < mediaQueries_1.length; _i++) {
        var viewport = mediaQueries_1[_i];
        _loop_1(viewport);
    }
}
853292
function _getViewportExpressions (rootExpressions) {
    const viewportExpressions = [];

    function dfs (expr) {
        if (expr._isViewport) {
            viewportExpressions.push(expr);
        } else {
            expr._getChildren().map(dfs);
        }
    }

    rootExpressions.map(dfs);

    return viewportExpressions;
}
18676
private void process(Node root, boolean hotSwap) {
    checkState(contextStack.isEmpty());
    contextStack.push(LexicalContext.newGlobalContext(root));
    if (hotSwap) {
      TranspilationPasses.hotSwapTranspile(compiler, root, transpiledFeatures, this);
    } else {
      TranspilationPasses.processTranspile(compiler, root, transpiledFeatures, this);
    }
    TranspilationPasses.maybeMarkFeaturesAsTranspiledAway(compiler, transpiledFeatures);
    checkState(contextStack.element().function == null);
    contextStack.remove();
    checkState(contextStack.isEmpty());
  }
695647
public ViewPortHandler or(Boundary boundary) {
        if(!boundaries.contains(boundary)) {
            boundaries.add(boundary);
        }
        return this;
    }
1186774
function PortalWidget(template, view, context, parentView) {
  this.template = template;
  this.template.view = parentView;
  this.context = context;
  // In case we need DOM events to bubble out of the portal
  // Change eventCore's bubbling to allow for a custom function/property
  // aside from parentNode that can link this.el to this.placeholder
  this.placeholder = null;
  this.el = null;
  this.vtree = null;
}
810806
function(layerPx) {
        var viewPortPx = null;
        if (layerPx != null) {
            var dX = this.layerContainerOriginPx.x;
            var dY = this.layerContainerOriginPx.y;
            viewPortPx = layerPx.add(dX, dY);            
        }
        return viewPortPx;
    }
1226892
def add_view_no_menu(self, baseview, endpoint=None, static_folder=None):
        
        baseview = self._check_and_init(baseview)
        log.info(LOGMSG_INF_FAB_ADD_VIEW.format(baseview.__class__.__name__, ""))

        if not self._view_exists(baseview):
            baseview.appbuilder = self
            self.baseviews.append(baseview)
            self._process_inner_views()
            if self.app:
                self.register_blueprint(
                    baseview, endpoint=endpoint, static_folder=static_folder
                )
                self._add_permission(baseview)
        else:
            log.warning(LOGMSG_WAR_FAB_VIEW_EXISTS.format(baseview.__class__.__name__))
        return baseview
787748
private void addGeneratedCSSResource(FacesContext context, String resourceName, UIViewRoot view) {
        addGeneratedResource(context, resourceName, "javax.faces.resource.Stylesheet", "butterfaces-dist-css", view);
    }
1025078
public static void enableAdeTagAction(PageContext context) throws JspException {

        ServletRequest req = context.getRequest();
        if (CmsHistoryResourceHandler.isHistoryRequest(req)) {
            // don't display advanced direct edit buttons on an historical resource
            return;
        }

        CmsFlexController controller = CmsFlexController.getController(req);
        CmsObject cms = controller.getCmsObject();

        if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
            // advanced direct edit is never enabled in the online project
            return;
        }

        if (CmsResource.isTemporaryFileName(cms.getRequestContext().getUri())) {
            // don't display advanced direct edit buttons if a temporary file is displayed
            return;
        }
        updateDirectEditFlagInSession(req);
        if (isDirectEditDisabled(req)) {
            try {
                String buttonLeft = null;
                Integer left = (Integer)((HttpServletRequest)req).getSession().getAttribute(
                    CmsGwtConstants.PARAM_BUTTON_LEFT);

                if (left != null) {
                    buttonLeft = left.toString() + "px";
                } else {
                    buttonLeft = "20%";
                }
                String titleMessage = Messages.get().getBundle(
                    OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(Messages.GUI_TOOLBAR_ENABLE_EDIT_MODE_0);
                context.getOut().print(getPreviewInclude(buttonLeft, titleMessage));
            } catch (IOException e) {
                throw new JspException(e);
            }
        } else {

            I_CmsDirectEditProvider eb = new CmsAdvancedDirectEditProvider();
            eb.init(cms, CmsDirectEditMode.TRUE, "");
            CmsJspTagEditable.setDirectEditProvider(context, eb);

            try {
                CmsContainerpageActionElement actionEl = new CmsContainerpageActionElement(
                    context,
                    (HttpServletRequest)req,
                    (HttpServletResponse)context.getResponse());
                context.getOut().print(actionEl.exportAll());
            } catch (Exception e) {
                throw new JspException(e);
            }
        }
    }
326912
function ViewportItem(options, parent) {
      classCallCheck(this, ViewportItem);

      this.parent = parent;
      this.id = Math.random().toString(36).substring(7);
      this.triggered = false;
      this.threshold = 200;
      this.isThresholdPercentage = false;

      // Override defaults with options.
      Object.assign(this, options);

      // The whole point is to have a callback function. Don't do anything if it's not given.
      if (typeof this.enter !== 'function') {
        throw new TypeError('Viewport.add :: No `enter` function provided in Viewport options.');
      }

      this.parseThreshold();

      this.hasExitCallback = typeof this.exit === 'function';

      // Cache element's offsets and dimensions.
      this.update();
    }