Esempio n. 1
0
double CompositorProxy::scrollTop(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return 0.0;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kScrollTop,
                                 exceptionState))
    return 0.0;
  return m_state->scrollTop();
}
Esempio n. 2
0
DOMMatrix* CompositorProxy::transform(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return nullptr;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kTransform,
                                 exceptionState))
    return nullptr;
  return DOMMatrix::create(m_state->transform(), exceptionState);
}
DOMMatrix* CompositorProxy::transform(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return nullptr;
    if (raiseExceptionIfNotMutable(Attributes::TRANSFORM, exceptionState))
        return nullptr;
    return m_transform;
}
Esempio n. 4
0
double CompositorProxy::opacity(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return 0.0;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kOpacity,
                                 exceptionState))
    return 0.0;
  return m_state->opacity();
}
double CompositorProxy::scrollTop(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return 0.0;
    if (raiseExceptionIfNotMutable(Attributes::SCROLL_TOP, exceptionState))
        return 0.0;
    return m_scrollTop;
}
double CompositorProxy::opacity(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return 0.0;
    if (raiseExceptionIfNotMutable(Attributes::OPACITY, exceptionState))
        return 0.0;
    return m_opacity;
}
Esempio n. 7
0
void CompositorProxy::setScrollTop(double scrollTop,
                                   ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kScrollTop,
                                 exceptionState))
    return;
  m_state->setScrollTop(scrollTop);
}
Esempio n. 8
0
void CompositorProxy::setOpacity(double opacity,
                                 ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kOpacity,
                                 exceptionState))
    return;
  m_state->setOpacity(std::min(1., std::max(0., opacity)));
}
void CompositorProxy::setTransform(DOMMatrix* transform, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::TRANSFORM, exceptionState))
        return;
    m_transform = transform;
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::TRANSFORM);
}
void CompositorProxy::setScrollTop(double scrollTop, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::SCROLL_TOP, exceptionState))
        return;
    m_scrollTop = scrollTop;
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::SCROLL_TOP);
}
void CompositorProxy::setOpacity(double opacity, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::OPACITY, exceptionState))
        return;
    m_opacity = std::min(1., std::max(0., opacity));
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::OPACITY);
}
Esempio n. 12
0
void CompositorProxy::setTransform(DOMMatrix* transform,
                                   ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kTransform,
                                 exceptionState))
    return;
  m_state->setTransform(
      TransformationMatrix::toSkMatrix44(transform->matrix()));
}