⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 207988 in webkit


Ignore:
Timestamp:
Oct 27, 2016, 4:18:52 AM (10 years ago)
Author:
ddkilzer@apple.com
Message:

Fix merge r207708. rdar://problem/28962914

Location:
branches/safari-602-branch/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602-branch/Source/WebCore/ChangeLog

    r207955 r207988  
     12016-10-27  David Kilzer  <ddkilzer@apple.com>
     2
     3        Fix merge r207708. rdar://problem/28962914
     4
     5        * html/MediaElementSession.cpp:
     6        (WebCore::isElementRectMostlyInMainFrame): Call unsafeGet().
     7        * platform/graphics/ImageSource.cpp:
     8        (WebCore::ImageSource::calculateMaximumSubsamplingLevel): Call unsafeGet().
     9        * platform/graphics/IntRect.h:
     10        (WebCore::IntRect::area): Replace non-template area() method with template version.
     11        * rendering/shapes/Shape.cpp:
     12        (WebCore::Shape::createRasterShape): Call unsafeGet().
     13
    1142016-10-27  Matthew Hanson  <matthew_hanson@apple.com>
    215
  • branches/safari-602-branch/Source/WebCore/html/MediaElementSession.cpp

    r207953 r207988  
    658658    IntRect mainFrameRectAdjustedForScrollPosition = IntRect(-mainFrameView->documentScrollPositionRelativeToViewOrigin(), mainFrameView->contentsSize());
    659659    IntRect elementRectInMainFrame = element.clientRect();
    660     unsigned totalElementArea = elementRectInMainFrame.area();
     660    unsigned totalElementArea = elementRectInMainFrame.area().unsafeGet();
    661661    elementRectInMainFrame.intersect(mainFrameRectAdjustedForScrollPosition);
    662662
    663     return elementRectInMainFrame.area() > totalElementArea / 2;
     663    return elementRectInMainFrame.area().unsafeGet() > totalElementArea / 2;
    664664}
    665665
  • branches/safari-602-branch/Source/WebCore/platform/graphics/ImageSource.cpp

    r207953 r207988  
    104104   
    105105    for (SubsamplingLevel level = 0; level < maxSubsamplingLevel; ++level) {
    106         if (frameSizeAtIndex(0, level).area() < maximumImageAreaBeforeSubsampling)
     106        if (frameSizeAtIndex(0, level).area().unsafeGet() < maximumImageAreaBeforeSubsampling)
    107107            return level;
    108108    }
  • branches/safari-602-branch/Source/WebCore/platform/graphics/IntRect.h

    r207953 r207988  
    8686    int width() const { return m_size.width(); }
    8787    int height() const { return m_size.height(); }
    88    
    89     unsigned area() const { return m_size.area().unsafeGet(); }
     88
     89    template <typename T = WTF::CrashOnOverflow>
     90    Checked<unsigned, T> area() const { return m_size.area<T>(); }
    9091
    9192    void setX(int x) { m_location.setX(x); }
  • branches/safari-602-branch/Source/WebCore/rendering/shapes/Shape.cpp

    r207953 r207988  
    197197        int maxBufferY = std::min(imageRect.height(), marginRect.maxY() - imageRect.y());
    198198
    199         if ((imageRect.area() * 4) == pixelArrayLength) {
     199        if ((imageRect.area() * 4).unsafeGet() == pixelArrayLength) {
    200200            for (int y = minBufferY; y < maxBufferY; ++y) {
    201201                int startX = -1;
Note: See TracChangeset for help on using the changeset viewer.