1 2015-03-17 Zalan Bujtas <zalan@apple.com>
3 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
4 https://bugs.webkit.org/show_bug.cgi?id=142785
6 Reviewed by Antti Koivisto.
8 This is in transition to support <br>. A particular position could point to multiple
9 segments when <br> is directly followed by text.
11 No change in functionality.
13 * rendering/SimpleLineLayoutFlowContents.cpp:
14 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
15 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
16 * rendering/SimpleLineLayoutFlowContents.h:
17 (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
18 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
19 (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
20 * rendering/SimpleLineLayoutResolver.cpp:
21 (WebCore::SimpleLineLayout::RunResolver::Run::text):
23 2015-03-17 Chris Dumez <cdumez@apple.com>
25 [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
26 https://bugs.webkit.org/show_bug.cgi?id=142752
27 <rdar://problem/20176731>
29 Reviewed by Antti Koivisto.
31 setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
32 and iOS on pages using a lot of timers.
34 For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
35 setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
36 stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
37 CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
39 The issue is that we keep creating, adding to run loop modes, and then
40 destroying the sharedTimer for each firing event. This is very
41 expensive. In such case, the CFRunLoopTimerRef documentation advises to
43 ... create a repeating timer with an initial firing time in the distant
44 future (or the initial firing time) and a very large repeat interval—on
45 the order of decades or more—and add it to all the necessary run loop
46 modes. Then, when you know when the timer should fire next, you reset
47 the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
48 timer’s own callback function. This technique effectively produces a
49 reusable, asynchronous timer.
52 Doing so greatly decreases CPU time spend in:
53 - setSharedTimerFireInterval(): 15.4% -> 4.6%
54 - stopSharedTimer(): 14.6% -> 8.6%
56 Overall CPU time spent on bing.com in timerFired() goes down from
59 This patch also refactors the SharedTimer code to share as much as
60 possible between Mac and iOS.
62 This patch is based in part on the following patch:
63 http://trac.webkit.org/changeset/143210
65 [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
67 * WebCore.xcodeproj/project.pbxproj:
68 * platform/SharedTimer.h:
69 (WebCore::SharedTimer::invalidate):
70 (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
71 (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
72 (WebCore::MainThreadSharedTimer::stop): Deleted.
73 * platform/ThreadTimers.cpp:
74 (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
75 * platform/cf/SharedTimerCF.mm: Added.
76 (WebCore::applicationDidBecomeActive):
77 (WebCore::setupPowerObserver):
78 (WebCore::setSharedTimerFiredFunction):
79 (WebCore::timerFired):
80 (WebCore::restartSharedTimer):
81 (WebCore::invalidateSharedTimer):
82 (WebCore::setSharedTimerFireInterval):
83 (WebCore::stopSharedTimer):
84 * platform/efl/SharedTimerEfl.cpp:
85 (WebCore::invalidateSharedTimer):
86 * platform/gtk/SharedTimerGtk.cpp:
87 (WebCore::invalidateSharedTimer):
88 * platform/ios/SharedTimerIOS.mm: Removed.
89 * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
90 * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
91 (WebCore::PowerObserver::PowerObserver):
92 (WebCore::PowerObserver::~PowerObserver):
93 (WebCore::PowerObserver::didReceiveSystemPowerNotification):
94 * platform/win/SharedTimerWin.cpp:
95 (WebCore::removeSharedTimer):
97 2015-03-17 Tim Horton <timothy_horton@apple.com>
99 Cannot invoke action menus anymore
100 https://bugs.webkit.org/show_bug.cgi?id=142797
101 <rdar://problem/20032670>
103 Reviewed by Beth Dakin.
105 * platform/spi/mac/NSMenuSPI.h:
106 Add additional NSMenu SPI.
108 2015-03-17 Zalan Bujtas <zalan@apple.com>
110 Simple line layout: Split fragments on renderer boundary on the fly.
111 https://bugs.webkit.org/show_bug.cgi?id=142579
113 Reviewed by Antti Koivisto.
115 Fragment splitting at renderers' boundary at the end of the line is no longer needed.
116 This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
117 fragments across renderer boundary.
119 Test: fast/text/simple-line-with-multiple-renderers.html
121 * rendering/SimpleLineLayout.cpp:
122 (WebCore::SimpleLineLayout::revertRuns):
123 (WebCore::SimpleLineLayout::LineState::isEmpty):
124 (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
125 whether neighboring fragments need collapsing.
126 (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
127 a fragment continuation.
128 (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
129 (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
130 they all get added to the current line.
131 (WebCore::SimpleLineLayout::createLineRuns):
132 (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
133 (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
134 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
135 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
136 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
137 (WebCore::SimpleLineLayout::begin): Deleted.
138 (WebCore::SimpleLineLayout::end): Deleted.
139 (WebCore::SimpleLineLayout::preWrap): Deleted.
140 (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
141 (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
142 (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
143 (WebCore::SimpleLineLayout::createTextRuns): Deleted.
144 (WebCore::SimpleLineLayout::create): Deleted.
145 (WebCore::SimpleLineLayout::Layout::create): Deleted.
146 * rendering/SimpleLineLayoutFlowContents.h:
147 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
148 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
149 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
150 * rendering/SimpleLineLayoutFunctions.cpp:
151 (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
152 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
153 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
154 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
155 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
156 (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
157 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
158 * rendering/SimpleLineLayoutTextFragmentIterator.h:
159 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
160 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
161 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
162 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
163 (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
164 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
166 2015-03-17 Jeremy Jones <jeremyj@apple.com>
168 When tab hides, pause fullscreen and exit normally.
169 https://bugs.webkit.org/show_bug.cgi?id=142685
171 Reviewed by Eric Carlson.
173 Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
174 the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
176 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
177 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
179 2015-03-17 Per Arne Vollan <peavo@outlook.com>
181 [WinCairo] Video position is incorrect when located inside a frame.
182 https://bugs.webkit.org/show_bug.cgi?id=142784
184 Reviewed by Brent Fulgham.
186 We need to take the enclosing frame's position into account, when finding the video position.
188 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
189 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
191 2015-03-17 Benjamin Poulain <bpoulain@apple.com>
193 Compile character ranges targeting the same state as range check in the bytecode
194 https://bugs.webkit.org/show_bug.cgi?id=142759
196 Reviewed by Alex Christensen.
198 Previously, character ranges would be compiled as many individual character checks.
199 For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
200 to enormous matchines.
202 With this patch, we find the ranges at lowering time and generate a single instruction
203 for them: "CheckValueRange". This helps making the machine denser when the input
206 The second part of this patch goes further in the case where the transitions out of
207 a state cover the entire alphabet. In that case, we create a fallback transition
208 on the fly and remove all the ranges made useless.
209 That case is common when ranges are used with inverse character set (e.g. [^a]+a).
211 * contentextensions/DFABytecode.h:
212 (WebCore::ContentExtensions::instructionSizeWithArguments):
213 * contentextensions/DFABytecodeCompiler.cpp:
214 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
215 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
216 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
217 (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
218 * contentextensions/DFABytecodeCompiler.h:
219 Extend the compiler to detect ranges and lower them as CheckValueRange.
221 * contentextensions/DFABytecodeInterpreter.cpp:
222 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
223 Range checks in the interpreter.
225 * contentextensions/NFA.cpp:
226 (WebCore::ContentExtensions::NFA::setFinal):
227 This assertion does not make sense with the current codebase. Actions are "compressed",
228 it is possible to have two patterns with the same action.
230 * contentextensions/NFAToDFA.cpp:
231 (WebCore::ContentExtensions::simplifyTransitions):
232 A very simple DFA optimization function: it only reduce the strength of ranges.
234 (WebCore::ContentExtensions::NFAToDFA::convert):
236 2015-03-17 Jer Noble <jer.noble@apple.com>
238 REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
239 https://bugs.webkit.org/show_bug.cgi?id=142787
241 Reviewed by Eric Carlson.
243 Null check m_player before derefencing.
245 * html/HTMLMediaElement.cpp:
246 (WebCore::HTMLMediaElement::parseAttribute):
248 2015-03-17 Beth Dakin <bdakin@apple.com>
250 DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
252 https://bugs.webkit.org/show_bug.cgi?id=142700
254 rdar://problem/20165168
256 Reviewed by Tim Horton.
258 This patch adds a new enum and member variable so that EventHandler can keep track
259 of the current immediate action state.
260 * page/EventHandler.cpp:
261 (WebCore::EventHandler::EventHandler):
263 A new mouse press even is starting. We can re-set m_immediateActionStage to none
264 unless a Hit Test has already been performed.
265 (WebCore::EventHandler::handleMousePressEvent):
267 If an immediate action was completed, then send mouse to the DOM and return early.
268 This will prevent us from doing our own normal mouseup behaviors such as
269 navigating to a link that was clicked — we only want to do that if the click was
270 not used to perform an immediate action.
271 (WebCore::EventHandler::handleMouseReleaseEvent):
272 * page/EventHandler.h:
273 (WebCore::EventHandler::setImmediateActionStage):
275 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
277 Use a better parameter name for Document.getElementsByClassName
278 https://bugs.webkit.org/show_bug.cgi?id=142771
280 Reviewed by Chris Dumez.
282 * bindings/objc/PublicDOMInterfaces.h:
285 2015-03-17 Timothy Horton <timothy_horton@apple.com>
287 Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
288 https://bugs.webkit.org/show_bug.cgi?id=142776
289 <rdar://problem/18921338>
291 Reviewed by Alexey Proskuryakov.
293 Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
295 In some cases (like the new test), we can end up trying to start
296 requestAnimationFrame on a Document that has no Page. Most paths null-checked
297 the Page and did the right thing, but one failed to do so. In addition,
298 the current fallback (when Page is null) can result in us constructing
299 the wrong kind of DisplayRefreshMonitor, which could lead to trouble
300 down the road when it's reused. Instead, just completely avoid making a
301 DisplayRefreshMonitor in the null-page case.
303 * dom/ScriptedAnimationController.cpp:
304 (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
305 If the page is null, bail.
307 * dom/ScriptedAnimationController.h:
308 * platform/graphics/DisplayRefreshMonitor.cpp:
309 (WebCore::DisplayRefreshMonitor::create):
310 Use Optional<> to make it easy to distinguish between ChromeClient
311 being unreachable (because we don't have a Page for some reason) and
312 ChromeClient declaring that it doesn't want to override the type of
313 DisplayRefreshMonitor that is created.
315 If ChromeClient was unreachable for some reason, we'll get back an engaged
316 nullptr and return it (instead of creating a DisplayRefreshMonitor based
317 on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
318 in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
321 If instead the client returns a disengaged Nullopt, we'll interpret that as
322 "construct the default type", which falls back on the platform #ifdefs to
325 * platform/graphics/DisplayRefreshMonitorManager.cpp:
326 (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
327 (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
328 Silently handle the case where we failed to make a DisplayRefreshMonitor.
330 * platform/graphics/DisplayRefreshMonitor.h:
331 * platform/graphics/DisplayRefreshMonitorClient.h:
332 * platform/graphics/GraphicsLayerUpdater.cpp:
333 (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
334 * platform/graphics/GraphicsLayerUpdater.h:
335 * rendering/RenderLayerCompositor.cpp:
336 (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
337 * rendering/RenderLayerCompositor.h:
338 Adjust to the new signature of createDisplayRefreshMonitor, and return
339 an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.
341 * page/ChromeClient.h:
342 Return Nullopt (indicating a lack of override) by default.
344 2015-03-17 Dean Jackson <dino@apple.com>
346 Implement Scroll Container Animation Triggers
347 https://bugs.webkit.org/show_bug.cgi?id=142732
349 Attempt to fix the build.
351 * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
353 2015-03-17 Dean Jackson <dino@apple.com>
355 Implement Scroll Container Animation Triggers
356 https://bugs.webkit.org/show_bug.cgi?id=142732
358 Reviewed by Simon Fraser.
360 Test: animations/trigger-container-scroll-simple.html
362 Basic implementation of container-scroll. It only checks
363 the page scroll position for trigger values (not the scrolling
364 container in an overflow).
366 * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
367 so that this property will appear in the inspector.
369 * page/FrameView.cpp:
370 (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
371 controller know about it.
373 * page/animation/AnimationBase.cpp:
374 (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
375 (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
376 and the scroll position is past it, then tell the state machine that
378 (WebCore::AnimationBase::timeToNextService): Use the scroll position as
379 an input to the update timer if a trigger is involved.
381 * page/animation/AnimationController.cpp:
382 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
383 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
384 (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
385 * page/animation/AnimationController.h:
386 * page/animation/AnimationControllerPrivate.h:
388 * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
390 (WebCore::CompositeAnimation::CompositeAnimation):
391 (WebCore::CompositeAnimation::updateKeyframeAnimations):
392 * page/animation/CompositeAnimation.h:
393 (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
394 * platform/animation/Animation.cpp:
395 (WebCore::Animation::operator=):
397 2015-03-17 Simon Fraser <simon.fraser@apple.com>
399 Move some code from LogicalSelectionOffsetCaches into RenderElement
400 https://bugs.webkit.org/show_bug.cgi?id=142758
402 Reviewed by Myles C. Maxfield.
404 LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
405 that should be used in more places, so move it into RenderElement.
409 * rendering/LogicalSelectionOffsetCaches.h:
410 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
411 (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
412 (WebCore::isNonRenderBlockInline): Deleted.
413 (WebCore::containingBlockForFixedPosition): Deleted.
414 (WebCore::containingBlockForAbsolutePosition): Deleted.
415 (WebCore::containingBlockForObjectInFlow): Deleted.
416 * rendering/RenderBlock.cpp: No need to initialize static data.
417 (WebCore::RenderBlock::positionedObjects): nullptr
418 * rendering/RenderElement.cpp:
419 (WebCore::RenderElement::containingBlockForFixedPosition):
420 (WebCore::RenderElement::containingBlockForAbsolutePosition):
421 (WebCore::isNonRenderBlockInline):
422 (WebCore::RenderElement::containingBlockForObjectInFlow):
423 * rendering/RenderElement.h:
424 (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
425 * rendering/RenderLayer.cpp:
426 (WebCore::isContainerForPositioned):
427 * rendering/RenderObject.cpp:
428 (WebCore::RenderObject::containingBlock):
430 2015-03-17 Alex Christensen <achristensen@webkit.org>
432 [WinCairo] Unreviewed build fix after r181640.
434 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
435 Tell Windows how to find ShaderLang.h.
437 2015-03-17 Chris Dumez <cdumez@apple.com>
439 'pageLoaded' diagnostic logging is too verbose
440 https://bugs.webkit.org/show_bug.cgi?id=142727
441 <rdar://problem/18937048>
443 Reviewed by Eric Carlson.
445 Make 'pageLoaded' diagnostic logging less verbose:
446 - Log once per main frame instead of once for subframe
449 * loader/FrameLoader.cpp:
450 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
452 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
454 [GTK] Wrong transfer annotations used in GObject DOM bindings
455 https://bugs.webkit.org/show_bug.cgi?id=142780
457 Reviewed by Gustavo Noronha Silva.
459 We are using transfer none for all methods returning a GObject DOM
460 Object. That's not true. Only objects derived from Node are
461 automatically released by the DOM object cache and can be transfer
462 none. All other objects are added to the cache only to avoid
463 creating the same wrapper twice for the same core object, but
464 caller should release the returned reference.
466 * bindings/gobject/WebKitDOMCustomUnstable.h:
467 * bindings/scripts/CodeGeneratorGObject.pm:
468 (GetTransferTypeForReturnType):
471 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
473 [GTK] WebKitDOM objects leaking
474 https://bugs.webkit.org/show_bug.cgi?id=118788
476 Reviewed by Darin Adler and Sergio Villar Senin.
478 Use a DOMwindowObserver class, derived from DOMWindowProperty to
479 be notified when the window object is detached from the frame to
480 clear the DOM objects associated to that frame in that case too.
482 * bindings/gobject/DOMObjectCache.cpp:
484 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
486 [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
487 https://bugs.webkit.org/show_bug.cgi?id=142530
489 Reviewed by Darin Adler.
491 Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
492 us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
493 and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
496 Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
497 required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
498 whole WebCore library anymore, only the ANGLESupport library.
501 * platform/graphics/ANGLEWebKitBridge.h:
502 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
504 2015-03-17 Matt Baker <mattbaker@apple.com>
506 Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
507 https://bugs.webkit.org/show_bug.cgi?id=142029
509 Reviewed by Timothy Hatcher.
511 Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
513 * inspector/InspectorTimelineAgent.cpp:
514 (WebCore::currentRunLoop):
515 (WebCore::InspectorTimelineAgent::internalStart):
516 (WebCore::InspectorTimelineAgent::internalStop):
517 (WebCore::toProtocol):
518 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
519 Install observers for the begining and end of the runloop when recording begins. All other
520 instrumented timeline events get added as children of the current runloop record, which is
521 sent to the frontend once the runloop completes.
523 * inspector/InspectorTimelineAgent.h:
525 * platform/cf/RunLoopObserver.cpp:
526 (WebCore::RunLoopObserver::schedule):
527 Wrapper changed to allow observing arbitrary runloop activities.
529 * platform/cf/RunLoopObserver.h:
531 2015-03-17 Philippe Normand <pnormand@igalia.com>
533 [GTK] basic OpenWebRTC build support
534 https://bugs.webkit.org/show_bug.cgi?id=142393
536 Reviewed by Carlos Garcia Campos.
538 * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
540 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
542 Remove never used "useLayerOnTop" bindings generator argument
543 https://bugs.webkit.org/show_bug.cgi?id=142773
545 Reviewed by Darin Adler.
547 * bindings/scripts/CodeGenerator.pm:
548 * bindings/scripts/CodeGeneratorJS.pm:
549 * bindings/scripts/CodeGeneratorObjC.pm:
550 * bindings/scripts/generate-bindings.pl:
552 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
554 Enable ES6 classes by default
555 https://bugs.webkit.org/show_bug.cgi?id=142774
557 Reviewed by Gavin Barraclough.
559 * Configurations/FeatureDefines.xcconfig:
561 2015-03-16 Simon Fraser <simon.fraser@apple.com>
563 Update the debug overlays after layout
564 https://bugs.webkit.org/show_bug.cgi?id=142768
566 Reviewed by Zalan Bujtas.
568 The debug overlays need to be updated after layout, in case elements with wheel event handlers
571 DebugPageOverlays::didLayout() is cheap if there are no overlays.
573 Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
574 to the main frame's event handler region.
576 * page/DebugPageOverlays.cpp:
577 (WebCore::DebugPageOverlays::regionChanged):
578 * page/DebugPageOverlays.h:
579 (WebCore::DebugPageOverlays::didLayout):
580 (WebCore::DebugPageOverlays::didChangeEventHandlers):
581 * page/FrameView.cpp:
582 (WebCore::FrameView::layout):
584 2015-03-16 Jon Lee <jonlee@apple.com>
586 Unreviewed fix for crash after r181608.
588 * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
590 2015-03-16 Simon Fraser <simon.fraser@apple.com>
592 Generalize the Document code that maintains a set of nodes with event handlers
593 https://bugs.webkit.org/show_bug.cgi?id=142762
595 Reviewed by Zalan Bujtas, Darin Adler.
597 Document.h defines a TouchEventTargetSet type, which will in future be used for
598 other event types too (wheel events), so rename it to EventTargetSet.
600 Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
604 (WebCore::Document::prepareForDestruction): References
605 (WebCore::Document::didAddTouchEventHandler): Ditto.
606 (WebCore::Document::didRemoveEventTargetNode): Ditto.
608 (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
610 * html/HTMLInputElement.cpp:
611 (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
612 (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
613 * page/DOMWindow.cpp:
614 (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
616 2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
618 Web Inspector: Object Previews in Indexed DB tables
619 https://bugs.webkit.org/show_bug.cgi?id=140813
621 Reviewed by Timothy Hatcher.
623 * inspector/InspectorIndexedDBAgent.cpp:
624 Include previews with object store objects.
626 2015-03-16 Jer Noble <jer.noble@apple.com>
628 [Mac] Update missing image UI
629 https://bugs.webkit.org/show_bug.cgi?id=142592
631 Reviewed by Darin Adler.
633 Update the broken image glyphs with new art (including a 3x image).
635 Test: fast/hidpi/broken-image-icon-very-hidpi.html
637 * Resources/missingImage.png:
638 * Resources/missingImage@2x.png:
639 * Resources/missingImage@3x.png: Added.
640 * WebCore.xcodeproj/project.pbxproj:
641 * loader/cache/CachedImage.cpp:
642 (WebCore::CachedImage::brokenImage):
644 2015-03-16 Dean Jackson <dino@apple.com>
646 Parsing and Style Resolution of Container-based Animation Triggers
647 https://bugs.webkit.org/show_bug.cgi?id=142687
648 <rdar://problem/20170007>
650 Reviewed by Simon Fraser.
652 Take 2 after the previous patch was rolled out.
654 This is the beginning of a prototype implementation of
655 CSS Animation Triggers, as described by
656 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
658 In this patch we parse and resolve the value of a new
659 CSS property "-webkit-animation-trigger". At the moment it
660 only accepts one function value "container-scroll", which
661 will trigger the animation at an absolute position within
662 an element's scrolling container. We expect the syntax to
663 change in the near future, as the spec is written.
665 Tests: animations/trigger-computed-style.html
666 animations/trigger-parsing.html
668 * WebCore.xcodeproj/project.pbxproj: Add the new files.
670 * css/CSSAnimationTriggerScrollValue.cpp: Added.
671 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
672 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
673 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
674 scroll trigger. This name may change in the future to better represent the
675 type of trigger, but it is good enough for now.
676 (WebCore::CSSAnimationTriggerScrollValue::create):
677 (WebCore::CSSAnimationTriggerScrollValue::startValue):
678 (WebCore::CSSAnimationTriggerScrollValue::endValue):
679 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
681 * css/CSSComputedStyleDeclaration.cpp:
682 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
683 (WebCore::getAnimationTriggerValue): Gets the current computed style.
684 (WebCore::ComputedStyleExtractor::propertyValue):
687 (WebCore::CSSParser::parseValue):
688 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
689 and record the value as a CSSAnimationTriggerScrollValue.
690 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
693 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
695 * css/CSSToStyleMap.cpp:
696 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
698 * css/CSSToStyleMap.h:
700 * css/CSSValue.cpp: Handle the new CSSValue type.
701 (WebCore::CSSValue::equals):
702 (WebCore::CSSValue::cssText):
703 (WebCore::CSSValue::destroy):
705 (WebCore::CSSValue::isAnimationTriggerScrollValue):
707 * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
708 and use them in the operator==.
709 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
710 (WebCore::Animation::isTriggerSet):
711 (WebCore::Animation::isEmpty):
713 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
714 "auto" and the scrolling trigger.
715 (WebCore::AnimationTrigger::~AnimationTrigger):
716 (WebCore::AnimationTrigger::type):
717 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
718 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
719 (WebCore::AnimationTrigger::AnimationTrigger):
720 (WebCore::AutoAnimationTrigger::create):
721 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
722 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
723 (WebCore::ScrollAnimationTrigger::create):
724 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
725 (WebCore::ScrollAnimationTrigger::startValue):
726 (WebCore::ScrollAnimationTrigger::setStartValue):
727 (WebCore::ScrollAnimationTrigger::endValue):
728 (WebCore::ScrollAnimationTrigger::setEndValue):
729 (WebCore::ScrollAnimationTrigger::hasEndValue):
730 (WebCore::ScrollAnimationTrigger::setHasEndValue):
731 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
733 2015-03-16 Alex Christensen <achristensen@webkit.org>
735 Progress towards CMake on Mac
736 https://bugs.webkit.org/show_bug.cgi?id=142747
738 Reviewed by Chris Dumez.
742 Added more directories, interfaces, and forwarding headers.
743 Temporarily disabled the generating of ObjC bindings in CMake builds.
744 * platform/mac/PasteboardMac.mm:
745 Removed unused include.
747 2015-03-16 Joanmarie Diggs <jdiggs@igalia.com>
749 AX: Crash viewing http://www.last.fm/
750 https://bugs.webkit.org/show_bug.cgi?id=142309
752 Reviewed by Chris Fleizach.
754 The crash occurs when a not-yet-rendered object emits a children-changed
755 signal. If an assistive technology is listening, AT-SPI2 will attempt to
756 create and cache the state set for the child being added and the creation
757 of the state set assumes a rendered object.
759 Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
761 * accessibility/atk/AXObjectCacheAtk.cpp:
762 (WebCore::AXObjectCache::attachWrapper):
764 2015-03-16 Commit Queue <commit-queue@webkit.org>
766 Unreviewed, rolling out r181492.
767 https://bugs.webkit.org/show_bug.cgi?id=142756
769 May have regressed PLT (Requested by anttik on #webkit).
773 "Cache glyph widths to GlyphPages"
774 https://bugs.webkit.org/show_bug.cgi?id=142028
775 http://trac.webkit.org/changeset/181492
777 2015-03-16 Roger Fong <roger_fong@apple.com>
779 [WebGL2] Instancing draw calls.
780 https://bugs.webkit.org/show_bug.cgi?id=126939.
781 <rdar://problem/15002379>
783 Reviewed by Dean Jackson.
785 Tested by a modified version of the 1.0.3 conformance tests:
786 conformance/extensions/angle-instanced-arrays.html
787 conformance/extensions/angle-instanced-arrays-out-of-bounds.html
789 These tests will be landed along with other modified extension conformance tests
790 once approval from Khronos is received.
792 * html/canvas/WebGL2RenderingContext.cpp:
793 (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
794 (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
795 (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
796 (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
797 (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
798 (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
799 * html/canvas/WebGL2RenderingContext.h:
800 * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
801 * html/canvas/WebGLRenderingContext.cpp:
802 (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
803 (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
804 * html/canvas/WebGLRenderingContext.h:
805 * html/canvas/WebGLRenderingContextBase.cpp:
806 (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
807 (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
808 (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
809 * html/canvas/WebGLRenderingContextBase.h:
811 2015-03-16 Commit Queue <commit-queue@webkit.org>
813 Unreviewed, rolling out r181572.
814 https://bugs.webkit.org/show_bug.cgi?id=142755
816 Caused weird test failures in transitions and animations
817 (Requested by dino on #webkit).
821 "Parsing and Style Resolution of Container-based Animation
823 https://bugs.webkit.org/show_bug.cgi?id=142687
824 http://trac.webkit.org/changeset/181572
826 2015-03-16 Yoav Weiss <yoav@yoav.ws>
828 Remove setCachedImage from HTMLImageElement since it is not used
829 https://bugs.webkit.org/show_bug.cgi?id=142740
831 Reviewed by Chris Dumez.
833 No new tests since this patch is just removing dead code.
835 HTMLImageElement::setCachedImage is not being called by anyone.
836 This patch removes it, since it's dead code.
838 * html/HTMLImageElement.h:
839 (WebCore::HTMLImageElement::setCachedImage): Deleted.
841 2015-03-16 Brent Fulgham <bfulgham@apple.com>
843 WebKit1 Clients Are Not Reliably Repainted
844 https://bugs.webkit.org/show_bug.cgi?id=142750
845 <rdar://problem/20042453>
847 Reviewed by Simon Fraser.
849 * page/FrameView.cpp:
850 (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
851 the early return so we can see when this happening in debug builds.
853 (WebCore::FrameView::inPaintableState): Added.
855 2015-03-16 Chris Dumez <cdumez@apple.com>
857 Make DatabaseContext suspendable if there is no pending database activity
858 https://bugs.webkit.org/show_bug.cgi?id=142716
859 <rdar://problem/19923085>
861 Reviewed by Andreas Kling.
863 Make DatabaseContext suspendable if there is no pending database
865 - No pending Database creation JS callback
866 - No pending transaction(s)
868 Suspending is safe in this case because we are not going to interrupt
869 any database activity, nor fire any JS event.
871 This greatly increases the likelihood of pages using websql to enter
874 Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
875 fast/history/page-cache-webdatabase-pending-transaction.html
877 * Modules/webdatabase/Database.cpp:
878 (WebCore::Database::hasPendingTransaction):
879 * Modules/webdatabase/Database.h:
880 * Modules/webdatabase/DatabaseContext.cpp:
881 (WebCore::DatabaseContext::canSuspend):
882 * Modules/webdatabase/DatabaseManager.cpp:
883 (WebCore::DatabaseManager::openDatabase):
884 * Modules/webdatabase/DatabaseThread.cpp:
885 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
886 * Modules/webdatabase/DatabaseThread.h:
888 2015-03-16 Brady Eidson <beidson@apple.com>
890 Addressing additional review feedback after http://trac.webkit.org/changeset/181565
891 https://bugs.webkit.org/show_bug.cgi?id=142733
893 Reviewed by Darin Adler.
895 * loader/icon/IconController.cpp:
896 (WebCore::IconController::startLoader): Null check page()
898 2015-03-16 Roger Fong <roger_fong@apple.com>
900 [Win] Unreviewed build fix attempt after r181571.
902 * WebCore.vcxproj/WebCore.vcxproj:
904 2015-03-16 Roger Fong <roger_fong@apple.com>
906 [WebGL2] Multiple Render Targets.
907 https://bugs.webkit.org/show_bug.cgi?id=126994.
908 <rdar://problem/15815766>
910 Reviewed by Dean Jackson.
912 Tested by a modified version of the 1.0.3 conformance test:
913 conformance/extensions/webgl-draw-buffers.html
914 This test will be landed along with other modified extension conformance tests
915 once approval from Khronos is received.
917 * html/canvas/WebGL2RenderingContext.cpp:
918 (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
919 Returns different error messages, uses non EXT enums.
920 (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
921 (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
922 (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
923 (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
924 (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
925 (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
926 (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
927 (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
928 * html/canvas/WebGL2RenderingContext.h:
929 * html/canvas/WebGLFramebuffer.cpp:
930 (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
931 * html/canvas/WebGLRenderingContext.cpp:
932 (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
933 (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
934 (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
935 * html/canvas/WebGLRenderingContext.h:
936 * html/canvas/WebGLRenderingContextBase.cpp:
937 (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
938 * html/canvas/WebGLRenderingContextBase.h:
940 2015-03-16 Dean Jackson <dino@apple.com>
942 Parsing and Style Resolution of Container-based Animation Triggers
943 https://bugs.webkit.org/show_bug.cgi?id=142687
944 <rdar://problem/20170007>
946 Reviewed by Simon Fraser.
948 This is the beginning of a prototype implementation of
949 CSS Animation Triggers, as described by
950 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
952 In this patch we parse and resolve the value of a new
953 CSS property "-webkit-animation-trigger". At the moment it
954 only accepts one function value "container-scroll", which
955 will trigger the animation at an absolute position within
956 an element's scrolling container. We expect the syntax to
957 change in the near future, as the spec is written.
959 Tests: animations/trigger-computed-style.html
960 animations/trigger-parsing.html
962 * WebCore.xcodeproj/project.pbxproj: Add the new files.
964 * css/CSSAnimationTriggerScrollValue.cpp: Added.
965 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
966 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
967 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
968 scroll trigger. This name may change in the future to better represent the
969 type of trigger, but it is good enough for now.
970 (WebCore::CSSAnimationTriggerScrollValue::create):
971 (WebCore::CSSAnimationTriggerScrollValue::startValue):
972 (WebCore::CSSAnimationTriggerScrollValue::endValue):
973 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
975 * css/CSSComputedStyleDeclaration.cpp:
976 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
977 (WebCore::getAnimationTriggerValue): Gets the current computed style.
978 (WebCore::ComputedStyleExtractor::propertyValue):
981 (WebCore::CSSParser::parseValue):
982 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
983 and record the value as a CSSAnimationTriggerScrollValue.
984 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
987 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
989 * css/CSSToStyleMap.cpp:
990 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
992 * css/CSSToStyleMap.h:
994 * css/CSSValue.cpp: Handle the new CSSValue type.
995 (WebCore::CSSValue::equals):
996 (WebCore::CSSValue::cssText):
997 (WebCore::CSSValue::destroy):
999 (WebCore::CSSValue::isAnimationTriggerScrollValue):
1001 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
1002 (WebCore::Animation::isTriggerSet):
1003 (WebCore::Animation::isEmpty):
1005 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
1006 "auto" and the scrolling trigger.
1007 (WebCore::AnimationTrigger::~AnimationTrigger):
1008 (WebCore::AnimationTrigger::type):
1009 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
1010 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
1011 (WebCore::AnimationTrigger::AnimationTrigger):
1012 (WebCore::AutoAnimationTrigger::create):
1013 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
1014 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
1015 (WebCore::ScrollAnimationTrigger::create):
1016 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
1017 (WebCore::ScrollAnimationTrigger::startValue):
1018 (WebCore::ScrollAnimationTrigger::setStartValue):
1019 (WebCore::ScrollAnimationTrigger::endValue):
1020 (WebCore::ScrollAnimationTrigger::setEndValue):
1021 (WebCore::ScrollAnimationTrigger::hasEndValue):
1022 (WebCore::ScrollAnimationTrigger::setHasEndValue):
1023 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
1025 2015-03-15 Roger Fong <roger_fong@apple.com>
1027 [WebGL2] Vertex Array Objects.
1028 https://bugs.webkit.org/show_bug.cgi?id=126944.
1029 <rdar://problem/15002455>
1031 Reviewed by Dean Jackson.
1033 Tested by a modified version of the 1.0.3 conformance test:
1034 conformance/extensions/oes-vertex-array-object.html
1035 This test will be landed along with other modified extension conformance tests
1036 once approval from Khronos is received.
1038 * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
1039 (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
1040 (WebCore::OESVertexArrayObject::bindVertexArrayOES):
1041 * html/canvas/WebGLRenderingContext.cpp:
1042 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
1043 (WebCore::WebGLRenderingContext::getParameter):
1044 * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
1045 (WebCore::WebGL2RenderingContext::createVertexArray):
1046 (WebCore::WebGL2RenderingContext::deleteVertexArray):
1047 (WebCore::WebGL2RenderingContext::isVertexArray):
1048 (WebCore::WebGL2RenderingContext::bindVertexArray):
1049 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
1050 (WebCore::WebGL2RenderingContext::getParameter):
1052 Duplicate extension object vertex array object extension methods in GraphicsContext3D.
1053 Implementation may change after we upgrade to newer GL headers and profile.
1054 * platform/graphics/GraphicsContext3D.h:
1055 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1056 (WebCore::GraphicsContext3D::createVertexArray):
1057 (WebCore::GraphicsContext3D::deleteVertexArray):
1058 (WebCore::GraphicsContext3D::isVertexArray):
1059 (WebCore::GraphicsContext3D::bindVertexArray):
1061 Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
1063 * WebCore.xcodeproj/project.pbxproj:
1064 * html/canvas/WebGLVertexArrayObject.cpp:
1065 (WebCore::WebGLVertexArrayObject::create):
1066 (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
1067 (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
1068 * html/canvas/WebGLVertexArrayObject.h:
1069 * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
1070 (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
1071 (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
1072 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
1073 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
1074 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
1075 * html/canvas/WebGLVertexArrayObjectBase.h: Added.
1076 (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
1077 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
1078 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
1079 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
1080 (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
1081 (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
1082 (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
1083 (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
1084 (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
1085 * html/canvas/WebGLVertexArrayObjectOES.cpp:
1086 (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
1087 (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
1088 (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
1089 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
1090 (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
1091 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
1092 * html/canvas/WebGLVertexArrayObjectOES.h:
1094 * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
1095 (WebCore::WebGLRenderingContextBase::initializeNewContext):
1096 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
1097 (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
1098 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
1099 (WebCore::WebGLRenderingContextBase::getVertexAttrib):
1100 (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
1101 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
1102 (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
1103 * html/canvas/WebGLRenderingContextBase.h:
1104 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
1106 Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
1107 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1109 * html/canvas/WebGLGetInfo.cpp:
1110 (WebCore::WebGLGetInfo::WebGLGetInfo):
1111 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
1112 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
1113 * html/canvas/WebGLGetInfo.h:
1115 2015-03-16 Brent Fulgham <bfulgham@apple.com>
1117 Potentially uninitialized Inspector values
1118 https://bugs.webkit.org/show_bug.cgi?id=142730
1120 Reviewed by Joseph Pecoraro.
1122 * inspector/InspectorDOMAgent.cpp:
1123 (WebCore::parseColor): Make sure color values are given an initial value.
1125 2015-03-16 Brady Eidson <beidson@apple.com>
1127 URLs visited during private browsing show up in WebpageIcons.db
1128 rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
1130 Patch by Sam Weinig. Reviewed by Brady Eidson.
1132 * loader/icon/IconController.cpp:
1133 (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
1134 (WebCore::IconController::continueLoadWithDecision): Instead of here.
1136 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
1138 Allow clients to selectively disable plug-ins
1139 https://bugs.webkit.org/show_bug.cgi?id=142506
1141 Reviewed by Anders Carlsson.
1143 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
1144 from the page). As part of this:
1146 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
1149 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
1152 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
1153 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
1155 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
1157 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
1158 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
1160 * dom/DOMImplementation.cpp:
1161 (WebCore::DOMImplementation::createDocument):
1162 Update to reflect function rename.
1164 * loader/SubframeLoader.cpp:
1165 (WebCore::findPluginMIMETypeFromURL):
1166 Adopt getWebVisibleMimesAndPluginIndices().
1167 (WebCore::logPluginRequest):
1168 Update to reflect function rename.
1169 (WebCore::SubframeLoader::shouldUsePlugin):
1172 * platform/PlatformStrategies.h:
1173 Export platformStrategies(), since it is now used in WebProcess.cpp.
1175 * plugins/DOMMimeType.cpp:
1176 (WebCore::DOMMimeType::type):
1177 (WebCore::DOMMimeType::description):
1178 (WebCore::DOMMimeType::mimeClassInfo):
1179 Adopt getWebVisibleMimesAndPluginIndices().
1180 (WebCore::DOMMimeType::enabledPlugin):
1183 * plugins/DOMMimeType.h:
1184 Don't return references in a few places where it is no longer safe to do so.
1185 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
1187 * plugins/DOMMimeTypeArray.cpp:
1188 (WebCore::DOMMimeTypeArray::length):
1189 Adopt getWebVisibleMimesAndPluginIndices().
1190 (WebCore::DOMMimeTypeArray::item):
1192 (WebCore::DOMMimeTypeArray::canGetItemsForName):
1194 (WebCore::DOMMimeTypeArray::namedItem):
1197 * plugins/DOMPlugin.cpp:
1198 (WebCore::DOMPlugin::pluginInfo):
1199 Adopt getWebVisiblePlugins().
1200 (WebCore::DOMPlugin::item):
1201 Adopt getWebVisibleMimesAndPluginIndices().
1202 (WebCore::DOMPlugin::canGetItemsForName):
1204 (WebCore::DOMPlugin::namedItem):
1207 * plugins/DOMPlugin.h:
1208 (WebCore::DOMPlugin::pluginInfo): Deleted.
1210 * plugins/DOMPluginArray.cpp:
1211 (WebCore::DOMPluginArray::length):
1212 Adopt getWebVisiblePlugins().
1213 (WebCore::DOMPluginArray::item):
1215 (WebCore::DOMPluginArray::canGetItemsForName):
1217 (WebCore::DOMPluginArray::namedItem):
1220 * plugins/PluginData.cpp:
1221 (WebCore::PluginData::PluginData):
1222 Stash the passed-in Page and call initPlugins().
1223 (WebCore::PluginData::getWebVisiblePlugins):
1224 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
1225 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
1226 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
1227 limited to the web-visible plug-ins.
1228 (WebCore::PluginData::supportsWebVisibleMimeType):
1229 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
1230 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
1231 Renamed from pluginInfoForMimeType(); ditto.
1232 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
1233 Renamed from pluginNameForMimeType(); ditto.
1234 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
1235 Renamed from pluginFileForMimeType(); ditto.
1236 (WebCore::PluginData::initPlugins):
1237 (WebCore::PluginData::supportsMimeType): Deleted.
1238 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
1239 (WebCore::PluginData::pluginNameForMimeType): Deleted.
1240 (WebCore::PluginData::pluginFileForMimeType): Deleted.
1242 * plugins/PluginData.h:
1243 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
1244 new members to PluginInfo for the clientLoadPolicy and bundle information.
1245 (WebCore::PluginData::PluginData):
1246 Replace some member functions with new ones that will hide plug-ins upon request from the client;
1247 (WebCore::PluginData::mimes): Deleted.
1248 (WebCore::PluginData::mimePluginIndices): Deleted.
1250 * plugins/PluginStrategy.h:
1251 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
1253 * replay/SerializationMethods.cpp:
1254 (JSC::EncodingTraits<PluginData>::encodeValue):
1255 Remove now-obsolete code for handling MIME types and add a FIXME.
1256 (JSC::DeserializedPluginData::DeserializedPluginData):
1257 (JSC::EncodingTraits<PluginData>::decodeValue):
1259 (JSC::EncodingTraits<PluginInfo>::encodeValue):
1260 Handle the new members in PluginInfo.
1261 (JSC::EncodingTraits<PluginInfo>::decodeValue):
1264 * replay/WebInputs.json:
1265 Teach Replay about PluginLoadClientPolicy.
1267 2015-03-16 Max Stepin <maxstepin@gmail.com>
1270 https://bugs.webkit.org/show_bug.cgi?id=17022
1272 Reviewed by Carlos Garcia Campos.
1274 Test: fast/images/animated-png.html
1276 * platform/image-decoders/ImageDecoder.h:
1277 (WebCore::ImageFrame::divide255):
1278 (WebCore::ImageFrame::overRGBA):
1279 * platform/image-decoders/png/PNGImageDecoder.cpp:
1280 (WebCore::frameHeader):
1281 (WebCore::readChunks):
1282 (WebCore::PNGImageReader::PNGImageReader):
1283 (WebCore::PNGImageDecoder::PNGImageDecoder):
1284 (WebCore::PNGImageDecoder::frameBufferAtIndex):
1285 (WebCore::PNGImageDecoder::headerAvailable):
1286 (WebCore::PNGImageDecoder::rowAvailable):
1287 (WebCore::PNGImageDecoder::pngComplete):
1288 (WebCore::PNGImageDecoder::readChunks):
1289 (WebCore::PNGImageDecoder::frameHeader):
1290 (WebCore::PNGImageDecoder::init):
1291 (WebCore::PNGImageDecoder::clearFrameBufferCache):
1292 (WebCore::PNGImageDecoder::initFrameBuffer):
1293 (WebCore::PNGImageDecoder::frameComplete):
1294 (WebCore::PNGImageDecoder::processingStart):
1295 (WebCore::PNGImageDecoder::processingFinish):
1296 (WebCore::PNGImageDecoder::fallbackNotAnimated):
1297 * platform/image-decoders/png/PNGImageDecoder.h:
1298 (WebCore::PNGImageDecoder::frameCount):
1299 (WebCore::PNGImageDecoder::repetitionCount):
1300 (WebCore::PNGImageDecoder::isComplete):
1302 2015-03-15 Benjamin Poulain <benjamin@webkit.org>
1304 CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
1305 https://bugs.webkit.org/show_bug.cgi?id=142715
1307 Reviewed by Brent Fulgham.
1309 Fix attribute matching with:
1314 Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
1315 fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
1316 fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html
1318 * css/SelectorChecker.cpp:
1319 (WebCore::attributeValueMatches):
1320 I forgot to change CSSSelector::Exact in my last patch.
1321 The tests could not catch that since we use the CSS JIT almost everywhere.
1323 * cssjit/SelectorCompiler.cpp:
1324 (WebCore::SelectorCompiler::attributeValueBeginsWith):
1325 (WebCore::SelectorCompiler::attributeValueEndsWith):
1326 (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
1328 2015-03-15 Dan Bernstein <mitz@apple.com>
1330 Fixed the iOS build after r181522.
1332 * page/FrameView.cpp:
1333 (WebCore::FrameView::performPostLayoutTasks):
1335 2015-03-15 Andy Estes <aestes@apple.com>
1337 [Content Filtering] Adopt new NEFilterSource SPI
1338 https://bugs.webkit.org/show_bug.cgi?id=142710
1339 rdar://problem/19023855
1341 Reviewed by Dan Bernstein.
1343 Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
1345 * platform/ContentFilter.cpp:
1346 (WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
1347 * platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
1348 added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
1349 * platform/cocoa/NetworkExtensionContentFilter.mm:
1350 (decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
1351 (WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
1352 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
1353 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
1354 (WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
1355 being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
1356 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
1357 (WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
1358 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
1359 (WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
1360 Otherwise, returned the original data.
1361 (WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
1362 * platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.
1364 2015-03-15 Brent Fulgham <bfulgham@apple.com>
1366 Scroll snap points are not supported on iframe content
1367 https://bugs.webkit.org/show_bug.cgi?id=142582
1368 <rdar://problem/20121319>
1370 Tested by css3/scroll-snap/scroll-snap-iframe.html
1372 Reviewed by Simon Fraser.
1374 The scroll snap points were not being applied to the iframe contents because the code
1375 that sets up the scroll snap point content is not called for iframes.
1377 To correct this, we need to make sure the snap offsets are set during post-frame layout
1378 for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
1380 * page/FrameView.cpp:
1381 (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
1382 MainFrame. Also notify scroll animators they need to update their snap point settings.
1384 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1386 Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
1387 that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
1388 to the more canonical is<RenderBox>() form.
1390 Fixes an assertion in animations/animation-on-inline-crash.html
1392 * page/animation/ImplicitAnimation.cpp:
1393 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1394 * page/animation/KeyframeAnimation.cpp:
1395 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1397 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1399 And another fix. Thanks to Hunseop Jeong for the fix.
1401 * html/HTMLInputElement.cpp:
1402 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1403 (WebCore::HTMLInputElement::didMoveToNewDocument):
1405 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1407 Fix the touch-event build.
1410 (WebCore::Document::didAddTouchEventHandler):
1411 (WebCore::Document::didRemoveTouchEventHandler):
1413 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1415 Reduce the side-effects of animations turning off overlap testing
1416 https://bugs.webkit.org/show_bug.cgi?id=92791
1418 Reviewed by Dean Jackson.
1420 When a layer is running a transition or animation of the transform property,
1421 we would simply disable overlap testing for later layers, which had the side-effect
1422 of promoting lots of unrelated elements into layers temporarily.
1424 Fix by maintaining overlap, but computing an overlap extent that takes the animation
1427 Rotations are currently treated as full rotations. If an extent for the overlap is
1428 hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
1429 then we fall back to the current behavior.
1431 Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
1432 compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
1433 compositing/layer-creation/mismatched-transform-transition-overlap.html
1434 compositing/layer-creation/multiple-keyframes-animation-overlap.html
1435 compositing/layer-creation/scale-rotation-animation-overlap.html
1436 compositing/layer-creation/scale-rotation-transition-overlap.html
1437 compositing/layer-creation/translate-animation-overlap.html
1438 compositing/layer-creation/translate-scale-animation-overlap.html
1439 compositing/layer-creation/translate-scale-transition-overlap.html
1440 compositing/layer-creation/translate-transition-overlap.html
1442 * page/animation/AnimationBase.cpp:
1443 (WebCore::containsRotation):
1444 (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
1445 transform lists, we can map a rectangle through the various operations. Transform-origin
1446 is used to shift the origin of the box first, and then unshift after. If we encounter
1447 a rotation, for now assume it's a full rotation (a future patch could tighten this up).
1448 (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
1449 interpolation, we have to decompose the matrix to see if there's any rotation component,
1450 and, if there is, fall back to current behavior.
1451 * page/animation/AnimationBase.h:
1452 * page/animation/AnimationController.cpp:
1453 (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1454 (WebCore::AnimationController::computeExtentOfAnimation):
1455 * page/animation/AnimationController.h:
1456 * page/animation/AnimationControllerPrivate.h:
1457 * page/animation/CompositeAnimation.cpp:
1458 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
1459 animations and transitions to compute the bounds extent.
1460 * page/animation/CompositeAnimation.h:
1461 * page/animation/ImplicitAnimation.cpp:
1462 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
1463 of the start and end transforms, and union them.
1464 * page/animation/ImplicitAnimation.h:
1465 * page/animation/KeyframeAnimation.cpp:
1466 (WebCore::KeyframeAnimation::animate):
1467 (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
1468 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
1469 for each keyframe, and take their union.
1470 * page/animation/KeyframeAnimation.h:
1471 * platform/graphics/GeometryUtilities.cpp:
1472 (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
1473 (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
1474 to the rotation origin, compute a bounds for the rotated rect by computing
1475 the furthest corner from the origin, and sweeping out a circle.
1476 * platform/graphics/GeometryUtilities.h:
1477 * platform/graphics/transforms/Matrix3DTransformOperation.h:
1478 * platform/graphics/transforms/MatrixTransformOperation.h:
1479 * platform/graphics/transforms/PerspectiveTransformOperation.h:
1480 * platform/graphics/transforms/RotateTransformOperation.h:
1481 * platform/graphics/transforms/ScaleTransformOperation.h:
1482 * platform/graphics/transforms/SkewTransformOperation.h:
1483 * platform/graphics/transforms/TransformOperation.h:
1484 (WebCore::TransformOperation::isAffectedByTransformOrigin):
1485 * platform/graphics/transforms/TransformOperations.cpp:
1486 (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
1487 they are affected by transform-origin.
1488 (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
1489 * platform/graphics/transforms/TransformOperations.h:
1490 * rendering/RenderBox.cpp:
1491 (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
1492 if the geometry map says so (which is most of the time).
1493 * rendering/RenderGeometryMap.cpp:
1494 (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
1495 geometry map in a way that is incompatible with this assertion; it deliberately ignores
1496 transforms sometimes, so we can't easily verify that the mapping matches mapping through
1498 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
1500 * rendering/RenderGeometryMap.h:
1501 * rendering/RenderLayer.cpp:
1502 (WebCore::RenderLayer::boundingBox): Whitespace.
1503 (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
1504 function to get the bounds of a layer, including descendants, when a transform animation is running.
1505 * rendering/RenderLayer.h:
1506 * rendering/RenderLayerCompositor.cpp:
1507 (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
1508 flag to detect nested animated transforms.
1509 (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
1510 the layer is animating transform, and the transition/animation is such that we can't easily compute the
1511 bounds of the animation.
1512 (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
1513 Compute the animated bounds if there's a transform animation running.
1514 (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
1515 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
1516 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1517 Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
1518 if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
1519 for overlap via the computed animated bounds).
1520 If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
1521 that descendants will know (nested transform animations fall back to current behavior).
1522 The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
1523 testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
1524 (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
1525 was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
1526 considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
1527 animation was running.
1528 Since transform animations are always accelerated, we can just test for a running transform animation.
1529 (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
1530 * rendering/RenderLayerCompositor.h:
1531 * rendering/style/RenderStyle.cpp:
1532 (WebCore::requireTransformOrigin): Some FIXME comments.
1534 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1536 Clean up related to wheelEvent names
1537 https://bugs.webkit.org/show_bug.cgi?id=142713
1539 Reviewed by Anders Carlsson.
1541 Add EventNames::isWheelEventType() and use it in places that test for the
1542 two wheel event names.
1545 (WebCore::Document::didAddWheelEventHandler):
1546 (WebCore::Document::didRemoveWheelEventHandler):
1547 * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
1548 will be used in a later patch.
1550 (WebCore::EventNames::isWheelEventType):
1552 (WebCore::Node::didMoveToNewDocument):
1553 (WebCore::tryAddEventListener):
1554 (WebCore::tryRemoveEventListener):
1555 (WebCore::Node::defaultEventHandler):
1556 * html/shadow/MediaControlsApple.cpp:
1557 (WebCore::MediaControlsAppleEventListener::handleEvent):
1558 * page/DOMWindow.cpp:
1559 (WebCore::DOMWindow::addEventListener):
1560 (WebCore::DOMWindow::removeEventListener):
1561 * page/ios/FrameIOS.mm:
1562 (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
1564 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1566 Remove a redundant repaint when a layer becomes composited
1567 https://bugs.webkit.org/show_bug.cgi?id=142711
1569 Reviewed by Anders Carlsson.
1571 RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
1572 repaintOnCompositingChange() when a layer is going to become composited,
1573 because updateBacking() does exactly the same thing. I used an assertion
1574 and ran the tests to ensure this wasn't a behavior change.
1576 * rendering/RenderLayerCompositor.cpp:
1577 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1579 2015-03-15 Benjamin Poulain <bpoulain@apple.com>
1581 Change the exact attribute matching to be ASCII case-insensitive
1582 https://bugs.webkit.org/show_bug.cgi?id=142609
1584 Reviewed by Darin Adler.
1586 In CSS, testing attribute values should be ASCII case-insensitive,
1587 previously we were using full unicode case conversion.
1589 Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
1591 * css/CSSParser.cpp:
1592 (WebCore::CSSParser::parseKeyframeSelector):
1593 The CSS parser has its own fast version for ASCII case insensitive.
1594 This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
1595 change that to the normal CSS parser version.
1597 * css/SelectorCheckerTestFunctions.h:
1598 (WebCore::equalIgnoringASCIICase): Deleted.
1599 * cssjit/SelectorCompiler.cpp:
1600 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
1602 2015-03-15 Brent Fulgham <bfulgham@apple.com>
1604 scroll snap points do not properly account for zoomed pages
1605 https://bugs.webkit.org/show_bug.cgi?id=142706
1606 <rdar://problem/20165771>
1608 Reviewed by Anders Carlsson.
1610 When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
1611 scaling value when selecting our correct scroll snap point target, as well as when specifying the
1612 pixel location for our animation to target.
1614 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1615 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1616 (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
1617 * platform/cocoa/ScrollController.h:
1618 (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
1619 * platform/cocoa/ScrollController.mm:
1620 (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
1621 based on the page scale factor.
1623 2015-03-15 Csaba Osztrogonác <ossy@webkit.org>
1625 Fix run-bindings-tests on the WinCairo bot
1626 https://bugs.webkit.org/show_bug.cgi?id=142588
1628 Reviewed by Alex Christensen.
1630 * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
1631 * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
1632 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
1633 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
1634 * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
1635 * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
1636 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
1637 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
1638 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
1639 * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
1640 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
1641 * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
1642 * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
1643 * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
1644 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
1645 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
1646 * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
1647 * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
1648 * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
1649 * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
1650 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
1651 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
1652 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
1653 * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
1654 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
1655 * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
1656 * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
1657 * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
1658 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
1659 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
1660 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
1661 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
1662 * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
1663 * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
1664 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
1665 * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
1666 * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
1667 * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
1668 * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
1669 * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
1671 2015-03-14 Darin Adler <darin@apple.com>
1673 More event handler improvements
1674 https://bugs.webkit.org/show_bug.cgi?id=142701
1676 Reviewed by Anders Carlsson.
1678 These are the improvements:
1680 - Use EventHandler rather than EventListener as the the type for event handler
1681 attributes. This matches the HTML specification, and also makes sense, since
1682 EventListener means something else (and we use it to mean that!). Also renamed
1683 JSWindowEventListener to WindowEventHandler. Even though this only affects the
1684 JavaScript code generated, it's not really a JavaScript-specific flag.
1686 - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
1687 all the IDL files where the appear. This includes changing the spelling from
1688 "evt" to "event". Some day we should fix this so these functions only need to
1689 appear in EventTarget.idl.
1691 - Tweak formatting a bit on the IDL files we had to modify anyway.
1693 - Use [Conditional] more often and #if less often in IDL files.
1695 - Added a new [DocumentEventHandler] attribute for the selectionchange event.
1696 This involved adding new event handler attribute functions to JSEventListener.h
1697 for use by the JavaScript bindings.
1699 - Removed a little unused code from the JavaScript code bindings generator.
1701 - Improved the mechanism used by HTMLElement and SVGElement to share the list of
1702 content attributes that are event handlers so there is only one map rather than
1703 two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
1704 can share the list of window event handlers.
1706 - Followed the HTML specification by putting all the event handler support in
1707 the HTMLElement class rather than having event handlers apply only a the
1708 particular element that uses those events. We already did this for most of
1709 our event handlers, but we are now doing it for all of them.
1711 * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
1712 as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
1713 * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
1714 * Modules/indexeddb/IDBDatabase.idl: Ditto.
1715 * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
1716 * Modules/indexeddb/IDBRequest.idl: Ditto.
1717 * Modules/indexeddb/IDBTransaction.idl: Ditto.
1718 * Modules/mediastream/MediaStream.idl: Ditto.
1719 * Modules/mediastream/MediaStreamTrack.idl: Ditto.
1720 * Modules/mediastream/RTCDTMFSender.idl: Ditto.
1721 * Modules/mediastream/RTCDataChannel.idl: Ditto.
1722 * Modules/mediastream/RTCPeerConnection.idl: Ditto.
1723 * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
1724 * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
1725 * Modules/webaudio/AudioContext.idl: Ditto.
1726 * Modules/webaudio/OscillatorNode.idl: Ditto.
1727 * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
1728 * Modules/websockets/WebSocket.idl: Ditto.
1729 * css/FontLoader.idl: Ditto.
1730 * dom/EventListener.idl: Ditto.
1731 * dom/EventTarget.idl: Ditto.
1732 * dom/MessagePort.idl: Ditto.
1733 * dom/Node.idl: Ditto.
1734 * dom/WebKitNamedFlow.idl: Ditto.
1735 * fileapi/FileReader.idl: Ditto.
1736 * html/MediaController.idl: Ditto.
1737 * html/track/AudioTrackList.idl: Ditto.
1738 * html/track/TextTrackCue.idl: Ditto.
1739 * html/track/TextTrackList.idl: Ditto.
1740 * html/track/VideoTrackList.idl: Ditto.
1741 * loader/appcache/DOMApplicationCache.idl: Ditto.
1742 * page/EventSource.idl: Ditto.
1743 * page/Performance.idl: Ditto.
1744 * workers/AbstractWorker.idl: Ditto.
1745 * workers/DedicatedWorkerGlobalScope.idl: Ditto.
1746 * workers/Worker.idl: Ditto.
1747 * workers/WorkerGlobalScope.idl: Ditto.
1748 * xml/XMLHttpRequest.idl: Ditto.
1749 * xml/XMLHttpRequestUpload.idl: Ditto.
1751 * Modules/notifications/Notification.idl: Did the above, but also used
1752 [Conditional] instead of #if throughout.
1753 * html/track/TextTrack.idl: Ditto.
1755 * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
1757 * bindings/js/JSEventListener.cpp:
1758 (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
1759 out of this. More closely matches the terminology used in IDL files and the
1761 (WebCore::setWindowEventHandlerAttribute): Ditto.
1762 (WebCore::documentEventHandlerAttribute): Added.
1763 (WebCore::setDocumentEventHandlerAttribute): Added.
1764 * bindings/js/JSEventListener.h: Updated for above changes.
1766 * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
1768 * bindings/scripts/CodeGeneratorGObject.pm:
1769 (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
1770 of type "EventListener".
1771 * bindings/scripts/CodeGeneratorObjC.pm:
1772 (SkipAttribute): Ditto.
1774 * bindings/scripts/CodeGeneratorJS.pm:
1775 (GenerateImplementation): Look for the type EventHandler instead of the type
1776 EventListener for event handler attributes. Also added code to handle the new
1777 DocumentEventHandler, and use the name WindowEventHandler instead of the name
1778 JSWindowEventListener. Removed unneeded preflight check to see if we have
1779 writable attributes; it was not doing us any good. (That caused a lot of code
1780 to be un-indented and makes the diff hard to read.)
1782 * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
1783 WindowEventHandler and DocumentEventHandler.
1785 * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
1786 type EventListener. The test output is unchanged, though.
1788 * dom/Document.idl: Got rid of the conditionals and merged all the event handler
1789 attributes into a single sorted, unconditional list. Added some that were missing,
1790 as detected by the event-handler-attributes.html test.
1792 * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
1793 only in certain element classes. Note that the script event handler attribute
1794 support is still here, even though it should be in HTMLElement and SVGElement
1795 instead. There's a FIXME about that, but no real urgency in fixing it.
1797 * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
1798 was from the script attribute only, not the content attribute.
1800 * html/HTMLBodyElement.cpp:
1801 (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
1802 contains the list of all the window event handlers that can be set on a body
1803 or frameset element and which are triggered by events on the window.
1804 (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
1805 This is the function to call to use the map above. Given an attribute, it
1806 returns either null if it is not a window event handler attribute, or the
1807 event type if it is one.
1808 (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
1809 functions above. Handling of these attributes is now unconditional, but
1810 also we don't have to keep the nested if statements here up to date, just
1811 the list of event handler attributes names in the map create function above.
1813 * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
1814 and private createWindowEventHandlerNameMap functions.
1816 * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
1817 and EventHandler. Also made everything unconditional. Also filled out the list here
1818 to match the list handled as content attributes. All covered by the test.
1820 * html/HTMLElement.cpp:
1821 (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
1822 populate function. Changed the list of event handler attributes to be a bit more
1823 complete, and to be entirely unconditional. Also refactored this function to use
1824 a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
1825 (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
1826 that both this class and HTMLBodyElement use to build event handler name maps.
1827 (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
1828 function that call to use the map above. Given an attribute it returns either
1829 null if it is not an event handler attribute, or the event type if it is one.
1830 This is actually two functions. One is a protected function for use by both this
1831 class and HTMLBodyElement so they can share things like the optimization to look
1832 for the "on" prefix. The other is the public function that we actually use in
1833 HTMLElement and SVGElement.
1834 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
1835 to use lineageOfType. Would have been even simpler if this took an element instead
1836 of a node. Unrelated to the event handler changes.
1837 (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
1838 whether to call through to the base class. The base class function is empty and
1839 never needs to be called, and in any case there is no value in doing work to
1840 decide whether to call through to an empty function. Changed the style of the
1841 function to use early return instead of else. Worth considering whether we want
1842 to return early or call through to base class in this family of functions. It's
1843 more efficient to return early, but doesn't work well if both the derived class
1844 and base class want to respond to changes to the same attribute. The new logic
1845 for event handler attributes is more straightforward than the old, since the
1846 eventNameForEventHandlerAttribute has the logic.
1847 (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
1848 changed to return a Ref since this never fails and needs to return null.
1850 * html/HTMLElement.h: Updated for above changes. This includes a template version
1851 of populateEventHandlerNameMap that extracts the array size at compile time and
1852 passes it to the non-template function that does the work.
1854 * html/HTMLFrameElementBase.cpp:
1855 (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
1856 event handler attributes handled by HTMLElement.
1857 * html/HTMLImageElement.cpp:
1858 (WebCore::HTMLImageElement::parseAttribute): Ditto.
1859 * html/HTMLLinkElement.cpp:
1860 (WebCore::HTMLLinkElement::parseAttribute): Ditto.
1861 * html/HTMLObjectElement.cpp:
1862 (WebCore::HTMLObjectElement::parseAttribute): Ditto.
1863 * html/HTMLScriptElement.cpp:
1864 (WebCore::HTMLScriptElement::parseAttribute): Ditto.
1866 * html/HTMLFrameSetElement.cpp:
1867 (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
1868 style, and added FIXMEs about the many problems in the attribute handling code.
1869 Replaced all the code to handle window event handlers with a new bit of code that
1870 calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
1872 * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
1873 in HTMLBodyElement.idl, although I did not add the document event handler here.
1874 As in the various other cases, having some extra event handlers does not seem to
1875 do harm and this is covered by the event-handler-attributes.html test.
1877 * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
1879 * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
1880 filled out the list of event handlers so all the tests in
1881 event-handler-attributes.html will pass.
1883 * svg/SVGElement.cpp:
1884 (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
1885 and replaced the event handler attribute code with new much simpler code that
1886 uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
1887 way we call through to base classes. Just call through to the
1888 SVGLangSpace::parseAttribute function unconditionally, and don't try to use
1889 early return style to arbitrate among base classes. We should make this
1890 simplification throughout the SVG code; there's no need for the complexity
1891 that was there before just to cut down slightly on calls through to base
1892 class parseAttribute functions.
1894 * svg/SVGSVGElement.cpp:
1895 (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
1896 early return style and corrected some comments about the window event handler
1897 attributes here. These could use some further testing and might later need to be
1898 properly supported when the attributes are set in script, not just in content.
1900 * svg/SVGScriptElement.cpp:
1901 (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
1902 (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
1903 early return style and also to call through to all three base classes. This is
1904 a pattern we should follow elsewhere in SVG to simplify the code. There is no
1905 need for the supportedAttributes sets like the one in this calass, and the code
1906 is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
1907 pretty sure the old code was slower than this new code will be. No need for the
1908 extra hash table lookup every time. Also removed handling of event handler
1909 attribute which is taken care of by SVGElement now.
1910 (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
1911 the same reason as in parseAttribute. This function really needs a new name:
1912 It's the same as parseAttribute, except it's also used when implementing
1913 changes due to SVG animation.
1915 * svg/SVGScriptElement.h: Removed isSupportedAttribute.
1917 2015-03-14 Simon Fraser <simon.fraser@apple.com>
1919 Clean up use of flags in localToContainer-type functions
1920 https://bugs.webkit.org/show_bug.cgi?id=142704
1922 Reviewed by Alexey Proskuryakov.
1924 RenderObject::localToContainerQuad() had the questionable behavior of always
1925 enforcing UseTransforms in the flags. However, a future patch will need to call
1926 localToContainerQuad() without this flag.
1928 Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
1929 and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
1931 The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
1932 a lower-level function, is removed.
1934 Sprinkle a few more nullptrs around.
1938 * rendering/RenderBlock.cpp:
1939 (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
1940 instead of mapLocalToContainer().
1941 (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
1942 * rendering/RenderBox.cpp:
1943 (WebCore::RenderBox::absoluteQuads): Ditto.
1944 * rendering/RenderBox.h:
1945 * rendering/RenderFlowThread.h:
1946 * rendering/RenderGeometryMap.h:
1947 (WebCore::RenderGeometryMap::absolutePoint):
1948 (WebCore::RenderGeometryMap::absoluteRect):
1949 * rendering/RenderImage.cpp:
1950 (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
1951 'false' as flags. Pass UseTransforms instead (but no behavior change since
1952 UseTransforms was forced on lower down).
1953 * rendering/RenderInline.h:
1954 * rendering/RenderLayer.cpp:
1955 (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
1956 * rendering/RenderLineBreak.cpp:
1957 (WebCore::RenderLineBreak::absoluteQuads):
1958 (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
1959 * rendering/RenderNamedFlowFragment.cpp:
1960 (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
1961 * rendering/RenderObject.cpp:
1962 (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
1963 the UseTransforms bit.
1964 (WebCore::RenderObject::localToContainerPoint): Also here.
1965 * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
1966 (WebCore::RenderObject::localToAbsoluteQuad):
1967 * rendering/RenderText.cpp:
1968 (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
1969 * rendering/RenderTextLineBoxes.cpp:
1970 (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
1971 (WebCore::RenderTextLineBoxes::absoluteQuads):
1972 (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
1973 * rendering/RenderView.h:
1974 * rendering/SimpleLineLayoutFunctions.cpp:
1975 (WebCore::SimpleLineLayout::collectAbsoluteQuads):
1976 * rendering/svg/RenderSVGForeignObject.h:
1977 * rendering/svg/RenderSVGInline.cpp:
1978 (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
1979 * rendering/svg/RenderSVGInline.h:
1980 * rendering/svg/RenderSVGModelObject.cpp:
1981 (WebCore::RenderSVGModelObject::absoluteQuads):
1982 * rendering/svg/RenderSVGModelObject.h:
1983 * rendering/svg/RenderSVGRoot.h:
1984 * rendering/svg/RenderSVGText.cpp:
1985 (WebCore::RenderSVGText::absoluteQuads):
1986 * rendering/svg/RenderSVGText.h:
1987 * rendering/svg/SVGRenderSupport.h:
1989 2015-03-14 Brent Fulgham <bfulgham@apple.com>
1991 [iOS] scroll snap points are animating to the wrong positions...
1992 https://bugs.webkit.org/show_bug.cgi?id=142705
1993 <rdar://problem/20136946>
1995 Reviewed by Simon Fraser.
1997 Avoid adding an extra '0' snap point to our set. We always start with one zero; this
1998 extra append just forces us to do more steps in our search for nearest snap point.
2000 * page/scrolling/AxisScrollSnapOffsets.cpp:
2001 (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
2003 2015-03-14 Dean Jackson <dino@apple.com>
2005 Feature flag for Animations Level 2
2006 https://bugs.webkit.org/show_bug.cgi?id=142699
2007 <rdar://problem/20165097>
2009 Reviewed by Brent Fulgham.
2011 Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
2013 * Configurations/FeatureDefines.xcconfig:
2014 * bindings/generic/RuntimeEnabledFeatures.cpp:
2015 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2016 * bindings/generic/RuntimeEnabledFeatures.h:
2017 (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
2018 (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
2020 2015-03-14 Adenilson Cavalcanti <cavalcantii@gmail.com>
2022 RenderBlock::imageChange() calling const methods on exit
2023 https://bugs.webkit.org/show_bug.cgi?id=142648
2025 Reviewed by Brent Fulgham.
2027 No new tests, no change on behavior.
2029 * rendering/RenderBlock.cpp:
2030 (WebCore::RenderBlock::imageChanged): Deleted.
2031 * rendering/RenderBlock.h:
2033 2015-03-14 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2035 [GStreamer] share GL context in pipeline
2036 https://bugs.webkit.org/show_bug.cgi?id=142693
2038 Reviewed by Philippe Normand.
2040 GstGL elements in a pipeline need to be aware of the application's
2041 display and its GL context. This information is shared through context
2042 messages between the pipeline and the browser.
2044 This patch shares this context through a GStreamer's synchronous
2045 message, using the GL information held in the web process.
2047 This patch is based on the work of Philippe Normand for Bug 138562.
2049 No new tests because this is platform specific and it depends in the
2050 run-time availability and configurations of GstGL elements.
2052 * PlatformGTK.cmake: appends the GstGL header files in the include
2053 directories. Also its library directory is appended.
2054 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2055 (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
2056 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2057 Initialize the new class attributes.
2058 (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
2059 for handling synchronous messages from the pipeline. This method
2060 currently only handles the GL context sharing.
2061 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
2062 the pipeline's bus to handle the synchronous messages.
2063 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
2064 class methods and attributes.
2066 2015-03-13 Alex Christensen <achristensen@webkit.org>
2068 Progress towards CMake on Mac.
2069 https://bugs.webkit.org/show_bug.cgi?id=142680
2071 Reviewed by Gyuyoung Kim.
2073 * PlatformMac.cmake:
2074 Added new include directories and removed old source files.
2076 2015-03-13 Commit Queue <commit-queue@webkit.org>
2078 Unreviewed, rolling out r181483.
2079 https://bugs.webkit.org/show_bug.cgi?id=142688
2081 Caused use-after-free on many tests (Requested by ap on
2086 "Allow clients to selectively disable plug-ins"
2087 https://bugs.webkit.org/show_bug.cgi?id=142506
2088 http://trac.webkit.org/changeset/181483
2090 2015-03-13 Antti Koivisto <antti@apple.com>
2092 Cache glyph widths to GlyphPages
2093 https://bugs.webkit.org/show_bug.cgi?id=142028
2095 Reviewed by Andreas Kling.
2097 Currently we have a separate cache in Font for glyph widths. In practice we always need
2098 the widths so we can just cache them in GlyphPages. This simplifies the code and removes
2099 a per-character hash lookup from WidthIterator.
2101 * platform/graphics/Font.cpp:
2102 (WebCore::Font::Font):
2103 (WebCore::Font::initCharWidths):
2104 (WebCore::Font::platformGlyphInit):
2105 (WebCore::createAndFillGlyphPage):
2106 (WebCore::Font::computeWidthForGlyph):
2108 Rename to make it clear this doesn't cache.
2110 (WebCore::GlyphPage::setGlyphDataForIndex):
2112 Initialize the width.
2113 This could go to GlyphPage.cpp if we had one.
2115 * platform/graphics/Font.h:
2116 (WebCore::Font::glyphZeroWidth):
2117 (WebCore::Font::isZeroWidthSpaceGlyph):
2118 (WebCore::Font::zeroGlyph): Deleted.
2119 (WebCore::Font::setZeroGlyph): Deleted.
2120 (WebCore::Font::widthForGlyph): Deleted.
2121 * platform/graphics/FontCascade.cpp:
2122 (WebCore::offsetToMiddleOfGlyph):
2123 * platform/graphics/FontCascadeFonts.cpp:
2124 (WebCore::FontCascadeFonts::glyphDataForCharacter):
2125 * platform/graphics/GlyphPage.h:
2126 (WebCore::GlyphData::GlyphData):
2128 Return width too as part of GlyphData.
2130 (WebCore::GlyphPage::glyphDataForIndex):
2131 (WebCore::GlyphPage::setGlyphDataForCharacter):
2132 (WebCore::GlyphPage::setGlyphDataForIndex):
2133 (WebCore::GlyphPage::GlyphPage):
2134 * platform/graphics/WidthIterator.cpp:
2135 (WebCore::WidthIterator::advanceInternal):
2137 No need to lookup width separately now.
2139 * platform/graphics/mac/ComplexTextController.cpp:
2140 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2141 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2142 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2143 * rendering/mathml/RenderMathMLOperator.cpp:
2144 (WebCore::RenderMathMLOperator::advanceForGlyph):
2145 * rendering/svg/SVGTextRunRenderingContext.cpp:
2146 (WebCore::missingGlyphForFont):
2147 * svg/SVGFontData.cpp:
2148 (WebCore::SVGFontData::initializeFont):
2150 2015-03-13 Eric Carlson <eric.carlson@apple.com>
2152 [Mac] Enable WIRELESS_PLAYBACK_TARGET
2153 https://bugs.webkit.org/show_bug.cgi?id=142635
2155 Reviewed by Darin Adler.
2157 * Configurations/FeatureDefines.xcconfig:
2159 2015-03-13 Jeremy Jones <jeremyj@apple.com>
2161 Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
2162 https://bugs.webkit.org/show_bug.cgi?id=142678
2164 Reviewed by Eric Carlson.
2166 Add the missing 'n' in "fullscreen".
2168 * platform/spi/ios/AVKitSPI.h:
2170 2015-03-13 Timothy Horton <timothy_horton@apple.com>
2172 Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
2173 https://bugs.webkit.org/show_bug.cgi?id=142664
2174 <rdar://problem/18859470>
2176 Reviewed by Benjamin Poulain.
2178 * page/ViewportConfiguration.cpp:
2179 (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
2180 (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
2181 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
2182 Split shouldIgnoreScalingConstraints into one for each dimension.
2184 (WebCore::ViewportConfiguration::initialScale):
2185 (WebCore::ViewportConfiguration::minimumScale):
2186 Don't force the initial and minimum scales to cover the whole view if the
2187 page claims to want to lay out to device width but then lays out too big.
2188 This will allow pages that misbehave in this way to scale down further
2189 than they previously could, but will result in a region of empty background
2190 color being exposed at the initial/minimum scale.
2192 (WebCore::ViewportConfiguration::description):
2193 Update the logging to show each dimension separately.
2195 * page/ViewportConfiguration.h:
2197 2015-03-13 Mark Lam <mark.lam@apple.com>
2199 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
2200 <https://webkit.org/b/142674>
2202 Reviewed by Filip Pizlo.
2204 No new tests because there is no new functionality. This is a refactoring effort.
2206 * bindings/objc/WebScriptObject.mm:
2207 * platform/ios/wak/WAKWindow.mm:
2208 (-[WAKWindow initWithLayer:]):
2209 (-[WAKWindow initWithFrame:]):
2211 2015-03-13 Doug Russell <d_russell@apple.com>
2213 AX: Provide API for assistive tech to ignore DOM key event handlers
2214 https://bugs.webkit.org/show_bug.cgi?id=142059
2216 Reviewed by Beth Dakin.
2218 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.
2220 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.
2222 Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
2224 * accessibility/AccessibilityObject.cpp:
2225 (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
2226 (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
2227 * accessibility/AccessibilityObject.h:
2228 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2229 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2230 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2231 (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2232 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2234 (WebCore::Element::dispatchKeyEvent):
2235 * page/EventHandler.cpp:
2236 (WebCore::EventHandler::keyEvent):
2237 (WebCore::handleKeyboardSelectionMovement):
2238 (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
2239 * page/EventHandler.h:
2242 2015-03-09 Conrad Shultz <conrad_shultz@apple.com>
2244 Allow clients to selectively disable plug-ins
2245 https://bugs.webkit.org/show_bug.cgi?id=142506
2247 Reviewed by Anders Carlsson.
2249 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2250 from the page). As part of this:
2252 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2255 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2258 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2259 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2261 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2263 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2264 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2266 * dom/DOMImplementation.cpp:
2267 (WebCore::DOMImplementation::createDocument):
2268 Update to reflect function rename.
2270 * loader/SubframeLoader.cpp:
2271 (WebCore::findPluginMIMETypeFromURL):
2272 Adopt getWebVisibleMimesAndPluginIndices().
2273 (WebCore::logPluginRequest):
2274 Update to reflect function rename.
2275 (WebCore::SubframeLoader::shouldUsePlugin):
2278 * platform/PlatformStrategies.h:
2279 Export platformStrategies(), since it is now used in WebProcess.cpp.
2281 * plugins/DOMMimeType.cpp:
2282 (WebCore::DOMMimeType::type):
2283 (WebCore::DOMMimeType::description):
2284 (WebCore::DOMMimeType::mimeClassInfo):
2285 Adopt getWebVisibleMimesAndPluginIndices().
2286 (WebCore::DOMMimeType::enabledPlugin):
2289 * plugins/DOMMimeType.h:
2290 Don't return references in a few places where it is no longer safe to do so.
2291 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2293 * plugins/DOMMimeTypeArray.cpp:
2294 (WebCore::DOMMimeTypeArray::length):
2295 Adopt getWebVisibleMimesAndPluginIndices().
2296 (WebCore::DOMMimeTypeArray::item):
2298 (WebCore::DOMMimeTypeArray::canGetItemsForName):
2300 (WebCore::DOMMimeTypeArray::namedItem):
2303 * plugins/DOMPlugin.cpp:
2304 (WebCore::DOMPlugin::pluginInfo):
2305 Adopt getWebVisiblePlugins().
2306 (WebCore::DOMPlugin::item):
2307 Adopt getWebVisibleMimesAndPluginIndices().
2308 (WebCore::DOMPlugin::canGetItemsForName):
2310 (WebCore::DOMPlugin::namedItem):
2313 * plugins/DOMPlugin.h:
2314 (WebCore::DOMPlugin::pluginInfo): Deleted.
2316 * plugins/DOMPluginArray.cpp:
2317 (WebCore::DOMPluginArray::length):
2318 Adopt getWebVisiblePlugins().
2319 (WebCore::DOMPluginArray::item):
2321 (WebCore::DOMPluginArray::canGetItemsForName):
2323 (WebCore::DOMPluginArray::namedItem):
2326 * plugins/PluginData.cpp:
2327 (WebCore::PluginData::PluginData):
2328 Stash the passed-in Page and call initPlugins().
2329 (WebCore::PluginData::getWebVisiblePlugins):
2330 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
2331 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
2332 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
2333 limited to the web-visible plug-ins.
2334 (WebCore::PluginData::supportsWebVisibleMimeType):
2335 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
2336 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
2337 Renamed from pluginInfoForMimeType(); ditto.
2338 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
2339 Renamed from pluginNameForMimeType(); ditto.
2340 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
2341 Renamed from pluginFileForMimeType(); ditto.
2342 (WebCore::PluginData::initPlugins):
2343 (WebCore::PluginData::supportsMimeType): Deleted.
2344 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
2345 (WebCore::PluginData::pluginNameForMimeType): Deleted.
2346 (WebCore::PluginData::pluginFileForMimeType): Deleted.
2348 * plugins/PluginData.h:
2349 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
2350 new members to PluginInfo for the clientLoadPolicy and bundle information.
2351 (WebCore::PluginData::PluginData):
2352 Replace some member functions with new ones that will hide plug-ins upon request from the client;
2353 (WebCore::PluginData::mimes): Deleted.
2354 (WebCore::PluginData::mimePluginIndices): Deleted.
2356 * plugins/PluginStrategy.h:
2357 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
2359 * replay/SerializationMethods.cpp:
2360 (JSC::EncodingTraits<PluginData>::encodeValue):
2361 Remove now-obsolete code for handling MIME types and add a FIXME.
2362 (JSC::DeserializedPluginData::DeserializedPluginData):
2363 (JSC::EncodingTraits<PluginData>::decodeValue):
2365 (JSC::EncodingTraits<PluginInfo>::encodeValue):
2366 Handle the new members in PluginInfo.
2367 (JSC::EncodingTraits<PluginInfo>::decodeValue):
2370 * replay/WebInputs.json:
2371 Teach Replay about PluginLoadClientPolicy.
2373 2015-03-13 Chris Dumez <cdumez@apple.com>
2375 XMLHttpRequests should not prevent a page from entering PageCache
2376 https://bugs.webkit.org/show_bug.cgi?id=142612
2377 <rdar://problem/19923085>
2379 Reviewed by Alexey Proskuryakov.
2381 Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
2382 drastically improve the likelihood of pages using them to enter
2383 PageCache. XMLHttpRequest used to be only suspendable when not
2384 loading. After this patch, if the XMLHttpRequest is loading when
2385 navigating away from the page, it will be aborted and the page
2386 will enter the PageCache. Upon restoring the page from PageCache,
2387 the XMLHttpRequests' error handlers will be executed to give them
2388 a chance to reload if they want to.
2390 Test: http/tests/navigation/page-cache-xhr.html
2392 * history/PageCache.cpp:
2393 (WebCore::logCanCacheFrameDecision):
2394 (WebCore::PageCache::canCachePageContainingThisFrame):
2395 Do not prevent a page to enter the page cache ff the main document has
2396 an error that is a cancellation and all remaining subresource loaders
2397 are for XHR. We extend the pre-existing mechanism used on iOS, which
2398 allowed PageCaching if the remaining resource loads are for images.
2400 * loader/DocumentLoader.cpp:
2401 (WebCore::areAllLoadersPageCacheAcceptable):
2402 Mark XHR loaders as PageCache acceptable.
2404 * loader/DocumentThreadableLoader.cpp:
2405 (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
2406 * loader/DocumentThreadableLoader.h:
2407 * loader/ThreadableLoader.h:
2408 * loader/cache/CachedResource.cpp:
2409 (WebCore::CachedResource::areAllClientsXMLHttpRequests):
2410 * loader/cache/CachedResource.h:
2411 * loader/cache/CachedResourceClient.h:
2412 (WebCore::CachedResourceClient::isXMLHttpRequest):
2413 * xml/XMLHttpRequest.cpp:
2414 (WebCore::XMLHttpRequest::XMLHttpRequest):
2415 (WebCore::XMLHttpRequest::createRequest):
2416 (WebCore::XMLHttpRequest::canSuspend):
2417 Report that we can suspend XMLHttpRequests as long as the window load
2418 event has already fired. If the window load event has not fired yet,
2419 it would be unsafe to cancel the load in suspend() as it would
2420 potentially cause arbitrary JS execution while suspending.
2422 (WebCore::XMLHttpRequest::suspend):
2423 If suspending for PageCache and the request is currently loading, abort
2424 the load and mark that we should fire the error event upon restoring
2427 (WebCore::XMLHttpRequest::resume):
2428 (WebCore::XMLHttpRequest::resumeTimerFired):
2429 Upon resuming, fire the error event in a timer if the load was aborted
2430 for suspending. We need to do this in a timer because we are not allowed
2431 to execute arbitrary JS inside resume().
2433 (WebCore::XMLHttpRequest::stop):
2434 Add a assertion to make sure we are not firing event inside stop() as
2435 this would potentially cause arbitrary JS execution and it would be
2436 unsafe. It seems to me that our code is currently unsafe but the
2437 assertion does not seem to be hit by our current layout tests. I am
2438 adding the assertion as it would make it clear we have a bug and we
2441 * xml/XMLHttpRequest.h:
2443 2015-03-13 Joonghun Park <jh718.park@samsung.com>
2445 Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
2446 https://bugs.webkit.org/show_bug.cgi?id=142652
2448 Reviewed by Csaba Osztrogonác.
2450 No new tests, no behavior changes.
2452 Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
2454 * css/CSSPrimitiveValue.cpp:
2455 (WebCore::propertyName):
2458 2015-03-12 Zan Dobersek <zdobersek@igalia.com>
2460 Remove DrawingBuffer
2461 https://bugs.webkit.org/show_bug.cgi?id=142641
2463 Reviewed by Darin Adler.
2465 Remove the DrawingBuffer class. Objects of this type were only held in the
2466 WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
2467 Chromium port, with the relevant code removed in r147888. Since then, the
2468 m_drawingBuffer member variable has always been null.
2471 * PlatformEfl.cmake:
2472 * PlatformGTK.cmake:
2473 * WebCore.vcxproj/WebCore.vcxproj:
2474 * WebCore.vcxproj/WebCore.vcxproj.filters:
2475 * WebCore.xcodeproj/project.pbxproj:
2476 * html/canvas/WebGL2RenderingContext.cpp:
2477 (WebCore::WebGL2RenderingContext::copyTexImage2D):
2478 * html/canvas/WebGLRenderingContext.cpp:
2479 (WebCore::WebGLRenderingContext::copyTexImage2D):
2480 * html/canvas/WebGLRenderingContextBase.cpp:
2481 (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2482 (WebCore::WebGLRenderingContextBase::initializeNewContext):
2483 (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
2484 (WebCore::WebGLRenderingContextBase::markContextChanged):
2485 (WebCore::WebGLRenderingContextBase::clearIfComposited):
2486 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
2487 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
2488 (WebCore::WebGLRenderingContextBase::reshape):
2489 (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
2490 (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
2491 (WebCore::WebGLRenderingContextBase::activeTexture):
2492 (WebCore::WebGLRenderingContextBase::bindFramebuffer):
2493 (WebCore::WebGLRenderingContextBase::bindTexture):
2494 (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
2495 (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
2496 (WebCore::WebGLRenderingContextBase::disable):
2497 (WebCore::WebGLRenderingContextBase::enable):
2498 (WebCore::WebGLRenderingContextBase::getContextAttributes):
2499 (WebCore::WebGLRenderingContextBase::readPixels):
2500 (WebCore::WebGLRenderingContextBase::loseContextImpl):
2501 (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
2502 (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
2503 (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
2504 * html/canvas/WebGLRenderingContextBase.h:
2505 (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
2506 (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
2507 * platform/graphics/GraphicsContext.h:
2508 * platform/graphics/GraphicsContext3D.h:
2509 * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
2510 * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
2511 * platform/graphics/gpu/DrawingBuffer.h: Removed.
2512 * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
2513 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2514 (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2515 (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2517 2015-03-12 Ryosuke Niwa <rniwa@webkit.org>
2519 REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
2520 https://bugs.webkit.org/show_bug.cgi?id=142646
2522 Reviewed by Darin Adler.
2524 The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
2525 Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
2527 Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
2528 position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
2529 return true when anchored before or after BR after this patch.
2531 Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
2534 (WebCore::Position::atStartOfTree):
2535 (WebCore::Position::atEndOfTree):
2537 2015-03-12 Yusuke Suzuki <utatane.tea@gmail.com>
2539 Integrate MapData into JSMap and JSSet
2540 https://bugs.webkit.org/show_bug.cgi?id=142556
2542 Reviewed by Filip Pizlo.
2544 Now Set has SetData and it's different from MapData.
2545 And MapData/SetData are completely integrated into JSSet and JSMap.
2546 Structured-cloning algorithm need to be aware of these changes.
2547 And in the case of JSSet, since JSSet doesn't need dummy value for construction,
2548 Structured-cloning only serialize the keys in JSSet.
2550 * ForwardingHeaders/runtime/MapDataInlines.h: Added.
2551 * bindings/js/SerializedScriptValue.cpp:
2552 (WebCore::CloneSerializer::serialize):
2553 (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
2554 (WebCore::CloneDeserializer::deserialize):
2555 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
2557 2015-03-12 Dan Bernstein <mitz@apple.com>
2559 Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2561 Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
2563 * platform/network/mac/CertificateInfoMac.mm:
2564 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
2565 * platform/spi/cocoa/SecuritySPI.h:
2567 2015-03-12 Geoffrey Garen <ggaren@apple.com>
2569 REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
2570 https://bugs.webkit.org/show_bug.cgi?id=142636
2572 Reviewed by Mark Hahnenberg.
2574 This was a pre-existing bug that I made a lot worse in
2575 <https://trac.webkit.org/changeset/181411>.
2577 * html/HTMLMediaElement.cpp:
2578 (WebCore::HTMLMediaElement::parseAttribute): Compare size before
2579 subtracting rather than subtracting and then comparing to zero. The
2580 latter technique is not valid for unsigned integers, which will happily
2581 underflow into giant numbers.
2583 * Modules/mediasource/SourceBuffer.cpp:
2584 (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
2585 technically correct, but I took the opportunity to clean it up a bit.
2586 There's no need to do two checks here, and it smells bad to check for
2587 a negative unsigned integer.
2589 2015-03-12 Sebastian Dröge <sebastian@centricular.com>
2591 Stop using single-include headers that are only available since GStreamer >= 1.2.
2593 https://bugs.webkit.org/show_bug.cgi?id=142537
2595 Reviewed by Philippe Normand.
2597 * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2598 * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2599 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
2600 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2601 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2602 * platform/graphics/gstreamer/GStreamerUtilities.h:
2603 * platform/graphics/gstreamer/ImageGStreamer.h:
2604 Instead of using single-include headers for the GStreamer libraries,
2605 directly include the headers we need. The single-include headers were
2606 only added in 1.2, and this would be the only reason why we would
2609 2015-03-12 Eric Carlson <eric.carlson@apple.com>
2611 [Mac] Update AirPlay handling
2612 https://bugs.webkit.org/show_bug.cgi?id=142541
2614 Unreviewed, respond to post-review comments.
2617 (WebCore::Document::didChoosePlaybackTarget):
2618 * page/ChromeClient.h:
2620 (WebCore::Page::showPlaybackTargetPicker):
2621 (WebCore::Page::didChoosePlaybackTarget):
2622 (WebCore::Page::configurePlaybackTargetMonitoring):
2624 2015-03-12 Csaba Osztrogonác <ossy@webkit.org>
2626 Fix the !ENABLE(PICTURE_SIZES) build
2627 https://bugs.webkit.org/show_bug.cgi?id=142617
2629 Reviewed by Darin Adler.
2631 * html/parser/HTMLPreloadScanner.cpp:
2632 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2634 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2636 Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
2638 Address ASSERT in LayoutTests/printing/page-format-data.html.
2640 * dom/InlineStyleSheetOwner.cpp:
2641 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2642 In case the TextPosition gets used because it wasn't created by a parser,
2643 zeros are more realistic values then beforeFirst.
2645 2015-03-11 Roger Fong <roger_fong@apple.com>
2647 Media element time no longer updates while scrubbing following r181279.
2648 https://bugs.webkit.org/show_bug.cgi?id=142606.
2649 <rdar://problem/20131014>
2651 Reviewed by Eric Carlson.
2653 * Modules/mediacontrols/mediaControlsApple.js:
2654 (Controller.prototype.handleWrapperMouseMove):
2655 Update time as a result of a mouse move if we are scrubbing.
2657 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2659 Web Inspector: CSS parser errors in the console should include column numbers
2660 https://bugs.webkit.org/show_bug.cgi?id=114313
2662 Reviewed by Darin Adler.
2664 Test: inspector-protocol/console/warnings-errors.html
2667 (WebCore::CSSParser::currentCharacterOffset):
2668 Get the current character offset depending on the source type.
2669 Add instance variables to track column position and start
2670 line / column for inline stylesheets.
2672 * css/CSSParser.cpp:
2673 (WebCore::CSSParser::CSSParser):
2674 (WebCore::CSSParser::parseSheet):
2675 Initialize new instance variables.
2677 (WebCore::CSSParser::currentLocation):
2678 Update to include column information for the token. Also, if we are on the
2679 first line we may need to take into account a start column offset as well.
2681 (WebCore::CSSParser::realLex):
2682 Set the token's start column.
2683 When bumping the line number, reset the column offset for the next
2684 line with the next character.
2686 (WebCore::CSSParser::syntaxError):
2687 (WebCore::CSSParser::logError):
2688 Include column information.
2690 * css/StyleSheetContents.cpp:
2691 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2692 (WebCore::StyleSheetContents::parseString):
2693 (WebCore::StyleSheetContents::parseStringAtPosition):
2694 Include column information.
2696 * css/StyleSheetContents.h:
2697 * dom/InlineStyleSheetOwner.cpp:
2698 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2699 (WebCore::InlineStyleSheetOwner::createSheet):
2700 Save and use column information later on.
2702 * dom/InlineStyleSheetOwner.h:
2703 * inspector/InspectorStyleSheet.cpp:
2704 (WebCore::InspectorStyleSheet::ensureSourceData):
2705 Updated parser signature needs starting column and no longer has optional parameters.
2707 2015-03-11 Eric Carlson <eric.carlson@apple.com>
2709 [Mac] Update AirPlay handling
2710 https://bugs.webkit.org/show_bug.cgi?id=142541
2712 Reviewed by Sam Weinig.
2714 * WebCore.xcodeproj/project.pbxproj:
2716 (WebCore::Document::showPlaybackTargetPicker):
2717 (WebCore::Document::addPlaybackTargetPickerClient):
2718 (WebCore::Document::removePlaybackTargetPickerClient):
2719 (WebCore::Document::configurePlaybackTargetMonitoring):
2720 (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
2721 (WebCore::Document::playbackTargetAvailabilityDidChange):
2722 (WebCore::Document::didChoosePlaybackTarget):
2724 * html/HTMLMediaElement.cpp:
2725 (WebCore::HTMLMediaElement::registerWithDocument):
2726 (WebCore::HTMLMediaElement::unregisterWithDocument):
2727 (WebCore::HTMLMediaElement::parseAttribute):
2728 * html/HTMLMediaElement.h:
2729 * html/HTMLMediaSession.cpp:
2730 (WebCore::HTMLMediaSession::HTMLMediaSession):
2731 (WebCore::HTMLMediaSession::registerWithDocument):
2732 (WebCore::HTMLMediaSession::unregisterWithDocument):
2733 (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2734 (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2735 (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2736 (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
2737 (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
2738 (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
2739 * html/HTMLMediaSession.h:
2740 * page/ChromeClient.h:
2742 (WebCore::Page::didChoosePlaybackTarget):
2743 (WebCore::Page::playbackTargetAvailabilityDidChange):
2744 (WebCore::Page::configurePlaybackTargetMonitoring):
2746 (WebCore::Page::hasWirelessPlaybackTarget):
2747 (WebCore::Page::playbackTarget):
2748 * platform/audio/MediaSession.cpp:
2749 (WebCore::MediaSession::clientDataBufferingTimerFired):
2750 (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
2751 * platform/audio/MediaSession.h:
2752 (WebCore::MediaSession::didChoosePlaybackTarget):
2753 (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
2754 (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2755 (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
2756 * platform/audio/MediaSessionManager.cpp:
2757 (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
2758 * platform/audio/MediaSessionManager.h:
2759 (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2760 * platform/audio/ios/MediaSessionManagerIOS.h:
2761 * platform/audio/ios/MediaSessionManagerIOS.mm:
2762 (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
2763 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
2764 * platform/graphics/AVPlaybackTarget.h: Added.
2765 (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
2766 (WebCore::AVPlaybackTarget::AVPlaybackTarget):
2767 (WebCore::AVPlaybackTarget::setDevicePickerContext):
2768 (WebCore::AVPlaybackTarget::devicePickerContext):
2769 * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
2770 (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
2771 * platform/graphics/MediaPlayer.cpp:
2772 (WebCore::MediaPlayer::setWirelessPlaybackTarget):
2773 * platform/graphics/MediaPlayer.h:
2774 * platform/graphics/MediaPlayerPrivate.h:
2775 (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
2776 * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
2777 (WebCore::AVPlaybackTarget::encode):
2778 (WebCore::AVPlaybackTarget::decode):
2779 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2780 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2781 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2782 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2783 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2784 (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
2785 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
2786 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
2787 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
2788 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2789 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2790 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2792 2015-03-11 Alex Christensen <achristensen@webkit.org>
2794 [Content Extensions] Add resource type and load type triggers.
2795 https://bugs.webkit.org/show_bug.cgi?id=142422
2797 Reviewed by Benjamin Poulain.
2801 * WebCore.xcodeproj/project.pbxproj:
2802 * contentextensions/ContentExtensionCompiler.cpp:
2803 (WebCore::ContentExtensions::compileRuleList):
2804 * contentextensions/ContentExtensionParser.cpp:
2805 (WebCore::ContentExtensions::getTypeFlags):
2806 (WebCore::ContentExtensions::loadTrigger):
2807 * contentextensions/ContentExtensionRule.h:
2808 * contentextensions/ContentExtensionsBackend.cpp:
2809 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2810 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
2811 * contentextensions/ContentExtensionsBackend.h:
2812 * contentextensions/DFABytecode.h:
2813 (WebCore::ContentExtensions::instructionSizeWithArguments):
2814 * contentextensions/DFABytecodeCompiler.cpp:
2815 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
2816 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2817 * contentextensions/DFABytecodeCompiler.h:
2818 * contentextensions/DFABytecodeInterpreter.cpp:
2819 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2820 * contentextensions/DFABytecodeInterpreter.h:
2821 * loader/ResourceLoadInfo.cpp: Added.
2822 (WebCore::toResourceType):
2823 (WebCore::readResourceType):
2824 (WebCore::readLoadType):
2825 (WebCore::ResourceLoadInfo::isThirdParty):
2826 (WebCore::ResourceLoadInfo::getResourceFlags):
2827 * loader/ResourceLoadInfo.h: Added.
2828 * loader/cache/CachedResourceLoader.cpp:
2829 (WebCore::CachedResourceLoader::requestResource):
2830 * page/UserContentController.cpp:
2831 (WebCore::UserContentController::actionsForResourceLoad):
2832 (WebCore::UserContentController::actionsForURL): Deleted.
2833 * page/UserContentController.h:
2835 2015-03-11 Tim Horton <timothy_horton@apple.com>
2839 * page/EventHandler.cpp:
2840 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2841 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2842 (WebCore::EventHandler::handleMousePressEventTripleClick):
2843 (WebCore::EventHandler::handleMousePressEventSingleClick):
2845 2015-03-11 Timothy Horton <timothy_horton@apple.com>
2847 <attachment> shouldn't use "user-select: all"
2848 https://bugs.webkit.org/show_bug.cgi?id=142453
2850 Reviewed by Darin Adler.
2852 It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
2853 all (at least for now), let's not use "user-select: all" in the default stylesheet
2854 for <attachment>. It's really overkill anyway, since <attachment> can't have children.
2855 The only "user-select: all" behavior we actually want is select-on-click.
2856 So, we'll implement that in a slightly different way.
2858 Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
2859 fast/attachment/attachment-select-on-click.html
2863 No more "user-select: all".
2865 (attachment:focus): Deleted.
2866 We stopped using attachment focus a while back and forgot to remove this.
2869 (WebCore::Node::shouldSelectOnMouseDown):
2870 Add a virtual function that Node subclasses can override to indicate they
2871 should be selected on mouse down.
2873 * html/HTMLAttachmentElement.h:
2874 Override the aforementioned virtual function; <attachment> should always
2875 be selected on mouse down.
2877 * page/EventHandler.cpp:
2878 (WebCore::nodeToSelectOnMouseDownForNode):
2879 Determine which node should be selected when a mousedown hits the given node.
2880 If there's any "user-select: all", we go with the outermost "user-select: all".
2881 Otherwise, we give the node a chance to say that it wants to be selected itself.
2883 (WebCore::expandSelectionToRespectSelectOnMouseDown):
2884 Rename this function, it's not just about "user-select: all" anymore.
2885 Make use of nodeToSelectOnMouseDownForNode.
2887 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2888 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2889 (WebCore::EventHandler::handleMousePressEventTripleClick):
2890 (WebCore::EventHandler::handleMousePressEventSingleClick):
2891 (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
2892 Adjust to the new names.
2894 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2896 Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
2897 https://bugs.webkit.org/show_bug.cgi?id=142595
2899 Reviewed by Andreas Kling.
2901 Fixed this bug for canvas.
2903 * html/HTMLCanvasElement.cpp:
2904 (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
2905 required by our IDL generator.
2907 (WebCore::HTMLCanvasElement::createImageBuffer): Use
2908 reportExtraMemoryAllocated.
2910 * html/HTMLCanvasElement.h:
2912 * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
2913 right way during GC. This will match our reportExtraMemoryAllocated
2914 with a reportExtraMemoryVisited during GC.
2916 2015-03-11 Roger Fong <roger_fong@apple.com>
2918 A number of minor edits to the media controls on OSX.
2919 https://bugs.webkit.org/show_bug.cgi?id=142551.
2920 <rdar://problem/20114707>
2922 Reviewed by Darin Adler.
2924 This covers a slew of minor edits to the new media controls. They are as follows.
2925 Small vertical placements adjustments to inline control elements.
2926 Make sure buttons have no focus outlines.
2927 Expand height of mute box that triggers the volume panel appearing.
2928 Turn all button colors into an slightly transparent white.
2929 Center status display text in fullscreen mode.
2930 Lower position of captions container in fullscreen mode.
2931 Show the controls on when done loading of the video an status display is hidden.
2933 * Modules/mediacontrols/mediaControlsApple.css:
2934 (audio::-webkit-media-controls-panel):
2935 (audio::-webkit-media-controls-panel button:focus):
2936 (audio::-webkit-media-controls-rewind-button):
2937 (audio::-webkit-media-controls-play-button):
2938 (audio::-webkit-media-controls-play-button.paused):
2939 (audio::-webkit-media-controls-panel .mute-box):
2940 (video::-webkit-media-controls-volume-max-button):
2941 (audio::-webkit-media-controls-panel .volume-box):
2942 (video::-webkit-media-controls-volume-min-button):
2943 (audio::-webkit-media-controls-wireless-playback-picker-button):
2944 (audio::-webkit-media-controls-toggle-closed-captions-button):
2945 (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
2946 (audio::-webkit-media-controls-fullscreen-button):
2947 (audio::-webkit-media-controls-fullscreen-button.exit):
2948 (audio::-webkit-media-controls-status-display):
2949 (audio::-webkit-media-controls-time-remaining-display):
2950 (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2951 (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
2952 (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
2953 (video:-webkit-full-screen::-webkit-media-controls-play-button):
2954 (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
2955 (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2956 (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2957 (video:-webkit-full-screen::-webkit-media-controls-status-display):
2958 (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2959 (audio::-webkit-media-controls-panel button:active): Deleted.
2960 * Modules/mediacontrols/mediaControlsApple.js:
2961 (Controller.prototype.setStatusHidden):
2963 2015-03-11 Commit Queue <commit-queue@webkit.org>
2965 Unreviewed, rolling out r179340 and r179344.
2966 https://bugs.webkit.org/show_bug.cgi?id=142598
2968 Caused images to stay alive forever when navigating away from
2969 the page before they finish loading. (Requested by kling on
2972 Reverted changesets:
2974 "CachedImage: ensure clients overrides imageChanged instead of
2976 https://bugs.webkit.org/show_bug.cgi?id=140722
2977 http://trac.webkit.org/changeset/179340
2979 "HTMLImageLoader: fix build failure on assert condition after
2981 https://bugs.webkit.org/show_bug.cgi?id=140722
2982 http://trac.webkit.org/changeset/179344
2984 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2986 Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
2987 https://bugs.webkit.org/show_bug.cgi?id=142593
2989 Reviewed by Andreas Kling.
2991 Adopt deprecatedReportExtraMemory as a short-term fix for runaway
2992 memory growth in these cases where we have not adopted
2993 reportExtraMemoryVisited.
2995 Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
2996 That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
2998 Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
2999 which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
3001 * Modules/mediasource/SourceBuffer.cpp:
3002 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
3003 * bindings/js/JSDocumentCustom.cpp:
3005 * bindings/js/JSImageDataCustom.cpp:
3007 * bindings/js/JSNodeListCustom.cpp:
3008 (WebCore::createWrapper):
3009 * dom/CollectionIndexCache.cpp:
3010 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
3011 * html/HTMLCanvasElement.cpp:
3012 (WebCore::HTMLCanvasElement::createImageBuffer):
3013 * html/HTMLImageLoader.cpp:
3014 (WebCore::HTMLImageLoader::imageChanged):
3015 * html/HTMLMediaElement.cpp:
3016 (WebCore::HTMLMediaElement::parseAttribute):
3017 * xml/XMLHttpRequest.cpp:
3018 (WebCore::XMLHttpRequest::dropProtection):
3020 2015-03-10 Andy Estes <aestes@apple.com>
3022 REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
3023 https://bugs.webkit.org/show_bug.cgi?id=142526
3025 Reviewed by Darin Adler.
3027 * loader/DocumentLoader.cpp:
3028 (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
3030 2015-03-10 Sam Weinig <sam@webkit.org>
3032 Allow adding a button in input elements for auto fill related functionality
3033 <rdar://problem/19782066>
3034 https://bugs.webkit.org/show_bug.cgi?id=142564
3036 Reviewed by Anders Carlsson.
3038 Test: fast/forms/input-auto-fill-button.html
3040 - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
3041 - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
3042 where not feasible due to exported API/SPI).
3045 * WebCore.vcxproj/WebCore.vcxproj:
3046 * WebCore.vcxproj/WebCore.vcxproj.filters:
3047 * WebCore.xcodeproj/project.pbxproj:
3051 (input::-webkit-auto-fill-button):
3052 (input::-webkit-auto-fill-button:hover):
3053 (input::-webkit-auto-fill-button:active):
3054 Add default style rules for the AutoFill button based on the ones
3055 used for caps lock indicator.
3057 * html/HTMLInputElement.cpp:
3058 (WebCore::HTMLInputElement::HTMLInputElement):
3059 (WebCore::HTMLInputElement::autoFillButtonElement):
3060 (WebCore::HTMLInputElement::reset):
3061 (WebCore::HTMLInputElement::setValueFromRenderer):
3062 (WebCore::HTMLInputElement::setAutoFilled):
3063 (WebCore::HTMLInputElement::setShowAutoFillButton):
3064 (WebCore::HTMLInputElement::setAutofilled): Deleted.
3065 * html/HTMLInputElement.h:
3066 (WebCore::HTMLInputElement::isAutoFilled):
3067 (WebCore::HTMLInputElement::showAutoFillButton):
3068 (WebCore::HTMLInputElement::isAutofilled): Deleted.
3069 Add new bit to represent whether the AutoFill button should be shown
3070 or not. By default it is not shown, and the client must enable it.
3072 * html/InputType.cpp:
3073 (WebCore::InputType::updateAutoFillButton):
3075 (WebCore::InputType::autoFillButtonElement):
3076 Add new virtual methods for updating and accessing the AutoFill button.
3078 * html/TextFieldInputType.cpp:
3079 (WebCore::TextFieldInputType::createShadowSubtree):
3080 (WebCore::TextFieldInputType::autoFillButtonElement):
3081 (WebCore::TextFieldInputType::destroyShadowSubtree):
3082 (WebCore::TextFieldInputType::updatePlaceholderText):
3083 (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
3084 (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
3085 (WebCore::TextFieldInputType::createContainer):
3086 (WebCore::TextFieldInputType::createAutoFillButton):
3087 (WebCore::TextFieldInputType::updateAutoFillButton):
3088 * html/TextFieldInputType.h:
3089 Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
3090 is slightly different than for the caps lock indicator, because I didn't want to force
3091 the creation of a container for all <input> elements just in case an AutoFill button was
3092 added. Instead, if an AutoFill button is added, the container is created on the fly and
3093 the existing DOM is updated to move into it. Once a container is created, it is never
3096 * html/shadow/AutoFillButtonElement.cpp: Added.
3097 (WebCore::AutoFillButtonElement::create):
3098 (WebCore::AutoFillButtonElement::AutoFillButtonElement):
3099 (WebCore::AutoFillButtonElement::defaultEventHandler):
3100 * html/shadow/AutoFillButtonElement.h: Added.
3101 Add div subclass that swallows the click event and forwards it to the ChromeClient.
3103 * page/ChromeClient.h:
3104 Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
3107 * testing/Internals.cpp:
3108 (WebCore::Internals::setAutofilled):
3109 (WebCore::Internals::setShowAutoFillButton):
3110 * testing/Internals.h:
3111 * testing/Internals.idl:
3112 Expose a new internals.setShowAutoFillButton() function to allow testing
3113 of the AutoFill button from layout tests.
3115 * accessibility/AccessibilityObject.cpp:
3116 (WebCore::AccessibilityObject::isValueAutofilled):
3117 * css/SelectorCheckerTestFunctions.h:
3118 (WebCore::isAutofilled):
3119 * css/StyleResolver.cpp:
3120 (WebCore::StyleResolver::canShareStyleWithControl):
3121 Update for new spelling of AutoFill.
3123 2015-03-11 Geoffrey Garen <ggaren@apple.com>
3125 Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
3126 https://bugs.webkit.org/show_bug.cgi?id=142589
3128 Reviewed by Andreas Kling.
3130 Updated for renames to JSC extra cost APIs.
3132 Added FIXMEs to our 10 use cases that are currently wrong, including
3133 canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
3135 * Modules/mediasource/SourceBuffer.cpp:
3136 (WebCore::SourceBuffer::appendBufferInternal):
3137 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
3138 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
3139 (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
3140 * Modules/mediasource/SourceBuffer.h:
3141 * bindings/js/JSDocumentCustom.cpp:
3143 * bindings/js/JSImageDataCustom.cpp:
3145 * bindings/js/JSNodeListCustom.cpp:
3146 (WebCore::createWrapper):
3147 * bindings/scripts/CodeGeneratorJS.pm:
3148 (GenerateImplementation):
3149 * dom/CollectionIndexCache.cpp:
3150 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
3151 (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
3152 * dom/CollectionIndexCache.h:
3153 (WebCore::Iterator>::computeNodeCountUpdatingListCache):
3154 * html/HTMLCanvasElement.cpp:
3155 (WebCore::HTMLCanvasElement::createImageBuffer):
3156 * html/HTMLCollection.h:
3157 (WebCore::CollectionNamedElementCache::didPopulate):
3158 * html/HTMLImageLoader.cpp:
3159 (WebCore::HTMLImageLoader::imageChanged):
3160 * html/HTMLMediaElement.cpp:
3161 (WebCore::HTMLMediaElement::parseAttribute):
3162 * xml/XMLHttpRequest.cpp:
3163 (WebCore::XMLHttpRequest::dropProtection):
3165 2015-03-11 Benjamin Poulain <bpoulain@apple.com>
3167 Add basic support for BOL and EOL assertions to the URL Filter parser
3168 https://bugs.webkit.org/show_bug.cgi?id=142568
3170 Reviewed by Alex Christensen.
3172 This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
3174 Both assertions must be the first/last term of their pattern. Any advanced combination
3175 results in a parsing error.
3177 The BOL assertion is easy to represent: currently, any pattern starts at the beginning
3178 of a line and the NFA are generated accordingly.
3180 I had two options to represent the EOL assertion:
3181 1) Add a new special transition on EOL.
3182 2) Add a new vector of actions to the states, conditional to the EOL input.
3184 I picked the first option to avoid growing every state by a vector
3185 that would be empty in the vast majority of cases.
3188 On the matching side, the interpreter was modified to support transitions on '\0'.
3189 DFABytecodeInstruction::CheckValue now stops when running on a character after
3190 the end of the string.
3192 DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
3193 to avoid going past the end of the input. Second, stop on '\0' too... the reason
3194 is that the unconditional jump is only used for fallback edges of the DFA, fallback
3195 edge are not supposed to accept '\0'.
3197 * contentextensions/DFA.cpp:
3198 (WebCore::ContentExtensions::printTransitions):
3199 * contentextensions/DFABytecodeInterpreter.cpp:
3200 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3201 * contentextensions/DFANode.h:
3202 * contentextensions/NFA.cpp:
3203 (WebCore::ContentExtensions::NFA::addTransition):
3204 (WebCore::ContentExtensions::NFA::addEpsilonTransition):
3205 (WebCore::ContentExtensions::printTransitions):
3206 * contentextensions/NFANode.h:
3207 * contentextensions/NFAToDFA.cpp:
3208 (WebCore::ContentExtensions::populateTransitions):
3209 (WebCore::ContentExtensions::NFAToDFA::convert):
3210 * contentextensions/URLFilterParser.cpp:
3211 (WebCore::ContentExtensions::Term::Term):
3212 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
3213 (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
3214 (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
3215 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3217 2015-03-11 Jer Noble <jer.noble@apple.com>
3219 [Mac] Update fullscreen placeholder UI to use Vibrancy.
3220 https://bugs.webkit.org/show_bug.cgi?id=142586
3222 Reviewed by Eric Carlson.
3224 Update the fullscreen placeholder with a translucent vibrant appearance
3225 using NSVisualEffectView. Since NSVisuaEffectView is only available for
3226 OS X 10.10 and above, wrap the new implementation in a version check and
3227 retain the old implementation.
3229 Drive-by: Update the strings for the placeholder view with new HI guidance
3232 * English.lproj/Localizable.strings:
3233 * platform/LocalizedStrings.cpp:
3234 (WebCore::clickToExitFullScreenText):
3235 * platform/mac/WebCoreFullScreenPlaceholderView.h:
3236 * platform/mac/WebCoreFullScreenPlaceholderView.mm:
3237 (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
3239 2015-03-11 Timothy Horton <timothy_horton@apple.com>
3241 Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
3242 https://bugs.webkit.org/show_bug.cgi?id=142549
3244 Reviewed by Simon Fraser.
3246 * page/ViewportConfiguration.cpp:
3247 (WebCore::ViewportConfiguration::ViewportConfiguration):
3248 Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
3249 because it being true does not guarantee that we will ignore scaling constraints,
3250 but it being false does guarantee that we won't.
3252 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
3253 Ignore scaling constraints if the page:
3254 a) claimed to want to lay out to device-width and then laid out too wide
3255 b) claimed to want to lay out to device-height and then laid out too tall
3256 c) claimed to want to lay out with initialScale=1 and then laid out too wide
3258 (WebCore::ViewportConfiguration::initialScale):
3259 (WebCore::ViewportConfiguration::minimumScale):
3260 (WebCore::ViewportConfiguration::allowsUserScaling):
3261 Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
3262 have some more logic here (as above).
3264 (WebCore::ViewportConfiguration::description):
3265 Dump whether we're ignoring scaling constraints.
3267 (WebCore::ViewportConfiguration::dump):
3268 Use WTFLogAlways so that the output goes to various other logging mechanisms
3269 instead of just stderr.
3271 * page/ViewportConfiguration.h:
3272 (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
3273 (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
3275 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
3277 Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
3278 https://bugs.webkit.org/show_bug.cgi?id=142569
3280 Reviewed by David Hyatt.
3282 Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
3283 that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
3284 return type from int to Optional<int>.
3286 No new tests because there is no behavior change.
3288 * rendering/RenderBlock.cpp:
3289 (WebCore::RenderBlock::baselinePosition):
3290 (WebCore::RenderBlock::firstLineBaseline):
3291 (WebCore::RenderBlock::inlineBlockBaseline):
3292 * rendering/RenderBlock.h:
3293 * rendering/RenderBlockFlow.cpp:
3294 (WebCore::RenderBlockFlow::firstLineBaseline):
3295 (WebCore::RenderBlockFlow::inlineBlockBaseline):
3296 * rendering/RenderBlockFlow.h:
3297 * rendering/RenderBox.h:
3298 (WebCore::RenderBox::firstLineBaseline):
3299 (WebCore::RenderBox::inlineBlockBaseline):
3300 * rendering/RenderDeprecatedFlexibleBox.cpp:
3301 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3302 * rendering/RenderFlexibleBox.cpp:
3303 (WebCore::RenderFlexibleBox::baselinePosition):
3304 (WebCore::RenderFlexibleBox::firstLineBaseline):
3305 (WebCore::RenderFlexibleBox::inlineBlockBaseline):
3306 (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3307 * rendering/RenderFlexibleBox.h:
3308 * rendering/RenderMenuList.h:
3309 * rendering/RenderTable.cpp:
3310 (WebCore::RenderTable::cellAbove):
3311 (WebCore::RenderTable::cellBelow):
3312 (WebCore::RenderTable::cellBefore):
3313 (WebCore::RenderTable::cellAfter):
3314 (WebCore::RenderTable::firstLineBlock):
3315 (WebCore::RenderTable::baselinePosition):
3316 (WebCore::RenderTable::inlineBlockBaseline):
3317 (WebCore::RenderTable::firstLineBaseline):
3318 * rendering/RenderTable.h:
3319 * rendering/RenderTableCell.cpp:
3320 (WebCore::RenderTableCell::cellBaselinePosition):
3321 * rendering/RenderTableSection.cpp:
3322 (WebCore::RenderTableSection::firstLineBaseline):
3323 * rendering/RenderTableSection.h:
3324 * rendering/RenderTextControl.h:
3325 * rendering/mathml/RenderMathMLBlock.cpp:
3326 (WebCore::RenderMathMLBlock::baselinePosition):
3327 (WebCore::RenderMathMLTable::firstLineBaseline):
3328 * rendering/mathml/RenderMathMLBlock.h:
3329 * rendering/mathml/RenderMathMLFraction.cpp:
3330 (WebCore::RenderMathMLFraction::firstLineBaseline):
3331 * rendering/mathml/RenderMathMLFraction.h:
3332 * rendering/mathml/RenderMathMLOperator.cpp:
3333 (WebCore::RenderMathMLOperator::firstLineBaseline):
3334 * rendering/mathml/RenderMathMLOperator.h:
3335 * rendering/mathml/RenderMathMLRoot.cpp:
3336 (WebCore::RenderMathMLRoot::firstLineBaseline):
3337 (WebCore::RenderMathMLRoot::layout):
3338 * rendering/mathml/RenderMathMLRoot.h:
3339 * rendering/mathml/RenderMathMLRow.cpp:
3340 (WebCore::RenderMathMLRow::layout):
3341 * rendering/mathml/RenderMathMLScripts.cpp:
3342 (WebCore::RenderMathMLScripts::layout):
3343 (WebCore::RenderMathMLScripts::firstLineBaseline):
3344 * rendering/mathml/RenderMathMLScripts.h:
3345 * rendering/mathml/RenderMathMLSpace.cpp:
3346 (WebCore::RenderMathMLSpace::firstLineBaseline):
3347 * rendering/mathml/RenderMathMLSpace.h:
3348 * rendering/mathml/RenderMathMLUnderOver.cpp:
3349 (WebCore::RenderMathMLUnderOver::firstLineBaseline):
3350 * rendering/mathml/RenderMathMLUnderOver.h:
3352 2015-03-11 Timothy Horton <timothy_horton@apple.com>
3354 <attachment>s should be created when dropping files onto contentEditable areas
3355 https://bugs.webkit.org/show_bug.cgi?id=142494
3356 <rdar://problem/19982553>
3358 Reviewed by Anders Carlsson.
3360 Covered by existing tests.
3362 * editing/mac/EditorMac.mm:
3363 (WebCore::Editor::WebContentReader::readFilenames):
3364 Instead of inserting the dropped URLs as strings, make an <attachment>
3367 2015-03-11 David Hyatt <hyatt@apple.com>
3369 Optimize offsetWidth and offsetHeight to avoid doing layouts.
3370 https://bugs.webkit.org/show_bug.cgi?id=142544
3372 Reviewed by Beth Dakin.
3375 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3377 Added a new method that only updates layout if it determines that the desired dimensions are out
3381 (WebCore::Element::offsetWidth):
3382 (WebCore::Element::offsetHeight):
3383 Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
3385 2015-03-11 Commit Queue <commit-queue@webkit.org>
3387 Unreviewed, rolling out r181367.
3388 https://bugs.webkit.org/show_bug.cgi?id=142581
3390 Caused crashes on the debug bots (Requested by cdumez on
3395 "Web Inspector: CSS parser errors in the console should
3396 include column numbers"
3397 https://bugs.webkit.org/show_bug.cgi?id=114313
3398 http://trac.webkit.org/changeset/181367
3400 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
3402 Inline block children do not have correct baselines if their children are also block elements
3403 https://bugs.webkit.org/show_bug.cgi?id=142559
3405 Reviewed by Darin Adler.
3407 Perform the same computation on child block elements as child inline elements.
3409 Test: fast/text/baseline-inline-block-block-children.html
3411 * rendering/RenderBlockFlow.cpp:
3412 (WebCore::RenderBlockFlow::inlineBlockBaseline):
3414 2015-03-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
3416 [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
3417 https://bugs.webkit.org/show_bug.cgi?id=142577
3419 Reviewed by Carlos Garcia Campos.
3421 No new tests, this is a build fix.
3423 * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
3424 * PlatformGTK.cmake: Idem.
3426 2015-03-10 Philippe Normand <pnormand@igalia.com>
3428 Rename MediaStreamCenter to RealtimeMediaSourceCenter
3429 https://bugs.webkit.org/show_bug.cgi?id=142535
3431 Reviewed by Eric Carlson.
3433 As per bug title, rename MediaStreamCenter to
3434 RealtimeMediaSourceCenter, this class manages
3435 RealtimeMediaSources, not MediaStreams. Some un-needed includes of
3436 the header were also removed.
3438 2015-03-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3440 Remove unnecessary create() factory functions
3441 https://bugs.webkit.org/show_bug.cgi?id=142558
3443 Reviewed by Darin Adler.
3445 create() function which just returns new instance can be replaced with std::make_unique<>.
3447 No new tests, no behavior changes.
3449 * bindings/js/JSCryptoKeySerializationJWK.cpp:
3450 (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
3451 * crypto/keys/CryptoKeyAES.cpp:
3452 (WebCore::CryptoKeyAES::exportData):
3453 * crypto/keys/CryptoKeyDataOctetSequence.h:
3454 * crypto/keys/CryptoKeyHMAC.cpp:
3455 (WebCore::CryptoKeyHMAC::exportData):
3456 * crypto/keys/CryptoKeySerializationRaw.cpp:
3457 (WebCore::CryptoKeySerializationRaw::keyData):
3458 * platform/audio/mac/CARingBuffer.cpp:
3459 (WebCore::CARingBuffer::create): Deleted.
3460 * platform/audio/mac/CARingBuffer.h:
3461 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3462 (WebCore::AudioSourceProviderAVFObjC::prepare):
3463 * testing/Internals.cpp:
3464 (WebCore::Internals::queueMicroTask):
3465 * testing/MicroTaskTest.cpp:
3466 (WebCore::MicroTaskTest::create): Deleted.
3467 * testing/MicroTaskTest.h:
3468 (WebCore::MicroTaskTest::MicroTaskTest):
3470 2015-03-10 Joseph Pecoraro <pecoraro@apple.com>
3472 Web Inspector: CSS parser errors in the console should include column numbers
3473 https://bugs.webkit.org/show_bug.cgi?id=114313
3475 Reviewed by Benjamin Poulain.
3477 Test: inspector-protocol/console/warnings-errors.html
3480 (WebCore::CSSParser::currentCharacterOffset):
3481 Get the current character offset depending on the source type.
3482 Add instance variables to track column position and start
3483 line / column for inline stylesheets.
3485 * css/CSSParser.cpp:
3486 (WebCore::CSSParser::CSSParser):
3487 (WebCore::CSSParser::parseSheet):
3488 Initialize new instance variables.
3490 (WebCore::CSSParser::currentLocation):
3491 Update to include column information. Also, if we are on the first line
3492 we may need to take into account a start column offset as well.
3494 (WebCore::CSSParser::realLex):
3495 When bumping the line number, reset the column offset for the next
3496 line with the next character.
3498 (WebCore::CSSParser::syntaxError):
3499 (WebCore::CSSParser::logError):
3500 Include column information.
3502 * css/StyleSheetContents.cpp:
3503 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
3504 (WebCore::StyleSheetContents::parseString):
3505 (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
3506 Include column information.
3508 * css/StyleSheetContents.h:
3509 * dom/InlineStyleSheetOwner.cpp:
3510 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
3511 (WebCore::InlineStyleSheetOwner::createSheet):
3512 Save and use column information later on.
3514 * dom/InlineStyleSheetOwner.h:
3515 * inspector/InspectorStyleSheet.cpp:
3516 (WebCore::InspectorStyleSheet::ensureSourceData):
3517 Updated parser signature needs starting column and no longer has optional parameters.
3519 2015-03-10 Darin Adler <darin@apple.com>
3521 Try to fix the GTK build.
3523 * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
3524 by putting in a LANGUAGE_GOBJECT conditional.
3526 2015-03-10 Darin Adler <darin@apple.com>
3528 Some event handler fixes
3529 https://bugs.webkit.org/show_bug.cgi?id=142474
3531 Reviewed by Anders Carlsson.
3533 * bindings/scripts/CodeGenerator.pm:
3534 (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
3535 handle combinations of & and | in conditional expressions; that's coming up when
3536 combining conditionals for includes in NavigatorContentUtils.idl.
3538 * bindings/scripts/CodeGeneratorJS.pm:
3539 (AddToImplIncludes): Removed the rudimentary attempt to split and merge
3540 conditionals involving | here; instead we rely on the rules in the
3541 GenerateConditionalStringFromAttributeValue to handle this.
3542 (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
3543 (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
3545 (JSValueToNative): Changed to take "conditional" as an argument, since getting
3546 it from the signature won't work for a method parameter.
3547 (WriteData): Merge duplicates based on the result of the
3548 GenerateConditionalStringFromAttributeValue function rather than on the values
3549 passed into that function, since that function converts conditionals into a
3550 canonical form and can make two strings equal that don't start out that way.
3552 * bindings/scripts/CodeGeneratorObjC.pm:
3553 (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
3554 for event handlers. We will rename EventListener to EventHandler in a
3557 * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
3558 by the better logic for conditional includes.
3560 * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
3561 * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
3563 * dom/Document.idl: Removed unneeded language #if around event handler
3564 attributes. Removed all the commented out event handler attributes.
3565 Sorted event handler attributes into a single section rather than separating
3566 "standard" from "extensions". Sorted the conditional event handler attributes
3567 into paragraphs at the bottom. We will probably make them all unconditional
3568 in a subsequent patch.
3570 * dom/Element.idl: Removed unneeded language #if around event handler
3571 attributes. Removed all the commented out event handler attributes.
3572 Moved event handler attributes here from all derived element classes to
3573 match the approach from the HTML standard. Also resorted the attributes
3574 as in Document above.
3576 * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
3577 attributes. Removed all the commented out event handler attributes.
3578 Sorted event handler attributes into a single section rather than separating
3579 "standard" from "overrides".
3581 * html/HTMLElement.cpp:
3582 (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
3583 Added a few missing attribute names, and re-sorted a bit. Moved any from
3584 element subclasses here.
3586 * html/HTMLFormElement.cpp:
3587 (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
3588 oncomplete and oncompleteerror to Element and HTMLElement.
3589 * html/HTMLFormElement.idl: Ditto.
3591 * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
3593 * html/HTMLInputElement.cpp:
3594 (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
3595 onsearch to HTMLElement.
3597 * html/HTMLMediaElement.cpp:
3598 (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
3599 all the event handler attributes to HTMLElement.
3600 (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
3601 if statement I noticed while auditing all calls to JSC::call.
3602 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
3603 I noticed this was missing because a flawed earlier version of my patch was
3604 causing the script to fail, leaving an exception behind that caused an
3605 assertion later. So I audited all calls to JSC::call looking for this mistake.
3607 * html/HTMLMediaElement.idl: Moved all the event handlers from here to
3608 Element. Also changed everything possible to use Conditional instead of #if.
3610 * html/HTMLPlugInImageElement.cpp:
3611 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
3612 clearException. Noticed it was missing while auditing all calls to JSC::call.
3614 * html/HTMLVideoElement.cpp:
3615 (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
3618 * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
3619 Conditional instead of #if.
3621 * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
3624 * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
3625 some older scheme to implement event handlers but no longer used at all.
3627 2015-03-10 Brent Fulgham <bfulgham@apple.com>
3629 CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
3630 https://bugs.webkit.org/show_bug.cgi?id=142411
3632 Reviewed by Simon Fraser.
3634 Tested by css3/scroll-snap/scroll-snap-position-values.html.
3636 Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
3637 may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
3638 and 'left', 'right', and 'center' for the X axis.
3640 Correct implementation to support calculated values for Scroll Snap Point markup. This required the
3641 Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
3642 to a regular CSSValue.
3644 Add tests that these position labels, as well as combinations with percentages and pixel offsets
3645 are parsed properly.
3647 * css/CSSComputedStyleDeclaration.cpp:
3648 (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
3649 when working with Length values. This is necessary to allow calculated results to be based on the proper default
3651 (WebCore::scrollSnapPoints): Ditto.
3652 (WebCore::scrollSnapCoordinates): Ditto.
3653 * css/CSSParser.cpp:
3654 (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
3656 (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
3657 (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
3658 (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
3659 (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
3660 (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
3661 (WebCore::CSSParser::parseTransformOrigin): Ditto.
3662 (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
3664 * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
3665 repeat values as calculations.
3667 2015-03-10 Enrica Casucci <enrica@apple.com>
3669 Add support for more emoji with variation.
3670 https://bugs.webkit.org/show_bug.cgi?id=142548
3671 rdar://problem/20105008
3673 Reviewed by Tim Horton.
3675 Update ICU rules to support new emoji with variation.
3677 Test: editing/selection/extend-by-character-007.html
3679 * platform/text/TextBreakIterator.cpp:
3680 (WebCore::cursorMovementIterator):
3682 2015-03-10 Alex Christensen <achristensen@webkit.org>
3684 Use unsigned for HashSet size.
3685 https://bugs.webkit.org/show_bug.cgi?id=142518
3687 Reviewed by Benjamin Poulain.
3689 * Modules/websockets/WebSocketDeflateFramer.cpp:
3690 (WebCore::WebSocketExtensionDeflateFrame::processResponse):
3691 * bindings/js/SerializedScriptValue.cpp:
3692 (WebCore::CloneSerializer::checkForDuplicate):
3693 (WebCore::CloneSerializer::writeConstantPoolIndex):
3694 * dom/ScriptRunner.cpp:
3695 (WebCore::ScriptRunner::~ScriptRunner):
3696 * loader/ResourceLoadScheduler.h:
3697 * platform/graphics/Font.cpp:
3698 (WebCore::Font::systemFallbackFontForCharacter):
3699 * platform/graphics/FontCache.cpp:
3700 (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
3701 (WebCore::FontCache::purgeInactiveFontData):
3702 * platform/graphics/FontCache.h:
3703 * platform/graphics/freetype/FontCacheFreeType.cpp:
3704 (WebCore::FontCache::systemFallbackForCharacters):
3705 * platform/graphics/ios/FontCacheIOS.mm:
3706 (WebCore::FontCache::getSystemFontFallbackForCharacters):
3707 (WebCore::FontCache::systemFallbackForCharacters):
3708 (WebCore::FontCache::similarFont):
3709 * platform/graphics/mac/FontCacheMac.mm:
3710 (WebCore::shouldAutoActivateFontIfNeeded):
3711 (WebCore::FontCache::systemFallbackForCharacters):
3712 (WebCore::FontCache::similarFont):
3713 * platform/graphics/win/FontCacheWin.cpp:
3714 (WebCore::FontCache::systemFallbackForCharacters):
3715 * rendering/RenderDeprecatedFlexibleBox.cpp:
3716 (WebCore::FlexBoxIterator::next):
3717 * rendering/RenderTableSection.cpp:
3718 (WebCore::RenderTableSection::computeOverflowFromCells):
3720 2015-03-10 Eric Carlson <eric.carlson@apple.com>
3722 [Mac] Refactor media controls code
3723 https://bugs.webkit.org/show_bug.cgi?id=142455
3725 Reviewed by Dean Jackson.
3727 No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
3729 * Modules/mediacontrols/mediaControlsApple.js:
3731 (Controller.prototype.addVideoListeners):
3732 (Controller.prototype.removeVideoListeners):
3733 (Controller.prototype.createControls):
3734 (Controller.prototype.setControlsType):
3735 (Controller.prototype.configureInlineControls):
3736 (Controller.prototype.updateStatusDisplay):
3737 (Controller.prototype.handlePanelMouseDown):
3738 (Controller.prototype.showControls):
3739 (Controller.prototype.hideControls):
3740 (Controller.prototype.handleOptimizedFullscreenButtonClicked):
3741 (Controller.prototype.currentPlaybackTargetIsWireless):
3742 (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
3743 (Controller.prototype.updateWirelessPlaybackStatus):
3744 (Controller.prototype.updateWirelessTargetAvailable):
3745 (Controller.prototype.handleWirelessPickerButtonClicked):
3746 (Controller.prototype.handleWirelessPlaybackChange):
3747 (Controller.prototype.handleWirelessTargetAvailableChange):
3748 (Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
3749 * Modules/mediacontrols/mediaControlsiOS.js:
3751 (ControllerIOS.prototype.addVideoListeners):
3752 (ControllerIOS.prototype.removeVideoListeners):
3753 (ControllerIOS.prototype.createControls):
3754 (ControllerIOS.prototype.setControlsType):
3755 (ControllerIOS.prototype.configureInlineControls):
3756 (ControllerIOS.prototype.showControls):
3757 (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
3758 (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
3759 (ControllerIOS.prototype.updateStatusDisplay):
3760 (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
3761 (ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
3762 (ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
3763 (ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
3764 (ControllerIOS.prototype.hideControls): Deleted.
3765 (ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
3766 (ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.
3768 2015-03-10 Said Abou-Hallawa <sabouhallawa@apple.com>
3770 Remove PassRefPtr from svg/properties classes.
3771 https://bugs.webkit.org/show_bug.cgi?id=142063.
3773 Reviewed by Darin Adler.
3775 Remove PassRefPtr from svg/properties classes. All the return types and
3776 the local variables should be RefPtr. If we are sure the pointer can't
3777 be null, we use Ref instead.
3779 * svg/SVGMarkerElement.cpp:
3780 (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
3781 (WebCore::SVGMarkerElement::orientTypeAnimated):
3782 * svg/SVGMarkerElement.h:
3783 * svg/SVGPathElement.cpp:
3784 (WebCore::SVGPathElement::lookupOrCreateDWrapper):
3785 (WebCore::SVGPathElement::pathSegList):
3786 (WebCore::SVGPathElement::animatedPathSegList):
3787 * svg/SVGPathElement.h:
3788 * svg/SVGPolyElement.cpp:
3789 (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
3790 (WebCore::SVGPolyElement::points):
3791 (WebCore::SVGPolyElement::animatedPoints):
3792 * svg/SVGPolyElement.h:
3793 * svg/SVGTextContentElement.cpp:
3794 (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
3795 (WebCore::SVGTextContentElement::textLengthAnimated):
3796 * svg/SVGTextContentElement.h:
3797 * svg/SVGViewSpec.cpp:
3798 (WebCore::SVGViewSpec::transform):
3799 (WebCore::SVGViewSpec::viewBoxAnimated):
3800 (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
3801 (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
3802 (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
3803 (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
3804 * svg/SVGViewSpec.h:
3805 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
3806 (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
3807 * svg/properties/SVGAnimatedListPropertyTearOff.h:
3808 (WebCore::SVGAnimatedListPropertyTearOff::create):
3809 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
3810 (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
3811 * svg/properties/SVGAnimatedProperty.h:
3812 (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
3813 * svg/properties/SVGAnimatedPropertyMacros.h:
3814 * svg/properties/SVGAnimatedPropertyTearOff.h:
3815 (WebCore::SVGAnimatedPropertyTearOff::create):
3816 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
3817 (WebCore::SVGAnimatedStaticPropertyTearOff::create):
3818 * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
3819 (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
3820 * svg/properties/SVGListProperty.h:
3821 (WebCore::SVGListProperty::initializeValuesAndWrappers):
3822 (WebCore::SVGListProperty::getItemValuesAndWrappers):
3823 (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
3824 (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
3825 (WebCore::SVGListProperty::removeItemValuesAndWrappers):
3826 (WebCore::SVGListProperty::appendItemValuesAndWrappers):
3827 * svg/properties/SVGListPropertyTearOff.h:
3828 (WebCore::SVGListPropertyTearOff::create):
3829 (WebCore::SVGListPropertyTearOff::initialize):
3830 (WebCore::SVGListPropertyTearOff::getItem):
3831 (WebCore::SVGListPropertyTearOff::insertItemBefore):
3832 (WebCore::SVGListPropertyTearOff::replaceItem):
3833 (WebCore::SVGListPropertyTearOff::removeItem):
3834 (WebCore::SVGListPropertyTearOff::appendItem):
3835 * svg/properties/SVGPathSegListPropertyTearOff.cpp:
3836 (WebCore::SVGPathSegListPropertyTearOff::getItem):
3837 (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
3838 (WebCore::SVGPathSegListPropertyTearOff::removeItem):
3839 * svg/properties/SVGPathSegListPropertyTearOff.h:
3840 (WebCore::SVGPathSegListPropertyTearOff::create):
3841 (WebCore::SVGPathSegListPropertyTearOff::initialize):
3842 (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
3843 (WebCore::SVGPathSegListPropertyTearOff::appendItem):
3844 * svg/properties/SVGPropertyInfo.h:
3845 * svg/properties/SVGStaticListPropertyTearOff.h:
3846 (WebCore::SVGStaticListPropertyTearOff::create):
3847 * svg/properties/SVGStaticPropertyTearOff.h:
3848 (WebCore::SVGStaticPropertyTearOff::create):
3849 * svg/properties/SVGTransformListPropertyTearOff.h:
3850 (WebCore::SVGTransformListPropertyTearOff::create):
3851 (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
3852 (WebCore::SVGTransformListPropertyTearOff::consolidate):
3854 2015-03-10 Timothy Horton <timothy_horton@apple.com>
3858 * platform/network/cf/ResourceHandleCFNet.cpp:
3859 (WebCore::ResourceHandle::createCFURLConnection):
3861 2015-03-10 Benjamin Poulain <bpoulain@apple.com>
3863 Extend URL filter's Term definition to support groups/subpatterns
3864 https://bugs.webkit.org/show_bug.cgi?id=142519
3866 Reviewed by Alex Christensen.
3868 Pretty simple extension: Term is extended to support holding
3869 a Vector of Term. The quantifier of the Term applies to its
3870 Vector of term as a whole.
3872 To avoid exposing too much internal in the API of Term, I moved
3873 graph generation from GraphBuilder to Term.
3875 Sinking a CharacterSet works as usual. Sinking a Group is done
3876 by sinking each of its Terms one by one and then apply the quantifier
3877 on the whole subgraph. This is done by recursively calling into
3878 Term::generateGraph().
3880 Since groups could be nested, the groups make a stack with the latest
3882 When sinking a floating Term, it is sunk to the latest open group. If there is no open
3883 group, we use the prefix tree and sink the whole subpattern to the graph.
3885 * contentextensions/URLFilterParser.cpp:
3886 (WebCore::ContentExtensions::Term::Term):
3887 (WebCore::ContentExtensions::Term::extendGroupSubpattern):
3888 (WebCore::ContentExtensions::Term::generateGraph):
3889 (WebCore::ContentExtensions::Term::operator==):
3890 (WebCore::ContentExtensions::Term::hash):
3891 (WebCore::ContentExtensions::Term::isUniversalTransition):
3892 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
3893 (WebCore::ContentExtensions::Term::destroy):
3894 (WebCore::ContentExtensions::Term::Group::operator==):
3895 (WebCore::ContentExtensions::Term::Group::hash):
3896 (WebCore::ContentExtensions::GraphBuilder::finalize):
3897 (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
3898 (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
3899 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3900 (WebCore::ContentExtensions::Term::quantifier): Deleted.
3901 (WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
3902 (WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
3903 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.
3905 2015-03-10 Roger Fong <roger_fong@apple.com>
3907 Adjustments to media control fonts.
3908 https://bugs.webkit.org/show_bug.cgi?id=142509.
3909 <rdar://problem/20085228>
3911 Reviewed by Darin Adler.
3913 Use system font for controls. Adjust surrounding divs accordingly.
3914 Apply subpixel antialiasing to all media control text.
3915 * Modules/mediacontrols/mediaControlsApple.css:
3916 (::-webkit-media-controls):
3917 (audio::-webkit-media-controls-closed-captions-container .list):
3918 (audio::-webkit-media-controls-status-display):
3919 (audio::-webkit-media-controls-time-remaining-display):
3920 (audio::-webkit-media-controls-current-time-display):
3921 (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
3922 (audio::-webkit-media-controls-current-time-display.five-digit-time):
3923 (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
3924 (audio::-webkit-media-controls-current-time-display.six-digit-time):
3926 2015-03-10 Dan Bernstein <mitz@apple.com>
3928 Fixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading a non-HTTPS webapge.
3930 Reviewed by Anders Carlsson.
3932 * platform/network/mac/CertificateInfoMac.mm:
3933 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Null-check the certificate chain.
3935 2015-03-10 Dan Bernstein <mitz@apple.com>
3939 * platform/spi/cocoa/SecuritySPI.h:
3941 2015-03-10 Zalan Bujtas <zalan@apple.com>
3943 Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
3944 https://bugs.webkit.org/show_bug.cgi?id=142344
3946 Reviewed by Antti Koivisto.
3948 This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
3949 the segment looping and position handling logic are no longer duplicated. It also unifies
3950 the static next*() functions' signature.
3952 No change in functionality.
3954 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3955 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3956 (WebCore::SimpleLineLayout::nextBreakablePosition):
3957 (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
3958 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3959 (WebCore::SimpleLineLayout::TextFragmen