您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ toFrameView函数代码示例

51自学网 2021-06-03 08:52:54
  C++
这篇教程C++ toFrameView函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中toFrameView函数的典型用法代码示例。如果您正苦于以下问题:C++ toFrameView函数的具体用法?C++ toFrameView怎么用?C++ toFrameView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了toFrameView函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: toFrameView

bool RenderWidget::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action){    if (request.allowsChildFrameContent() && widget() && widget()->isFrameView() && toFrameView(widget())->renderView()) {        FrameView* childFrameView = toFrameView(widget());        RenderView* childRoot = childFrameView->renderView();        LayoutPoint adjustedLocation = accumulatedOffset + location();        LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - childFrameView->scrollOffset();        HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);        HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildFrameHitTest);        HitTestResult childFrameResult(newHitTestLocation);        bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTestLocation, childFrameResult);        if (newHitTestLocation.isRectBasedTest())            result.append(childFrameResult);        else if (isInsideChildFrame)            result = childFrameResult;        if (isInsideChildFrame)            return true;    }    bool hadResult = result.innerNode();    bool inside = RenderReplaced::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, action);    // Check to see if we are really over the widget itself (and not just in the border/padding area).    if ((inside || result.isRectBasedTest()) && !hadResult && result.innerNode() == &frameOwnerElement())        result.setIsOverWidget(contentBoxRect().contains(result.localPoint()));    return inside;}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:31,


示例2: nodeAtPointOverWidget

bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action){    if (!widget() || !widget()->isFrameView() || !result.hitTestRequest().allowsChildFrameContent())        return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action);    // A hit test can never hit an off-screen element; only off-screen iframes are throttled;    // therefore, hit tests can skip descending into throttled iframes.    if (toFrameView(widget())->shouldThrottleRendering())        return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action);    ASSERT(document().lifecycle().state() >= DocumentLifecycle::CompositingClean);    if (action == HitTestForeground) {        FrameView* childFrameView = toFrameView(widget());        LayoutView* childRoot = childFrameView->layoutView();        if (visibleToHitTestRequest(result.hitTestRequest()) && childRoot) {            LayoutPoint adjustedLocation = accumulatedOffset + location();            LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset());            HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);            HitTestRequest newHitTestRequest(result.hitTestRequest().type() | HitTestRequest::ChildFrameHitTest);            HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation);            // The frame's layout and style must be up-to-date if we reach here.            bool isInsideChildFrame = childRoot->hitTestNoLifecycleUpdate(childFrameResult);            if (result.hitTestRequest().listBased()) {                result.append(childFrameResult);            } else if (isInsideChildFrame) {                // Force the result not to be cacheable because the parent                // frame should not cache this result; as it won't be notified of                // changes in the child.                childFrameResult.setCacheable(false);                result = childFrameResult;            }            // Don't trust |isInsideChildFrame|. For rect-based hit-test, returns            // true only when the hit test rect is totally within the iframe,            // i.e. nodeAtPointOverWidget() also returns true.            // Use a temporary HitTestResult because we don't want to collect the            // iframe element itself if the hit-test rect is totally within the iframe.            if (isInsideChildFrame) {                if (!locationInContainer.isRectBasedTest())                    return true;                HitTestResult pointOverWidgetResult = result;                bool pointOverWidget = nodeAtPointOverWidget(pointOverWidgetResult, locationInContainer, accumulatedOffset, action);                if (pointOverWidget)                    return true;                result = pointOverWidgetResult;                return false;            }        }    }    return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action);}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:56,


示例3: getPluginOcclusions

// Return a set of rectangles that should not be overdrawn by the// plugin ("cutouts"). This helps implement the "iframe shim"// technique of overlaying a windowed plugin with content from the// page. In a nutshell, iframe elements should occlude plugins when// they occur higher in the stacking order.void getPluginOcclusions(Element* element, Widget* parentWidget, const IntRect& frameRect, Vector<IntRect>& occlusions){    RenderObject* pluginNode = element->renderer();    ASSERT(pluginNode);    if (!pluginNode->style())        return;    Vector<const RenderObject*> pluginZstack;    Vector<const RenderObject*> iframeZstack;    getObjectStack(pluginNode, &pluginZstack);    if (!parentWidget->isFrameView())        return;    FrameView* parentFrameView = toFrameView(parentWidget);    // Occlusions by iframes.    const FrameView::ChildrenWidgetSet* children = parentFrameView->children();    for (FrameView::ChildrenWidgetSet::const_iterator it = children->begin(); it != children->end(); ++it) {        // We only care about FrameView's because iframes show up as FrameViews.        if (!(*it)->isFrameView())            continue;        const FrameView* frameView = toFrameView(it->get());        // Check to make sure we can get both the element and the RenderObject        // for this FrameView, if we can't just move on to the next object.        // FIXME: Plugin occlusion by remote frames is probably broken.        HTMLElement* element = frameView->frame().deprecatedLocalOwner();        if (!element || !element->renderer())            continue;        RenderObject* iframeRenderer = element->renderer();        if (isHTMLIFrameElement(*element) && intersectsRect(iframeRenderer, frameRect)) {            getObjectStack(iframeRenderer, &iframeZstack);            if (iframeIsAbovePlugin(iframeZstack, pluginZstack))                addToOcclusions(toRenderBox(iframeRenderer), occlusions);        }    }    // Occlusions by top layer elements.    // FIXME: There's no handling yet for the interaction between top layer and    // iframes. For example, a plugin in the top layer will be occluded by an    // iframe. And a plugin inside an iframe in the top layer won't be respected    // as being in the top layer.    const Element* ancestor = topLayerAncestor(element);    Document* document = parentFrameView->frame().document();    const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements = document->topLayerElements();    size_t start = ancestor ? elements.find(ancestor) + 1 : 0;    for (size_t i = start; i < elements.size(); ++i)        addTreeToOcclusions(elements[i]->renderer(), frameRect, occlusions);}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:56,


示例4: toFrameView

FrameView* AXScrollView::documentFrameView() const{    if (!m_scrollView || !m_scrollView->isFrameView())        return 0;    return toFrameView(m_scrollView);}
开发者ID:Igalia,项目名称:blink,代码行数:7,


示例5: ASSERT

void PluginView::updatePluginWidget(){    if (!parent())        return;    ASSERT(parent()->isFrameView());    FrameView* frameView = toFrameView(parent());    IntRect oldWindowRect = m_windowRect;    IntRect oldClipRect = m_clipRect;    m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());    m_clipRect = windowClipRect();    m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());    if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)        return;    if (m_status != PluginStatusLoadedSuccessfully)        return;    if (!m_isWindowed && !m_windowRect.isEmpty()) {        Display* display = getPluginDisplay(nullptr);        if (m_drawable)            XFreePixmap(display, m_drawable);                    m_drawable = XCreatePixmap(display, getRootWindow(m_parentFrame.get()),            m_windowRect.width(), m_windowRect.height(),            ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);        XSync(display, false); // make sure that the server knows about the Drawable    }    setNPWindowIfNeeded();}
开发者ID:boska,项目名称:webkit,代码行数:34,


示例6: ASSERT

void RenderWidget::setIsOverlapped(bool isOverlapped){    Widget* widget = this->widget();    ASSERT(widget);    ASSERT(widget->isFrameView());    toFrameView(widget)->setIsOverlapped(isOverlapped);}
开发者ID:coinpayee,项目名称:blink,代码行数:7,


示例7: toFrameView

FrameView* AccessibilityScrollView::documentFrameView() const{    if (!m_scrollView || !m_scrollView->isFrameView())        return nullptr;        return toFrameView(m_scrollView);}    
开发者ID:chenbk85,项目名称:webkit2-wincairo,代码行数:7,


示例8: toFrameView

bool LayoutPart::isThrottledFrameView() const{    if (!widget() || !widget()->isFrameView())        return false;    const FrameView* frameView = toFrameView(widget());    return frameView->shouldThrottleRendering();}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:7,


示例9: nodeAtPointOverWidget

bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action){    if (!widget() || !widget()->isFrameView() || !result.hitTestRequest().allowsChildFrameContent())        return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action);    FrameView* childFrameView = toFrameView(widget());    LayoutView* childRoot = childFrameView->layoutView();    if (visibleToHitTestRequest(result.hitTestRequest()) && childRoot) {        LayoutPoint adjustedLocation = accumulatedOffset + location();        LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset());        HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);        HitTestRequest newHitTestRequest(result.hitTestRequest().type() | HitTestRequest::ChildFrameHitTest);        HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation);        bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTestLocation, childFrameResult);        if (result.hitTestRequest().listBased())            result.append(childFrameResult);        else if (isInsideChildFrame)            result = childFrameResult;        if (isInsideChildFrame)            return true;    }    return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action);}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:28,


示例10: toFrameView

bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& wheelEvent, Widget* widget){    if (!widget->isFrameView())        return false;    return toFrameView(widget)->frame().eventHandler().handleWheelEvent(wheelEvent);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:7,


示例11: location

void RenderWidget::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset){    LayoutPoint adjustedPaintOffset = paintOffset + location();    // Tell the widget to paint now. This is the only time the widget is allowed    // to paint itself. That way it will composite properly with z-indexed layers.    IntPoint widgetLocation = m_widget->frameRect().location();    IntPoint paintLocation(roundToInt(adjustedPaintOffset.x() + borderLeft() + paddingLeft()),        roundToInt(adjustedPaintOffset.y() + borderTop() + paddingTop()));    IntRect paintRect = paintInfo.rect;    IntSize widgetPaintOffset = paintLocation - widgetLocation;    // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,    // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plug-in drawing.    if (!widgetPaintOffset.isZero()) {        paintInfo.context->translate(widgetPaintOffset);        paintRect.move(-widgetPaintOffset);    }    m_widget->paint(paintInfo.context, paintRect);    if (!widgetPaintOffset.isZero())        paintInfo.context->translate(-widgetPaintOffset);    if (m_widget->isFrameView()) {        FrameView* frameView = toFrameView(m_widget.get());        bool runOverlapTests = !frameView->useSlowRepaintsIfNotOverlapped() || frameView->hasCompositedContentIncludingDescendants();        if (paintInfo.overlapTestRequests && runOverlapTests) {            ASSERT(!paintInfo.overlapTestRequests->contains(this));            paintInfo.overlapTestRequests->set(this, m_widget->frameRect());        }    }}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:32,


示例12: ASSERT

bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widget* widget){    ASSERT(widget);    if (!widget->isFrameView())        return false;    return toFrameView(widget)->frame()->eventHandler()->handleWheelEvent(event);}
开发者ID:harlanlewis,项目名称:webkit,代码行数:8,


示例13: scaleDeltaToWindow

static float scaleDeltaToWindow(const Widget* widget, float delta){    float scale = 1;    if (widget) {        FrameView* rootView = toFrameView(widget->root());        if (rootView)            scale = rootView->inputEventsScaleFactor();    }    return delta / scale;}
开发者ID:howardroark2018,项目名称:chromium,代码行数:10,


示例14: toFrameView

AXObject* AXScrollView::parentObject() const{    if (!m_scrollView || !m_scrollView->isFrameView())        return 0;    // FIXME: Broken for OOPI.    HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().deprecatedLocalOwner();    if (owner && owner->renderer())        return axObjectCache()->getOrCreate(owner);    return 0;}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:12,


示例15: DCHECK

void ChromeClientImpl::scheduleAnimation(Widget* widget) {  DCHECK(widget->isFrameView());  FrameView* view = toFrameView(widget);  LocalFrame* frame = view->frame().localFrameRoot();  // If the frame is still being created, it might not yet have a WebWidget.  // FIXME: Is this the right thing to do? Is there a way to avoid having  // a local frame root that doesn't have a WebWidget? During initialization  // there is no content to draw so this call serves no purpose.  if (WebLocalFrameImpl::fromFrame(frame) &&      WebLocalFrameImpl::fromFrame(frame)->frameWidget())    WebLocalFrameImpl::fromFrame(frame)->frameWidget()->scheduleAnimation();}
开发者ID:mirror,项目名称:chromium,代码行数:13,


示例16: toFrameView

void RenderFrameBase::layoutWithFlattening(bool hasFixedWidth, bool hasFixedHeight){    FrameView* childFrameView = toFrameView(widget());    RenderView* childRoot = childFrameView ? childFrameView->frame()->contentRenderer() : 0;    if (!childRoot || !shouldExpandFrame(width(), height(), hasFixedWidth, hasFixedHeight)) {        updateWidgetPosition();        if (childFrameView)            childFrameView->layout();        setNeedsLayout(false);        return;    }    // need to update to calculate min/max correctly    updateWidgetPosition();    // if scrollbars are off, and the width or height are fixed    // we obey them and do not expand. With frame flattening    // no subframe much ever become scrollable.    HTMLFrameElementBase* element = static_cast<HTMLFrameElementBase*>(node());    bool isScrollable = element->scrollingMode() != ScrollbarAlwaysOff;    // consider iframe inset border    int hBorder = borderLeft() + borderRight();    int vBorder = borderTop() + borderBottom();    // make sure minimum preferred width is enforced    if (isScrollable || !hasFixedWidth) {        setWidth(max(width(), childRoot->minPreferredLogicalWidth() + hBorder));        // update again to pass the new width to the child frame        updateWidgetPosition();        childFrameView->layout();    }    // expand the frame by setting frame height = content height    if (isScrollable || !hasFixedHeight || childRoot->isFrameSet())        setHeight(max<LayoutUnit>(height(), childFrameView->contentsHeight() + vBorder));    if (isScrollable || !hasFixedWidth || childRoot->isFrameSet())        setWidth(max<LayoutUnit>(width(), childFrameView->contentsWidth() + hBorder));    updateWidgetPosition();    ASSERT(!childFrameView->layoutPending());    ASSERT(!childRoot->needsLayout());    ASSERT(!childRoot->firstChild() || !childRoot->firstChild()->firstChild() || !childRoot->firstChild()->firstChild()->needsLayout());    setNeedsLayout(false);}
开发者ID:Channely,项目名称:know-your-chrome,代码行数:49,


示例17: axObjectCache

AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const{    if (!m_scrollView || !m_scrollView->isFrameView())        return nullptr;        AXObjectCache* cache = axObjectCache();    if (!cache)        return nullptr;    HTMLFrameOwnerElement* owner = toFrameView(m_scrollView)->frame().ownerElement();    if (owner && owner->renderer())        return cache->get(owner);        return nullptr;}
开发者ID:chenbk85,项目名称:webkit2-wincairo,代码行数:15,


示例18: toFrameView

void RenderFrame::viewCleared(){    if (!widget() || !widget()->isFrameView())        return;    FrameView* view = toFrameView(widget());    int marginWidth = frameElement().marginWidth();    int marginHeight = frameElement().marginHeight();    if (marginWidth != -1)        view->setMarginWidth(marginWidth);    if (marginHeight != -1)        view->setMarginHeight(marginHeight);}
开发者ID:kodybrown,项目名称:webkit,代码行数:15,


示例19: if

// Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mouse// with touch input for plugins that don't support touch input).WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObject* layoutObject, const TouchEvent& event){    if (!event.touches())        return;    if (event.touches()->length() != 1) {        if (event.touches()->length() || event.type() != EventTypeNames::touchend || !event.changedTouches() || event.changedTouches()->length() != 1)            return;    }    const Touch* touch = event.touches()->length() == 1 ? event.touches()->item(0) : event.changedTouches()->item(0);    if (touch->identifier())        return;    if (event.type() == EventTypeNames::touchstart)        type = MouseDown;    else if (event.type() == EventTypeNames::touchmove)        type = MouseMove;    else if (event.type() == EventTypeNames::touchend)        type = MouseUp;    else        return;    // TODO(majidvp): Instead of using |Event::createTime| which is epoch time    // we should instead use |Event::platformTimeStamp| which is the actual    // platform monotonic time. See: crbug.com/538199    timeStampSeconds = convertDOMTimeStampToSeconds(event.createTime());    modifiers = event.modifiers();    // The mouse event co-ordinates should be generated from the co-ordinates of the touch point.    FrameView* view =  toFrameView(widget->parent());    // FIXME: if view == nullptr, pointInRootFrame will really be pointInRootContent.    IntPoint pointInRootFrame = roundedIntPoint(touch->absoluteLocation());    if (view)        pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);    IntPoint screenPoint = roundedIntPoint(touch->screenLocation());    globalX = screenPoint.x();    globalY = screenPoint.y();    windowX = pointInRootFrame.x();    windowY = pointInRootFrame.y();    button = WebMouseEvent::ButtonLeft;    modifiers |= WebInputEvent::LeftButtonDown;    clickCount = (type == MouseDown || type == MouseUp);    IntPoint localPoint = convertAbsoluteLocationForLayoutObject(touch->absoluteLocation(), *layoutObject);    x = localPoint.x();    y = localPoint.y();}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:50,


示例20: toHTMLFrameElement

void RenderFrame::viewCleared(){    HTMLFrameElement* element = toHTMLFrameElement(node());    if (!element || !widget() || !widget()->isFrameView())        return;    FrameView* view = toFrameView(widget());    int marginWidth = element->marginWidth();    int marginHeight = element->marginHeight();    if (marginWidth != -1)        view->setMarginWidth(marginWidth);    if (marginHeight != -1)        view->setMarginHeight(marginHeight);}
开发者ID:Igalia,项目名称:blink,代码行数:16,


示例21: updateWidgetGeometry

void RenderWidget::updateWidgetPosition(){    if (!m_widget || !node()) // Check the node in case destroy() has been called.        return;    bool boundsChanged = updateWidgetGeometry();    // if the frame bounds got changed, or if view needs layout (possibly indicating    // content size is wrong) we have to do a layout to set the right widget size    if (m_widget && m_widget->isFrameView()) {        FrameView* frameView = toFrameView(m_widget.get());        // Check the frame's page to make sure that the frame isn't in the process of being destroyed.        if ((boundsChanged || frameView->needsLayout()) && frameView->frame().page())            frameView->layout();    }}
开发者ID:Metrological,项目名称:chromium,代码行数:16,


示例22: if

// Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mouse// with touch input for plugins that don't support touch input).WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObject* layoutObject, const TouchEvent& event){    if (!event.touches())        return;    if (event.touches()->length() != 1) {        if (event.touches()->length() || event.type() != EventTypeNames::touchend || !event.changedTouches() || event.changedTouches()->length() != 1)            return;    }    const Touch* touch = event.touches()->length() == 1 ? event.touches()->item(0) : event.changedTouches()->item(0);    if (touch->identifier())        return;    if (event.type() == EventTypeNames::touchstart)        type = MouseDown;    else if (event.type() == EventTypeNames::touchmove)        type = MouseMove;    else if (event.type() == EventTypeNames::touchend)        type = MouseUp;    else        return;    timeStampSeconds = event.platformTimeStamp();    modifiers = event.modifiers();    // The mouse event co-ordinates should be generated from the co-ordinates of the touch point.    FrameView* view =  toFrameView(widget->parent());    // FIXME: if view == nullptr, pointInRootFrame will really be pointInRootContent.    IntPoint pointInRootFrame = roundedIntPoint(touch->absoluteLocation());    if (view)        pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);    IntPoint screenPoint = roundedIntPoint(touch->screenLocation());    globalX = screenPoint.x();    globalY = screenPoint.y();    windowX = pointInRootFrame.x();    windowY = pointInRootFrame.y();    button = WebMouseEvent::ButtonLeft;    modifiers |= WebInputEvent::LeftButtonDown;    clickCount = (type == MouseDown || type == MouseUp);    IntPoint localPoint = convertAbsoluteLocationForLayoutObject(touch->absoluteLocation(), *layoutObject);    x = localPoint.x();    y = localPoint.y();    pointerType = WebPointerProperties::PointerType::Touch;}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:49,


示例23: updateWebMouseEventFromCoreMouseEvent

// FIXME: Change |widget| to const Widget& after RemoteFrames get// RemoteFrameViews.static void updateWebMouseEventFromCoreMouseEvent(const MouseRelatedEvent& event, const Widget* widget, const LayoutObject& layoutObject, WebMouseEvent& webEvent){    webEvent.timeStampSeconds = event.platformTimeStamp();    webEvent.modifiers = event.modifiers();    FrameView* view = widget ? toFrameView(widget->parent()) : 0;    // TODO(bokan): If view == nullptr, pointInRootFrame will really be pointInRootContent.    IntPoint pointInRootFrame = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y());    if (view)        pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);    webEvent.globalX = event.screenX();    webEvent.globalY = event.screenY();    webEvent.windowX = pointInRootFrame.x();    webEvent.windowY = pointInRootFrame.y();    IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteLocation(), layoutObject);    webEvent.x = localPoint.x();    webEvent.y = localPoint.y();}
开发者ID:howardroark2018,项目名称:chromium,代码行数:20,



注:本文中的toFrameView函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ toHTMLElement函数代码示例
C++ toFloat函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。