Changeset 209924 in webkit


Ignore:
Timestamp:
Dec 16, 2016 10:32:27 AM (7 years ago)
Author:
Brent Fulgham
Message:

Arguments called in wrong order
https://bugs.webkit.org/show_bug.cgi?id=165923

Reviewed by Simon Fraser.

Source/WebCore:

Correct the ordering of several function calls.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): The 'nearestToPresentationStartTime'
argument is being checked for validity, but 'nearestToPresentationEndTime' is being used in the
calculation. This seems like a copy/paste error.

  • page/PrintContext.cpp:

(WebCore::PrintContext::outputLinkedDestinations): FloatPoint::expandedTo returns a new object that
has been expanded. This code continued using the 'unexpanded' point.

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::computeImageSizeInBytes): The 'bytesPerComponent' and 'componentsPerPixel'
variables were being passed in the wrong order.

  • platform/network/CacheValidation.cpp: The 'last-modified' header string was being concatenated with

the following string, resulting in an incorrect 'last-modifiedproxy-authenticate' string value.

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::firstGlyph): The ASSERT was assigning to the (by-value) input
parameter 'codePoint', rather than comparing it to the firstGlyph value's codePoint.

Tools:

The 'audioDeviceUIDs' array is being passed to the argument that expects video devices,
and the 'videoDeviceUIDs' array is being passed to the audo device argument. Fix this.

  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack): The
order of arguments to WKUserMediaPermissionRequestAllow are flipped.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209917 r209924  
     12016-12-15  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Arguments called in wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=165923
     5
     6        Reviewed by Simon Fraser.
     7
     8        Correct the ordering of several function calls.
     9
     10        * Modules/mediasource/SourceBuffer.cpp:
     11        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): The 'nearestToPresentationStartTime'
     12        argument is being checked for validity, but 'nearestToPresentationEndTime' is being used in the
     13        calculation. This seems like a copy/paste error.
     14        * page/PrintContext.cpp:
     15        (WebCore::PrintContext::outputLinkedDestinations): FloatPoint::expandedTo returns a new object that
     16        has been expanded. This code continued using the 'unexpanded' point.
     17        * platform/graphics/GraphicsContext3D.cpp:
     18        (WebCore::GraphicsContext3D::computeImageSizeInBytes): The 'bytesPerComponent' and 'componentsPerPixel'
     19        variables were being passed in the wrong order.
     20        * platform/network/CacheValidation.cpp: The 'last-modified' header string was being concatenated with
     21        the following string, resulting in an incorrect 'last-modifiedproxy-authenticate' string value.
     22        * svg/SVGToOTFFontConversion.cpp:
     23        (WebCore::SVGToOTFFontConverter::firstGlyph): The ASSERT was assigning to the (by-value) input
     24        parameter 'codePoint', rather than comparing it to the firstGlyph value's codePoint.
     25
    1262016-12-16  Youenn Fablet  <youenn@apple.com>
    227
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp

    r209390 r209924  
    11/*
    22 * Copyright (C) 2013 Google Inc. All rights reserved.
    3  * Copyright (C) 2013-2014 Apple Inc. All rights reserved.
     3 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    16391639
    16401640        auto nearestToPresentationEndTime = trackBuffer.buffered.nearest(presentationEndTime);
    1641         if (nearestToPresentationStartTime.isValid() && (nearestToPresentationEndTime - presentationEndTime).isBetween(MediaTime::zeroTime(), MediaSource::currentTimeFudgeFactor()))
     1641        if (nearestToPresentationEndTime.isValid() && (nearestToPresentationEndTime - presentationEndTime).isBetween(MediaTime::zeroTime(), MediaSource::currentTimeFudgeFactor()))
    16421642            presentationEndTime = nearestToPresentationEndTime;
    16431643
  • trunk/Source/WebCore/page/PrintContext.cpp

    r209411 r209924  
    11/*
    22 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
    3  * Copyright (C) 2007 Apple Inc.
     3 * Copyright (C) 2007, 2016 Apple Inc.
    44 *
    55 * This library is free software; you can redistribute it and/or
     
    276276
    277277        FloatPoint point = renderer->absoluteAnchorRect().minXMinYCorner();
    278         point.expandedTo(FloatPoint());
     278        point = point.expandedTo(FloatPoint());
    279279
    280280        if (!pageRect.contains(roundedIntPoint(point)))
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp

    r208910 r209924  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2016 Apple Inc. All rights reserved.
    33 * Copyright (C) 2010 Google Inc. All rights reserved.
    44 * Copyright (C) 2010 Mozilla Corporation. All rights reserved.
     
    330330        return GraphicsContext3D::INVALID_VALUE;
    331331    unsigned int bytesPerComponent, componentsPerPixel;
    332     if (!computeFormatAndTypeParameters(format, type, &bytesPerComponent, &componentsPerPixel))
     332    if (!computeFormatAndTypeParameters(format, type, &componentsPerPixel, &bytesPerComponent))
    333333        return GraphicsContext3D::INVALID_ENUM;
    334334    if (!width || !height) {
  • trunk/Source/WebCore/platform/network/CacheValidation.cpp

    r208985 r209924  
    4747    "etag",
    4848    "keep-alive",
    49     "last-modified"
     49    "last-modified",
    5050    "proxy-authenticate",
    5151    "proxy-connection",
  • trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp

    r208985 r209924  
    11/*
    2  * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    734734    auto codePointsIterator = codePoints.begin();
    735735    ASSERT(codePointsIterator != codePoints.end());
    736     ASSERT(codepoint = *codePointsIterator);
     736    ASSERT(codepoint == *codePointsIterator);
    737737#endif
    738738    return v[0];
  • trunk/Tools/ChangeLog

    r209918 r209924  
     12016-12-15  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Arguments called in wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=165923
     5
     6        Reviewed by Simon Fraser.
     7
     8        The 'audioDeviceUIDs' array is being passed to the argument that expects video devices,
     9        and the 'videoDeviceUIDs' array is being passed to the audo device argument. Fix this.
     10
     11        * TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:
     12        (TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack): The
     13        order of arguments to WKUserMediaPermissionRequestAllow are flipped.
     14
    1152016-12-16  Hunseop Jeong  <hs85.jeong@samsung.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2/UserMedia.cpp

    r201944 r209924  
    11/*
    22 * Copyright (C) 2014 Igalia S.L
     3 * Copyright (C) 2016 Apple Inc. All rights reserved.
    34 *
    45 *  This library is free software; you can redistribute it and/or
     
    5152            audioDeviceUID = WKStringCreateWithUTF8CString("");
    5253
    53         WKUserMediaPermissionRequestAllow(permissionRequest, videoDeviceUID.get(), audioDeviceUID.get());
     54        WKUserMediaPermissionRequestAllow(permissionRequest, audioDeviceUID.get(), videoDeviceUID.get());
    5455    }
    5556
Note: See TracChangeset for help on using the changeset viewer.