1 2015-03-17 Zalan Bujtas <zalan@apple.com>
3 Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
4 https://bugs.webkit.org/show_bug.cgi?id=142809
6 Reviewed by Antti Koivisto.
8 FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
10 No change in functionality.
12 * rendering/SimpleLineLayoutFlowContents.h:
13 (WebCore::SimpleLineLayout::FlowContents::begin):
14 (WebCore::SimpleLineLayout::FlowContents::end):
15 (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
16 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
17 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
18 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
19 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
20 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
21 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
22 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
23 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
25 2015-03-17 Zalan Bujtas <zalan@apple.com>
27 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
28 https://bugs.webkit.org/show_bug.cgi?id=142785
30 Reviewed by Antti Koivisto.
32 This is in transition to support <br>. A particular position could point to multiple
33 segments when <br> is directly followed by text.
35 No change in functionality.
37 * rendering/SimpleLineLayoutFlowContents.cpp:
38 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
39 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
40 * rendering/SimpleLineLayoutFlowContents.h:
41 (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
42 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
43 (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
44 * rendering/SimpleLineLayoutResolver.cpp:
45 (WebCore::SimpleLineLayout::RunResolver::Run::text):
47 2015-03-17 Chris Dumez <cdumez@apple.com>
49 [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
50 https://bugs.webkit.org/show_bug.cgi?id=142752
51 <rdar://problem/20176731>
53 Reviewed by Antti Koivisto.
55 setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
56 and iOS on pages using a lot of timers.
58 For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
59 setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
60 stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
61 CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
63 The issue is that we keep creating, adding to run loop modes, and then
64 destroying the sharedTimer for each firing event. This is very
65 expensive. In such case, the CFRunLoopTimerRef documentation advises to
67 ... create a repeating timer with an initial firing time in the distant
68 future (or the initial firing time) and a very large repeat interval—on
69 the order of decades or more—and add it to all the necessary run loop
70 modes. Then, when you know when the timer should fire next, you reset
71 the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
72 timer’s own callback function. This technique effectively produces a
73 reusable, asynchronous timer.
76 Doing so greatly decreases CPU time spend in:
77 - setSharedTimerFireInterval(): 15.4% -> 4.6%
78 - stopSharedTimer(): 14.6% -> 8.6%
80 Overall CPU time spent on bing.com in timerFired() goes down from
83 This patch also refactors the SharedTimer code to share as much as
84 possible between Mac and iOS.
86 This patch is based in part on the following patch:
87 http://trac.webkit.org/changeset/143210
89 [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
91 * WebCore.xcodeproj/project.pbxproj:
92 * platform/SharedTimer.h:
93 (WebCore::SharedTimer::invalidate):
94 (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
95 (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
96 (WebCore::MainThreadSharedTimer::stop): Deleted.
97 * platform/ThreadTimers.cpp:
98 (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
99 * platform/cf/SharedTimerCF.mm: Added.
100 (WebCore::applicationDidBecomeActive):
101 (WebCore::setupPowerObserver):
102 (WebCore::setSharedTimerFiredFunction):
103 (WebCore::timerFired):
104 (WebCore::restartSharedTimer):
105 (WebCore::invalidateSharedTimer):
106 (WebCore::setSharedTimerFireInterval):
107 (WebCore::stopSharedTimer):
108 * platform/efl/SharedTimerEfl.cpp:
109 (WebCore::invalidateSharedTimer):
110 * platform/gtk/SharedTimerGtk.cpp:
111 (WebCore::invalidateSharedTimer):
112 * platform/ios/SharedTimerIOS.mm: Removed.
113 * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
114 * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
115 (WebCore::PowerObserver::PowerObserver):
116 (WebCore::PowerObserver::~PowerObserver):
117 (WebCore::PowerObserver::didReceiveSystemPowerNotification):
118 * platform/win/SharedTimerWin.cpp:
119 (WebCore::removeSharedTimer):
121 2015-03-17 Tim Horton <timothy_horton@apple.com>
123 Cannot invoke action menus anymore
124 https://bugs.webkit.org/show_bug.cgi?id=142797
125 <rdar://problem/20032670>
127 Reviewed by Beth Dakin.
129 * platform/spi/mac/NSMenuSPI.h:
130 Add additional NSMenu SPI.
132 2015-03-17 Zalan Bujtas <zalan@apple.com>
134 Simple line layout: Split fragments on renderer boundary on the fly.
135 https://bugs.webkit.org/show_bug.cgi?id=142579
137 Reviewed by Antti Koivisto.
139 Fragment splitting at renderers' boundary at the end of the line is no longer needed.
140 This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
141 fragments across renderer boundary.
143 Test: fast/text/simple-line-with-multiple-renderers.html
145 * rendering/SimpleLineLayout.cpp:
146 (WebCore::SimpleLineLayout::revertRuns):
147 (WebCore::SimpleLineLayout::LineState::isEmpty):
148 (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
149 whether neighboring fragments need collapsing.
150 (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
151 a fragment continuation.
152 (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
153 (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
154 they all get added to the current line.
155 (WebCore::SimpleLineLayout::createLineRuns):
156 (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
157 (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
158 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
159 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
160 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
161 (WebCore::SimpleLineLayout::begin): Deleted.
162 (WebCore::SimpleLineLayout::end): Deleted.
163 (WebCore::SimpleLineLayout::preWrap): Deleted.
164 (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
165 (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
166 (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
167 (WebCore::SimpleLineLayout::createTextRuns): Deleted.
168 (WebCore::SimpleLineLayout::create): Deleted.
169 (WebCore::SimpleLineLayout::Layout::create): Deleted.
170 * rendering/SimpleLineLayoutFlowContents.h:
171 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
172 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
173 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
174 * rendering/SimpleLineLayoutFunctions.cpp:
175 (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
176 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
177 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
178 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
179 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
180 (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
181 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
182 * rendering/SimpleLineLayoutTextFragmentIterator.h:
183 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
184 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
185 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
186 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
187 (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
188 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
190 2015-03-17 Jeremy Jones <jeremyj@apple.com>
192 When tab hides, pause fullscreen and exit normally.
193 https://bugs.webkit.org/show_bug.cgi?id=142685
195 Reviewed by Eric Carlson.
197 Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
198 the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
200 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
201 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
203 2015-03-17 Per Arne Vollan <peavo@outlook.com>
205 [WinCairo] Video position is incorrect when located inside a frame.
206 https://bugs.webkit.org/show_bug.cgi?id=142784
208 Reviewed by Brent Fulgham.
210 We need to take the enclosing frame's position into account, when finding the video position.
212 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
213 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
215 2015-03-17 Benjamin Poulain <bpoulain@apple.com>
217 Compile character ranges targeting the same state as range check in the bytecode
218 https://bugs.webkit.org/show_bug.cgi?id=142759
220 Reviewed by Alex Christensen.
222 Previously, character ranges would be compiled as many individual character checks.
223 For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
224 to enormous matchines.
226 With this patch, we find the ranges at lowering time and generate a single instruction
227 for them: "CheckValueRange". This helps making the machine denser when the input
230 The second part of this patch goes further in the case where the transitions out of
231 a state cover the entire alphabet. In that case, we create a fallback transition
232 on the fly and remove all the ranges made useless.
233 That case is common when ranges are used with inverse character set (e.g. [^a]+a).
235 * contentextensions/DFABytecode.h:
236 (WebCore::ContentExtensions::instructionSizeWithArguments):
237 * contentextensions/DFABytecodeCompiler.cpp:
238 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
239 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
240 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
241 (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
242 * contentextensions/DFABytecodeCompiler.h:
243 Extend the compiler to detect ranges and lower them as CheckValueRange.
245 * contentextensions/DFABytecodeInterpreter.cpp:
246 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
247 Range checks in the interpreter.
249 * contentextensions/NFA.cpp:
250 (WebCore::ContentExtensions::NFA::setFinal):
251 This assertion does not make sense with the current codebase. Actions are "compressed",
252 it is possible to have two patterns with the same action.
254 * contentextensions/NFAToDFA.cpp:
255 (WebCore::ContentExtensions::simplifyTransitions):
256 A very simple DFA optimization function: it only reduce the strength of ranges.
258 (WebCore::ContentExtensions::NFAToDFA::convert):
260 2015-03-17 Jer Noble <jer.noble@apple.com>
262 REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
263 https://bugs.webkit.org/show_bug.cgi?id=142787
265 Reviewed by Eric Carlson.
267 Null check m_player before derefencing.
269 * html/HTMLMediaElement.cpp:
270 (WebCore::HTMLMediaElement::parseAttribute):
272 2015-03-17 Beth Dakin <bdakin@apple.com>
274 DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
276 https://bugs.webkit.org/show_bug.cgi?id=142700
278 rdar://problem/20165168
280 Reviewed by Tim Horton.
282 This patch adds a new enum and member variable so that EventHandler can keep track
283 of the current immediate action state.
284 * page/EventHandler.cpp:
285 (WebCore::EventHandler::EventHandler):
287 A new mouse press even is starting. We can re-set m_immediateActionStage to none
288 unless a Hit Test has already been performed.
289 (WebCore::EventHandler::handleMousePressEvent):
291 If an immediate action was completed, then send mouse to the DOM and return early.
292 This will prevent us from doing our own normal mouseup behaviors such as
293 navigating to a link that was clicked — we only want to do that if the click was
294 not used to perform an immediate action.
295 (WebCore::EventHandler::handleMouseReleaseEvent):
296 * page/EventHandler.h:
297 (WebCore::EventHandler::setImmediateActionStage):
299 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
301 Use a better parameter name for Document.getElementsByClassName
302 https://bugs.webkit.org/show_bug.cgi?id=142771
304 Reviewed by Chris Dumez.
306 * bindings/objc/PublicDOMInterfaces.h:
309 2015-03-17 Timothy Horton <timothy_horton@apple.com>
311 Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
312 https://bugs.webkit.org/show_bug.cgi?id=142776
313 <rdar://problem/18921338>
315 Reviewed by Alexey Proskuryakov.
317 Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
319 In some cases (like the new test), we can end up trying to start
320 requestAnimationFrame on a Document that has no Page. Most paths null-checked
321 the Page and did the right thing, but one failed to do so. In addition,
322 the current fallback (when Page is null) can result in us constructing
323 the wrong kind of DisplayRefreshMonitor, which could lead to trouble
324 down the road when it's reused. Instead, just completely avoid making a
325 DisplayRefreshMonitor in the null-page case.
327 * dom/ScriptedAnimationController.cpp:
328 (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
329 If the page is null, bail.
331 * dom/ScriptedAnimationController.h:
332 * platform/graphics/DisplayRefreshMonitor.cpp:
333 (WebCore::DisplayRefreshMonitor::create):
334 Use Optional<> to make it easy to distinguish between ChromeClient
335 being unreachable (because we don't have a Page for some reason) and
336 ChromeClient declaring that it doesn't want to override the type of
337 DisplayRefreshMonitor that is created.
339 If ChromeClient was unreachable for some reason, we'll get back an engaged
340 nullptr and return it (instead of creating a DisplayRefreshMonitor based
341 on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
342 in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
345 If instead the client returns a disengaged Nullopt, we'll interpret that as
346 "construct the default type", which falls back on the platform #ifdefs to
349 * platform/graphics/DisplayRefreshMonitorManager.cpp:
350 (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
351 (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
352 Silently handle the case where we failed to make a DisplayRefreshMonitor.
354 * platform/graphics/DisplayRefreshMonitor.h:
355 * platform/graphics/DisplayRefreshMonitorClient.h:
356 * platform/graphics/GraphicsLayerUpdater.cpp:
357 (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
358 * platform/graphics/GraphicsLayerUpdater.h:
359 * rendering/RenderLayerCompositor.cpp:
360 (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
361 * rendering/RenderLayerCompositor.h:
362 Adjust to the new signature of createDisplayRefreshMonitor, and return
363 an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.
365 * page/ChromeClient.h:
366 Return Nullopt (indicating a lack of override) by default.
368 2015-03-17 Dean Jackson <dino@apple.com>
370 Implement Scroll Container Animation Triggers
371 https://bugs.webkit.org/show_bug.cgi?id=142732
373 Attempt to fix the build.
375 * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
377 2015-03-17 Dean Jackson <dino@apple.com>
379 Implement Scroll Container Animation Triggers
380 https://bugs.webkit.org/show_bug.cgi?id=142732
382 Reviewed by Simon Fraser.
384 Test: animations/trigger-container-scroll-simple.html
386 Basic implementation of container-scroll. It only checks
387 the page scroll position for trigger values (not the scrolling
388 container in an overflow).
390 * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
391 so that this property will appear in the inspector.
393 * page/FrameView.cpp:
394 (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
395 controller know about it.
397 * page/animation/AnimationBase.cpp:
398 (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
399 (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
400 and the scroll position is past it, then tell the state machine that
402 (WebCore::AnimationBase::timeToNextService): Use the scroll position as
403 an input to the update timer if a trigger is involved.
405 * page/animation/AnimationController.cpp:
406 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
407 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
408 (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
409 * page/animation/AnimationController.h:
410 * page/animation/AnimationControllerPrivate.h:
412 * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
414 (WebCore::CompositeAnimation::CompositeAnimation):
415 (WebCore::CompositeAnimation::updateKeyframeAnimations):
416 * page/animation/CompositeAnimation.h:
417 (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
418 * platform/animation/Animation.cpp:
419 (WebCore::Animation::operator=):
421 2015-03-17 Simon Fraser <simon.fraser@apple.com>
423 Move some code from LogicalSelectionOffsetCaches into RenderElement
424 https://bugs.webkit.org/show_bug.cgi?id=142758
426 Reviewed by Myles C. Maxfield.
428 LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
429 that should be used in more places, so move it into RenderElement.
433 * rendering/LogicalSelectionOffsetCaches.h:
434 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
435 (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
436 (WebCore::isNonRenderBlockInline): Deleted.
437 (WebCore::containingBlockForFixedPosition): Deleted.
438 (WebCore::containingBlockForAbsolutePosition): Deleted.
439 (WebCore::containingBlockForObjectInFlow): Deleted.
440 * rendering/RenderBlock.cpp: No need to initialize static data.
441 (WebCore::RenderBlock::positionedObjects): nullptr
442 * rendering/RenderElement.cpp:
443 (WebCore::RenderElement::containingBlockForFixedPosition):
444 (WebCore::RenderElement::containingBlockForAbsolutePosition):
445 (WebCore::isNonRenderBlockInline):
446 (WebCore::RenderElement::containingBlockForObjectInFlow):
447 * rendering/RenderElement.h:
448 (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
449 * rendering/RenderLayer.cpp:
450 (WebCore::isContainerForPositioned):
451 * rendering/RenderObject.cpp:
452 (WebCore::RenderObject::containingBlock):
454 2015-03-17 Alex Christensen <achristensen@webkit.org>
456 [WinCairo] Unreviewed build fix after r181640.
458 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
459 Tell Windows how to find ShaderLang.h.
461 2015-03-17 Chris Dumez <cdumez@apple.com>
463 'pageLoaded' diagnostic logging is too verbose
464 https://bugs.webkit.org/show_bug.cgi?id=142727
465 <rdar://problem/18937048>
467 Reviewed by Eric Carlson.
469 Make 'pageLoaded' diagnostic logging less verbose:
470 - Log once per main frame instead of once for subframe
473 * loader/FrameLoader.cpp:
474 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
476 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
478 [GTK] Wrong transfer annotations used in GObject DOM bindings
479 https://bugs.webkit.org/show_bug.cgi?id=142780
481 Reviewed by Gustavo Noronha Silva.
483 We are using transfer none for all methods returning a GObject DOM
484 Object. That's not true. Only objects derived from Node are
485 automatically released by the DOM object cache and can be transfer
486 none. All other objects are added to the cache only to avoid
487 creating the same wrapper twice for the same core object, but
488 caller should release the returned reference.
490 * bindings/gobject/WebKitDOMCustomUnstable.h:
491 * bindings/scripts/CodeGeneratorGObject.pm:
492 (GetTransferTypeForReturnType):
495 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
497 [GTK] WebKitDOM objects leaking
498 https://bugs.webkit.org/show_bug.cgi?id=118788
500 Reviewed by Darin Adler and Sergio Villar Senin.
502 Use a DOMwindowObserver class, derived from DOMWindowProperty to
503 be notified when the window object is detached from the frame to
504 clear the DOM objects associated to that frame in that case too.
506 * bindings/gobject/DOMObjectCache.cpp:
508 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
510 [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
511 https://bugs.webkit.org/show_bug.cgi?id=142530
513 Reviewed by Darin Adler.
515 Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
516 us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
517 and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
520 Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
521 required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
522 whole WebCore library anymore, only the ANGLESupport library.
525 * platform/graphics/ANGLEWebKitBridge.h:
526 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
528 2015-03-17 Matt Baker <mattbaker@apple.com>
530 Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
531 https://bugs.webkit.org/show_bug.cgi?id=142029
533 Reviewed by Timothy Hatcher.
535 Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
537 * inspector/InspectorTimelineAgent.cpp:
538 (WebCore::currentRunLoop):
539 (WebCore::InspectorTimelineAgent::internalStart):
540 (WebCore::InspectorTimelineAgent::internalStop):
541 (WebCore::toProtocol):
542 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
543 Install observers for the begining and end of the runloop when recording begins. All other
544 instrumented timeline events get added as children of the current runloop record, which is
545 sent to the frontend once the runloop completes.
547 * inspector/InspectorTimelineAgent.h:
549 * platform/cf/RunLoopObserver.cpp:
550 (WebCore::RunLoopObserver::schedule):
551 Wrapper changed to allow observing arbitrary runloop activities.
553 * platform/cf/RunLoopObserver.h:
555 2015-03-17 Philippe Normand <pnormand@igalia.com>
557 [GTK] basic OpenWebRTC build support
558 https://bugs.webkit.org/show_bug.cgi?id=142393
560 Reviewed by Carlos Garcia Campos.
562 * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
564 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
566 Remove never used "useLayerOnTop" bindings generator argument
567 https://bugs.webkit.org/show_bug.cgi?id=142773
569 Reviewed by Darin Adler.
571 * bindings/scripts/CodeGenerator.pm:
572 * bindings/scripts/CodeGeneratorJS.pm:
573 * bindings/scripts/CodeGeneratorObjC.pm:
574 * bindings/scripts/generate-bindings.pl:
576 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
578 Enable ES6 classes by default
579 https://bugs.webkit.org/show_bug.cgi?id=142774
581 Reviewed by Gavin Barraclough.
583 * Configurations/FeatureDefines.xcconfig:
585 2015-03-16 Simon Fraser <simon.fraser@apple.com>
587 Update the debug overlays after layout
588 https://bugs.webkit.org/show_bug.cgi?id=142768
590 Reviewed by Zalan Bujtas.
592 The debug overlays need to be updated after layout, in case elements with wheel event handlers
595 DebugPageOverlays::didLayout() is cheap if there are no overlays.
597 Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
598 to the main frame's event handler region.
600 * page/DebugPageOverlays.cpp:
601 (WebCore::DebugPageOverlays::regionChanged):
602 * page/DebugPageOverlays.h:
603 (WebCore::DebugPageOverlays::didLayout):
604 (WebCore::DebugPageOverlays::didChangeEventHandlers):
605 * page/FrameView.cpp:
606 (WebCore::FrameView::layout):
608 2015-03-16 Jon Lee <jonlee@apple.com>
610 Unreviewed fix for crash after r181608.
612 * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
614 2015-03-16 Simon Fraser <simon.fraser@apple.com>
616 Generalize the Document code that maintains a set of nodes with event handlers
617 https://bugs.webkit.org/show_bug.cgi?id=142762
619 Reviewed by Zalan Bujtas, Darin Adler.
621 Document.h defines a TouchEventTargetSet type, which will in future be used for
622 other event types too (wheel events), so rename it to EventTargetSet.
624 Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
628 (WebCore::Document::prepareForDestruction): References
629 (WebCore::Document::didAddTouchEventHandler): Ditto.
630 (WebCore::Document::didRemoveEventTargetNode): Ditto.
632 (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
634 * html/HTMLInputElement.cpp:
635 (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
636 (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
637 * page/DOMWindow.cpp:
638 (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
640 2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
642 Web Inspector: Object Previews in Indexed DB tables
643 https://bugs.webkit.org/show_bug.cgi?id=140813
645 Reviewed by Timothy Hatcher.
647 * inspector/InspectorIndexedDBAgent.cpp:
648 Include previews with object store objects.
650 2015-03-16 Jer Noble <jer.noble@apple.com>
652 [Mac] Update missing image UI
653 https://bugs.webkit.org/show_bug.cgi?id=142592
655 Reviewed by Darin Adler.
657 Update the broken image glyphs with new art (including a 3x image).
659 Test: fast/hidpi/broken-image-icon-very-hidpi.html
661 * Resources/missingImage.png:
662 * Resources/missingImage@2x.png:
663 * Resources/missingImage@3x.png: Added.
664 * WebCore.xcodeproj/project.pbxproj:
665 * loader/cache/CachedImage.cpp:
666 (WebCore::CachedImage::brokenImage):
668 2015-03-16 Dean Jackson <dino@apple.com>
670 Parsing and Style Resolution of Container-based Animation Triggers
671 https://bugs.webkit.org/show_bug.cgi?id=142687
672 <rdar://problem/20170007>
674 Reviewed by Simon Fraser.
676 Take 2 after the previous patch was rolled out.
678 This is the beginning of a prototype implementation of
679 CSS Animation Triggers, as described by
680 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
682 In this patch we parse and resolve the value of a new
683 CSS property "-webkit-animation-trigger". At the moment it
684 only accepts one function value "container-scroll", which
685 will trigger the animation at an absolute position within
686 an element's scrolling container. We expect the syntax to
687 change in the near future, as the spec is written.
689 Tests: animations/trigger-computed-style.html
690 animations/trigger-parsing.html
692 * WebCore.xcodeproj/project.pbxproj: Add the new files.
694 * css/CSSAnimationTriggerScrollValue.cpp: Added.
695 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
696 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
697 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
698 scroll trigger. This name may change in the future to better represent the
699 type of trigger, but it is good enough for now.
700 (WebCore::CSSAnimationTriggerScrollValue::create):
701 (WebCore::CSSAnimationTriggerScrollValue::startValue):
702 (WebCore::CSSAnimationTriggerScrollValue::endValue):
703 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
705 * css/CSSComputedStyleDeclaration.cpp:
706 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
707 (WebCore::getAnimationTriggerValue): Gets the current computed style.
708 (WebCore::ComputedStyleExtractor::propertyValue):
711 (WebCore::CSSParser::parseValue):
712 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
713 and record the value as a CSSAnimationTriggerScrollValue.
714 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
717 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
719 * css/CSSToStyleMap.cpp:
720 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
722 * css/CSSToStyleMap.h:
724 * css/CSSValue.cpp: Handle the new CSSValue type.
725 (WebCore::CSSValue::equals):
726 (WebCore::CSSValue::cssText):
727 (WebCore::CSSValue::destroy):
729 (WebCore::CSSValue::isAnimationTriggerScrollValue):
731 * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
732 and use them in the operator==.
733 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
734 (WebCore::Animation::isTriggerSet):
735 (WebCore::Animation::isEmpty):
737 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
738 "auto" and the scrolling trigger.
739 (WebCore::AnimationTrigger::~AnimationTrigger):
740 (WebCore::AnimationTrigger::type):
741 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
742 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
743 (WebCore::AnimationTrigger::AnimationTrigger):
744 (WebCore::AutoAnimationTrigger::create):
745 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
746 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
747 (WebCore::ScrollAnimationTrigger::create):
748 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
749 (WebCore::ScrollAnimationTrigger::startValue):
750 (WebCore::ScrollAnimationTrigger::setStartValue):
751 (WebCore::ScrollAnimationTrigger::endValue):
752 (WebCore::ScrollAnimationTrigger::setEndValue):
753 (WebCore::ScrollAnimationTrigger::hasEndValue):
754 (WebCore::ScrollAnimationTrigger::setHasEndValue):
755 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
757 2015-03-16 Alex Christensen <achristensen@webkit.org>
759 Progress towards CMake on Mac
760 https://bugs.webkit.org/show_bug.cgi?id=142747
762 Reviewed by Chris Dumez.
766 Added more directories, interfaces, and forwarding headers.
767 Temporarily disabled the generating of ObjC bindings in CMake builds.
768 * platform/mac/PasteboardMac.mm:
769 Removed unused include.
771 2015-03-16 Joanmarie Diggs <jdiggs@igalia.com>
773 AX: Crash viewing http://www.last.fm/
774 https://bugs.webkit.org/show_bug.cgi?id=142309
776 Reviewed by Chris Fleizach.
778 The crash occurs when a not-yet-rendered object emits a children-changed
779 signal. If an assistive technology is listening, AT-SPI2 will attempt to
780 create and cache the state set for the child being added and the creation
781 of the state set assumes a rendered object.
783 Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
785 * accessibility/atk/AXObjectCacheAtk.cpp:
786 (WebCore::AXObjectCache::attachWrapper):
788 2015-03-16 Commit Queue <commit-queue@webkit.org>
790 Unreviewed, rolling out r181492.
791 https://bugs.webkit.org/show_bug.cgi?id=142756
793 May have regressed PLT (Requested by anttik on #webkit).
797 "Cache glyph widths to GlyphPages"
798 https://bugs.webkit.org/show_bug.cgi?id=142028
799 http://trac.webkit.org/changeset/181492
801 2015-03-16 Roger Fong <roger_fong@apple.com>
803 [WebGL2] Instancing draw calls.
804 https://bugs.webkit.org/show_bug.cgi?id=126939.
805 <rdar://problem/15002379>
807 Reviewed by Dean Jackson.
809 Tested by a modified version of the 1.0.3 conformance tests:
810 conformance/extensions/angle-instanced-arrays.html
811 conformance/extensions/angle-instanced-arrays-out-of-bounds.html
813 These tests will be landed along with other modified extension conformance tests
814 once approval from Khronos is received.
816 * html/canvas/WebGL2RenderingContext.cpp:
817 (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
818 (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
819 (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
820 (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
821 (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
822 (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
823 * html/canvas/WebGL2RenderingContext.h:
824 * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
825 * html/canvas/WebGLRenderingContext.cpp:
826 (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
827 (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
828 * html/canvas/WebGLRenderingContext.h:
829 * html/canvas/WebGLRenderingContextBase.cpp:
830 (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
831 (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
832 (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
833 * html/canvas/WebGLRenderingContextBase.h:
835 2015-03-16 Commit Queue <commit-queue@webkit.org>
837 Unreviewed, rolling out r181572.
838 https://bugs.webkit.org/show_bug.cgi?id=142755
840 Caused weird test failures in transitions and animations
841 (Requested by dino on #webkit).
845 "Parsing and Style Resolution of Container-based Animation
847 https://bugs.webkit.org/show_bug.cgi?id=142687
848 http://trac.webkit.org/changeset/181572
850 2015-03-16 Yoav Weiss <yoav@yoav.ws>
852 Remove setCachedImage from HTMLImageElement since it is not used
853 https://bugs.webkit.org/show_bug.cgi?id=142740
855 Reviewed by Chris Dumez.
857 No new tests since this patch is just removing dead code.
859 HTMLImageElement::setCachedImage is not being called by anyone.
860 This patch removes it, since it's dead code.
862 * html/HTMLImageElement.h:
863 (WebCore::HTMLImageElement::setCachedImage): Deleted.
865 2015-03-16 Brent Fulgham <bfulgham@apple.com>
867 WebKit1 Clients Are Not Reliably Repainted
868 https://bugs.webkit.org/show_bug.cgi?id=142750
869 <rdar://problem/20042453>
871 Reviewed by Simon Fraser.
873 * page/FrameView.cpp:
874 (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
875 the early return so we can see when this happening in debug builds.
877 (WebCore::FrameView::inPaintableState): Added.
879 2015-03-16 Chris Dumez <cdumez@apple.com>
881 Make DatabaseContext suspendable if there is no pending database activity
882 https://bugs.webkit.org/show_bug.cgi?id=142716
883 <rdar://problem/19923085>
885 Reviewed by Andreas Kling.
887 Make DatabaseContext suspendable if there is no pending database
889 - No pending Database creation JS callback
890 - No pending transaction(s)
892 Suspending is safe in this case because we are not going to interrupt
893 any database activity, nor fire any JS event.
895 This greatly increases the likelihood of pages using websql to enter
898 Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
899 fast/history/page-cache-webdatabase-pending-transaction.html
901 * Modules/webdatabase/Database.cpp:
902 (WebCore::Database::hasPendingTransaction):
903 * Modules/webdatabase/Database.h:
904 * Modules/webdatabase/DatabaseContext.cpp:
905 (WebCore::DatabaseContext::canSuspend):
906 * Modules/webdatabase/DatabaseManager.cpp:
907 (WebCore::DatabaseManager::openDatabase):
908 * Modules/webdatabase/DatabaseThread.cpp:
909 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
910 * Modules/webdatabase/DatabaseThread.h:
912 2015-03-16 Brady Eidson <beidson@apple.com>
914 Addressing additional review feedback after http://trac.webkit.org/changeset/181565
915 https://bugs.webkit.org/show_bug.cgi?id=142733
917 Reviewed by Darin Adler.
919 * loader/icon/IconController.cpp:
920 (WebCore::IconController::startLoader): Null check page()
922 2015-03-16 Roger Fong <roger_fong@apple.com>
924 [Win] Unreviewed build fix attempt after r181571.
926 * WebCore.vcxproj/WebCore.vcxproj:
928 2015-03-16 Roger Fong <roger_fong@apple.com>
930 [WebGL2] Multiple Render Targets.
931 https://bugs.webkit.org/show_bug.cgi?id=126994.
932 <rdar://problem/15815766>
934 Reviewed by Dean Jackson.
936 Tested by a modified version of the 1.0.3 conformance test:
937 conformance/extensions/webgl-draw-buffers.html
938 This test will be landed along with other modified extension conformance tests
939 once approval from Khronos is received.
941 * html/canvas/WebGL2RenderingContext.cpp:
942 (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
943 Returns different error messages, uses non EXT enums.
944 (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
945 (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
946 (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
947 (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
948 (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
949 (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
950 (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
951 (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
952 * html/canvas/WebGL2RenderingContext.h:
953 * html/canvas/WebGLFramebuffer.cpp:
954 (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
955 * html/canvas/WebGLRenderingContext.cpp:
956 (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
957 (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
958 (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
959 * html/canvas/WebGLRenderingContext.h:
960 * html/canvas/WebGLRenderingContextBase.cpp:
961 (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
962 * html/canvas/WebGLRenderingContextBase.h:
964 2015-03-16 Dean Jackson <dino@apple.com>
966 Parsing and Style Resolution of Container-based Animation Triggers
967 https://bugs.webkit.org/show_bug.cgi?id=142687
968 <rdar://problem/20170007>
970 Reviewed by Simon Fraser.
972 This is the beginning of a prototype implementation of
973 CSS Animation Triggers, as described by
974 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
976 In this patch we parse and resolve the value of a new
977 CSS property "-webkit-animation-trigger". At the moment it
978 only accepts one function value "container-scroll", which
979 will trigger the animation at an absolute position within
980 an element's scrolling container. We expect the syntax to
981 change in the near future, as the spec is written.
983 Tests: animations/trigger-computed-style.html
984 animations/trigger-parsing.html
986 * WebCore.xcodeproj/project.pbxproj: Add the new files.
988 * css/CSSAnimationTriggerScrollValue.cpp: Added.
989 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
990 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
991 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
992 scroll trigger. This name may change in the future to better represent the
993 type of trigger, but it is good enough for now.
994 (WebCore::CSSAnimationTriggerScrollValue::create):
995 (WebCore::CSSAnimationTriggerScrollValue::startValue):
996 (WebCore::CSSAnimationTriggerScrollValue::endValue):
997 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
999 * css/CSSComputedStyleDeclaration.cpp:
1000 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
1001 (WebCore::getAnimationTriggerValue): Gets the current computed style.
1002 (WebCore::ComputedStyleExtractor::propertyValue):
1004 * css/CSSParser.cpp:
1005 (WebCore::CSSParser::parseValue):
1006 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
1007 and record the value as a CSSAnimationTriggerScrollValue.
1008 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
1011 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
1013 * css/CSSToStyleMap.cpp:
1014 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
1015 an Animation object.
1016 * css/CSSToStyleMap.h:
1018 * css/CSSValue.cpp: Handle the new CSSValue type.
1019 (WebCore::CSSValue::equals):
1020 (WebCore::CSSValue::cssText):
1021 (WebCore::CSSValue::destroy):
1023 (WebCore::CSSValue::isAnimationTriggerScrollValue):
1025 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
1026 (WebCore::Animation::isTriggerSet):
1027 (WebCore::Animation::isEmpty):
1029 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
1030 "auto" and the scrolling trigger.
1031 (WebCore::AnimationTrigger::~AnimationTrigger):
1032 (WebCore::AnimationTrigger::type):
1033 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
1034 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
1035 (WebCore::AnimationTrigger::AnimationTrigger):
1036 (WebCore::AutoAnimationTrigger::create):
1037 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
1038 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
1039 (WebCore::ScrollAnimationTrigger::create):
1040 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
1041 (WebCore::ScrollAnimationTrigger::startValue):
1042 (WebCore::ScrollAnimationTrigger::setStartValue):
1043 (WebCore::ScrollAnimationTrigger::endValue):
1044 (WebCore::ScrollAnimationTrigger::setEndValue):
1045 (WebCore::ScrollAnimationTrigger::hasEndValue):
1046 (WebCore::ScrollAnimationTrigger::setHasEndValue):
1047 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
1049 2015-03-15 Roger Fong <roger_fong@apple.com>
1051 [WebGL2] Vertex Array Objects.
1052 https://bugs.webkit.org/show_bug.cgi?id=126944.
1053 <rdar://problem/15002455>
1055 Reviewed by Dean Jackson.
1057 Tested by a modified version of the 1.0.3 conformance test:
1058 conformance/extensions/oes-vertex-array-object.html
1059 This test will be landed along with other modified extension conformance tests
1060 once approval from Khronos is received.
1062 * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
1063 (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
1064 (WebCore::OESVertexArrayObject::bindVertexArrayOES):
1065 * html/canvas/WebGLRenderingContext.cpp:
1066 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
1067 (WebCore::WebGLRenderingContext::getParameter):
1068 * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
1069 (WebCore::WebGL2RenderingContext::createVertexArray):
1070 (WebCore::WebGL2RenderingContext::deleteVertexArray):
1071 (WebCore::WebGL2RenderingContext::isVertexArray):
1072 (WebCore::WebGL2RenderingContext::bindVertexArray):
1073 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
1074 (WebCore::WebGL2RenderingContext::getParameter):
1076 Duplicate extension object vertex array object extension methods in GraphicsContext3D.
1077 Implementation may change after we upgrade to newer GL headers and profile.
1078 * platform/graphics/GraphicsContext3D.h:
1079 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1080 (WebCore::GraphicsContext3D::createVertexArray):
1081 (WebCore::GraphicsContext3D::deleteVertexArray):
1082 (WebCore::GraphicsContext3D::isVertexArray):
1083 (WebCore::GraphicsContext3D::bindVertexArray):
1085 Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
1087 * WebCore.xcodeproj/project.pbxproj:
1088 * html/canvas/WebGLVertexArrayObject.cpp:
1089 (WebCore::WebGLVertexArrayObject::create):
1090 (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
1091 (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
1092 * html/canvas/WebGLVertexArrayObject.h:
1093 * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
1094 (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
1095 (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
1096 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
1097 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
1098 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
1099 * html/canvas/WebGLVertexArrayObjectBase.h: Added.
1100 (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
1101 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
1102 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
1103 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
1104 (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
1105 (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
1106 (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
1107 (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
1108 (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
1109 * html/canvas/WebGLVertexArrayObjectOES.cpp:
1110 (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
1111 (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
1112 (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
1113 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
1114 (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
1115 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
1116 * html/canvas/WebGLVertexArrayObjectOES.h:
1118 * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
1119 (WebCore::WebGLRenderingContextBase::initializeNewContext):
1120 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
1121 (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
1122 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
1123 (WebCore::WebGLRenderingContextBase::getVertexAttrib):
1124 (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
1125 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
1126 (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
1127 * html/canvas/WebGLRenderingContextBase.h:
1128 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
1130 Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
1131 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1133 * html/canvas/WebGLGetInfo.cpp:
1134 (WebCore::WebGLGetInfo::WebGLGetInfo):
1135 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
1136 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
1137 * html/canvas/WebGLGetInfo.h:
1139 2015-03-16 Brent Fulgham <bfulgham@apple.com>
1141 Potentially uninitialized Inspector values
1142 https://bugs.webkit.org/show_bug.cgi?id=142730
1144 Reviewed by Joseph Pecoraro.
1146 * inspector/InspectorDOMAgent.cpp:
1147 (WebCore::parseColor): Make sure color values are given an initial value.
1149 2015-03-16 Brady Eidson <beidson@apple.com>
1151 URLs visited during private browsing show up in WebpageIcons.db
1152 rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
1154 Patch by Sam Weinig. Reviewed by Brady Eidson.
1156 * loader/icon/IconController.cpp:
1157 (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
1158 (WebCore::IconController::continueLoadWithDecision): Instead of here.
1160 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
1162 Allow clients to selectively disable plug-ins
1163 https://bugs.webkit.org/show_bug.cgi?id=142506
1165 Reviewed by Anders Carlsson.
1167 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
1168 from the page). As part of this:
1170 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
1173 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
1176 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
1177 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
1179 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
1181 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
1182 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
1184 * dom/DOMImplementation.cpp:
1185 (WebCore::DOMImplementation::createDocument):
1186 Update to reflect function rename.
1188 * loader/SubframeLoader.cpp:
1189 (WebCore::findPluginMIMETypeFromURL):
1190 Adopt getWebVisibleMimesAndPluginIndices().
1191 (WebCore::logPluginRequest):
1192 Update to reflect function rename.
1193 (WebCore::SubframeLoader::shouldUsePlugin):
1196 * platform/PlatformStrategies.h:
1197 Export platformStrategies(), since it is now used in WebProcess.cpp.
1199 * plugins/DOMMimeType.cpp:
1200 (WebCore::DOMMimeType::type):
1201 (WebCore::DOMMimeType::description):
1202 (WebCore::DOMMimeType::mimeClassInfo):
1203 Adopt getWebVisibleMimesAndPluginIndices().
1204 (WebCore::DOMMimeType::enabledPlugin):
1207 * plugins/DOMMimeType.h:
1208 Don't return references in a few places where it is no longer safe to do so.
1209 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
1211 * plugins/DOMMimeTypeArray.cpp:
1212 (WebCore::DOMMimeTypeArray::length):
1213 Adopt getWebVisibleMimesAndPluginIndices().
1214 (WebCore::DOMMimeTypeArray::item):
1216 (WebCore::DOMMimeTypeArray::canGetItemsForName):
1218 (WebCore::DOMMimeTypeArray::namedItem):
1221 * plugins/DOMPlugin.cpp:
1222 (WebCore::DOMPlugin::pluginInfo):
1223 Adopt getWebVisiblePlugins().
1224 (WebCore::DOMPlugin::item):
1225 Adopt getWebVisibleMimesAndPluginIndices().
1226 (WebCore::DOMPlugin::canGetItemsForName):
1228 (WebCore::DOMPlugin::namedItem):
1231 * plugins/DOMPlugin.h:
1232 (WebCore::DOMPlugin::pluginInfo): Deleted.
1234 * plugins/DOMPluginArray.cpp:
1235 (WebCore::DOMPluginArray::length):
1236 Adopt getWebVisiblePlugins().
1237 (WebCore::DOMPluginArray::item):
1239 (WebCore::DOMPluginArray::canGetItemsForName):
1241 (WebCore::DOMPluginArray::namedItem):
1244 * plugins/PluginData.cpp:
1245 (WebCore::PluginData::PluginData):
1246 Stash the passed-in Page and call initPlugins().
1247 (WebCore::PluginData::getWebVisiblePlugins):
1248 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
1249 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
1250 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
1251 limited to the web-visible plug-ins.
1252 (WebCore::PluginData::supportsWebVisibleMimeType):
1253 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
1254 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
1255 Renamed from pluginInfoForMimeType(); ditto.
1256 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
1257 Renamed from pluginNameForMimeType(); ditto.
1258 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
1259 Renamed from pluginFileForMimeType(); ditto.
1260 (WebCore::PluginData::initPlugins):
1261 (WebCore::PluginData::supportsMimeType): Deleted.
1262 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
1263 (WebCore::PluginData::pluginNameForMimeType): Deleted.
1264 (WebCore::PluginData::pluginFileForMimeType): Deleted.
1266 * plugins/PluginData.h:
1267 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
1268 new members to PluginInfo for the clientLoadPolicy and bundle information.
1269 (WebCore::PluginData::PluginData):
1270 Replace some member functions with new ones that will hide plug-ins upon request from the client;
1271 (WebCore::PluginData::mimes): Deleted.
1272 (WebCore::PluginData::mimePluginIndices): Deleted.
1274 * plugins/PluginStrategy.h:
1275 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
1277 * replay/SerializationMethods.cpp:
1278 (JSC::EncodingTraits<PluginData>::encodeValue):
1279 Remove now-obsolete code for handling MIME types and add a FIXME.
1280 (JSC::DeserializedPluginData::DeserializedPluginData):
1281 (JSC::EncodingTraits<PluginData>::decodeValue):
1283 (JSC::EncodingTraits<PluginInfo>::encodeValue):
1284 Handle the new members in PluginInfo.
1285 (JSC::EncodingTraits<PluginInfo>::decodeValue):
1288 * replay/WebInputs.json:
1289 Teach Replay about PluginLoadClientPolicy.
1291 2015-03-16 Max Stepin <maxstepin@gmail.com>
1294 https://bugs.webkit.org/show_bug.cgi?id=17022
1296 Reviewed by Carlos Garcia Campos.
1298 Test: fast/images/animated-png.html
1300 * platform/image-decoders/ImageDecoder.h:
1301 (WebCore::ImageFrame::divide255):
1302 (WebCore::ImageFrame::overRGBA):
1303 * platform/image-decoders/png/PNGImageDecoder.cpp:
1304 (WebCore::frameHeader):
1305 (WebCore::readChunks):
1306 (WebCore::PNGImageReader::PNGImageReader):
1307 (WebCore::PNGImageDecoder::PNGImageDecoder):
1308 (WebCore::PNGImageDecoder::frameBufferAtIndex):
1309 (WebCore::PNGImageDecoder::headerAvailable):
1310 (WebCore::PNGImageDecoder::rowAvailable):
1311 (WebCore::PNGImageDecoder::pngComplete):
1312 (WebCore::PNGImageDecoder::readChunks):
1313 (WebCore::PNGImageDecoder::frameHeader):
1314 (WebCore::PNGImageDecoder::init):
1315 (WebCore::PNGImageDecoder::clearFrameBufferCache):
1316 (WebCore::PNGImageDecoder::initFrameBuffer):
1317 (WebCore::PNGImageDecoder::frameComplete):
1318 (WebCore::PNGImageDecoder::processingStart):
1319 (WebCore::PNGImageDecoder::processingFinish):
1320 (WebCore::PNGImageDecoder::fallbackNotAnimated):
1321 * platform/image-decoders/png/PNGImageDecoder.h:
1322 (WebCore::PNGImageDecoder::frameCount):
1323 (WebCore::PNGImageDecoder::repetitionCount):
1324 (WebCore::PNGImageDecoder::isComplete):
1326 2015-03-15 Benjamin Poulain <benjamin@webkit.org>
1328 CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
1329 https://bugs.webkit.org/show_bug.cgi?id=142715
1331 Reviewed by Brent Fulgham.
1333 Fix attribute matching with:
1338 Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
1339 fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
1340 fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html
1342 * css/SelectorChecker.cpp:
1343 (WebCore::attributeValueMatches):
1344 I forgot to change CSSSelector::Exact in my last patch.
1345 The tests could not catch that since we use the CSS JIT almost everywhere.
1347 * cssjit/SelectorCompiler.cpp:
1348 (WebCore::SelectorCompiler::attributeValueBeginsWith):
1349 (WebCore::SelectorCompiler::attributeValueEndsWith):
1350 (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
1352 2015-03-15 Dan Bernstein <mitz@apple.com>
1354 Fixed the iOS build after r181522.
1356 * page/FrameView.cpp:
1357 (WebCore::FrameView::performPostLayoutTasks):
1359 2015-03-15 Andy Estes <aestes@apple.com>
1361 [Content Filtering] Adopt new NEFilterSource SPI
1362 https://bugs.webkit.org/show_bug.cgi?id=142710
1363 rdar://problem/19023855
1365 Reviewed by Dan Bernstein.
1367 Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
1369 * platform/ContentFilter.cpp:
1370 (WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
1371 * platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
1372 added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
1373 * platform/cocoa/NetworkExtensionContentFilter.mm:
1374 (decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
1375 (WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
1376 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
1377 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
1378 (WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
1379 being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
1380 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
1381 (WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
1382 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
1383 (WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
1384 Otherwise, returned the original data.
1385 (WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
1386 * platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.
1388 2015-03-15 Brent Fulgham <bfulgham@apple.com>
1390 Scroll snap points are not supported on iframe content
1391 https://bugs.webkit.org/show_bug.cgi?id=142582
1392 <rdar://problem/20121319>
1394 Tested by css3/scroll-snap/scroll-snap-iframe.html
1396 Reviewed by Simon Fraser.
1398 The scroll snap points were not being applied to the iframe contents because the code
1399 that sets up the scroll snap point content is not called for iframes.
1401 To correct this, we need to make sure the snap offsets are set during post-frame layout
1402 for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
1404 * page/FrameView.cpp:
1405 (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
1406 MainFrame. Also notify scroll animators they need to update their snap point settings.
1408 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1410 Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
1411 that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
1412 to the more canonical is<RenderBox>() form.
1414 Fixes an assertion in animations/animation-on-inline-crash.html
1416 * page/animation/ImplicitAnimation.cpp:
1417 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1418 * page/animation/KeyframeAnimation.cpp:
1419 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1421 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1423 And another fix. Thanks to Hunseop Jeong for the fix.
1425 * html/HTMLInputElement.cpp:
1426 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1427 (WebCore::HTMLInputElement::didMoveToNewDocument):
1429 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1431 Fix the touch-event build.
1434 (WebCore::Document::didAddTouchEventHandler):
1435 (WebCore::Document::didRemoveTouchEventHandler):
1437 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1439 Reduce the side-effects of animations turning off overlap testing
1440 https://bugs.webkit.org/show_bug.cgi?id=92791
1442 Reviewed by Dean Jackson.
1444 When a layer is running a transition or animation of the transform property,
1445 we would simply disable overlap testing for later layers, which had the side-effect
1446 of promoting lots of unrelated elements into layers temporarily.
1448 Fix by maintaining overlap, but computing an overlap extent that takes the animation
1451 Rotations are currently treated as full rotations. If an extent for the overlap is
1452 hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
1453 then we fall back to the current behavior.
1455 Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
1456 compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
1457 compositing/layer-creation/mismatched-transform-transition-overlap.html
1458 compositing/layer-creation/multiple-keyframes-animation-overlap.html
1459 compositing/layer-creation/scale-rotation-animation-overlap.html
1460 compositing/layer-creation/scale-rotation-transition-overlap.html
1461 compositing/layer-creation/translate-animation-overlap.html
1462 compositing/layer-creation/translate-scale-animation-overlap.html
1463 compositing/layer-creation/translate-scale-transition-overlap.html
1464 compositing/layer-creation/translate-transition-overlap.html
1466 * page/animation/AnimationBase.cpp:
1467 (WebCore::containsRotation):
1468 (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
1469 transform lists, we can map a rectangle through the various operations. Transform-origin
1470 is used to shift the origin of the box first, and then unshift after. If we encounter
1471 a rotation, for now assume it's a full rotation (a future patch could tighten this up).
1472 (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
1473 interpolation, we have to decompose the matrix to see if there's any rotation component,
1474 and, if there is, fall back to current behavior.
1475 * page/animation/AnimationBase.h:
1476 * page/animation/AnimationController.cpp:
1477 (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1478 (WebCore::AnimationController::computeExtentOfAnimation):
1479 * page/animation/AnimationController.h:
1480 * page/animation/AnimationControllerPrivate.h:
1481 * page/animation/CompositeAnimation.cpp:
1482 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
1483 animations and transitions to compute the bounds extent.
1484 * page/animation/CompositeAnimation.h:
1485 * page/animation/ImplicitAnimation.cpp:
1486 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
1487 of the start and end transforms, and union them.
1488 * page/animation/ImplicitAnimation.h:
1489 * page/animation/KeyframeAnimation.cpp:
1490 (WebCore::KeyframeAnimation::animate):
1491 (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
1492 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
1493 for each keyframe, and take their union.
1494 * page/animation/KeyframeAnimation.h:
1495 * platform/graphics/GeometryUtilities.cpp:
1496 (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
1497 (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
1498 to the rotation origin, compute a bounds for the rotated rect by computing
1499 the furthest corner from the origin, and sweeping out a circle.
1500 * platform/graphics/GeometryUtilities.h:
1501 * platform/graphics/transforms/Matrix3DTransformOperation.h:
1502 * platform/graphics/transforms/MatrixTransformOperation.h:
1503 * platform/graphics/transforms/PerspectiveTransformOperation.h:
1504 * platform/graphics/transforms/RotateTransformOperation.h:
1505 * platform/graphics/transforms/ScaleTransformOperation.h:
1506 * platform/graphics/transforms/SkewTransformOperation.h:
1507 * platform/graphics/transforms/TransformOperation.h:
1508 (WebCore::TransformOperation::isAffectedByTransformOrigin):
1509 * platform/graphics/transforms/TransformOperations.cpp:
1510 (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
1511 they are affected by transform-origin.
1512 (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
1513 * platform/graphics/transforms/TransformOperations.h:
1514 * rendering/RenderBox.cpp:
1515 (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
1516 if the geometry map says so (which is most of the time).
1517 * rendering/RenderGeometryMap.cpp:
1518 (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
1519 geometry map in a way that is incompatible with this assertion; it deliberately ignores
1520 transforms sometimes, so we can't easily verify that the mapping matches mapping through
1522 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
1524 * rendering/RenderGeometryMap.h:
1525 * rendering/RenderLayer.cpp:
1526 (WebCore::RenderLayer::boundingBox): Whitespace.
1527 (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
1528 function to get the bounds of a layer, including descendants, when a transform animation is running.
1529 * rendering/RenderLayer.h:
1530 * rendering/RenderLayerCompositor.cpp:
1531 (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
1532 flag to detect nested animated transforms.
1533 (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
1534 the layer is animating transform, and the transition/animation is such that we can't easily compute the
1535 bounds of the animation.
1536 (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
1537 Compute the animated bounds if there's a transform animation running.
1538 (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
1539 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
1540 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1541 Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
1542 if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
1543 for overlap via the computed animated bounds).
1544 If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
1545 that descendants will know (nested transform animations fall back to current behavior).
1546 The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
1547 testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
1548 (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
1549 was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
1550 considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
1551 animation was running.
1552 Since transform animations are always accelerated, we can just test for a running transform animation.
1553 (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
1554 * rendering/RenderLayerCompositor.h:
1555 * rendering/style/RenderStyle.cpp:
1556 (WebCore::requireTransformOrigin): Some FIXME comments.
1558 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1560 Clean up related to wheelEvent names
1561 https://bugs.webkit.org/show_bug.cgi?id=142713
1563 Reviewed by Anders Carlsson.
1565 Add EventNames::isWheelEventType() and use it in places that test for the
1566 two wheel event names.
1569 (WebCore::Document::didAddWheelEventHandler):
1570 (WebCore::Document::didRemoveWheelEventHandler):
1571 * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
1572 will be used in a later patch.
1574 (WebCore::EventNames::isWheelEventType):
1576 (WebCore::Node::didMoveToNewDocument):
1577 (WebCore::tryAddEventListener):
1578 (WebCore::tryRemoveEventListener):
1579 (WebCore::Node::defaultEventHandler):
1580 * html/shadow/MediaControlsApple.cpp:
1581 (WebCore::MediaControlsAppleEventListener::handleEvent):
1582 * page/DOMWindow.cpp:
1583 (WebCore::DOMWindow::addEventListener):
1584 (WebCore::DOMWindow::removeEventListener):
1585 * page/ios/FrameIOS.mm:
1586 (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
1588 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1590 Remove a redundant repaint when a layer becomes composited
1591 https://bugs.webkit.org/show_bug.cgi?id=142711
1593 Reviewed by Anders Carlsson.
1595 RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
1596 repaintOnCompositingChange() when a layer is going to become composited,
1597 because updateBacking() does exactly the same thing. I used an assertion
1598 and ran the tests to ensure this wasn't a behavior change.
1600 * rendering/RenderLayerCompositor.cpp:
1601 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1603 2015-03-15 Benjamin Poulain <bpoulain@apple.com>
1605 Change the exact attribute matching to be ASCII case-insensitive
1606 https://bugs.webkit.org/show_bug.cgi?id=142609
1608 Reviewed by Darin Adler.
1610 In CSS, testing attribute values should be ASCII case-insensitive,
1611 previously we were using full unicode case conversion.
1613 Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
1615 * css/CSSParser.cpp:
1616 (WebCore::CSSParser::parseKeyframeSelector):
1617 The CSS parser has its own fast version for ASCII case insensitive.
1618 This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
1619 change that to the normal CSS parser version.
1621 * css/SelectorCheckerTestFunctions.h:
1622 (WebCore::equalIgnoringASCIICase): Deleted.
1623 * cssjit/SelectorCompiler.cpp:
1624 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
1626 2015-03-15 Brent Fulgham <bfulgham@apple.com>
1628 scroll snap points do not properly account for zoomed pages
1629 https://bugs.webkit.org/show_bug.cgi?id=142706
1630 <rdar://problem/20165771>
1632 Reviewed by Anders Carlsson.
1634 When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
1635 scaling value when selecting our correct scroll snap point target, as well as when specifying the
1636 pixel location for our animation to target.
1638 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1639 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1640 (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
1641 * platform/cocoa/ScrollController.h:
1642 (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
1643 * platform/cocoa/ScrollController.mm:
1644 (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
1645 based on the page scale factor.
1647 2015-03-15 Csaba Osztrogonác <ossy@webkit.org>
1649 Fix run-bindings-tests on the WinCairo bot
1650 https://bugs.webkit.org/show_bug.cgi?id=142588
1652 Reviewed by Alex Christensen.
1654 * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
1655 * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
1656 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
1657 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
1658 * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
1659 * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
1660 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
1661 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
1662 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
1663 * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
1664 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
1665 * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
1666 * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
1667 * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
1668 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
1669 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
1670 * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
1671 * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
1672 * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
1673 * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
1674 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
1675 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
1676 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
1677 * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
1678 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
1679 * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
1680 * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
1681 * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
1682 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
1683 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
1684 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
1685 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
1686 * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
1687 * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
1688 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
1689 * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
1690 * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
1691 * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
1692 * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
1693 * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
1695 2015-03-14 Darin Adler <darin@apple.com>
1697 More event handler improvements
1698 https://bugs.webkit.org/show_bug.cgi?id=142701
1700 Reviewed by Anders Carlsson.
1702 These are the improvements:
1704 - Use EventHandler rather than EventListener as the the type for event handler
1705 attributes. This matches the HTML specification, and also makes sense, since
1706 EventListener means something else (and we use it to mean that!). Also renamed
1707 JSWindowEventListener to WindowEventHandler. Even though this only affects the
1708 JavaScript code generated, it's not really a JavaScript-specific flag.
1710 - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
1711 all the IDL files where the appear. This includes changing the spelling from
1712 "evt" to "event". Some day we should fix this so these functions only need to
1713 appear in EventTarget.idl.
1715 - Tweak formatting a bit on the IDL files we had to modify anyway.
1717 - Use [Conditional] more often and #if less often in IDL files.
1719 - Added a new [DocumentEventHandler] attribute for the selectionchange event.
1720 This involved adding new event handler attribute functions to JSEventListener.h
1721 for use by the JavaScript bindings.
1723 - Removed a little unused code from the JavaScript code bindings generator.
1725 - Improved the mechanism used by HTMLElement and SVGElement to share the list of
1726 content attributes that are event handlers so there is only one map rather than
1727 two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
1728 can share the list of window event handlers.
1730 - Followed the HTML specification by putting all the event handler support in
1731 the HTMLElement class rather than having event handlers apply only a the
1732 particular element that uses those events. We already did this for most of
1733 our event handlers, but we are now doing it for all of them.
1735 * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
1736 as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
1737 * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
1738 * Modules/indexeddb/IDBDatabase.idl: Ditto.
1739 * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
1740 * Modules/indexeddb/IDBRequest.idl: Ditto.
1741 * Modules/indexeddb/IDBTransaction.idl: Ditto.
1742 * Modules/mediastream/MediaStream.idl: Ditto.
1743 * Modules/mediastream/MediaStreamTrack.idl: Ditto.
1744 * Modules/mediastream/RTCDTMFSender.idl: Ditto.
1745 * Modules/mediastream/RTCDataChannel.idl: Ditto.
1746 * Modules/mediastream/RTCPeerConnection.idl: Ditto.
1747 * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
1748 * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
1749 * Modules/webaudio/AudioContext.idl: Ditto.
1750 * Modules/webaudio/OscillatorNode.idl: Ditto.
1751 * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
1752 * Modules/websockets/WebSocket.idl: Ditto.
1753 * css/FontLoader.idl: Ditto.
1754 * dom/EventListener.idl: Ditto.
1755 * dom/EventTarget.idl: Ditto.
1756 * dom/MessagePort.idl: Ditto.
1757 * dom/Node.idl: Ditto.
1758 * dom/WebKitNamedFlow.idl: Ditto.
1759 * fileapi/FileReader.idl: Ditto.
1760 * html/MediaController.idl: Ditto.
1761 * html/track/AudioTrackList.idl: Ditto.
1762 * html/track/TextTrackCue.idl: Ditto.
1763 * html/track/TextTrackList.idl: Ditto.
1764 * html/track/VideoTrackList.idl: Ditto.
1765 * loader/appcache/DOMApplicationCache.idl: Ditto.
1766 * page/EventSource.idl: Ditto.
1767 * page/Performance.idl: Ditto.
1768 * workers/AbstractWorker.idl: Ditto.
1769 * workers/DedicatedWorkerGlobalScope.idl: Ditto.
1770 * workers/Worker.idl: Ditto.
1771 * workers/WorkerGlobalScope.idl: Ditto.
1772 * xml/XMLHttpRequest.idl: Ditto.
1773 * xml/XMLHttpRequestUpload.idl: Ditto.
1775 * Modules/notifications/Notification.idl: Did the above, but also used
1776 [Conditional] instead of #if throughout.
1777 * html/track/TextTrack.idl: Ditto.
1779 * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
1781 * bindings/js/JSEventListener.cpp:
1782 (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
1783 out of this. More closely matches the terminology used in IDL files and the
1785 (WebCore::setWindowEventHandlerAttribute): Ditto.
1786 (WebCore::documentEventHandlerAttribute): Added.
1787 (WebCore::setDocumentEventHandlerAttribute): Added.
1788 * bindings/js/JSEventListener.h: Updated for above changes.
1790 * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
1792 * bindings/scripts/CodeGeneratorGObject.pm:
1793 (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
1794 of type "EventListener".
1795 * bindings/scripts/CodeGeneratorObjC.pm:
1796 (SkipAttribute): Ditto.
1798 * bindings/scripts/CodeGeneratorJS.pm:
1799 (GenerateImplementation): Look for the type EventHandler instead of the type
1800 EventListener for event handler attributes. Also added code to handle the new
1801 DocumentEventHandler, and use the name WindowEventHandler instead of the name
1802 JSWindowEventListener. Removed unneeded preflight check to see if we have
1803 writable attributes; it was not doing us any good. (That caused a lot of code
1804 to be un-indented and makes the diff hard to read.)
1806 * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
1807 WindowEventHandler and DocumentEventHandler.
1809 * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
1810 type EventListener. The test output is unchanged, though.
1812 * dom/Document.idl: Got rid of the conditionals and merged all the event handler
1813 attributes into a single sorted, unconditional list. Added some that were missing,
1814 as detected by the event-handler-attributes.html test.
1816 * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
1817 only in certain element classes. Note that the script event handler attribute
1818 support is still here, even though it should be in HTMLElement and SVGElement
1819 instead. There's a FIXME about that, but no real urgency in fixing it.
1821 * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
1822 was from the script attribute only, not the content attribute.
1824 * html/HTMLBodyElement.cpp:
1825 (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
1826 contains the list of all the window event handlers that can be set on a body
1827 or frameset element and which are triggered by events on the window.
1828 (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
1829 This is the function to call to use the map above. Given an attribute, it
1830 returns either null if it is not a window event handler attribute, or the
1831 event type if it is one.
1832 (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
1833 functions above. Handling of these attributes is now unconditional, but
1834 also we don't have to keep the nested if statements here up to date, just
1835 the list of event handler attributes names in the map create function above.
1837 * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
1838 and private createWindowEventHandlerNameMap functions.
1840 * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
1841 and EventHandler. Also made everything unconditional. Also filled out the list here
1842 to match the list handled as content attributes. All covered by the test.
1844 * html/HTMLElement.cpp:
1845 (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
1846 populate function. Changed the list of event handler attributes to be a bit more
1847 complete, and to be entirely unconditional. Also refactored this function to use
1848 a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
1849 (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
1850 that both this class and HTMLBodyElement use to build event handler name maps.
1851 (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
1852 function that call to use the map above. Given an attribute it returns either
1853 null if it is not an event handler attribute, or the event type if it is one.
1854 This is actually two functions. One is a protected function for use by both this
1855 class and HTMLBodyElement so they can share things like the optimization to look
1856 for the "on" prefix. The other is the public function that we actually use in
1857 HTMLElement and SVGElement.
1858 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
1859 to use lineageOfType. Would have been even simpler if this took an element instead
1860 of a node. Unrelated to the event handler changes.
1861 (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
1862 whether to call through to the base class. The base class function is empty and
1863 never needs to be called, and in any case there is no value in doing work to
1864 decide whether to call through to an empty function. Changed the style of the
1865 function to use early return instead of else. Worth considering whether we want
1866 to return early or call through to base class in this family of functions. It's
1867 more efficient to return early, but doesn't work well if both the derived class
1868 and base class want to respond to changes to the same attribute. The new logic
1869 for event handler attributes is more straightforward than the old, since the
1870 eventNameForEventHandlerAttribute has the logic.
1871 (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
1872 changed to return a Ref since this never fails and needs to return null.
1874 * html/HTMLElement.h: Updated for above changes. This includes a template version
1875 of populateEventHandlerNameMap that extracts the array size at compile time and
1876 passes it to the non-template function that does the work.
1878 * html/HTMLFrameElementBase.cpp:
1879 (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
1880 event handler attributes handled by HTMLElement.
1881 * html/HTMLImageElement.cpp:
1882 (WebCore::HTMLImageElement::parseAttribute): Ditto.
1883 * html/HTMLLinkElement.cpp:
1884 (WebCore::HTMLLinkElement::parseAttribute): Ditto.
1885 * html/HTMLObjectElement.cpp:
1886 (WebCore::HTMLObjectElement::parseAttribute): Ditto.
1887 * html/HTMLScriptElement.cpp:
1888 (WebCore::HTMLScriptElement::parseAttribute): Ditto.
1890 * html/HTMLFrameSetElement.cpp:
1891 (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
1892 style, and added FIXMEs about the many problems in the attribute handling code.
1893 Replaced all the code to handle window event handlers with a new bit of code that
1894 calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
1896 * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
1897 in HTMLBodyElement.idl, although I did not add the document event handler here.
1898 As in the various other cases, having some extra event handlers does not seem to
1899 do harm and this is covered by the event-handler-attributes.html test.
1901 * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
1903 * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
1904 filled out the list of event handlers so all the tests in
1905 event-handler-attributes.html will pass.
1907 * svg/SVGElement.cpp:
1908 (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
1909 and replaced the event handler attribute code with new much simpler code that
1910 uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
1911 way we call through to base classes. Just call through to the
1912 SVGLangSpace::parseAttribute function unconditionally, and don't try to use
1913 early return style to arbitrate among base classes. We should make this
1914 simplification throughout the SVG code; there's no need for the complexity
1915 that was there before just to cut down slightly on calls through to base
1916 class parseAttribute functions.
1918 * svg/SVGSVGElement.cpp:
1919 (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
1920 early return style and corrected some comments about the window event handler
1921 attributes here. These could use some further testing and might later need to be
1922 properly supported when the attributes are set in script, not just in content.
1924 * svg/SVGScriptElement.cpp:
1925 (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
1926 (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
1927 early return style and also to call through to all three base classes. This is
1928 a pattern we should follow elsewhere in SVG to simplify the code. There is no
1929 need for the supportedAttributes sets like the one in this calass, and the code
1930 is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
1931 pretty sure the old code was slower than this new code will be. No need for the
1932 extra hash table lookup every time. Also removed handling of event handler
1933 attribute which is taken care of by SVGElement now.
1934 (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
1935 the same reason as in parseAttribute. This function really needs a new name:
1936 It's the same as parseAttribute, except it's also used when implementing
1937 changes due to SVG animation.
1939 * svg/SVGScriptElement.h: Removed isSupportedAttribute.
1941 2015-03-14 Simon Fraser <simon.fraser@apple.com>
1943 Clean up use of flags in localToContainer-type functions
1944 https://bugs.webkit.org/show_bug.cgi?id=142704
1946 Reviewed by Alexey Proskuryakov.
1948 RenderObject::localToContainerQuad() had the questionable behavior of always
1949 enforcing UseTransforms in the flags. However, a future patch will need to call
1950 localToContainerQuad() without this flag.
1952 Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
1953 and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
1955 The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
1956 a lower-level function, is removed.
1958 Sprinkle a few more nullptrs around.
1962 * rendering/RenderBlock.cpp:
1963 (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
1964 instead of mapLocalToContainer().
1965 (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
1966 * rendering/RenderBox.cpp:
1967 (WebCore::RenderBox::absoluteQuads): Ditto.
1968 * rendering/RenderBox.h:
1969 * rendering/RenderFlowThread.h:
1970 * rendering/RenderGeometryMap.h:
1971 (WebCore::RenderGeometryMap::absolutePoint):
1972 (WebCore::RenderGeometryMap::absoluteRect):
1973 * rendering/RenderImage.cpp:
1974 (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
1975 'false' as flags. Pass UseTransforms instead (but no behavior change since
1976 UseTransforms was forced on lower down).
1977 * rendering/RenderInline.h:
1978 * rendering/RenderLayer.cpp:
1979 (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
1980 * rendering/RenderLineBreak.cpp:
1981 (WebCore::RenderLineBreak::absoluteQuads):
1982 (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
1983 * rendering/RenderNamedFlowFragment.cpp:
1984 (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
1985 * rendering/RenderObject.cpp:
1986 (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
1987 the UseTransforms bit.
1988 (WebCore::RenderObject::localToContainerPoint): Also here.
1989 * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
1990 (WebCore::RenderObject::localToAbsoluteQuad):
1991 * rendering/RenderText.cpp:
1992 (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
1993 * rendering/RenderTextLineBoxes.cpp:
1994 (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
1995 (WebCore::RenderTextLineBoxes::absoluteQuads):
1996 (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
1997 * rendering/RenderView.h:
1998 * rendering/SimpleLineLayoutFunctions.cpp:
1999 (WebCore::SimpleLineLayout::collectAbsoluteQuads):
2000 * rendering/svg/RenderSVGForeignObject.h:
2001 * rendering/svg/RenderSVGInline.cpp:
2002 (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
2003 * rendering/svg/RenderSVGInline.h:
2004 * rendering/svg/RenderSVGModelObject.cpp:
2005 (WebCore::RenderSVGModelObject::absoluteQuads):
2006 * rendering/svg/RenderSVGModelObject.h:
2007 * rendering/svg/RenderSVGRoot.h:
2008 * rendering/svg/RenderSVGText.cpp:
2009 (WebCore::RenderSVGText::absoluteQuads):
2010 * rendering/svg/RenderSVGText.h:
2011 * rendering/svg/SVGRenderSupport.h:
2013 2015-03-14 Brent Fulgham <bfulgham@apple.com>
2015 [iOS] scroll snap points are animating to the wrong positions...
2016 https://bugs.webkit.org/show_bug.cgi?id=142705
2017 <rdar://problem/20136946>
2019 Reviewed by Simon Fraser.
2021 Avoid adding an extra '0' snap point to our set. We always start with one zero; this
2022 extra append just forces us to do more steps in our search for nearest snap point.
2024 * page/scrolling/AxisScrollSnapOffsets.cpp:
2025 (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
2027 2015-03-14 Dean Jackson <dino@apple.com>
2029 Feature flag for Animations Level 2
2030 https://bugs.webkit.org/show_bug.cgi?id=142699
2031 <rdar://problem/20165097>
2033 Reviewed by Brent Fulgham.
2035 Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
2037 * Configurations/FeatureDefines.xcconfig:
2038 * bindings/generic/RuntimeEnabledFeatures.cpp:
2039 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2040 * bindings/generic/RuntimeEnabledFeatures.h:
2041 (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
2042 (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
2044 2015-03-14 Adenilson Cavalcanti <cavalcantii@gmail.com>
2046 RenderBlock::imageChange() calling const methods on exit
2047 https://bugs.webkit.org/show_bug.cgi?id=142648
2049 Reviewed by Brent Fulgham.
2051 No new tests, no change on behavior.
2053 * rendering/RenderBlock.cpp:
2054 (WebCore::RenderBlock::imageChanged): Deleted.
2055 * rendering/RenderBlock.h:
2057 2015-03-14 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2059 [GStreamer] share GL context in pipeline
2060 https://bugs.webkit.org/show_bug.cgi?id=142693
2062 Reviewed by Philippe Normand.
2064 GstGL elements in a pipeline need to be aware of the application's
2065 display and its GL context. This information is shared through context
2066 messages between the pipeline and the browser.
2068 This patch shares this context through a GStreamer's synchronous
2069 message, using the GL information held in the web process.
2071 This patch is based on the work of Philippe Normand for Bug 138562.
2073 No new tests because this is platform specific and it depends in the
2074 run-time availability and configurations of GstGL elements.
2076 * PlatformGTK.cmake: appends the GstGL header files in the include
2077 directories. Also its library directory is appended.
2078 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2079 (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
2080 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2081 Initialize the new class attributes.
2082 (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
2083 for handling synchronous messages from the pipeline. This method
2084 currently only handles the GL context sharing.
2085 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
2086 the pipeline's bus to handle the synchronous messages.
2087 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
2088 class methods and attributes.
2090 2015-03-13 Alex Christensen <achristensen@webkit.org>
2092 Progress towards CMake on Mac.
2093 https://bugs.webkit.org/show_bug.cgi?id=142680
2095 Reviewed by Gyuyoung Kim.
2097 * PlatformMac.cmake:
2098 Added new include directories and removed old source files.
2100 2015-03-13 Commit Queue <commit-queue@webkit.org>
2102 Unreviewed, rolling out r181483.
2103 https://bugs.webkit.org/show_bug.cgi?id=142688
2105 Caused use-after-free on many tests (Requested by ap on
2110 "Allow clients to selectively disable plug-ins"
2111 https://bugs.webkit.org/show_bug.cgi?id=142506
2112 http://trac.webkit.org/changeset/181483
2114 2015-03-13 Antti Koivisto <antti@apple.com>
2116 Cache glyph widths to GlyphPages
2117 https://bugs.webkit.org/show_bug.cgi?id=142028
2119 Reviewed by Andreas Kling.
2121 Currently we have a separate cache in Font for glyph widths. In practice we always need
2122 the widths so we can just cache them in GlyphPages. This simplifies the code and removes
2123 a per-character hash lookup from WidthIterator.
2125 * platform/graphics/Font.cpp:
2126 (WebCore::Font::Font):
2127 (WebCore::Font::initCharWidths):
2128 (WebCore::Font::platformGlyphInit):
2129 (WebCore::createAndFillGlyphPage):
2130 (WebCore::Font::computeWidthForGlyph):
2132 Rename to make it clear this doesn't cache.
2134 (WebCore::GlyphPage::setGlyphDataForIndex):
2136 Initialize the width.
2137 This could go to GlyphPage.cpp if we had one.
2139 * platform/graphics/Font.h:
2140 (WebCore::Font::glyphZeroWidth):
2141 (WebCore::Font::isZeroWidthSpaceGlyph):
2142 (WebCore::Font::zeroGlyph): Deleted.
2143 (WebCore::Font::setZeroGlyph): Deleted.
2144 (WebCore::Font::widthForGlyph): Deleted.
2145 * platform/graphics/FontCascade.cpp:
2146 (WebCore::offsetToMiddleOfGlyph):
2147 * platform/graphics/FontCascadeFonts.cpp:
2148 (WebCore::FontCascadeFonts::glyphDataForCharacter):
2149 * platform/graphics/GlyphPage.h:
2150 (WebCore::GlyphData::GlyphData):
2152 Return width too as part of GlyphData.
2154 (WebCore::GlyphPage::glyphDataForIndex):
2155 (WebCore::GlyphPage::setGlyphDataForCharacter):
2156 (WebCore::GlyphPage::setGlyphDataForIndex):
2157 (WebCore::GlyphPage::GlyphPage):
2158 * platform/graphics/WidthIterator.cpp:
2159 (WebCore::WidthIterator::advanceInternal):
2161 No need to lookup width separately now.
2163 * platform/graphics/mac/ComplexTextController.cpp:
2164 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2165 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2166 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2167 * rendering/mathml/RenderMathMLOperator.cpp:
2168 (WebCore::RenderMathMLOperator::advanceForGlyph):
2169 * rendering/svg/SVGTextRunRenderingContext.cpp:
2170 (WebCore::missingGlyphForFont):
2171 * svg/SVGFontData.cpp:
2172 (WebCore::SVGFontData::initializeFont):
2174 2015-03-13 Eric Carlson <eric.carlson@apple.com>
2176 [Mac] Enable WIRELESS_PLAYBACK_TARGET
2177 https://bugs.webkit.org/show_bug.cgi?id=142635
2179 Reviewed by Darin Adler.
2181 * Configurations/FeatureDefines.xcconfig:
2183 2015-03-13 Jeremy Jones <jeremyj@apple.com>
2185 Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
2186 https://bugs.webkit.org/show_bug.cgi?id=142678
2188 Reviewed by Eric Carlson.
2190 Add the missing 'n' in "fullscreen".
2192 * platform/spi/ios/AVKitSPI.h:
2194 2015-03-13 Timothy Horton <timothy_horton@apple.com>
2196 Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
2197 https://bugs.webkit.org/show_bug.cgi?id=142664
2198 <rdar://problem/18859470>
2200 Reviewed by Benjamin Poulain.
2202 * page/ViewportConfiguration.cpp:
2203 (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
2204 (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
2205 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
2206 Split shouldIgnoreScalingConstraints into one for each dimension.
2208 (WebCore::ViewportConfiguration::initialScale):
2209 (WebCore::ViewportConfiguration::minimumScale):
2210 Don't force the initial and minimum scales to cover the whole view if the
2211 page claims to want to lay out to device width but then lays out too big.
2212 This will allow pages that misbehave in this way to scale down further
2213 than they previously could, but will result in a region of empty background
2214 color being exposed at the initial/minimum scale.
2216 (WebCore::ViewportConfiguration::description):
2217 Update the logging to show each dimension separately.
2219 * page/ViewportConfiguration.h:
2221 2015-03-13 Mark Lam <mark.lam@apple.com>
2223 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
2224 <https://webkit.org/b/142674>
2226 Reviewed by Filip Pizlo.
2228 No new tests because there is no new functionality. This is a refactoring effort.
2230 * bindings/objc/WebScriptObject.mm:
2231 * platform/ios/wak/WAKWindow.mm:
2232 (-[WAKWindow initWithLayer:]):
2233 (-[WAKWindow initWithFrame:]):
2235 2015-03-13 Doug Russell <d_russell@apple.com>
2237 AX: Provide API for assistive tech to ignore DOM key event handlers
2238 https://bugs.webkit.org/show_bug.cgi?id=142059
2240 Reviewed by Beth Dakin.
2242 Assistive technology applications on the desktop are heavily dependent on keyboard navigation being reliable. This is greatly hindered by sites that handle key events without updating keyboard selection and then consume the event. It is important for assistive technology apps to allow users to decide to ignore these handlers that are incorrect for their purposes.
2244 This can be fixed by exposing, via a new accessibility attribute, a way to decide, for a given WebCore::Frame, to pre-empt DOM dispatch and instead let accessibility caret browsing take place.
2246 Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
2248 * accessibility/AccessibilityObject.cpp:
2249 (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
2250 (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
2251 * accessibility/AccessibilityObject.h:
2252 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2253 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2254 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2255 (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2256 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2258 (WebCore::Element::dispatchKeyEvent):
2259 * page/EventHandler.cpp:
2260 (WebCore::EventHandler::keyEvent):
2261 (WebCore::handleKeyboardSelectionMovement):
2262 (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
2263 * page/EventHandler.h:
2266 2015-03-09 Conrad Shultz <conrad_shultz@apple.com>
2268 Allow clients to selectively disable plug-ins
2269 https://bugs.webkit.org/show_bug.cgi?id=142506
2271 Reviewed by Anders Carlsson.
2273 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2274 from the page). As part of this:
2276 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2279 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2282 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2283 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2285 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2287 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2288 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2290 * dom/DOMImplementation.cpp:
2291 (WebCore::DOMImplementation::createDocument):
2292 Update to reflect function rename.
2294 * loader/SubframeLoader.cpp:
2295 (WebCore::findPluginMIMETypeFromURL):
2296 Adopt getWebVisibleMimesAndPluginIndices().
2297 (WebCore::logPluginRequest):
2298 Update to reflect function rename.
2299 (WebCore::SubframeLoader::shouldUsePlugin):
2302 * platform/PlatformStrategies.h:
2303 Export platformStrategies(), since it is now used in WebProcess.cpp.
2305 * plugins/DOMMimeType.cpp:
2306 (WebCore::DOMMimeType::type):
2307 (WebCore::DOMMimeType::description):
2308 (WebCore::DOMMimeType::mimeClassInfo):
2309 Adopt getWebVisibleMimesAndPluginIndices().
2310 (WebCore::DOMMimeType::enabledPlugin):
2313 * plugins/DOMMimeType.h:
2314 Don't return references in a few places where it is no longer safe to do so.
2315 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2317 * plugins/DOMMimeTypeArray.cpp:
2318 (WebCore::DOMMimeTypeArray::length):
2319 Adopt getWebVisibleMimesAndPluginIndices().
2320 (WebCore::DOMMimeTypeArray::item):
2322 (WebCore::DOMMimeTypeArray::canGetItemsForName):
2324 (WebCore::DOMMimeTypeArray::namedItem):
2327 * plugins/DOMPlugin.cpp:
2328 (WebCore::DOMPlugin::pluginInfo):
2329 Adopt getWebVisiblePlugins().
2330 (WebCore::DOMPlugin::item):
2331 Adopt getWebVisibleMimesAndPluginIndices().
2332 (WebCore::DOMPlugin::canGetItemsForName):
2334 (WebCore::DOMPlugin::namedItem):
2337 * plugins/DOMPlugin.h:
2338 (WebCore::DOMPlugin::pluginInfo): Deleted.
2340 * plugins/DOMPluginArray.cpp:
2341 (WebCore::DOMPluginArray::length):
2342 Adopt getWebVisiblePlugins().
2343 (WebCore::DOMPluginArray::item):
2345 (WebCore::DOMPluginArray::canGetItemsForName):
2347 (WebCore::DOMPluginArray::namedItem):
2350 * plugins/PluginData.cpp:
2351 (WebCore::PluginData::PluginData):
2352 Stash the passed-in Page and call initPlugins().
2353 (WebCore::PluginData::getWebVisiblePlugins):
2354 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
2355 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
2356 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
2357 limited to the web-visible plug-ins.
2358 (WebCore::PluginData::supportsWebVisibleMimeType):
2359 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
2360 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
2361 Renamed from pluginInfoForMimeType(); ditto.
2362 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
2363 Renamed from pluginNameForMimeType(); ditto.
2364 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
2365 Renamed from pluginFileForMimeType(); ditto.
2366 (WebCore::PluginData::initPlugins):
2367 (WebCore::PluginData::supportsMimeType): Deleted.
2368 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
2369 (WebCore::PluginData::pluginNameForMimeType): Deleted.
2370 (WebCore::PluginData::pluginFileForMimeType): Deleted.
2372 * plugins/PluginData.h:
2373 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
2374 new members to PluginInfo for the clientLoadPolicy and bundle information.
2375 (WebCore::PluginData::PluginData):
2376 Replace some member functions with new ones that will hide plug-ins upon request from the client;
2377 (WebCore::PluginData::mimes): Deleted.
2378 (WebCore::PluginData::mimePluginIndices): Deleted.
2380 * plugins/PluginStrategy.h:
2381 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
2383 * replay/SerializationMethods.cpp:
2384 (JSC::EncodingTraits<PluginData>::encodeValue):
2385 Remove now-obsolete code for handling MIME types and add a FIXME.
2386 (JSC::DeserializedPluginData::DeserializedPluginData):
2387 (JSC::EncodingTraits<PluginData>::decodeValue):
2389 (JSC::EncodingTraits<PluginInfo>::encodeValue):
2390 Handle the new members in PluginInfo.
2391 (JSC::EncodingTraits<PluginInfo>::decodeValue):
2394 * replay/WebInputs.json:
2395 Teach Replay about PluginLoadClientPolicy.
2397 2015-03-13 Chris Dumez <cdumez@apple.com>
2399 XMLHttpRequests should not prevent a page from entering PageCache
2400 https://bugs.webkit.org/show_bug.cgi?id=142612
2401 <rdar://problem/19923085>
2403 Reviewed by Alexey Proskuryakov.
2405 Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
2406 drastically improve the likelihood of pages using them to enter
2407 PageCache. XMLHttpRequest used to be only suspendable when not
2408 loading. After this patch, if the XMLHttpRequest is loading when
2409 navigating away from the page, it will be aborted and the page
2410 will enter the PageCache. Upon restoring the page from PageCache,
2411 the XMLHttpRequests' error handlers will be executed to give them
2412 a chance to reload if they want to.
2414 Test: http/tests/navigation/page-cache-xhr.html
2416 * history/PageCache.cpp:
2417 (WebCore::logCanCacheFrameDecision):
2418 (WebCore::PageCache::canCachePageContainingThisFrame):
2419 Do not prevent a page to enter the page cache ff the main document has
2420 an error that is a cancellation and all remaining subresource loaders
2421 are for XHR. We extend the pre-existing mechanism used on iOS, which
2422 allowed PageCaching if the remaining resource loads are for images.
2424 * loader/DocumentLoader.cpp:
2425 (WebCore::areAllLoadersPageCacheAcceptable):
2426 Mark XHR loaders as PageCache acceptable.
2428 * loader/DocumentThreadableLoader.cpp:
2429 (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
2430 * loader/DocumentThreadableLoader.h:
2431 * loader/ThreadableLoader.h:
2432 * loader/cache/CachedResource.cpp:
2433 (WebCore::CachedResource::areAllClientsXMLHttpRequests):
2434 * loader/cache/CachedResource.h:
2435 * loader/cache/CachedResourceClient.h:
2436 (WebCore::CachedResourceClient::isXMLHttpRequest):
2437 * xml/XMLHttpRequest.cpp:
2438 (WebCore::XMLHttpRequest::XMLHttpRequest):
2439 (WebCore::XMLHttpRequest::createRequest):
2440 (WebCore::XMLHttpRequest::canSuspend):
2441 Report that we can suspend XMLHttpRequests as long as the window load
2442 event has already fired. If the window load event has not fired yet,
2443 it would be unsafe to cancel the load in suspend() as it would
2444 potentially cause arbitrary JS execution while suspending.
2446 (WebCore::XMLHttpRequest::suspend):
2447 If suspending for PageCache and the request is currently loading, abort
2448 the load and mark that we should fire the error event upon restoring
2451 (WebCore::XMLHttpRequest::resume):
2452 (WebCore::XMLHttpRequest::resumeTimerFired):
2453 Upon resuming, fire the error event in a timer if the load was aborted
2454 for suspending. We need to do this in a timer because we are not allowed
2455 to execute arbitrary JS inside resume().
2457 (WebCore::XMLHttpRequest::stop):
2458 Add a assertion to make sure we are not firing event inside stop() as
2459 this would potentially cause arbitrary JS execution and it would be
2460 unsafe. It seems to me that our code is currently unsafe but the
2461 assertion does not seem to be hit by our current layout tests. I am
2462 adding the assertion as it would make it clear we have a bug and we
2465 * xml/XMLHttpRequest.h:
2467 2015-03-13 Joonghun Park <jh718.park@samsung.com>
2469 Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
2470 https://bugs.webkit.org/show_bug.cgi?id=142652
2472 Reviewed by Csaba Osztrogonác.
2474 No new tests, no behavior changes.
2476 Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
2478 * css/CSSPrimitiveValue.cpp:
2479 (WebCore::propertyName):
2482 2015-03-12 Zan Dobersek <zdobersek@igalia.com>
2484 Remove DrawingBuffer
2485 https://bugs.webkit.org/show_bug.cgi?id=142641
2487 Reviewed by Darin Adler.
2489 Remove the DrawingBuffer class. Objects of this type were only held in the
2490 WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
2491 Chromium port, with the relevant code removed in r147888. Since then, the
2492 m_drawingBuffer member variable has always been null.
2495 * PlatformEfl.cmake:
2496 * PlatformGTK.cmake:
2497 * WebCore.vcxproj/WebCore.vcxproj:
2498 * WebCore.vcxproj/WebCore.vcxproj.filters:
2499 * WebCore.xcodeproj/project.pbxproj:
2500 * html/canvas/WebGL2RenderingContext.cpp:
2501 (WebCore::WebGL2RenderingContext::copyTexImage2D):
2502 * html/canvas/WebGLRenderingContext.cpp:
2503 (WebCore::WebGLRenderingContext::copyTexImage2D):
2504 * html/canvas/WebGLRenderingContextBase.cpp:
2505 (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2506 (WebCore::WebGLRenderingContextBase::initializeNewContext):
2507 (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
2508 (WebCore::WebGLRenderingContextBase::markContextChanged):
2509 (WebCore::WebGLRenderingContextBase::clearIfComposited):
2510 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
2511 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
2512 (WebCore::WebGLRenderingContextBase::reshape):
2513 (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
2514 (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
2515 (WebCore::WebGLRenderingContextBase::activeTexture):
2516 (WebCore::WebGLRenderingContextBase::bindFramebuffer):
2517 (WebCore::WebGLRenderingContextBase::bindTexture):
2518 (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
2519 (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
2520 (WebCore::WebGLRenderingContextBase::disable):
2521 (WebCore::WebGLRenderingContextBase::enable):
2522 (WebCore::WebGLRenderingContextBase::getContextAttributes):
2523 (WebCore::WebGLRenderingContextBase::readPixels):
2524 (WebCore::WebGLRenderingContextBase::loseContextImpl):
2525 (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
2526 (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
2527 (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
2528 * html/canvas/WebGLRenderingContextBase.h:
2529 (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
2530 (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
2531 * platform/graphics/GraphicsContext.h:
2532 * platform/graphics/GraphicsContext3D.h:
2533 * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
2534 * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
2535 * platform/graphics/gpu/DrawingBuffer.h: Removed.
2536 * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
2537 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2538 (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2539 (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2541 2015-03-12 Ryosuke Niwa <rniwa@webkit.org>
2543 REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
2544 https://bugs.webkit.org/show_bug.cgi?id=142646
2546 Reviewed by Darin Adler.
2548 The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
2549 Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
2551 Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
2552 position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
2553 return true when anchored before or after BR after this patch.
2555 Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
2558 (WebCore::Position::atStartOfTree):
2559 (WebCore::Position::atEndOfTree):
2561 2015-03-12 Yusuke Suzuki <utatane.tea@gmail.com>
2563 Integrate MapData into JSMap and JSSet
2564 https://bugs.webkit.org/show_bug.cgi?id=142556
2566 Reviewed by Filip Pizlo.
2568 Now Set has SetData and it's different from MapData.
2569 And MapData/SetData are completely integrated into JSSet and JSMap.
2570 Structured-cloning algorithm need to be aware of these changes.
2571 And in the case of JSSet, since JSSet doesn't need dummy value for construction,
2572 Structured-cloning only serialize the keys in JSSet.
2574 * ForwardingHeaders/runtime/MapDataInlines.h: Added.
2575 * bindings/js/SerializedScriptValue.cpp:
2576 (WebCore::CloneSerializer::serialize):
2577 (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
2578 (WebCore::CloneDeserializer::deserialize):
2579 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
2581 2015-03-12 Dan Bernstein <mitz@apple.com>
2583 Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2585 Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
2587 * platform/network/mac/CertificateInfoMac.mm:
2588 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
2589 * platform/spi/cocoa/SecuritySPI.h:
2591 2015-03-12 Geoffrey Garen <ggaren@apple.com>
2593 REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
2594 https://bugs.webkit.org/show_bug.cgi?id=142636
2596 Reviewed by Mark Hahnenberg.
2598 This was a pre-existing bug that I made a lot worse in
2599 <https://trac.webkit.org/changeset/181411>.
2601 * html/HTMLMediaElement.cpp:
2602 (WebCore::HTMLMediaElement::parseAttribute): Compare size before
2603 subtracting rather than subtracting and then comparing to zero. The
2604 latter technique is not valid for unsigned integers, which will happily
2605 underflow into giant numbers.
2607 * Modules/mediasource/SourceBuffer.cpp:
2608 (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
2609 technically correct, but I took the opportunity to clean it up a bit.
2610 There's no need to do two checks here, and it smells bad to check for
2611 a negative unsigned integer.
2613 2015-03-12 Sebastian Dröge <sebastian@centricular.com>
2615 Stop using single-include headers that are only available since GStreamer >= 1.2.
2617 https://bugs.webkit.org/show_bug.cgi?id=142537
2619 Reviewed by Philippe Normand.
2621 * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2622 * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2623 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
2624 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2625 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2626 * platform/graphics/gstreamer/GStreamerUtilities.h:
2627 * platform/graphics/gstreamer/ImageGStreamer.h:
2628 Instead of using single-include headers for the GStreamer libraries,
2629 directly include the headers we need. The single-include headers were
2630 only added in 1.2, and this would be the only reason why we would
2633 2015-03-12 Eric Carlson <eric.carlson@apple.com>
2635 [Mac] Update AirPlay handling
2636 https://bugs.webkit.org/show_bug.cgi?id=142541
2638 Unreviewed, respond to post-review comments.
2641 (WebCore::Document::didChoosePlaybackTarget):
2642 * page/ChromeClient.h:
2644 (WebCore::Page::showPlaybackTargetPicker):
2645 (WebCore::Page::didChoosePlaybackTarget):
2646 (WebCore::Page::configurePlaybackTargetMonitoring):
2648 2015-03-12 Csaba Osztrogonác <ossy@webkit.org>
2650 Fix the !ENABLE(PICTURE_SIZES) build
2651 https://bugs.webkit.org/show_bug.cgi?id=142617
2653 Reviewed by Darin Adler.
2655 * html/parser/HTMLPreloadScanner.cpp:
2656 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2658 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2660 Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
2662 Address ASSERT in LayoutTests/printing/page-format-data.html.
2664 * dom/InlineStyleSheetOwner.cpp:
2665 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2666 In case the TextPosition gets used because it wasn't created by a parser,
2667 zeros are more realistic values then beforeFirst.
2669 2015-03-11 Roger Fong <roger_fong@apple.com>
2671 Media element time no longer updates while scrubbing following r181279.
2672 https://bugs.webkit.org/show_bug.cgi?id=142606.
2673 <rdar://problem/20131014>
2675 Reviewed by Eric Carlson.
2677 * Modules/mediacontrols/mediaControlsApple.js:
2678 (Controller.prototype.handleWrapperMouseMove):
2679 Update time as a result of a mouse move if we are scrubbing.
2681 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2683 Web Inspector: CSS parser errors in the console should include column numbers
2684 https://bugs.webkit.org/show_bug.cgi?id=114313
2686 Reviewed by Darin Adler.
2688 Test: inspector-protocol/console/warnings-errors.html
2691 (WebCore::CSSParser::currentCharacterOffset):
2692 Get the current character offset depending on the source type.
2693 Add instance variables to track column position and start
2694 line / column for inline stylesheets.
2696 * css/CSSParser.cpp:
2697 (WebCore::CSSParser::CSSParser):
2698 (WebCore::CSSParser::parseSheet):
2699 Initialize new instance variables.
2701 (WebCore::CSSParser::currentLocation):
2702 Update to include column information for the token. Also, if we are on the
2703 first line we may need to take into account a start column offset as well.
2705 (WebCore::CSSParser::realLex):
2706 Set the token's start column.
2707 When bumping the line number, reset the column offset for the next
2708 line with the next character.
2710 (WebCore::CSSParser::syntaxError):
2711 (WebCore::CSSParser::logError):
2712 Include column information.
2714 * css/StyleSheetContents.cpp:
2715 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2716 (WebCore::StyleSheetContents::parseString):
2717 (WebCore::StyleSheetContents::parseStringAtPosition):
2718 Include column information.
2720 * css/StyleSheetContents.h:
2721 * dom/InlineStyleSheetOwner.cpp:
2722 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2723 (WebCore::InlineStyleSheetOwner::createSheet):
2724 Save and use column information later on.
2726 * dom/InlineStyleSheetOwner.h:
2727 * inspector/InspectorStyleSheet.cpp:
2728 (WebCore::InspectorStyleSheet::ensureSourceData):
2729 Updated parser signature needs starting column and no longer has optional parameters.
2731 2015-03-11 Eric Carlson <eric.carlson@apple.com>
2733 [Mac] Update AirPlay handling
2734 https://bugs.webkit.org/show_bug.cgi?id=142541
2736 Reviewed by Sam Weinig.
2738 * WebCore.xcodeproj/project.pbxproj:
2740 (WebCore::Document::showPlaybackTargetPicker):
2741 (WebCore::Document::addPlaybackTargetPickerClient):
2742 (WebCore::Document::removePlaybackTargetPickerClient):
2743 (WebCore::Document::configurePlaybackTargetMonitoring):
2744 (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
2745 (WebCore::Document::playbackTargetAvailabilityDidChange):
2746 (WebCore::Document::didChoosePlaybackTarget):
2748 * html/HTMLMediaElement.cpp:
2749 (WebCore::HTMLMediaElement::registerWithDocument):
2750 (WebCore::HTMLMediaElement::unregisterWithDocument):
2751 (WebCore::HTMLMediaElement::parseAttribute):
2752 * html/HTMLMediaElement.h:
2753 * html/HTMLMediaSession.cpp:
2754 (WebCore::HTMLMediaSession::HTMLMediaSession):
2755 (WebCore::HTMLMediaSession::registerWithDocument):
2756 (WebCore::HTMLMediaSession::unregisterWithDocument):
2757 (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2758 (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2759 (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2760 (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
2761 (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
2762 (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
2763 * html/HTMLMediaSession.h:
2764 * page/ChromeClient.h:
2766 (WebCore::Page::didChoosePlaybackTarget):
2767 (WebCore::Page::playbackTargetAvailabilityDidChange):
2768 (WebCore::Page::configurePlaybackTargetMonitoring):
2770 (WebCore::Page::hasWirelessPlaybackTarget):
2771 (WebCore::Page::playbackTarget):
2772 * platform/audio/MediaSession.cpp:
2773 (WebCore::MediaSession::clientDataBufferingTimerFired):
2774 (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
2775 * platform/audio/MediaSession.h:
2776 (WebCore::MediaSession::didChoosePlaybackTarget):
2777 (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
2778 (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2779 (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
2780 * platform/audio/MediaSessionManager.cpp:
2781 (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
2782 * platform/audio/MediaSessionManager.h:
2783 (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2784 * platform/audio/ios/MediaSessionManagerIOS.h:
2785 * platform/audio/ios/MediaSessionManagerIOS.mm:
2786 (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
2787 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
2788 * platform/graphics/AVPlaybackTarget.h: Added.
2789 (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
2790 (WebCore::AVPlaybackTarget::AVPlaybackTarget):
2791 (WebCore::AVPlaybackTarget::setDevicePickerContext):
2792 (WebCore::AVPlaybackTarget::devicePickerContext):
2793 * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
2794 (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
2795 * platform/graphics/MediaPlayer.cpp:
2796 (WebCore::MediaPlayer::setWirelessPlaybackTarget):
2797 * platform/graphics/MediaPlayer.h:
2798 * platform/graphics/MediaPlayerPrivate.h:
2799 (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
2800 * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
2801 (WebCore::AVPlaybackTarget::encode):
2802 (WebCore::AVPlaybackTarget::decode):
2803 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2804 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2805 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2806 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2807 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2808 (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
2809 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
2810 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
2811 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
2812 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2813 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2814 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2816 2015-03-11 Alex Christensen <achristensen@webkit.org>
2818 [Content Extensions] Add resource type and load type triggers.
2819 https://bugs.webkit.org/show_bug.cgi?id=142422
2821 Reviewed by Benjamin Poulain.
2825 * WebCore.xcodeproj/project.pbxproj:
2826 * contentextensions/ContentExtensionCompiler.cpp:
2827 (WebCore::ContentExtensions::compileRuleList):
2828 * contentextensions/ContentExtensionParser.cpp:
2829 (WebCore::ContentExtensions::getTypeFlags):
2830 (WebCore::ContentExtensions::loadTrigger):
2831 * contentextensions/ContentExtensionRule.h:
2832 * contentextensions/ContentExtensionsBackend.cpp:
2833 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2834 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
2835 * contentextensions/ContentExtensionsBackend.h:
2836 * contentextensions/DFABytecode.h:
2837 (WebCore::ContentExtensions::instructionSizeWithArguments):
2838 * contentextensions/DFABytecodeCompiler.cpp:
2839 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
2840 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2841 * contentextensions/DFABytecodeCompiler.h:
2842 * contentextensions/DFABytecodeInterpreter.cpp:
2843 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2844 * contentextensions/DFABytecodeInterpreter.h:
2845 * loader/ResourceLoadInfo.cpp: Added.
2846 (WebCore::toResourceType):
2847 (WebCore::readResourceType):
2848 (WebCore::readLoadType):
2849 (WebCore::ResourceLoadInfo::isThirdParty):
2850 (WebCore::ResourceLoadInfo::getResourceFlags):
2851 * loader/ResourceLoadInfo.h: Added.
2852 * loader/cache/CachedResourceLoader.cpp:
2853 (WebCore::CachedResourceLoader::requestResource):
2854 * page/UserContentController.cpp:
2855 (WebCore::UserContentController::actionsForResourceLoad):
2856 (WebCore::UserContentController::actionsForURL): Deleted.
2857 * page/UserContentController.h:
2859 2015-03-11 Tim Horton <timothy_horton@apple.com>
2863 * page/EventHandler.cpp:
2864 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2865 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2866 (WebCore::EventHandler::handleMousePressEventTripleClick):
2867 (WebCore::EventHandler::handleMousePressEventSingleClick):
2869 2015-03-11 Timothy Horton <timothy_horton@apple.com>
2871 <attachment> shouldn't use "user-select: all"
2872 https://bugs.webkit.org/show_bug.cgi?id=142453
2874 Reviewed by Darin Adler.
2876 It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
2877 all (at least for now), let's not use "user-select: all" in the default stylesheet
2878 for <attachment>. It's really overkill anyway, since <attachment> can't have children.
2879 The only "user-select: all" behavior we actually want is select-on-click.
2880 So, we'll implement that in a slightly different way.
2882 Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
2883 fast/attachment/attachment-select-on-click.html
2887 No more "user-select: all".
2889 (attachment:focus): Deleted.
2890 We stopped using attachment focus a while back and forgot to remove this.
2893 (WebCore::Node::shouldSelectOnMouseDown):
2894 Add a virtual function that Node subclasses can override to indicate they
2895 should be selected on mouse down.
2897 * html/HTMLAttachmentElement.h:
2898 Override the aforementioned virtual function; <attachment> should always
2899 be selected on mouse down.
2901 * page/EventHandler.cpp:
2902 (WebCore::nodeToSelectOnMouseDownForNode):
2903 Determine which node should be selected when a mousedown hits the given node.
2904 If there's any "user-select: all", we go with the outermost "user-select: all".
2905 Otherwise, we give the node a chance to say that it wants to be selected itself.
2907 (WebCore::expandSelectionToRespectSelectOnMouseDown):
2908 Rename this function, it's not just about "user-select: all" anymore.
2909 Make use of nodeToSelectOnMouseDownForNode.
2911 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2912 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2913 (WebCore::EventHandler::handleMousePressEventTripleClick):
2914 (WebCore::EventHandler::handleMousePressEventSingleClick):
2915 (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
2916 Adjust to the new names.
2918 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2920 Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
2921 https://bugs.webkit.org/show_bug.cgi?id=142595
2923 Reviewed by Andreas Kling.
2925 Fixed this bug for canvas.
2927 * html/HTMLCanvasElement.cpp:
2928 (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
2929 required by our IDL generator.
2931 (WebCore::HTMLCanvasElement::createImageBuffer): Use
2932 reportExtraMemoryAllocated.
2934 * html/HTMLCanvasElement.h:
2936 * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
2937 right way during GC. This will match our reportExtraMemoryAllocated
2938 with a reportExtraMemoryVisited during GC.
2940 2015-03-11 Roger Fong <roger_fong@apple.com>
2942 A number of minor edits to the media controls on OSX.
2943 https://bugs.webkit.org/show_bug.cgi?id=142551.
2944 <rdar://problem/20114707>
2946 Reviewed by Darin Adler.
2948 This covers a slew of minor edits to the new media controls. They are as follows.
2949 Small vertical placements adjustments to inline control elements.
2950 Make sure buttons have no focus outlines.
2951 Expand height of mute box that triggers the volume panel appearing.
2952 Turn all button colors into an slightly transparent white.
2953 Center status display text in fullscreen mode.
2954 Lower position of captions container in fullscreen mode.
2955 Show the controls on when done loading of the video an status display is hidden.
2957 * Modules/mediacontrols/mediaControlsApple.css:
2958 (audio::-webkit-media-controls-panel):
2959 (audio::-webkit-media-controls-panel button:focus):
2960 (audio::-webkit-media-controls-rewind-button):
2961 (audio::-webkit-media-controls-play-button):
2962 (audio::-webkit-media-controls-play-button.paused):
2963 (audio::-webkit-media-controls-panel .mute-box):
2964 (video::-webkit-media-controls-volume-max-button):
2965 (audio::-webkit-media-controls-panel .volume-box):
2966 (video::-webkit-media-controls-volume-min-button):
2967 (audio::-webkit-media-controls-wireless-playback-picker-button):
2968 (audio::-webkit-media-controls-toggle-closed-captions-button):
2969 (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
2970 (audio::-webkit-media-controls-fullscreen-button):
2971 (audio::-webkit-media-controls-fullscreen-button.exit):
2972 (audio::-webkit-media-controls-status-display):
2973 (audio::-webkit-media-controls-time-remaining-display):
2974 (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2975 (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
2976 (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
2977 (video:-webkit-full-screen::-webkit-media-controls-play-button):
2978 (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
2979 (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2980 (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2981 (video:-webkit-full-screen::-webkit-media-controls-status-display):
2982 (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2983 (audio::-webkit-media-controls-panel button:active): Deleted.
2984 * Modules/mediacontrols/mediaControlsApple.js:
2985 (Controller.prototype.setStatusHidden):
2987 2015-03-11 Commit Queue <commit-queue@webkit.org>
2989 Unreviewed, rolling out r179340 and r179344.
2990 https://bugs.webkit.org/show_bug.cgi?id=142598
2992 Caused images to stay alive forever when navigating away from
2993 the page before they finish loading. (Requested by kling on
2996 Reverted changesets:
2998 "CachedImage: ensure clients overrides imageChanged instead of
3000 https://bugs.webkit.org/show_bug.cgi?id=140722
3001 http://trac.webkit.org/changeset/179340
3003 "HTMLImageLoader: fix build failure on assert condition after
3005 https://bugs.webkit.org/show_bug.cgi?id=140722
3006 http://trac.webkit.org/changeset/179344
3008 2015-03-11 Geoffrey Garen <ggaren@apple.com>
3010 Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
3011 https://bugs.webkit.org/show_bug.cgi?id=142593
3013 Reviewed by Andreas Kling.
3015 Adopt deprecatedReportExtraMemory as a short-term fix for runaway
3016 memory growth in these cases where we have not adopted
3017 reportExtraMemoryVisited.
3019 Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
3020 That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
3022 Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
3023 which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
3025 * Modules/mediasource/SourceBuffer.cpp:
3026 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
3027 * bindings/js/JSDocumentCustom.cpp:
3029 * bindings/js/JSImageDataCustom.cpp:
3031 * bindings/js/JSNodeListCustom.cpp:
3032 (WebCore::createWrapper):
3033 * dom/CollectionIndexCache.cpp:
3034 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
3035 * html/HTMLCanvasElement.cpp:
3036 (WebCore::HTMLCanvasElement::createImageBuffer):
3037 * html/HTMLImageLoader.cpp:
3038 (WebCore::HTMLImageLoader::imageChanged):
3039 * html/HTMLMediaElement.cpp:
3040 (WebCore::HTMLMediaElement::parseAttribute):
3041 * xml/XMLHttpRequest.cpp:
3042 (WebCore::XMLHttpRequest::dropProtection):
3044 2015-03-10 Andy Estes <aestes@apple.com>
3046 REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
3047 https://bugs.webkit.org/show_bug.cgi?id=142526
3049 Reviewed by Darin Adler.
3051 * loader/DocumentLoader.cpp:
3052 (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
3054 2015-03-10 Sam Weinig <sam@webkit.org>
3056 Allow adding a button in input elements for auto fill related functionality
3057 <rdar://problem/19782066>
3058 https://bugs.webkit.org/show_bug.cgi?id=142564
3060 Reviewed by Anders Carlsson.
3062 Test: fast/forms/input-auto-fill-button.html
3064 - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
3065 - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
3066 where not feasible due to exported API/SPI).
3069 * WebCore.vcxproj/WebCore.vcxproj:
3070 * WebCore.vcxproj/WebCore.vcxproj.filters:
3071 * WebCore.xcodeproj/project.pbxproj:
3075 (input::-webkit-auto-fill-button):
3076 (input::-webkit-auto-fill-button:hover):
3077 (input::-webkit-auto-fill-button:active):
3078 Add default style rules for the AutoFill button based on the ones
3079 used for caps lock indicator.
3081 * html/HTMLInputElement.cpp:
3082 (WebCore::HTMLInputElement::HTMLInputElement):
3083 (WebCore::HTMLInputElement::autoFillButtonElement):
3084 (WebCore::HTMLInputElement::reset):
3085 (WebCore::HTMLInputElement::setValueFromRenderer):
3086 (WebCore::HTMLInputElement::setAutoFilled):
3087 (WebCore::HTMLInputElement::setShowAutoFillButton):
3088 (WebCore::HTMLInputElement::setAutofilled): Deleted.
3089 * html/HTMLInputElement.h:
3090 (WebCore::HTMLInputElement::isAutoFilled):
3091 (WebCore::HTMLInputElement::showAutoFillButton):
3092 (WebCore::HTMLInputElement::isAutofilled): Deleted.
3093 Add new bit to represent whether the AutoFill button should be shown
3094 or not. By default it is not shown, and the client must enable it.
3096 * html/InputType.cpp:
3097 (WebCore::InputType::updateAutoFillButton):
3099 (WebCore::InputType::autoFillButtonElement):
3100 Add new virtual methods for updating and accessing the AutoFill button.
3102 * html/TextFieldInputType.cpp:
3103 (WebCore::TextFieldInputType::createShadowSubtree):
3104 (WebCore::TextFieldInputType::autoFillButtonElement):
3105 (WebCore::TextFieldInputType::destroyShadowSubtree):
3106 (WebCore::TextFieldInputType::updatePlaceholderText):
3107 (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
3108 (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
3109 (WebCore::TextFieldInputType::createContainer):
3110 (WebCore::TextFieldInputType::createAutoFillButton):
3111 (WebCore::TextFieldInputType::updateAutoFillButton):
3112 * html/TextFieldInputType.h:
3113 Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
3114 is slightly different than for the caps lock indicator, because I didn't want to force
3115 the creation of a container for all <input> elements just in case an AutoFill button was
3116 added. Instead, if an AutoFill button is added, the container is created on the fly and
3117 the existing DOM is updated to move into it. Once a container is created, it is never
3120 * html/shadow/AutoFillButtonElement.cpp: Added.
3121 (WebCore::AutoFillButtonElement::create):
3122 (WebCore::AutoFillButtonElement::AutoFillButtonElement):
3123 (WebCore::AutoFillButtonElement::defaultEventHandler):
3124 * html/shadow/AutoFillButtonElement.h: Added.
3125 Add div subclass that swallows the click event and forwards it to the ChromeClient.
3127 * page/ChromeClient.h:
3128 Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
3131 * testing/Internals.cpp:
3132 (WebCore::Internals::setAutofilled):
3133 (WebCore::Internals::setShowAutoFillButton):
3134 * testing/Internals.h:
3135 * testing/Internals.idl:
3136 Expose a new internals.setShowAutoFillButton() function to allow testing
3137 of the AutoFill button from layout tests.
3139 * accessibility/AccessibilityObject.cpp:
3140 (WebCore::AccessibilityObject::isValueAutofilled):
3141 * css/SelectorCheckerTestFunctions.h:
3142 (WebCore::isAutofilled):
3143 * css/StyleResolver.cpp:
3144 (WebCore::StyleResolver::canShareStyleWithControl):
3145 Update for new spelling of AutoFill.
3147 2015-03-11 Geoffrey Garen <ggaren@apple.com>
3149 Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
3150 https://bugs.webkit.org/show_bug.cgi?id=142589
3152 Reviewed by Andreas Kling.
3154 Updated for renames to JSC extra cost APIs.
3156 Added FIXMEs to our 10 use cases that are currently wrong, including
3157 canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
3159 * Modules/mediasource/SourceBuffer.cpp:
3160 (WebCore::SourceBuffer::appendBufferInternal):
3161 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
3162 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
3163 (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
3164 * Modules/mediasource/SourceBuffer.h:
3165 * bindings/js/JSDocumentCustom.cpp:
3167 * bindings/js/JSImageDataCustom.cpp:
3169 * bindings/js/JSNodeListCustom.cpp:
3170 (WebCore::createWrapper):
3171 * bindings/scripts/CodeGeneratorJS.pm:
3172 (GenerateImplementation):
3173 * dom/CollectionIndexCache.cpp:
3174 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
3175 (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
3176 * dom/CollectionIndexCache.h:
3177 (WebCore::Iterator>::computeNodeCountUpdatingListCache):
3178 * html/HTMLCanvasElement.cpp:
3179 (WebCore::HTMLCanvasElement::createImageBuffer):
3180 * html/HTMLCollection.h:
3181 (WebCore::CollectionNamedElementCache::didPopulate):
3182 * html/HTMLImageLoader.cpp:
3183 (WebCore::HTMLImageLoader::imageChanged):
3184 * html/HTMLMediaElement.cpp:
3185 (WebCore::HTMLMediaElement::parseAttribute):
3186 * xml/XMLHttpRequest.cpp:
3187 (WebCore::XMLHttpRequest::dropProtection):
3189 2015-03-11 Benjamin Poulain <bpoulain@apple.com>
3191 Add basic support for BOL and EOL assertions to the URL Filter parser
3192 https://bugs.webkit.org/show_bug.cgi?id=142568
3194 Reviewed by Alex Christensen.
3196 This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
3198 Both assertions must be the first/last term of their pattern. Any advanced combination
3199 results in a parsing error.
3201 The BOL assertion is easy to represent: currently, any pattern starts at the beginning
3202 of a line and the NFA are generated accordingly.
3204 I had two options to represent the EOL assertion:
3205 1) Add a new special transition on EOL.
3206 2) Add a new vector of actions to the states, conditional to the EOL input.
3208 I picked the first option to avoid growing every state by a vector
3209 that would be empty in the vast majority of cases.
3212 On the matching side, the interpreter was modified to support transitions on '\0'.
3213 DFABytecodeInstruction::CheckValue now stops when running on a character after
3214 the end of the string.
3216 DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
3217 to avoid going past the end of the input. Second, stop on '\0' too... the reason
3218 is that the unconditional jump is only used for fallback edges of the DFA, fallback
3219 edge are not supposed to accept '\0'.
3221 * contentextensions/DFA.cpp:
3222 (WebCore::ContentExtensions::printTransitions):
3223 * contentextensions/DFABytecodeInterpreter.cpp:
3224 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3225 * contentextensions/DFANode.h:
3226 * contentextensions/NFA.cpp:
3227 (WebCore::ContentExtensions::NFA::addTransition):
3228 (WebCore::ContentExtensions::NFA::addEpsilonTransition):
3229 (WebCore::ContentExtensions::printTransitions):
3230 * contentextensions/NFANode.h:
3231 * contentextensions/NFAToDFA.cpp:
3232 (WebCore::ContentExtensions::populateTransitions):
3233 (WebCore::ContentExtensions::NFAToDFA::convert):
3234 * contentextensions/URLFilterParser.cpp:
3235 (WebCore::ContentExtensions::Term::Term):
3236 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
3237 (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
3238 (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
3239 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3241 2015-03-11 Jer Noble <jer.noble@apple.com>
3243 [Mac] Update fullscreen placeholder UI to use Vibrancy.
3244 https://bugs.webkit.org/show_bug.cgi?id=142586
3246 Reviewed by Eric Carlson.
3248 Update the fullscreen placeholder with a translucent vibrant appearance
3249 using NSVisualEffectView. Since NSVisuaEffectView is only available for
3250 OS X 10.10 and above, wrap the new implementation in a version check and
3251 retain the old implementation.
3253 Drive-by: Update the strings for the placeholder view with new HI guidance
3256 * English.lproj/Localizable.strings:
3257 * platform/LocalizedStrings.cpp:
3258 (WebCore::clickToExitFullScreenText):
3259 * platform/mac/WebCoreFullScreenPlaceholderView.h:
3260 * platform/mac/WebCoreFullScreenPlaceholderView.mm:
3261 (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
3263 2015-03-11 Timothy Horton <timothy_horton@apple.com>
3265 Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
3266 https://bugs.webkit.org/show_bug.cgi?id=142549
3268 Reviewed by Simon Fraser.
3270 * page/ViewportConfiguration.cpp:
3271 (WebCore::ViewportConfiguration::ViewportConfiguration):
3272 Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
3273 because it being true does not guarantee that we will ignore scaling constraints,
3274 but it being false does guarantee that we won't.
3276 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
3277 Ignore scaling constraints if the page:
3278 a) claimed to want to lay out to device-width and then laid out too wide
3279 b) claimed to want to lay out to device-height and then laid out too tall
3280 c) claimed to want to lay out with initialScale=1 and then laid out too wide
3282 (WebCore::ViewportConfiguration::initialScale):
3283 (WebCore::ViewportConfiguration::minimumScale):
3284 (WebCore::ViewportConfiguration::allowsUserScaling):
3285 Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
3286 have some more logic here (as above).
3288 (WebCore::ViewportConfiguration::description):
3289 Dump whether we're ignoring scaling constraints.
3291 (WebCore::ViewportConfiguration::dump):
3292 Use WTFLogAlways so that the output goes to various other logging mechanisms
3293 instead of just stderr.
3295 * page/ViewportConfiguration.h:
3296 (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
3297 (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
3299 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
3301 Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
3302 https://bugs.webkit.org/show_bug.cgi?id=142569
3304 Reviewed by David Hyatt.
3306 Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
3307 that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
3308 return type from int to Optional<int>.
3310 No new tests because there is no behavior change.
3312 * rendering/RenderBlock.cpp:
3313 (WebCore::RenderBlock::baselinePosition):
3314 (WebCore::RenderBlock::firstLineBaseline):
3315 (WebCore::RenderBlock::inlineBlockBaseline):
3316 * rendering/RenderBlock.h:
3317 * rendering/RenderBlockFlow.cpp:
3318 (WebCore::RenderBlockFlow::firstLineBaseline):
3319 (WebCore::RenderBlockFlow::inlineBlockBaseline):
3320 * rendering/RenderBlockFlow.h:
3321 * rendering/RenderBox.h:
3322 (WebCore::RenderBox::firstLineBaseline):
3323 (WebCore::RenderBox::inlineBlockBaseline):
3324 * rendering/RenderDeprecatedFlexibleBox.cpp:
3325 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3326 * rendering/RenderFlexibleBox.cpp:
3327 (WebCore::RenderFlexibleBox::baselinePosition):
3328 (WebCore::RenderFlexibleBox::firstLineBaseline):
3329 (WebCore::RenderFlexibleBox::inlineBlockBaseline):
3330 (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3331 * rendering/RenderFlexibleBox.h:
3332 * rendering/RenderMenuList.h:
3333 * rendering/RenderTable.cpp:
3334 (WebCore::RenderTable::cellAbove):
3335 (WebCore::RenderTable::cellBelow):
3336 (WebCore::RenderTable::cellBefore):
3337 (WebCore::RenderTable::cellAfter):
3338 (WebCore::RenderTable::firstLineBlock):
3339 (WebCore::RenderTable::baselinePosition):
3340 (WebCore::RenderTable::inlineBlockBaseline):
3341 (WebCore::RenderTable::firstLineBaseline):
3342 * rendering/RenderTable.h:
3343 * rendering/RenderTableCell.cpp:
3344 (WebCore::RenderTableCell::cellBaselinePosition):
3345 * rendering/RenderTableSection.cpp:
3346 (WebCore::RenderTableSection::firstLineBaseline):
3347 * rendering/RenderTableSection.h:
3348 * rendering/RenderTextControl.h:
3349 * rendering/mathml/RenderMathMLBlock.cpp:
3350 (WebCore::RenderMathMLBlock::baselinePosition):
3351 (WebCore::RenderMathMLTable::firstLineBaseline):
3352 * rendering/mathml/RenderMathMLBlock.h:
3353 * rendering/mathml/RenderMathMLFraction.cpp:
3354 (WebCore::RenderMathMLFraction::firstLineBaseline):
3355 * rendering/mathml/RenderMathMLFraction.h:
3356 * rendering/mathml/RenderMathMLOperator.cpp:
3357 (WebCore::RenderMathMLOperator::firstLineBaseline):
3358 * rendering/mathml/RenderMathMLOperator.h:
3359 * rendering/mathml/RenderMathMLRoot.cpp:
3360 (WebCore::RenderMathMLRoot::firstLineBaseline):
3361 (WebCore::RenderMathMLRoot::layout):
3362 * rendering/mathml/RenderMathMLRoot.h:
3363 * rendering/mathml/RenderMathMLRow.cpp:
3364 (WebCore::RenderMathMLRow::layout):
3365 * rendering/mathml/RenderMathMLScripts.cpp:
3366 (WebCore::RenderMathMLScripts::layout):
3367 (WebCore::RenderMathMLScripts::firstLineBaseline):
3368 * rendering/mathml/RenderMathMLScripts.h:
3369 * rendering/mathml/RenderMathMLSpace.cpp:
3370 (WebCore::RenderMathMLSpace::firstLineBaseline):
3371 * rendering/mathml/RenderMathMLSpace.h:
3372 * rendering/mathml/RenderMathMLUnderOver.cpp:
3373 (WebCore::RenderMathMLUnderOver::firstLineBaseline):
3374 * rendering/mathml/RenderMathMLUnderOver.h:
3376 2015-03-11 Timothy Horton <timothy_horton@apple.com>
3378 <attachment>s should be created when dropping files onto contentEditable areas
3379 https://bugs.webkit.org/show_bug.cgi?id=142494
3380 <rdar://problem/19982553>
3382 Reviewed by Anders Carlsson.