Port DOMTimer from std::chrono::milliseconds to WTF::Seconds type
[WebKit-https.git] / Source / WebCore / ChangeLog
index 30fde30..abc3134 100644 (file)
@@ -1,3 +1,148 @@
+2017-03-07  Chris Dumez  <cdumez@apple.com>
+
+        Port DOMTimer from std::chrono::milliseconds to WTF::Seconds type
+        https://bugs.webkit.org/show_bug.cgi?id=169236
+
+        Reviewed by Simon Fraser.
+
+        * dom/Document.cpp:
+        (WebCore::Document::minimumDOMTimerInterval):
+        (WebCore::Document::timerAlignmentInterval):
+        * dom/Document.h:
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::adjustMinimumDOMTimerInterval):
+        (WebCore::ScriptExecutionContext::minimumDOMTimerInterval):
+        (WebCore::ScriptExecutionContext::timerAlignmentInterval):
+        * dom/ScriptExecutionContext.h:
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didInstallTimerImpl):
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didInstallTimer):
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::didInstallTimer):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createTimerInstallData):
+        * inspector/TimelineRecordFactory.h:
+        * page/DOMTimer.cpp:
+        (WebCore::shouldForwardUserGesture):
+        (WebCore::userGestureTokenToForward):
+        (WebCore::DOMTimer::DOMTimer):
+        (WebCore::DOMTimer::install):
+        (WebCore::DOMTimer::intervalClampedToMinimum):
+        (WebCore::DOMTimer::alignedFireTime):
+        * page/DOMTimer.h:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::setTimeout):
+        (WebCore::DOMWindow::setInterval):
+        * page/Page.cpp:
+        (WebCore::Page::setTimerThrottlingState):
+        (WebCore::Page::setDOMTimerAlignmentIntervalIncreaseLimit):
+        (WebCore::Page::updateDOMTimerAlignmentInterval):
+        * page/Page.h:
+        (WebCore::Page::domTimerAlignmentInterval):
+        * page/Settings.cpp:
+        (WebCore::Settings::setMinimumDOMTimerInterval):
+        * page/Settings.h:
+        (WebCore::Settings::minimumDOMTimerInterval):
+        * page/SuspendableTimer.h:
+        (WebCore::SuspendableTimer::startRepeating):
+        (WebCore::SuspendableTimer::startOneShot):
+        (WebCore::SuspendableTimer::augmentFireInterval):
+        (WebCore::SuspendableTimer::augmentRepeatInterval):
+        * platform/Timer.cpp:
+        (WebCore::TimerBase::setNextFireTime):
+        * platform/Timer.h:
+        (WebCore::TimerBase::alignedFireTime):
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::setMinimumTimerInterval):
+        * testing/InternalSettings.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::isTimerThrottled):
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::setTimeout):
+        (WebCore::WorkerGlobalScope::setInterval):
+
+2017-03-07  Chris Dumez  <cdumez@apple.com>
+
+        Align initEvent / initCustomEvent / initMessageEvent with the latest specification
+        https://bugs.webkit.org/show_bug.cgi?id=169176
+
+        Reviewed by Alex Christensen.
+
+        Align initEvent / initCustomEvent / initMessageEvent with the latest specification
+        after:
+        - https://github.com/whatwg/dom/pull/417
+        - https://github.com/whatwg/html/pull/2410
+
+        In particular, the following changes were made:
+        - initEvent: The length property now properly returns 1 instead of 3 as only the
+          first parameter is mandatory. We were already behaving correcting the the length
+          property value was wrong because we forgot to drop a hack from the bindings
+          generator.
+        - initCustomEvent: Make all parameters except the first optional. Previously, all
+          parameters were mandatory so this is safe.
+        - initMessageEvent: Drop the custom code and mark the first parameter as mandatory.
+          A side effect of dropping the custom code is that null is no longer considered as
+          valid input for the last parameter. The parameter is of type sequence<> and the
+          new behavior is consistent with the specification and Firefox. If it turns out to
+          break existing content, I'll make the parameter nullable in a follow-up.
+
+        No new tests, updated existing tests.
+
+        * bindings/js/JSMessageEventCustom.cpp:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GeneratePropertiesHashTable):
+        * dom/CustomEvent.idl:
+        * dom/MessageEvent.idl:
+
+2017-03-07  Antti Koivisto  <antti@apple.com>
+
+        Differentiate between pending head and body stylesheets in Style::Scope
+        https://bugs.webkit.org/show_bug.cgi?id=169277
+
+        Reviewed by Andreas Kling.
+
+        Split pending stylesheet node set into separate sets for head and body elements and processing instructions.
+
+        This tightens typing and will also be useful later.
+
+        * style/StyleScope.cpp:
+        (WebCore::Style::Scope::~Scope):
+        (WebCore::Style::Scope::addPendingSheet):
+        (WebCore::Style::Scope::removePendingSheet):
+        (WebCore::Style::Scope::didRemovePendingStylesheet):
+        (WebCore::Style::Scope::hasPendingSheet):
+        (WebCore::Style::Scope::hasPendingSheetInBody):
+        (WebCore::Style::Scope::hasProcessingInstructionWithPendingSheet): Deleted.
+        * style/StyleScope.h:
+        (WebCore::Style::Scope::hasPendingSheet): Deleted.
+        (WebCore::Style::Scope::hasPendingSheets): Deleted.
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::hasLoadingStylesheet):
+
+            Just test for body stylesheets.
+
+        (WebCore::Style::TreeResolver::resolve):
+
+            Treat all before-body stylesheets uniformly.
+
+2017-03-07  Antoine Quint  <graouts@apple.com>
+
+        [Modern Media Controls] Setting a valid source after an invalid one retains the invalid placard
+        https://bugs.webkit.org/show_bug.cgi?id=169280
+        <rdar://problem/30876078>
+
+        Reviewed by Jon Lee.
+
+        We need to track when a new load start to see if we might have recovered from an error
+        and hide the "invalid" placard.
+
+        Test: media/modern-media-controls/placard-support/placard-support-error-recover.html
+
+        * Modules/modern-media-controls/media/placard-support.js:
+        (PlacardSupport.prototype.get mediaEvents):
+
 2017-03-07  Andy Estes  <aestes@apple.com>
 
         REGRESSION (r213412): JPEG premultiplication tests fail under GuardMalloc