Comment 3 for bug 1639185

Revision history for this message
Olivier Tilloy (osomon) wrote :

WebView::GetLocationBarContentOffset() returns -nan.

I’m not sure where the root cause of the issue lies (cc::CompositorFrameMetadata::top_controls_height and cc::CompositorFrameMetadata::top_controls_shown_ratio having non-number values), this would require further investigation to determine. The following patch works around the issue:

  float WebView::GetLocationBarContentOffset() const {
    float offset = compositor_frame_metadata().top_controls_height *
                   compositor_frame_metadata().top_controls_shown_ratio;
    if (std::isnan(offset)) {
      return 0.f;
    }
    return offset;
  }

Note that the code for the location bar controller has been significantly reworked in oxide since then, so it’s hard to tell whether the issue (which doesn’t exhibit in master) has been fixed in oxide itself or whether it was a bug in chromium that has been fixed since then.