Progress towards CMake on Mac.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-13  Alex Christensen  <achristensen@webkit.org>
2
3         Progress towards CMake on Mac.
4         https://bugs.webkit.org/show_bug.cgi?id=142680
5
6         Reviewed by Gyuyoung Kim.
7
8         * PlatformMac.cmake:
9         Added new include directories and removed old source files.
10
11 2015-03-13  Commit Queue  <commit-queue@webkit.org>
12
13         Unreviewed, rolling out r181483.
14         https://bugs.webkit.org/show_bug.cgi?id=142688
15
16         Caused use-after-free on many tests (Requested by ap on
17         #webkit).
18
19         Reverted changeset:
20
21         "Allow clients to selectively disable plug-ins"
22         https://bugs.webkit.org/show_bug.cgi?id=142506
23         http://trac.webkit.org/changeset/181483
24
25 2015-03-13  Antti Koivisto  <antti@apple.com>
26
27         Cache glyph widths to GlyphPages
28         https://bugs.webkit.org/show_bug.cgi?id=142028
29
30         Reviewed by Andreas Kling.
31
32         Currently we have a separate cache in Font for glyph widths. In practice we always need
33         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
34         a per-character hash lookup from WidthIterator.
35
36         * platform/graphics/Font.cpp:
37         (WebCore::Font::Font):
38         (WebCore::Font::initCharWidths):
39         (WebCore::Font::platformGlyphInit):
40         (WebCore::createAndFillGlyphPage):
41         (WebCore::Font::computeWidthForGlyph):
42
43             Rename to make it clear this doesn't cache.
44
45         (WebCore::GlyphPage::setGlyphDataForIndex):
46
47             Initialize the width.
48             This could go to GlyphPage.cpp if we had one.
49
50         * platform/graphics/Font.h:
51         (WebCore::Font::glyphZeroWidth):
52         (WebCore::Font::isZeroWidthSpaceGlyph):
53         (WebCore::Font::zeroGlyph): Deleted.
54         (WebCore::Font::setZeroGlyph): Deleted.
55         (WebCore::Font::widthForGlyph): Deleted.
56         * platform/graphics/FontCascade.cpp:
57         (WebCore::offsetToMiddleOfGlyph):
58         * platform/graphics/FontCascadeFonts.cpp:
59         (WebCore::FontCascadeFonts::glyphDataForCharacter):
60         * platform/graphics/GlyphPage.h:
61         (WebCore::GlyphData::GlyphData):
62
63             Return width too as part of GlyphData.
64
65         (WebCore::GlyphPage::glyphDataForIndex):
66         (WebCore::GlyphPage::setGlyphDataForCharacter):
67         (WebCore::GlyphPage::setGlyphDataForIndex):
68         (WebCore::GlyphPage::GlyphPage):
69         * platform/graphics/WidthIterator.cpp:
70         (WebCore::WidthIterator::advanceInternal):
71
72             No need to lookup width separately now.
73
74         * platform/graphics/mac/ComplexTextController.cpp:
75         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
76         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
77         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
78         * rendering/mathml/RenderMathMLOperator.cpp:
79         (WebCore::RenderMathMLOperator::advanceForGlyph):
80         * rendering/svg/SVGTextRunRenderingContext.cpp:
81         (WebCore::missingGlyphForFont):
82         * svg/SVGFontData.cpp:
83         (WebCore::SVGFontData::initializeFont):
84
85 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
86
87         [Mac] Enable WIRELESS_PLAYBACK_TARGET
88         https://bugs.webkit.org/show_bug.cgi?id=142635
89
90         Reviewed by Darin Adler.
91
92         * Configurations/FeatureDefines.xcconfig:
93
94 2015-03-13  Jeremy Jones  <jeremyj@apple.com>
95
96         Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
97         https://bugs.webkit.org/show_bug.cgi?id=142678
98
99         Reviewed by Eric Carlson.
100
101         Add the missing 'n' in "fullscreen".
102
103         * platform/spi/ios/AVKitSPI.h:
104
105 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
106
107         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
108         https://bugs.webkit.org/show_bug.cgi?id=142664
109         <rdar://problem/18859470>
110
111         Reviewed by Benjamin Poulain.
112
113         * page/ViewportConfiguration.cpp:
114         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
115         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
116         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
117         Split shouldIgnoreScalingConstraints into one for each dimension.
118
119         (WebCore::ViewportConfiguration::initialScale):
120         (WebCore::ViewportConfiguration::minimumScale):
121         Don't force the initial and minimum scales to cover the whole view if the
122         page claims to want to lay out to device width but then lays out too big.
123         This will allow pages that misbehave in this way to scale down further
124         than they previously could, but will result in a region of empty background
125         color being exposed at the initial/minimum scale.
126
127         (WebCore::ViewportConfiguration::description):
128         Update the logging to show each dimension separately.
129
130         * page/ViewportConfiguration.h:
131
132 2015-03-13  Mark Lam  <mark.lam@apple.com>
133
134         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
135         <https://webkit.org/b/142674>
136
137         Reviewed by Filip Pizlo.
138
139         No new tests because there is no new functionality. This is a refactoring effort.
140
141         * bindings/objc/WebScriptObject.mm:
142         * platform/ios/wak/WAKWindow.mm:
143         (-[WAKWindow initWithLayer:]):
144         (-[WAKWindow initWithFrame:]):
145
146 2015-03-13  Doug Russell  <d_russell@apple.com>
147
148         AX: Provide API for assistive tech to ignore DOM key event handlers
149         https://bugs.webkit.org/show_bug.cgi?id=142059
150
151         Reviewed by Beth Dakin.
152
153         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.
154
155         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.
156
157         Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
158
159         * accessibility/AccessibilityObject.cpp:
160         (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
161         (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
162         * accessibility/AccessibilityObject.h:
163         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
164         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
165         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
166         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
167         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
168         * dom/Element.cpp:
169         (WebCore::Element::dispatchKeyEvent):
170         * page/EventHandler.cpp:
171         (WebCore::EventHandler::keyEvent):
172         (WebCore::handleKeyboardSelectionMovement):
173         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
174         * page/EventHandler.h:
175         * page/Settings.in:
176
177 2015-03-09  Conrad Shultz  <conrad_shultz@apple.com>
178
179         Allow clients to selectively disable plug-ins
180         https://bugs.webkit.org/show_bug.cgi?id=142506
181
182         Reviewed by Anders Carlsson.
183
184         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
185         from the page). As part of this:
186
187         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
188            set of plug-ins.
189
190         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
191            down the stack.
192
193         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
194            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
195
196         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
197
198         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
199         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
200
201         * dom/DOMImplementation.cpp:
202         (WebCore::DOMImplementation::createDocument):
203         Update to reflect function rename.
204
205         * loader/SubframeLoader.cpp:
206         (WebCore::findPluginMIMETypeFromURL):
207         Adopt getWebVisibleMimesAndPluginIndices().
208         (WebCore::logPluginRequest):
209         Update to reflect function rename.
210         (WebCore::SubframeLoader::shouldUsePlugin):
211         Ditto.
212
213         * platform/PlatformStrategies.h:
214         Export platformStrategies(), since it is now used in WebProcess.cpp.
215
216         * plugins/DOMMimeType.cpp:
217         (WebCore::DOMMimeType::type):
218         (WebCore::DOMMimeType::description):
219         (WebCore::DOMMimeType::mimeClassInfo):
220         Adopt getWebVisibleMimesAndPluginIndices().
221         (WebCore::DOMMimeType::enabledPlugin):
222         Ditto.
223
224         * plugins/DOMMimeType.h:
225         Don't return references in a few places where it is no longer safe to do so.
226         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
227
228         * plugins/DOMMimeTypeArray.cpp:
229         (WebCore::DOMMimeTypeArray::length):
230         Adopt getWebVisibleMimesAndPluginIndices().
231         (WebCore::DOMMimeTypeArray::item):
232         Ditto.
233         (WebCore::DOMMimeTypeArray::canGetItemsForName):
234         Ditto.
235         (WebCore::DOMMimeTypeArray::namedItem):
236         Ditto.
237
238         * plugins/DOMPlugin.cpp:
239         (WebCore::DOMPlugin::pluginInfo):
240         Adopt getWebVisiblePlugins().
241         (WebCore::DOMPlugin::item):
242         Adopt getWebVisibleMimesAndPluginIndices().
243         (WebCore::DOMPlugin::canGetItemsForName):
244         Ditto.
245         (WebCore::DOMPlugin::namedItem):
246         Ditto.
247
248         * plugins/DOMPlugin.h:
249         (WebCore::DOMPlugin::pluginInfo): Deleted.
250
251         * plugins/DOMPluginArray.cpp:
252         (WebCore::DOMPluginArray::length):
253         Adopt getWebVisiblePlugins().
254         (WebCore::DOMPluginArray::item):
255         Ditto.
256         (WebCore::DOMPluginArray::canGetItemsForName):
257         Ditto.
258         (WebCore::DOMPluginArray::namedItem):
259         Ditto.
260
261         * plugins/PluginData.cpp:
262         (WebCore::PluginData::PluginData):
263         Stash the passed-in Page and call initPlugins().
264         (WebCore::PluginData::getWebVisiblePlugins):
265         New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
266         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
267         New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
268         limited to the web-visible plug-ins.
269         (WebCore::PluginData::supportsWebVisibleMimeType):
270         Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
271         (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
272         Renamed from pluginInfoForMimeType(); ditto.
273         (WebCore::PluginData::pluginNameForWebVisibleMimeType):
274         Renamed from pluginNameForMimeType(); ditto.
275         (WebCore::PluginData::pluginFileForWebVisibleMimeType):
276         Renamed from pluginFileForMimeType(); ditto.
277         (WebCore::PluginData::initPlugins):
278         (WebCore::PluginData::supportsMimeType): Deleted.
279         (WebCore::PluginData::pluginInfoForMimeType): Deleted.
280         (WebCore::PluginData::pluginNameForMimeType): Deleted.
281         (WebCore::PluginData::pluginFileForMimeType): Deleted.
282
283         * plugins/PluginData.h:
284         Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
285         new members to PluginInfo for the clientLoadPolicy and bundle information.
286         (WebCore::PluginData::PluginData):
287         Replace some member functions with new ones that will hide plug-ins upon request from the client;
288         (WebCore::PluginData::mimes): Deleted.
289         (WebCore::PluginData::mimePluginIndices): Deleted.
290
291         * plugins/PluginStrategy.h:
292         Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
293
294         * replay/SerializationMethods.cpp:
295         (JSC::EncodingTraits<PluginData>::encodeValue):
296         Remove now-obsolete code for handling MIME types and add a FIXME.
297         (JSC::DeserializedPluginData::DeserializedPluginData):
298         (JSC::EncodingTraits<PluginData>::decodeValue):
299         Ditto.
300         (JSC::EncodingTraits<PluginInfo>::encodeValue):
301         Handle the new members in PluginInfo.
302         (JSC::EncodingTraits<PluginInfo>::decodeValue):
303         Ditto.
304
305         * replay/WebInputs.json:
306         Teach Replay about PluginLoadClientPolicy.
307
308 2015-03-13  Chris Dumez  <cdumez@apple.com>
309
310         XMLHttpRequests should not prevent a page from entering PageCache
311         https://bugs.webkit.org/show_bug.cgi?id=142612
312         <rdar://problem/19923085>
313
314         Reviewed by Alexey Proskuryakov.
315
316         Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
317         drastically improve the likelihood of pages using them to enter
318         PageCache. XMLHttpRequest used to be only suspendable when not
319         loading. After this patch, if the XMLHttpRequest is loading when
320         navigating away from the page, it will be aborted and the page
321         will enter the PageCache. Upon restoring the page from PageCache,
322         the XMLHttpRequests' error handlers will be executed to give them
323         a chance to reload if they want to.
324
325         Test: http/tests/navigation/page-cache-xhr.html
326
327         * history/PageCache.cpp:
328         (WebCore::logCanCacheFrameDecision):
329         (WebCore::PageCache::canCachePageContainingThisFrame):
330         Do not prevent a page to enter the page cache ff the main document has
331         an error that is a cancellation and all remaining subresource loaders
332         are for XHR. We extend the pre-existing mechanism used on iOS, which
333         allowed PageCaching if the remaining resource loads are for images.
334
335         * loader/DocumentLoader.cpp:
336         (WebCore::areAllLoadersPageCacheAcceptable):
337         Mark XHR loaders as PageCache acceptable.
338
339         * loader/DocumentThreadableLoader.cpp:
340         (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
341         * loader/DocumentThreadableLoader.h:
342         * loader/ThreadableLoader.h:
343         * loader/cache/CachedResource.cpp:
344         (WebCore::CachedResource::areAllClientsXMLHttpRequests):
345         * loader/cache/CachedResource.h:
346         * loader/cache/CachedResourceClient.h:
347         (WebCore::CachedResourceClient::isXMLHttpRequest):
348         * xml/XMLHttpRequest.cpp:
349         (WebCore::XMLHttpRequest::XMLHttpRequest):
350         (WebCore::XMLHttpRequest::createRequest):
351         (WebCore::XMLHttpRequest::canSuspend):
352         Report that we can suspend XMLHttpRequests as long as the window load
353         event has already fired. If the window load event has not fired yet,
354         it would be unsafe to cancel the load in suspend() as it would
355         potentially cause arbitrary JS execution while suspending.
356
357         (WebCore::XMLHttpRequest::suspend):
358         If suspending for PageCache and the request is currently loading, abort
359         the load and mark that we should fire the error event upon restoring
360         from PageCache.
361
362         (WebCore::XMLHttpRequest::resume):
363         (WebCore::XMLHttpRequest::resumeTimerFired):
364         Upon resuming, fire the error event in a timer if the load was aborted
365         for suspending. We need to do this in a timer because we are not allowed
366         to execute arbitrary JS inside resume().
367
368         (WebCore::XMLHttpRequest::stop):
369         Add a assertion to make sure we are not firing event inside stop() as
370         this would potentially cause arbitrary JS execution and it would be
371         unsafe. It seems to me that our code is currently unsafe but the
372         assertion does not seem to be hit by our current layout tests. I am
373         adding the assertion as it would make it clear we have a bug and we
374         need to fix it.
375
376         * xml/XMLHttpRequest.h:
377
378 2015-03-13  Joonghun Park  <jh718.park@samsung.com>
379
380         Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
381         https://bugs.webkit.org/show_bug.cgi?id=142652
382
383         Reviewed by Csaba Osztrogonác.
384
385         No new tests, no behavior changes.
386
387         Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
388
389         * css/CSSPrimitiveValue.cpp:
390         (WebCore::propertyName):
391         * css/makeprop.pl:
392
393 2015-03-12  Zan Dobersek  <zdobersek@igalia.com>
394
395         Remove DrawingBuffer
396         https://bugs.webkit.org/show_bug.cgi?id=142641
397
398         Reviewed by Darin Adler.
399
400         Remove the DrawingBuffer class. Objects of this type were only held in the
401         WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
402         Chromium port, with the relevant code removed in r147888. Since then, the
403         m_drawingBuffer member variable has always been null.
404
405         * CMakeLists.txt:
406         * PlatformEfl.cmake:
407         * PlatformGTK.cmake:
408         * WebCore.vcxproj/WebCore.vcxproj:
409         * WebCore.vcxproj/WebCore.vcxproj.filters:
410         * WebCore.xcodeproj/project.pbxproj:
411         * html/canvas/WebGL2RenderingContext.cpp:
412         (WebCore::WebGL2RenderingContext::copyTexImage2D):
413         * html/canvas/WebGLRenderingContext.cpp:
414         (WebCore::WebGLRenderingContext::copyTexImage2D):
415         * html/canvas/WebGLRenderingContextBase.cpp:
416         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
417         (WebCore::WebGLRenderingContextBase::initializeNewContext):
418         (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
419         (WebCore::WebGLRenderingContextBase::markContextChanged):
420         (WebCore::WebGLRenderingContextBase::clearIfComposited):
421         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
422         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
423         (WebCore::WebGLRenderingContextBase::reshape):
424         (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
425         (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
426         (WebCore::WebGLRenderingContextBase::activeTexture):
427         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
428         (WebCore::WebGLRenderingContextBase::bindTexture):
429         (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
430         (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
431         (WebCore::WebGLRenderingContextBase::disable):
432         (WebCore::WebGLRenderingContextBase::enable):
433         (WebCore::WebGLRenderingContextBase::getContextAttributes):
434         (WebCore::WebGLRenderingContextBase::readPixels):
435         (WebCore::WebGLRenderingContextBase::loseContextImpl):
436         (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
437         (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
438         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
439         * html/canvas/WebGLRenderingContextBase.h:
440         (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
441         (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
442         * platform/graphics/GraphicsContext.h:
443         * platform/graphics/GraphicsContext3D.h:
444         * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
445         * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
446         * platform/graphics/gpu/DrawingBuffer.h: Removed.
447         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
448         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
449         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
450         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
451
452 2015-03-12  Ryosuke Niwa  <rniwa@webkit.org>
453
454         REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
455         https://bugs.webkit.org/show_bug.cgi?id=142646
456
457         Reviewed by Darin Adler.
458
459         The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
460         Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
461
462         Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
463         position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
464         return true when anchored before or after BR after this patch.
465
466         Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
467
468         * dom/Position.cpp:
469         (WebCore::Position::atStartOfTree):
470         (WebCore::Position::atEndOfTree):
471
472 2015-03-12  Yusuke Suzuki  <utatane.tea@gmail.com>
473
474         Integrate MapData into JSMap and JSSet
475         https://bugs.webkit.org/show_bug.cgi?id=142556
476
477         Reviewed by Filip Pizlo.
478
479         Now Set has SetData and it's different from MapData.
480         And MapData/SetData are completely integrated into JSSet and JSMap.
481         Structured-cloning algorithm need to be aware of these changes.
482         And in the case of JSSet, since JSSet doesn't need dummy value for construction,
483         Structured-cloning only serialize the keys in JSSet.
484
485         * ForwardingHeaders/runtime/MapDataInlines.h: Added.
486         * bindings/js/SerializedScriptValue.cpp:
487         (WebCore::CloneSerializer::serialize):
488         (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
489         (WebCore::CloneDeserializer::deserialize):
490         (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
491
492 2015-03-12  Dan Bernstein  <mitz@apple.com>
493
494         Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
495
496         Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
497
498         * platform/network/mac/CertificateInfoMac.mm:
499         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
500         * platform/spi/cocoa/SecuritySPI.h:
501
502 2015-03-12  Geoffrey Garen  <ggaren@apple.com>
503
504         REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
505         https://bugs.webkit.org/show_bug.cgi?id=142636
506
507         Reviewed by Mark Hahnenberg.
508
509         This was a pre-existing bug that I made a lot worse in
510         <https://trac.webkit.org/changeset/181411>.
511
512         * html/HTMLMediaElement.cpp:
513         (WebCore::HTMLMediaElement::parseAttribute): Compare size before
514         subtracting rather than subtracting and then comparing to zero. The
515         latter technique is not valid for unsigned integers, which will happily
516         underflow into giant numbers.
517
518         * Modules/mediasource/SourceBuffer.cpp:
519         (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
520          technically correct, but I took the opportunity to clean it up a bit.
521          There's no need to do two checks here, and it smells bad to check for
522          a negative unsigned integer.
523
524 2015-03-12  Sebastian Dröge  <sebastian@centricular.com>
525
526         Stop using single-include headers that are only available since GStreamer >= 1.2.
527
528         https://bugs.webkit.org/show_bug.cgi?id=142537
529
530         Reviewed by Philippe Normand.
531
532         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
533         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
534         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
535         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
536         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
537         * platform/graphics/gstreamer/GStreamerUtilities.h:
538         * platform/graphics/gstreamer/ImageGStreamer.h:
539         Instead of using single-include headers for the GStreamer libraries,
540         directly include the headers we need. The single-include headers were
541         only added in 1.2, and this would be the only reason why we would
542         depend on 1.2.
543
544 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
545
546         [Mac] Update AirPlay handling
547         https://bugs.webkit.org/show_bug.cgi?id=142541
548
549         Unreviewed, respond to post-review comments.
550
551         * dom/Document.cpp:
552         (WebCore::Document::didChoosePlaybackTarget):
553         * page/ChromeClient.h:
554         * page/Page.cpp:
555         (WebCore::Page::showPlaybackTargetPicker):
556         (WebCore::Page::didChoosePlaybackTarget):
557         (WebCore::Page::configurePlaybackTargetMonitoring):
558
559 2015-03-12  Csaba Osztrogonác  <ossy@webkit.org>
560
561         Fix the !ENABLE(PICTURE_SIZES) build
562         https://bugs.webkit.org/show_bug.cgi?id=142617
563
564         Reviewed by Darin Adler.
565
566         * html/parser/HTMLPreloadScanner.cpp:
567         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
568
569 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
570
571         Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
572
573         Address ASSERT in LayoutTests/printing/page-format-data.html.
574
575         * dom/InlineStyleSheetOwner.cpp:
576         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
577         In case the TextPosition gets used because it wasn't created by a parser,
578         zeros are more realistic values then beforeFirst.
579
580 2015-03-11  Roger Fong  <roger_fong@apple.com>
581
582         Media element time no longer updates while scrubbing following r181279.
583         https://bugs.webkit.org/show_bug.cgi?id=142606.
584         <rdar://problem/20131014>
585
586         Reviewed by Eric Carlson.
587
588         * Modules/mediacontrols/mediaControlsApple.js:
589         (Controller.prototype.handleWrapperMouseMove):
590         Update time as a result of a mouse move if we are scrubbing.
591
592 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
593
594         Web Inspector: CSS parser errors in the console should include column numbers
595         https://bugs.webkit.org/show_bug.cgi?id=114313
596
597         Reviewed by Darin Adler.
598
599         Test: inspector-protocol/console/warnings-errors.html
600
601         * css/CSSParser.h:
602         (WebCore::CSSParser::currentCharacterOffset):
603         Get the current character offset depending on the source type.
604         Add instance variables to track column position and start
605         line / column for inline stylesheets.
606
607         * css/CSSParser.cpp:
608         (WebCore::CSSParser::CSSParser):
609         (WebCore::CSSParser::parseSheet):
610         Initialize new instance variables.
611
612         (WebCore::CSSParser::currentLocation):
613         Update to include column information for the token. Also, if we are on the
614         first line we may need to take into account a start column offset as well.
615
616         (WebCore::CSSParser::realLex):
617         Set the token's start column.
618         When bumping the line number, reset the column offset for the next
619         line with the next character.
620
621         (WebCore::CSSParser::syntaxError):
622         (WebCore::CSSParser::logError):
623         Include column information.
624
625         * css/StyleSheetContents.cpp:
626         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
627         (WebCore::StyleSheetContents::parseString):
628         (WebCore::StyleSheetContents::parseStringAtPosition):
629         Include column information.
630
631         * css/StyleSheetContents.h:
632         * dom/InlineStyleSheetOwner.cpp:
633         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
634         (WebCore::InlineStyleSheetOwner::createSheet):
635         Save and use column information later on.
636
637         * dom/InlineStyleSheetOwner.h:
638         * inspector/InspectorStyleSheet.cpp:
639         (WebCore::InspectorStyleSheet::ensureSourceData):
640         Updated parser signature needs starting column and no longer has optional parameters.
641
642 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
643
644         [Mac] Update AirPlay handling
645         https://bugs.webkit.org/show_bug.cgi?id=142541
646
647         Reviewed by Sam Weinig.
648
649         * WebCore.xcodeproj/project.pbxproj:
650         * dom/Document.cpp:
651         (WebCore::Document::showPlaybackTargetPicker):
652         (WebCore::Document::addPlaybackTargetPickerClient):
653         (WebCore::Document::removePlaybackTargetPickerClient):
654         (WebCore::Document::configurePlaybackTargetMonitoring):
655         (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
656         (WebCore::Document::playbackTargetAvailabilityDidChange):
657         (WebCore::Document::didChoosePlaybackTarget):
658         * dom/Document.h:
659         * html/HTMLMediaElement.cpp:
660         (WebCore::HTMLMediaElement::registerWithDocument):
661         (WebCore::HTMLMediaElement::unregisterWithDocument):
662         (WebCore::HTMLMediaElement::parseAttribute):
663         * html/HTMLMediaElement.h:
664         * html/HTMLMediaSession.cpp:
665         (WebCore::HTMLMediaSession::HTMLMediaSession):
666         (WebCore::HTMLMediaSession::registerWithDocument):
667         (WebCore::HTMLMediaSession::unregisterWithDocument):
668         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
669         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
670         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
671         (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
672         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
673         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
674         * html/HTMLMediaSession.h:
675         * page/ChromeClient.h:
676         * page/Page.cpp:
677         (WebCore::Page::didChoosePlaybackTarget):
678         (WebCore::Page::playbackTargetAvailabilityDidChange):
679         (WebCore::Page::configurePlaybackTargetMonitoring):
680         * page/Page.h:
681         (WebCore::Page::hasWirelessPlaybackTarget):
682         (WebCore::Page::playbackTarget):
683         * platform/audio/MediaSession.cpp:
684         (WebCore::MediaSession::clientDataBufferingTimerFired):
685         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
686         * platform/audio/MediaSession.h:
687         (WebCore::MediaSession::didChoosePlaybackTarget):
688         (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
689         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
690         (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
691         * platform/audio/MediaSessionManager.cpp:
692         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
693         * platform/audio/MediaSessionManager.h:
694         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
695         * platform/audio/ios/MediaSessionManagerIOS.h:
696         * platform/audio/ios/MediaSessionManagerIOS.mm:
697         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
698         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
699         * platform/graphics/AVPlaybackTarget.h: Added.
700         (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
701         (WebCore::AVPlaybackTarget::AVPlaybackTarget):
702         (WebCore::AVPlaybackTarget::setDevicePickerContext):
703         (WebCore::AVPlaybackTarget::devicePickerContext):
704         * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
705         (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
706         * platform/graphics/MediaPlayer.cpp:
707         (WebCore::MediaPlayer::setWirelessPlaybackTarget):
708         * platform/graphics/MediaPlayer.h:
709         * platform/graphics/MediaPlayerPrivate.h:
710         (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
711         * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
712         (WebCore::AVPlaybackTarget::encode):
713         (WebCore::AVPlaybackTarget::decode):
714         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
715         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
716         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
717         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
718         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
719         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
720         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
721         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
722         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
723         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
724         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
725         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
726
727 2015-03-11  Alex Christensen  <achristensen@webkit.org>
728
729         [Content Extensions] Add resource type and load type triggers.
730         https://bugs.webkit.org/show_bug.cgi?id=142422
731
732         Reviewed by Benjamin Poulain.
733
734         New API tests.
735
736         * WebCore.xcodeproj/project.pbxproj:
737         * contentextensions/ContentExtensionCompiler.cpp:
738         (WebCore::ContentExtensions::compileRuleList):
739         * contentextensions/ContentExtensionParser.cpp:
740         (WebCore::ContentExtensions::getTypeFlags):
741         (WebCore::ContentExtensions::loadTrigger):
742         * contentextensions/ContentExtensionRule.h:
743         * contentextensions/ContentExtensionsBackend.cpp:
744         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
745         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
746         * contentextensions/ContentExtensionsBackend.h:
747         * contentextensions/DFABytecode.h:
748         (WebCore::ContentExtensions::instructionSizeWithArguments):
749         * contentextensions/DFABytecodeCompiler.cpp:
750         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
751         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
752         * contentextensions/DFABytecodeCompiler.h:
753         * contentextensions/DFABytecodeInterpreter.cpp:
754         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
755         * contentextensions/DFABytecodeInterpreter.h:
756         * loader/ResourceLoadInfo.cpp: Added.
757         (WebCore::toResourceType):
758         (WebCore::readResourceType):
759         (WebCore::readLoadType):
760         (WebCore::ResourceLoadInfo::isThirdParty):
761         (WebCore::ResourceLoadInfo::getResourceFlags):
762         * loader/ResourceLoadInfo.h: Added.
763         * loader/cache/CachedResourceLoader.cpp:
764         (WebCore::CachedResourceLoader::requestResource):
765         * page/UserContentController.cpp:
766         (WebCore::UserContentController::actionsForResourceLoad):
767         (WebCore::UserContentController::actionsForURL): Deleted.
768         * page/UserContentController.h:
769
770 2015-03-11  Tim Horton  <timothy_horton@apple.com>
771
772         Fix the build.
773
774         * page/EventHandler.cpp:
775         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
776         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
777         (WebCore::EventHandler::handleMousePressEventTripleClick):
778         (WebCore::EventHandler::handleMousePressEventSingleClick):
779
780 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
781
782         <attachment> shouldn't use "user-select: all"
783         https://bugs.webkit.org/show_bug.cgi?id=142453
784
785         Reviewed by Darin Adler.
786
787         It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
788         all (at least for now), let's not use "user-select: all" in the default stylesheet
789         for <attachment>. It's really overkill anyway, since <attachment> can't have children.
790         The only "user-select: all" behavior we actually want is select-on-click.
791         So, we'll implement that in a slightly different way.
792
793         Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
794                fast/attachment/attachment-select-on-click.html
795
796         * css/html.css:
797         (attachment):
798         No more "user-select: all".
799
800         (attachment:focus): Deleted.
801         We stopped using attachment focus a while back and forgot to remove this.
802
803         * dom/Node.h:
804         (WebCore::Node::shouldSelectOnMouseDown):
805         Add a virtual function that Node subclasses can override to indicate they
806         should be selected on mouse down.
807
808         * html/HTMLAttachmentElement.h:
809         Override the aforementioned virtual function; <attachment> should always
810         be selected on mouse down.
811
812         * page/EventHandler.cpp:
813         (WebCore::nodeToSelectOnMouseDownForNode):
814         Determine which node should be selected when a mousedown hits the given node.
815         If there's any "user-select: all", we go with the outermost "user-select: all".
816         Otherwise, we give the node a chance to say that it wants to be selected itself.
817
818         (WebCore::expandSelectionToRespectSelectOnMouseDown):
819         Rename this function, it's not just about "user-select: all" anymore.
820         Make use of nodeToSelectOnMouseDownForNode.
821
822         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
823         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
824         (WebCore::EventHandler::handleMousePressEventTripleClick):
825         (WebCore::EventHandler::handleMousePressEventSingleClick):
826         (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
827         Adjust to the new names.
828
829 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
830
831         Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
832         https://bugs.webkit.org/show_bug.cgi?id=142595
833
834         Reviewed by Andreas Kling.
835
836         Fixed this bug for canvas.
837
838         * html/HTMLCanvasElement.cpp:
839         (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
840         required by our IDL generator.
841
842         (WebCore::HTMLCanvasElement::createImageBuffer): Use
843         reportExtraMemoryAllocated.
844
845         * html/HTMLCanvasElement.h:
846
847         * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
848         right way during GC. This will match our reportExtraMemoryAllocated
849         with a reportExtraMemoryVisited during GC.
850
851 2015-03-11  Roger Fong  <roger_fong@apple.com>
852
853         A number of minor edits to the media controls on OSX.
854         https://bugs.webkit.org/show_bug.cgi?id=142551.
855         <rdar://problem/20114707>
856
857         Reviewed by Darin Adler.
858
859         This covers a slew of minor edits to the new media controls. They are as follows.
860         Small vertical placements adjustments to inline control elements.
861         Make sure buttons have no focus outlines.
862         Expand height of mute box that triggers the volume panel appearing.
863         Turn all button colors into an slightly transparent white.
864         Center status display text in fullscreen mode.
865         Lower position of captions container in fullscreen mode.
866         Show the controls on when done loading of the video an status display is hidden.
867
868         * Modules/mediacontrols/mediaControlsApple.css:
869         (audio::-webkit-media-controls-panel):
870         (audio::-webkit-media-controls-panel button:focus):
871         (audio::-webkit-media-controls-rewind-button):
872         (audio::-webkit-media-controls-play-button):
873         (audio::-webkit-media-controls-play-button.paused):
874         (audio::-webkit-media-controls-panel .mute-box):
875         (video::-webkit-media-controls-volume-max-button):
876         (audio::-webkit-media-controls-panel .volume-box):
877         (video::-webkit-media-controls-volume-min-button):
878         (audio::-webkit-media-controls-wireless-playback-picker-button):
879         (audio::-webkit-media-controls-toggle-closed-captions-button):
880         (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
881         (audio::-webkit-media-controls-fullscreen-button):
882         (audio::-webkit-media-controls-fullscreen-button.exit):
883         (audio::-webkit-media-controls-status-display):
884         (audio::-webkit-media-controls-time-remaining-display):
885         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
886         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
887         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
888         (video:-webkit-full-screen::-webkit-media-controls-play-button):
889         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
890         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
891         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
892         (video:-webkit-full-screen::-webkit-media-controls-status-display):
893         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
894         (audio::-webkit-media-controls-panel button:active): Deleted.
895         * Modules/mediacontrols/mediaControlsApple.js:
896         (Controller.prototype.setStatusHidden):
897
898 2015-03-11  Commit Queue  <commit-queue@webkit.org>
899
900         Unreviewed, rolling out r179340 and r179344.
901         https://bugs.webkit.org/show_bug.cgi?id=142598
902
903         Caused images to stay alive forever when navigating away from
904         the page before they finish loading. (Requested by kling on
905         #webkit).
906
907         Reverted changesets:
908
909         "CachedImage: ensure clients overrides imageChanged instead of
910         notifyFinished"
911         https://bugs.webkit.org/show_bug.cgi?id=140722
912         http://trac.webkit.org/changeset/179340
913
914         "HTMLImageLoader: fix build failure on assert condition after
915         r179340"
916         https://bugs.webkit.org/show_bug.cgi?id=140722
917         http://trac.webkit.org/changeset/179344
918
919 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
920
921         Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
922         https://bugs.webkit.org/show_bug.cgi?id=142593
923
924         Reviewed by Andreas Kling.
925
926         Adopt deprecatedReportExtraMemory as a short-term fix for runaway
927         memory growth in these cases where we have not adopted
928         reportExtraMemoryVisited.
929
930         Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
931         That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
932
933         Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
934         which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
935
936         * Modules/mediasource/SourceBuffer.cpp:
937         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
938         * bindings/js/JSDocumentCustom.cpp:
939         (WebCore::toJS):
940         * bindings/js/JSImageDataCustom.cpp:
941         (WebCore::toJS):
942         * bindings/js/JSNodeListCustom.cpp:
943         (WebCore::createWrapper):
944         * dom/CollectionIndexCache.cpp:
945         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
946         * html/HTMLCanvasElement.cpp:
947         (WebCore::HTMLCanvasElement::createImageBuffer):
948         * html/HTMLImageLoader.cpp:
949         (WebCore::HTMLImageLoader::imageChanged):
950         * html/HTMLMediaElement.cpp:
951         (WebCore::HTMLMediaElement::parseAttribute):
952         * xml/XMLHttpRequest.cpp:
953         (WebCore::XMLHttpRequest::dropProtection):
954
955 2015-03-10  Andy Estes  <aestes@apple.com>
956
957         REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
958         https://bugs.webkit.org/show_bug.cgi?id=142526
959
960         Reviewed by Darin Adler.
961
962         * loader/DocumentLoader.cpp:
963         (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
964
965 2015-03-10  Sam Weinig  <sam@webkit.org>
966
967         Allow adding a button in input elements for auto fill related functionality
968         <rdar://problem/19782066>
969         https://bugs.webkit.org/show_bug.cgi?id=142564
970
971         Reviewed by Anders Carlsson.
972
973         Test: fast/forms/input-auto-fill-button.html
974
975         - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
976         - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
977           where not feasible due to exported API/SPI).
978
979         * CMakeLists.txt:
980         * WebCore.vcxproj/WebCore.vcxproj:
981         * WebCore.vcxproj/WebCore.vcxproj.filters:
982         * WebCore.xcodeproj/project.pbxproj:
983         Add new files.
984
985         * css/html.css:
986         (input::-webkit-auto-fill-button):
987         (input::-webkit-auto-fill-button:hover):
988         (input::-webkit-auto-fill-button:active):
989         Add default style rules for the AutoFill button based on the ones
990         used for caps lock indicator.
991
992         * html/HTMLInputElement.cpp:
993         (WebCore::HTMLInputElement::HTMLInputElement):
994         (WebCore::HTMLInputElement::autoFillButtonElement):
995         (WebCore::HTMLInputElement::reset):
996         (WebCore::HTMLInputElement::setValueFromRenderer):
997         (WebCore::HTMLInputElement::setAutoFilled):
998         (WebCore::HTMLInputElement::setShowAutoFillButton):
999         (WebCore::HTMLInputElement::setAutofilled): Deleted.
1000         * html/HTMLInputElement.h:
1001         (WebCore::HTMLInputElement::isAutoFilled):
1002         (WebCore::HTMLInputElement::showAutoFillButton):
1003         (WebCore::HTMLInputElement::isAutofilled): Deleted.
1004         Add new bit to represent whether the AutoFill button should be shown
1005         or not. By default it is not shown, and the client must enable it.
1006
1007         * html/InputType.cpp:
1008         (WebCore::InputType::updateAutoFillButton):
1009         * html/InputType.h:
1010         (WebCore::InputType::autoFillButtonElement):
1011         Add new virtual methods for updating and accessing the AutoFill button.
1012
1013         * html/TextFieldInputType.cpp:
1014         (WebCore::TextFieldInputType::createShadowSubtree):
1015         (WebCore::TextFieldInputType::autoFillButtonElement):
1016         (WebCore::TextFieldInputType::destroyShadowSubtree):
1017         (WebCore::TextFieldInputType::updatePlaceholderText):
1018         (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
1019         (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
1020         (WebCore::TextFieldInputType::createContainer):
1021         (WebCore::TextFieldInputType::createAutoFillButton):
1022         (WebCore::TextFieldInputType::updateAutoFillButton):
1023         * html/TextFieldInputType.h:
1024         Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
1025         is slightly different than for the caps lock indicator, because I didn't want to force
1026         the creation of a container for all <input> elements just in case an AutoFill button was
1027         added. Instead, if an AutoFill button is added, the container is created on the fly and
1028         the existing DOM is updated to move into it. Once a container is created, it is never
1029         removed.
1030
1031         * html/shadow/AutoFillButtonElement.cpp: Added.
1032         (WebCore::AutoFillButtonElement::create):
1033         (WebCore::AutoFillButtonElement::AutoFillButtonElement):
1034         (WebCore::AutoFillButtonElement::defaultEventHandler):
1035         * html/shadow/AutoFillButtonElement.h: Added.
1036         Add div subclass that swallows the click event and forwards it to the ChromeClient.
1037
1038         * page/ChromeClient.h:
1039         Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
1040         button was clicked.
1041
1042         * testing/Internals.cpp:
1043         (WebCore::Internals::setAutofilled):
1044         (WebCore::Internals::setShowAutoFillButton):
1045         * testing/Internals.h:
1046         * testing/Internals.idl:
1047         Expose a new internals.setShowAutoFillButton() function to allow testing
1048         of the AutoFill button from layout tests.
1049
1050         * accessibility/AccessibilityObject.cpp:
1051         (WebCore::AccessibilityObject::isValueAutofilled):
1052         * css/SelectorCheckerTestFunctions.h:
1053         (WebCore::isAutofilled):
1054         * css/StyleResolver.cpp:
1055         (WebCore::StyleResolver::canShareStyleWithControl):
1056         Update for new spelling of AutoFill.
1057
1058 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
1059
1060         Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
1061         https://bugs.webkit.org/show_bug.cgi?id=142589
1062
1063         Reviewed by Andreas Kling.
1064
1065         Updated for renames to JSC extra cost APIs.
1066
1067         Added FIXMEs to our 10 use cases that are currently wrong, including
1068         canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
1069
1070         * Modules/mediasource/SourceBuffer.cpp:
1071         (WebCore::SourceBuffer::appendBufferInternal):
1072         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1073         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
1074         (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
1075         * Modules/mediasource/SourceBuffer.h:
1076         * bindings/js/JSDocumentCustom.cpp:
1077         (WebCore::toJS):
1078         * bindings/js/JSImageDataCustom.cpp:
1079         (WebCore::toJS):
1080         * bindings/js/JSNodeListCustom.cpp:
1081         (WebCore::createWrapper):
1082         * bindings/scripts/CodeGeneratorJS.pm:
1083         (GenerateImplementation):
1084         * dom/CollectionIndexCache.cpp:
1085         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
1086         (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
1087         * dom/CollectionIndexCache.h:
1088         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
1089         * html/HTMLCanvasElement.cpp:
1090         (WebCore::HTMLCanvasElement::createImageBuffer):
1091         * html/HTMLCollection.h:
1092         (WebCore::CollectionNamedElementCache::didPopulate):
1093         * html/HTMLImageLoader.cpp:
1094         (WebCore::HTMLImageLoader::imageChanged):
1095         * html/HTMLMediaElement.cpp:
1096         (WebCore::HTMLMediaElement::parseAttribute):
1097         * xml/XMLHttpRequest.cpp:
1098         (WebCore::XMLHttpRequest::dropProtection):
1099
1100 2015-03-11  Benjamin Poulain  <bpoulain@apple.com>
1101
1102         Add basic support for BOL and EOL assertions to the URL Filter parser
1103         https://bugs.webkit.org/show_bug.cgi?id=142568
1104
1105         Reviewed by Alex Christensen.
1106
1107         This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
1108
1109         Both assertions must be the first/last term of their pattern. Any advanced combination
1110         results in a parsing error.
1111
1112         The BOL assertion is easy to represent: currently, any pattern starts at the beginning
1113         of a line and the NFA are generated accordingly.
1114
1115         I had two options to represent the EOL assertion:
1116         1) Add a new special transition on EOL.
1117         2) Add a new vector of actions to the states, conditional to the EOL input.
1118
1119         I picked the first option to avoid growing every state by a vector
1120         that would be empty in the vast majority of cases.
1121
1122
1123         On the matching side, the interpreter was modified to support transitions on '\0'.
1124         DFABytecodeInstruction::CheckValue now stops when running on a character after
1125         the end of the string.
1126
1127         DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
1128         to avoid going past the end of the input. Second, stop on '\0' too... the reason
1129         is that the unconditional jump is only used for fallback edges of the DFA, fallback
1130         edge are not supposed to accept '\0'.
1131
1132         * contentextensions/DFA.cpp:
1133         (WebCore::ContentExtensions::printTransitions):
1134         * contentextensions/DFABytecodeInterpreter.cpp:
1135         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1136         * contentextensions/DFANode.h:
1137         * contentextensions/NFA.cpp:
1138         (WebCore::ContentExtensions::NFA::addTransition):
1139         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
1140         (WebCore::ContentExtensions::printTransitions):
1141         * contentextensions/NFANode.h:
1142         * contentextensions/NFAToDFA.cpp:
1143         (WebCore::ContentExtensions::populateTransitions):
1144         (WebCore::ContentExtensions::NFAToDFA::convert):
1145         * contentextensions/URLFilterParser.cpp:
1146         (WebCore::ContentExtensions::Term::Term):
1147         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
1148         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1149         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
1150         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1151
1152 2015-03-11  Jer Noble  <jer.noble@apple.com>
1153
1154         [Mac] Update fullscreen placeholder UI to use Vibrancy.
1155         https://bugs.webkit.org/show_bug.cgi?id=142586
1156
1157         Reviewed by Eric Carlson.
1158
1159         Update the fullscreen placeholder with a translucent vibrant appearance
1160         using NSVisualEffectView. Since NSVisuaEffectView is only available for
1161         OS X 10.10 and above, wrap the new implementation in a version check and
1162         retain the old implementation.
1163
1164         Drive-by: Update the strings for the placeholder view with new HI guidance
1165         as well.
1166
1167         * English.lproj/Localizable.strings:
1168         * platform/LocalizedStrings.cpp:
1169         (WebCore::clickToExitFullScreenText):
1170         * platform/mac/WebCoreFullScreenPlaceholderView.h:
1171         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
1172         (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
1173
1174 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1175
1176         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
1177         https://bugs.webkit.org/show_bug.cgi?id=142549
1178
1179         Reviewed by Simon Fraser.
1180
1181         * page/ViewportConfiguration.cpp:
1182         (WebCore::ViewportConfiguration::ViewportConfiguration):
1183         Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
1184         because it being true does not guarantee that we will ignore scaling constraints,
1185         but it being false does guarantee that we won't.
1186
1187         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
1188         Ignore scaling constraints if the page:
1189             a) claimed to want to lay out to device-width and then laid out too wide
1190             b) claimed to want to lay out to device-height and then laid out too tall
1191             c) claimed to want to lay out with initialScale=1 and then laid out too wide
1192
1193         (WebCore::ViewportConfiguration::initialScale):
1194         (WebCore::ViewportConfiguration::minimumScale):
1195         (WebCore::ViewportConfiguration::allowsUserScaling):
1196         Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
1197         have some more logic here (as above).
1198
1199         (WebCore::ViewportConfiguration::description):
1200         Dump whether we're ignoring scaling constraints.
1201
1202         (WebCore::ViewportConfiguration::dump):
1203         Use WTFLogAlways so that the output goes to various other logging mechanisms
1204         instead of just stderr.
1205
1206         * page/ViewportConfiguration.h:
1207         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
1208         (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
1209
1210 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
1211
1212         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
1213         https://bugs.webkit.org/show_bug.cgi?id=142569
1214
1215         Reviewed by David Hyatt.
1216
1217         Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
1218         that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
1219         return type from int to Optional<int>.
1220
1221         No new tests because there is no behavior change.
1222
1223         * rendering/RenderBlock.cpp:
1224         (WebCore::RenderBlock::baselinePosition):
1225         (WebCore::RenderBlock::firstLineBaseline):
1226         (WebCore::RenderBlock::inlineBlockBaseline):
1227         * rendering/RenderBlock.h:
1228         * rendering/RenderBlockFlow.cpp:
1229         (WebCore::RenderBlockFlow::firstLineBaseline):
1230         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1231         * rendering/RenderBlockFlow.h:
1232         * rendering/RenderBox.h:
1233         (WebCore::RenderBox::firstLineBaseline):
1234         (WebCore::RenderBox::inlineBlockBaseline):
1235         * rendering/RenderDeprecatedFlexibleBox.cpp:
1236         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1237         * rendering/RenderFlexibleBox.cpp:
1238         (WebCore::RenderFlexibleBox::baselinePosition):
1239         (WebCore::RenderFlexibleBox::firstLineBaseline):
1240         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
1241         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
1242         * rendering/RenderFlexibleBox.h:
1243         * rendering/RenderMenuList.h:
1244         * rendering/RenderTable.cpp:
1245         (WebCore::RenderTable::cellAbove):
1246         (WebCore::RenderTable::cellBelow):
1247         (WebCore::RenderTable::cellBefore):
1248         (WebCore::RenderTable::cellAfter):
1249         (WebCore::RenderTable::firstLineBlock):
1250         (WebCore::RenderTable::baselinePosition):
1251         (WebCore::RenderTable::inlineBlockBaseline):
1252         (WebCore::RenderTable::firstLineBaseline):
1253         * rendering/RenderTable.h:
1254         * rendering/RenderTableCell.cpp:
1255         (WebCore::RenderTableCell::cellBaselinePosition):
1256         * rendering/RenderTableSection.cpp:
1257         (WebCore::RenderTableSection::firstLineBaseline):
1258         * rendering/RenderTableSection.h:
1259         * rendering/RenderTextControl.h:
1260         * rendering/mathml/RenderMathMLBlock.cpp:
1261         (WebCore::RenderMathMLBlock::baselinePosition):
1262         (WebCore::RenderMathMLTable::firstLineBaseline):
1263         * rendering/mathml/RenderMathMLBlock.h:
1264         * rendering/mathml/RenderMathMLFraction.cpp:
1265         (WebCore::RenderMathMLFraction::firstLineBaseline):
1266         * rendering/mathml/RenderMathMLFraction.h:
1267         * rendering/mathml/RenderMathMLOperator.cpp:
1268         (WebCore::RenderMathMLOperator::firstLineBaseline):
1269         * rendering/mathml/RenderMathMLOperator.h:
1270         * rendering/mathml/RenderMathMLRoot.cpp:
1271         (WebCore::RenderMathMLRoot::firstLineBaseline):
1272         (WebCore::RenderMathMLRoot::layout):
1273         * rendering/mathml/RenderMathMLRoot.h:
1274         * rendering/mathml/RenderMathMLRow.cpp:
1275         (WebCore::RenderMathMLRow::layout):
1276         * rendering/mathml/RenderMathMLScripts.cpp:
1277         (WebCore::RenderMathMLScripts::layout):
1278         (WebCore::RenderMathMLScripts::firstLineBaseline):
1279         * rendering/mathml/RenderMathMLScripts.h:
1280         * rendering/mathml/RenderMathMLSpace.cpp:
1281         (WebCore::RenderMathMLSpace::firstLineBaseline):
1282         * rendering/mathml/RenderMathMLSpace.h:
1283         * rendering/mathml/RenderMathMLUnderOver.cpp:
1284         (WebCore::RenderMathMLUnderOver::firstLineBaseline):
1285         * rendering/mathml/RenderMathMLUnderOver.h:
1286
1287 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1288
1289         <attachment>s should be created when dropping files onto contentEditable areas
1290         https://bugs.webkit.org/show_bug.cgi?id=142494
1291         <rdar://problem/19982553>
1292
1293         Reviewed by Anders Carlsson.
1294
1295         Covered by existing tests.
1296
1297         * editing/mac/EditorMac.mm:
1298         (WebCore::Editor::WebContentReader::readFilenames):
1299         Instead of inserting the dropped URLs as strings, make an <attachment>
1300         for each.
1301
1302 2015-03-11  David Hyatt  <hyatt@apple.com>
1303
1304         Optimize offsetWidth and offsetHeight to avoid doing layouts.
1305         https://bugs.webkit.org/show_bug.cgi?id=142544
1306
1307         Reviewed by Beth Dakin.
1308
1309         * dom/Document.cpp:
1310         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1311         * dom/Document.h:
1312         Added a new method that only updates layout if it determines that the desired dimensions are out
1313         of date.
1314
1315         * dom/Element.cpp:
1316         (WebCore::Element::offsetWidth):
1317         (WebCore::Element::offsetHeight):
1318         Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
1319
1320 2015-03-11  Commit Queue  <commit-queue@webkit.org>
1321
1322         Unreviewed, rolling out r181367.
1323         https://bugs.webkit.org/show_bug.cgi?id=142581
1324
1325         Caused crashes on the debug bots (Requested by cdumez on
1326         #webkit).
1327
1328         Reverted changeset:
1329
1330         "Web Inspector: CSS parser errors in the console should
1331         include column numbers"
1332         https://bugs.webkit.org/show_bug.cgi?id=114313
1333         http://trac.webkit.org/changeset/181367
1334
1335 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
1336
1337         Inline block children do not have correct baselines if their children are also block elements
1338         https://bugs.webkit.org/show_bug.cgi?id=142559
1339
1340         Reviewed by Darin Adler.
1341
1342         Perform the same computation on child block elements as child inline elements.
1343
1344         Test: fast/text/baseline-inline-block-block-children.html
1345
1346         * rendering/RenderBlockFlow.cpp:
1347         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1348
1349 2015-03-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1350
1351         [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
1352         https://bugs.webkit.org/show_bug.cgi?id=142577
1353
1354         Reviewed by Carlos Garcia Campos.
1355
1356         No new tests, this is a build fix.
1357
1358         * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
1359         * PlatformGTK.cmake: Idem.
1360
1361 2015-03-10  Philippe Normand  <pnormand@igalia.com>
1362
1363         Rename MediaStreamCenter to RealtimeMediaSourceCenter
1364         https://bugs.webkit.org/show_bug.cgi?id=142535
1365
1366         Reviewed by Eric Carlson.
1367
1368         As per bug title, rename MediaStreamCenter to
1369         RealtimeMediaSourceCenter, this class manages
1370         RealtimeMediaSources, not MediaStreams. Some un-needed includes of
1371         the header were also removed.
1372
1373 2015-03-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1374
1375         Remove unnecessary create() factory functions
1376         https://bugs.webkit.org/show_bug.cgi?id=142558
1377
1378         Reviewed by Darin Adler.
1379
1380         create() function which just returns new instance can be replaced with std::make_unique<>.
1381
1382         No new tests, no behavior changes.
1383
1384         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1385         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
1386         * crypto/keys/CryptoKeyAES.cpp:
1387         (WebCore::CryptoKeyAES::exportData):
1388         * crypto/keys/CryptoKeyDataOctetSequence.h:
1389         * crypto/keys/CryptoKeyHMAC.cpp:
1390         (WebCore::CryptoKeyHMAC::exportData):
1391         * crypto/keys/CryptoKeySerializationRaw.cpp:
1392         (WebCore::CryptoKeySerializationRaw::keyData):
1393         * platform/audio/mac/CARingBuffer.cpp:
1394         (WebCore::CARingBuffer::create): Deleted.
1395         * platform/audio/mac/CARingBuffer.h:
1396         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1397         (WebCore::AudioSourceProviderAVFObjC::prepare):
1398         * testing/Internals.cpp:
1399         (WebCore::Internals::queueMicroTask):
1400         * testing/MicroTaskTest.cpp:
1401         (WebCore::MicroTaskTest::create): Deleted.
1402         * testing/MicroTaskTest.h:
1403         (WebCore::MicroTaskTest::MicroTaskTest):
1404
1405 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
1406
1407         Web Inspector: CSS parser errors in the console should include column numbers
1408         https://bugs.webkit.org/show_bug.cgi?id=114313
1409
1410         Reviewed by Benjamin Poulain.
1411
1412         Test: inspector-protocol/console/warnings-errors.html
1413
1414         * css/CSSParser.h:
1415         (WebCore::CSSParser::currentCharacterOffset):
1416         Get the current character offset depending on the source type.
1417         Add instance variables to track column position and start
1418         line / column for inline stylesheets.
1419
1420         * css/CSSParser.cpp:
1421         (WebCore::CSSParser::CSSParser):
1422         (WebCore::CSSParser::parseSheet):
1423         Initialize new instance variables.
1424
1425         (WebCore::CSSParser::currentLocation):
1426         Update to include column information. Also, if we are on the first line
1427         we may need to take into account a start column offset as well.
1428
1429         (WebCore::CSSParser::realLex):
1430         When bumping the line number, reset the column offset for the next
1431         line with the next character.
1432
1433         (WebCore::CSSParser::syntaxError):
1434         (WebCore::CSSParser::logError):
1435         Include column information.
1436
1437         * css/StyleSheetContents.cpp:
1438         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1439         (WebCore::StyleSheetContents::parseString):
1440         (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
1441         Include column information.
1442
1443         * css/StyleSheetContents.h:
1444         * dom/InlineStyleSheetOwner.cpp:
1445         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1446         (WebCore::InlineStyleSheetOwner::createSheet):
1447         Save and use column information later on.
1448
1449         * dom/InlineStyleSheetOwner.h:
1450         * inspector/InspectorStyleSheet.cpp:
1451         (WebCore::InspectorStyleSheet::ensureSourceData):
1452         Updated parser signature needs starting column and no longer has optional parameters.
1453
1454 2015-03-10  Darin Adler  <darin@apple.com>
1455
1456         Try to fix the GTK build.
1457
1458         * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
1459         by putting in a LANGUAGE_GOBJECT conditional.
1460
1461 2015-03-10  Darin Adler  <darin@apple.com>
1462
1463         Some event handler fixes
1464         https://bugs.webkit.org/show_bug.cgi?id=142474
1465
1466         Reviewed by Anders Carlsson.
1467
1468         * bindings/scripts/CodeGenerator.pm:
1469         (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
1470         handle combinations of & and | in conditional expressions; that's coming up when
1471         combining conditionals for includes in NavigatorContentUtils.idl.
1472
1473         * bindings/scripts/CodeGeneratorJS.pm:
1474         (AddToImplIncludes): Removed the rudimentary attempt to split and merge
1475         conditionals involving | here; instead we rely on the rules in the
1476         GenerateConditionalStringFromAttributeValue to handle this.
1477         (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
1478         (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
1479         JSValueToNative.
1480         (JSValueToNative): Changed to take "conditional" as an argument, since getting
1481         it from the signature won't work for a method parameter.
1482         (WriteData): Merge duplicates based on the result of the
1483         GenerateConditionalStringFromAttributeValue function rather than on the values
1484         passed into that function, since that function converts conditionals into a
1485         canonical form and can make two strings equal that don't start out that way.
1486
1487         * bindings/scripts/CodeGeneratorObjC.pm:
1488         (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
1489         for event handlers. We will rename EventListener to EventHandler in a
1490         subsequent patch.
1491
1492         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
1493         by the better logic for conditional includes.
1494
1495         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
1496         * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
1497
1498         * dom/Document.idl: Removed unneeded language #if around event handler
1499         attributes. Removed all the commented out event handler attributes.
1500         Sorted event handler attributes into a single section rather than separating
1501         "standard" from "extensions". Sorted the conditional event handler attributes
1502         into paragraphs at the bottom. We will probably make them all unconditional
1503         in a subsequent patch.
1504
1505         * dom/Element.idl: Removed unneeded language #if around event handler
1506         attributes. Removed all the commented out event handler attributes.
1507         Moved event handler attributes here from all derived element classes to
1508         match the approach from the HTML standard. Also resorted the attributes
1509         as in Document above.
1510
1511         * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
1512         attributes. Removed all the commented out event handler attributes.
1513         Sorted event handler attributes into a single section rather than separating
1514         "standard" from "overrides".
1515
1516         * html/HTMLElement.cpp:
1517         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
1518         Added a few missing attribute names, and re-sorted a bit. Moved any from
1519         element subclasses here.
1520
1521         * html/HTMLFormElement.cpp:
1522         (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
1523         oncomplete and oncompleteerror to Element and HTMLElement.
1524         * html/HTMLFormElement.idl: Ditto.
1525
1526         * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
1527
1528         * html/HTMLInputElement.cpp:
1529         (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
1530         onsearch to HTMLElement.
1531
1532         * html/HTMLMediaElement.cpp:
1533         (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
1534         all the event handler attributes to HTMLElement.
1535         (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
1536         if statement I noticed while auditing all calls to JSC::call.
1537         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
1538         I noticed this was missing because a flawed earlier version of my patch was
1539         causing the script to fail, leaving an exception behind that caused an
1540         assertion later. So I audited all calls to JSC::call looking for this mistake.
1541
1542         * html/HTMLMediaElement.idl: Moved all the event handlers from here to
1543         Element. Also changed everything possible to use Conditional instead of #if.
1544
1545         * html/HTMLPlugInImageElement.cpp:
1546         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
1547         clearException. Noticed it was missing while auditing all calls to JSC::call.
1548
1549         * html/HTMLVideoElement.cpp:
1550         (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
1551         HTMLElement.
1552
1553         * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
1554         Conditional instead of #if.
1555
1556         * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
1557         handlers section.
1558
1559         * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
1560         some older scheme to implement event handlers but no longer used at all.
1561
1562 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
1563
1564         CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
1565         https://bugs.webkit.org/show_bug.cgi?id=142411
1566
1567         Reviewed by Simon Fraser.
1568
1569         Tested by css3/scroll-snap/scroll-snap-position-values.html.
1570
1571         Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
1572         may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
1573         and 'left', 'right', and 'center' for the X axis.
1574
1575         Correct implementation to support calculated values for Scroll Snap Point markup. This required the
1576         Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
1577         to a regular CSSValue.
1578
1579         Add tests that these position labels, as well as combinations with percentages and pixel offsets
1580         are parsed properly.
1581
1582         * css/CSSComputedStyleDeclaration.cpp:
1583         (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
1584         when working with Length values. This is necessary to allow calculated results to be based on the proper default
1585         page dimensions.
1586         (WebCore::scrollSnapPoints): Ditto.
1587         (WebCore::scrollSnapCoordinates): Ditto.
1588         * css/CSSParser.cpp:
1589         (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
1590         positions.
1591         (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
1592         (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
1593         (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
1594         (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
1595         (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
1596         (WebCore::CSSParser::parseTransformOrigin): Ditto.
1597         (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
1598         * css/CSSParser.h:
1599         * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
1600         repeat values as calculations.
1601
1602 2015-03-10  Enrica Casucci  <enrica@apple.com>
1603
1604         Add support for more emoji with variation.
1605         https://bugs.webkit.org/show_bug.cgi?id=142548
1606         rdar://problem/20105008
1607
1608         Reviewed by Tim Horton.
1609
1610         Update ICU rules to support new emoji with variation.
1611
1612         Test: editing/selection/extend-by-character-007.html
1613
1614         * platform/text/TextBreakIterator.cpp:
1615         (WebCore::cursorMovementIterator):
1616
1617 2015-03-10  Alex Christensen  <achristensen@webkit.org>
1618
1619         Use unsigned for HashSet size.
1620         https://bugs.webkit.org/show_bug.cgi?id=142518
1621
1622         Reviewed by Benjamin Poulain.
1623
1624         * Modules/websockets/WebSocketDeflateFramer.cpp:
1625         (WebCore::WebSocketExtensionDeflateFrame::processResponse):
1626         * bindings/js/SerializedScriptValue.cpp:
1627         (WebCore::CloneSerializer::checkForDuplicate):
1628         (WebCore::CloneSerializer::writeConstantPoolIndex):
1629         * dom/ScriptRunner.cpp:
1630         (WebCore::ScriptRunner::~ScriptRunner):
1631         * loader/ResourceLoadScheduler.h:
1632         * platform/graphics/Font.cpp:
1633         (WebCore::Font::systemFallbackFontForCharacter):
1634         * platform/graphics/FontCache.cpp:
1635         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
1636         (WebCore::FontCache::purgeInactiveFontData):
1637         * platform/graphics/FontCache.h:
1638         * platform/graphics/freetype/FontCacheFreeType.cpp:
1639         (WebCore::FontCache::systemFallbackForCharacters):
1640         * platform/graphics/ios/FontCacheIOS.mm:
1641         (WebCore::FontCache::getSystemFontFallbackForCharacters):
1642         (WebCore::FontCache::systemFallbackForCharacters):
1643         (WebCore::FontCache::similarFont):
1644         * platform/graphics/mac/FontCacheMac.mm:
1645         (WebCore::shouldAutoActivateFontIfNeeded):
1646         (WebCore::FontCache::systemFallbackForCharacters):
1647         (WebCore::FontCache::similarFont):
1648         * platform/graphics/win/FontCacheWin.cpp:
1649         (WebCore::FontCache::systemFallbackForCharacters):
1650         * rendering/RenderDeprecatedFlexibleBox.cpp:
1651         (WebCore::FlexBoxIterator::next):
1652         * rendering/RenderTableSection.cpp:
1653         (WebCore::RenderTableSection::computeOverflowFromCells):
1654
1655 2015-03-10  Eric Carlson  <eric.carlson@apple.com>
1656
1657         [Mac] Refactor media controls code
1658         https://bugs.webkit.org/show_bug.cgi?id=142455
1659
1660         Reviewed by Dean Jackson.
1661
1662         No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
1663
1664         * Modules/mediacontrols/mediaControlsApple.js:
1665         (Controller):
1666         (Controller.prototype.addVideoListeners):
1667         (Controller.prototype.removeVideoListeners):
1668         (Controller.prototype.createControls):
1669         (Controller.prototype.setControlsType):
1670         (Controller.prototype.configureInlineControls):
1671         (Controller.prototype.updateStatusDisplay):
1672         (Controller.prototype.handlePanelMouseDown):
1673         (Controller.prototype.showControls):
1674         (Controller.prototype.hideControls):
1675         (Controller.prototype.handleOptimizedFullscreenButtonClicked):
1676         (Controller.prototype.currentPlaybackTargetIsWireless):
1677         (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
1678         (Controller.prototype.updateWirelessPlaybackStatus):
1679         (Controller.prototype.updateWirelessTargetAvailable):
1680         (Controller.prototype.handleWirelessPickerButtonClicked):
1681         (Controller.prototype.handleWirelessPlaybackChange):
1682         (Controller.prototype.handleWirelessTargetAvailableChange):
1683         (Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
1684         * Modules/mediacontrols/mediaControlsiOS.js:
1685         (ControllerIOS):
1686         (ControllerIOS.prototype.addVideoListeners):
1687         (ControllerIOS.prototype.removeVideoListeners):
1688         (ControllerIOS.prototype.createControls):
1689         (ControllerIOS.prototype.setControlsType):
1690         (ControllerIOS.prototype.configureInlineControls):
1691         (ControllerIOS.prototype.showControls):
1692         (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
1693         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
1694         (ControllerIOS.prototype.updateStatusDisplay):
1695         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
1696         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
1697         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
1698         (ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
1699         (ControllerIOS.prototype.hideControls): Deleted.
1700         (ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
1701         (ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.
1702
1703 2015-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
1704
1705         Remove PassRefPtr from svg/properties classes.
1706         https://bugs.webkit.org/show_bug.cgi?id=142063.
1707
1708         Reviewed by Darin Adler.
1709         
1710         Remove PassRefPtr from svg/properties classes. All the return types and
1711         the local variables should be RefPtr. If we are sure the pointer can't
1712         be null, we use Ref instead.
1713
1714         * svg/SVGMarkerElement.cpp:
1715         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
1716         (WebCore::SVGMarkerElement::orientTypeAnimated):
1717         * svg/SVGMarkerElement.h:
1718         * svg/SVGPathElement.cpp:
1719         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1720         (WebCore::SVGPathElement::pathSegList):
1721         (WebCore::SVGPathElement::animatedPathSegList):
1722         * svg/SVGPathElement.h:
1723         * svg/SVGPolyElement.cpp:
1724         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1725         (WebCore::SVGPolyElement::points):
1726         (WebCore::SVGPolyElement::animatedPoints):
1727         * svg/SVGPolyElement.h:
1728         * svg/SVGTextContentElement.cpp:
1729         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1730         (WebCore::SVGTextContentElement::textLengthAnimated):
1731         * svg/SVGTextContentElement.h:
1732         * svg/SVGViewSpec.cpp:
1733         (WebCore::SVGViewSpec::transform):
1734         (WebCore::SVGViewSpec::viewBoxAnimated):
1735         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
1736         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
1737         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
1738         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
1739         * svg/SVGViewSpec.h:
1740         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1741         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
1742         * svg/properties/SVGAnimatedListPropertyTearOff.h:
1743         (WebCore::SVGAnimatedListPropertyTearOff::create):
1744         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1745         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
1746         * svg/properties/SVGAnimatedProperty.h:
1747         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
1748         * svg/properties/SVGAnimatedPropertyMacros.h:
1749         * svg/properties/SVGAnimatedPropertyTearOff.h:
1750         (WebCore::SVGAnimatedPropertyTearOff::create):
1751         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
1752         (WebCore::SVGAnimatedStaticPropertyTearOff::create):
1753         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
1754         (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
1755         * svg/properties/SVGListProperty.h:
1756         (WebCore::SVGListProperty::initializeValuesAndWrappers):
1757         (WebCore::SVGListProperty::getItemValuesAndWrappers):
1758         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
1759         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
1760         (WebCore::SVGListProperty::removeItemValuesAndWrappers):
1761         (WebCore::SVGListProperty::appendItemValuesAndWrappers):
1762         * svg/properties/SVGListPropertyTearOff.h:
1763         (WebCore::SVGListPropertyTearOff::create):
1764         (WebCore::SVGListPropertyTearOff::initialize):
1765         (WebCore::SVGListPropertyTearOff::getItem):
1766         (WebCore::SVGListPropertyTearOff::insertItemBefore):
1767         (WebCore::SVGListPropertyTearOff::replaceItem):
1768         (WebCore::SVGListPropertyTearOff::removeItem):
1769         (WebCore::SVGListPropertyTearOff::appendItem):
1770         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1771         (WebCore::SVGPathSegListPropertyTearOff::getItem):
1772         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
1773         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
1774         * svg/properties/SVGPathSegListPropertyTearOff.h:
1775         (WebCore::SVGPathSegListPropertyTearOff::create):
1776         (WebCore::SVGPathSegListPropertyTearOff::initialize):
1777         (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
1778         (WebCore::SVGPathSegListPropertyTearOff::appendItem):
1779         * svg/properties/SVGPropertyInfo.h:
1780         * svg/properties/SVGStaticListPropertyTearOff.h:
1781         (WebCore::SVGStaticListPropertyTearOff::create):
1782         * svg/properties/SVGStaticPropertyTearOff.h:
1783         (WebCore::SVGStaticPropertyTearOff::create):
1784         * svg/properties/SVGTransformListPropertyTearOff.h:
1785         (WebCore::SVGTransformListPropertyTearOff::create):
1786         (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
1787         (WebCore::SVGTransformListPropertyTearOff::consolidate):
1788
1789 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
1790
1791         Fix the build
1792
1793         * platform/network/cf/ResourceHandleCFNet.cpp:
1794         (WebCore::ResourceHandle::createCFURLConnection):
1795
1796 2015-03-10  Benjamin Poulain  <bpoulain@apple.com>
1797
1798         Extend URL filter's Term definition to support groups/subpatterns
1799         https://bugs.webkit.org/show_bug.cgi?id=142519
1800
1801         Reviewed by Alex Christensen.
1802
1803         Pretty simple extension: Term is extended to support holding
1804         a Vector of Term. The quantifier of the Term applies to its
1805         Vector of term as a whole.
1806
1807         To avoid exposing too much internal in the API of Term, I moved
1808         graph generation from GraphBuilder to Term.
1809
1810         Sinking a CharacterSet works as usual. Sinking a Group is done
1811         by sinking each of its Terms one by one and then apply the quantifier
1812         on the whole subgraph. This is done by recursively calling into
1813         Term::generateGraph().
1814
1815         Since groups could be nested, the groups make a stack with the latest
1816         open group on top.
1817         When sinking a floating Term, it is sunk to the latest open group. If there is no open
1818         group, we use the prefix tree and sink the whole subpattern to the graph.
1819
1820         * contentextensions/URLFilterParser.cpp:
1821         (WebCore::ContentExtensions::Term::Term):
1822         (WebCore::ContentExtensions::Term::extendGroupSubpattern):
1823         (WebCore::ContentExtensions::Term::generateGraph):
1824         (WebCore::ContentExtensions::Term::operator==):
1825         (WebCore::ContentExtensions::Term::hash):
1826         (WebCore::ContentExtensions::Term::isUniversalTransition):
1827         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1828         (WebCore::ContentExtensions::Term::destroy):
1829         (WebCore::ContentExtensions::Term::Group::operator==):
1830         (WebCore::ContentExtensions::Term::Group::hash):
1831         (WebCore::ContentExtensions::GraphBuilder::finalize):
1832         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
1833         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
1834         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1835         (WebCore::ContentExtensions::Term::quantifier): Deleted.
1836         (WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
1837         (WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
1838         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.
1839
1840 2015-03-10  Roger Fong  <roger_fong@apple.com>
1841
1842         Adjustments to media control fonts.
1843         https://bugs.webkit.org/show_bug.cgi?id=142509.
1844         <rdar://problem/20085228>
1845
1846         Reviewed by Darin Adler.
1847
1848         Use system font for controls. Adjust surrounding divs accordingly.
1849         Apply subpixel antialiasing to all media control text.
1850         * Modules/mediacontrols/mediaControlsApple.css:
1851         (::-webkit-media-controls):
1852         (audio::-webkit-media-controls-closed-captions-container .list):
1853         (audio::-webkit-media-controls-status-display):
1854         (audio::-webkit-media-controls-time-remaining-display):
1855         (audio::-webkit-media-controls-current-time-display):
1856         (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
1857         (audio::-webkit-media-controls-current-time-display.five-digit-time):
1858         (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
1859         (audio::-webkit-media-controls-current-time-display.six-digit-time):
1860
1861 2015-03-10  Dan Bernstein  <mitz@apple.com>
1862
1863         Fixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading a non-HTTPS webapge.
1864
1865         Reviewed by Anders Carlsson.
1866
1867         * platform/network/mac/CertificateInfoMac.mm:
1868         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Null-check the certificate chain.
1869
1870 2015-03-10  Dan Bernstein  <mitz@apple.com>
1871
1872         Fixed the build.
1873
1874         * platform/spi/cocoa/SecuritySPI.h:
1875
1876 2015-03-10  Zalan Bujtas  <zalan@apple.com>
1877
1878         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
1879         https://bugs.webkit.org/show_bug.cgi?id=142344
1880
1881         Reviewed by Antti Koivisto.
1882
1883         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
1884         the segment looping and position handling logic are no longer duplicated. It also unifies
1885         the static next*() functions' signature.
1886
1887         No change in functionality.
1888
1889         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1890         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
1891         (WebCore::SimpleLineLayout::nextBreakablePosition):
1892         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
1893         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1894         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
1895         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
1896         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
1897         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1898
1899 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1900
1901         [GTK] GL_MAX_VARYING_FLOATS is not defined in OpenGL ES 2
1902         https://bugs.webkit.org/show_bug.cgi?id=142529
1903
1904         Reviewed by Žan Doberšek.
1905
1906         Do not use GL_MAX_VARYING_FLOATS when platform is GTK+ and using
1907         OpenGL ES 2.
1908
1909         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1910         (WebCore::GraphicsContext3D::checkVaryingsPacking):
1911
1912 2015-03-10  José Dapena Paz  <jdapena@igalia.com>
1913
1914         Unreviewed. Fix GTK+ build with OpenGL ES 2 enabled.
1915
1916         Remove USE(OPENGL) ifdef from GLContext.cpp, since there's nothing
1917         specific to OpenGL in that file, and everything depending on
1918         configure options is already protected by USE(GLX) and USE(EGL)
1919         ifdefs. This is causing linking issues when building with OpenGL
1920         ES 2, because the header doesn't have the ifdef, and the cpp file
1921         is not compiled leaving all the interface undefined.
1922
1923         Rubber-stamped by Carlos Garcia Campos.
1924
1925         * platform/graphics/GLContext.cpp:
1926
1927 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com> and José Dapena Paz  <jdapena@igalia.com>
1928
1929         [GTK] Add a configure option to build with OpenGL ES 2
1930         https://bugs.webkit.org/show_bug.cgi?id=142498
1931
1932         Reviewed by Martin Robinson.
1933
1934         Build GLES or GL specific files depending on the build options.
1935
1936         * PlatformGTK.cmake:
1937
1938 2015-03-10  Zan Dobersek  <zdobersek@igalia.com>
1939
1940         Shrink the CSSPropertyID enum type
1941         https://bugs.webkit.org/show_bug.cgi?id=142456
1942
1943         Reviewed by Sam Weinig.
1944
1945         Specify uint16_t as the base type for the CSSPropertyID enum.
1946         This is enough to cover all of the CSS properties (429 at this moment,
1947         with static_assert covering future changes). It halves the enum type size,
1948         from 4 bytes to 2, reducing the size of various CSSPropertyID containers.
1949
1950         No new tests -- no change in behavior.
1951
1952         * css/CSSPrimitiveValue.cpp:
1953         (WebCore::propertyName): Remove the unnecessary propertyID < 0 check.
1954         * css/makeprop.pl:
1955
1956 2015-03-10  Dan Bernstein  <mitz@apple.com>
1957
1958         WebCore part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
1959         https://bugs.webkit.org/show_bug.cgi?id=142461
1960
1961         Reviewed by Sam Weinig.
1962
1963         * WebCore.xcodeproj/project.pbxproj: Added reference to SecuritySPI.h and sorted the
1964         spi/cocoa group.
1965
1966         * platform/network/cf/CertificateInfo.h: Declared new member function
1967         containsNonRootSHA1SignedCertificate.
1968
1969         * platform/network/mac/CertificateInfoMac.mm:
1970         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added. Checks if any but
1971         the last certificate in the chain uses SHA-1 as its signature hash algorithm.
1972
1973         * platform/network/curl/CertificateInfo.h:
1974         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added notImplemented
1975         implementation.
1976
1977         * platform/network/soup/CertificateInfo.h:
1978         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Ditto.
1979
1980         * platform/spi/cocoa/SecuritySPI.h: Added.
1981
1982 2015-03-09  Chris Dumez  <cdumez@apple.com>
1983
1984         [iOS] Sweep all collected objects on critical memory pressure
1985         https://bugs.webkit.org/show_bug.cgi?id=142457
1986         <rdar://problem/20044440>
1987
1988         Reviewed by Geoffrey Garen.
1989
1990         Do a full sweep of objects marked for destruction on critical memory
1991         pressure to free up memory.
1992
1993         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1994         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1995
1996 2015-03-09  Andy Estes  <aestes@apple.com>
1997
1998         [Content Filtering] Give ContentFilter subclasses private constructors, and make them fast-allocated and non-copyable
1999         https://bugs.webkit.org/show_bug.cgi?id=142515
2000
2001         Reviewed by Andreas Kling.
2002
2003         * platform/cocoa/NetworkExtensionContentFilter.h:
2004         * platform/cocoa/ParentalControlsContentFilter.h:
2005         * testing/MockContentFilter.h:
2006
2007 2015-03-09  Chris Dumez  <cdumez@apple.com>
2008
2009         [CG] Have Canvas use the IOSurfacePool
2010         https://bugs.webkit.org/show_bug.cgi?id=142417
2011         <rdar://problem/20044440>
2012
2013         Reviewed by Darin Adler.
2014
2015         Have ImageBufferDataCG use the IOSurfacePool so that Canvas can
2016         benefit from it. I see a ~75% progression on Canvas/reuse.html
2017         performance test on my Macbook Pro with 1000 different canvas
2018         sizes and ~110% progression with 100 different canvas sizes.
2019
2020         I also see a ~65% cache hit rate on the mobile version of
2021         cnn.com.
2022
2023         Note that ImageData calls CGContextClearRect() after calling
2024         IOSurface::create() so recycling IOSurfaces in this case should
2025         be safe.
2026
2027         Performance test: Canvas/reuse.html
2028
2029         * platform/graphics/ImageBuffer.h:
2030         (WebCore::ImageBuffer::baseTransform):
2031         * platform/graphics/cg/ImageBufferCG.cpp:
2032         (WebCore::ImageBuffer::ImageBuffer):
2033         (WebCore::ImageBuffer::context):
2034         (WebCore::ImageBuffer::copyImage):
2035         (WebCore::ImageBuffer::copyNativeImage):
2036         (WebCore::ImageBuffer::draw):
2037         (WebCore::ImageBuffer::clip):
2038         (WebCore::ImageBuffer::putByteArray):
2039         (WebCore::ImageBuffer::toDataURL):
2040         * platform/graphics/cg/ImageBufferDataCG.cpp:
2041         (WebCore::ImageBufferData::~ImageBufferData):
2042         (WebCore::ImageBufferData::getData):
2043         (WebCore::ImageBufferData::putData):
2044         (WebCore::ImageBufferData::ImageBufferData): Deleted.
2045         * platform/graphics/cg/ImageBufferDataCG.h:
2046         * platform/graphics/cocoa/IOSurface.h:
2047         * platform/graphics/cocoa/IOSurface.mm:
2048         (IOSurface::surfaceFromPool):
2049         (IOSurface::create):
2050         (IOSurface::createFromSendRight):
2051         (IOSurface::createFromImage):
2052         (IOSurface::setContextSize):
2053
2054 2015-03-09  Brent Fulgham  <bfulgham@apple.com>
2055
2056         Assertion in ScrollController::processWheelEventForScrollSnapOnAxis when scrolling with mechanical wheel mouse
2057         https://bugs.webkit.org/show_bug.cgi?id=142517
2058
2059         Reviewed by Simon Fraser.
2060
2061         * platform/cocoa/ScrollController.mm:
2062         (WebCore::toWheelEventStatus): Recognize stateless mechanical wheel events.
2063         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): If a mechanical wheel event is processed while
2064         considering scroll snap logic, end any snap animations and clean up.
2065         (WebCore::ScrollController::updateScrollSnapPoints): Don't begin tracking scroll snap state if there is not
2066         scroll snap point defined in the markup.
2067
2068 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
2069
2070         REGRESSION(r176978): Inline-blocks with overflowing contents have ascents that are too large
2071         https://bugs.webkit.org/show_bug.cgi?id=141783
2072
2073         Reviewed by David Hyatt.
2074
2075         When we have an inline-block element, and we want to find its baseline (to lay out other
2076         elements on the same line) we loop through the element's children and ask them what their
2077         baselines are. The children use the location of the top of their last line to compute this
2078         value. However, if the child has overflow-y, this might not be the correct calculation.
2079
2080         This behavior is in the spec: "The baseline of an 'inline-block' is the baseline of its last
2081         line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow'
2082         property has a computed value other than 'visible', in which case the baseline is the bottom
2083         margin edge."
2084             -- http://www.w3.org/TR/CSS21/visudet.html#leading
2085
2086         However, we believe that a better policy is, when overflow is not "visible," to place the
2087         baseline at the bottom of the block if the contents overflowed in the Y direction, and to place
2088         it at the bottom of the last line if the contents did not overflow in the Y direction. This is
2089         partially consistent with previous behavior, and isn't too far from the spec to cause too many
2090         breakages.
2091
2092         Test: fast/css/inline-block-tricky-baselines.html
2093               fast/text/baseline-inline-block.html
2094
2095         * rendering/RenderBlockFlow.cpp:
2096         (WebCore::RenderBlockFlow::inlineBlockBaseline):
2097
2098 2015-03-09  Andy Estes  <aestes@apple.com>
2099
2100         [Content Filtering] Add tests
2101         https://bugs.webkit.org/show_bug.cgi?id=142475
2102
2103         Reviewed by Andreas Kling.
2104
2105         Added a mock content filter that can be configured by window.internals. A test can control whether the filter
2106         is enabled, what to display when a page is blocked, at what point the allow/block decision is made, and what
2107         decision to make.
2108
2109         Added tests to cover allowing and blocking content at each decision point.
2110
2111         Tests: contentfiltering/allow-after-add-data.html
2112                contentfiltering/allow-after-finished-adding-data.html
2113                contentfiltering/allow-after-response.html
2114                contentfiltering/block-after-add-data.html
2115                contentfiltering/block-after-finished-adding-data.html
2116                contentfiltering/block-after-response.html
2117
2118         * DerivedSources.make: Added MockContentFilterSettings.idl.
2119         * WebCore.xcodeproj/project.pbxproj:
2120         * bindings/js/JSMockContentFilterSettingsCustom.cpp: Added.
2121         (WebCore::JSMockContentFilterSettings::decisionPoint): Returned the decision point's JSValue.
2122         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Set the decision point; threw an exception for invalid values.
2123         (WebCore::JSMockContentFilterSettings::decision): Returned the decision's JSValue.
2124         (WebCore::JSMockContentFilterSettings::setDecision): Set the decision; threw an exception for invalid values.
2125         * platform/ContentFilter.cpp:
2126         (WebCore::ContentFilter::types): Renamed from contentFilterTypes.
2127         (WebCore::ContentFilter::createIfNeeded):
2128         (WebCore::contentFilterType): Deleted.
2129         (WebCore::contentFilterTypes): Deleted.
2130         * platform/ContentFilter.h:
2131         (WebCore::ContentFilter::addType): Used to register a new content filter type.
2132         (WebCore::ContentFilter::type): Renamed from contentFilterType.
2133         * platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NE_FILTER_SOURCE to here.
2134         * testing/Internals.cpp:
2135         (WebCore::Internals::resetToConsistentState): Called MockContentFilterSettings::reset().
2136         (WebCore::Internals::Internals): Called MockContentFilter::ensureInstalled().
2137         (WebCore::Internals::mockContentFilterSettings): Returned a reference to MockContentFilterSettings::singleton().
2138         * testing/Internals.h:
2139         * testing/Internals.idl: Added attribute mockContentFilterSettings.
2140         * testing/MockContentFilter.cpp: Added.
2141         (WebCore::MockContentFilter::ensureInstalled): Called MockContentFilter::addType().
2142         (WebCore::MockContentFilter::canHandleResponse): Returned whether MockContentFilterSettings is enabled.
2143         (WebCore::MockContentFilter::create): Returned a new MockContentFilter.
2144         (WebCore::MockContentFilter::MockContentFilter): Called maybeDetermineStatus().
2145         (WebCore::MockContentFilter::addData): Copied data into m_replacementData and called maybeDetermineStatus().
2146         (WebCore::MockContentFilter::finishedAddingData): Called maybeDetermineStatus().
2147         (WebCore::MockContentFilter::needsMoreData): Returned whether m_status equals NeedsMoreData.
2148         (WebCore::MockContentFilter::didBlockData): Returned whether m_status equals Blocked.
2149         (WebCore::MockContentFilter::getReplacementData): Returned a pointer to the start of m_replacementData.
2150         (WebCore::MockContentFilter::unblockHandler): Returned an empty ContentFilterUnblockHandler.
2151         (WebCore::MockContentFilter::maybeDetermineStatus): If m_status is NeedsMoreData and the current decision point
2152         equals MockContentFilterSettings's decision point, set m_status according to MockContentFilterSettings's
2153         decision. If m_status becomes Blocked, clear the original page data from m_replacementData and copy
2154         MockContentFilterSettings's blocked string instead.
2155         * testing/MockContentFilter.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
2156         * testing/MockContentFilterSettings.cpp: Copied from Source/WebCore/platform/ContentFilter.h.
2157         (WebCore::MockContentFilterSettings::singleton):
2158         (WebCore::MockContentFilterSettings::reset): Reset settings to their initial values.
2159         (WebCore::MockContentFilterSettings::MockContentFilterSettings):
2160         * testing/MockContentFilterSettings.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
2161         (WebCore::MockContentFilterSettings::ref): Added an empty implementation to make the bindings think this is RefCounted.
2162         (WebCore::MockContentFilterSettings::deref): Ditto.
2163         (WebCore::MockContentFilterSettings::enabled):
2164         (WebCore::MockContentFilterSettings::setEnabled):
2165         (WebCore::MockContentFilterSettings::blockedString):
2166         (WebCore::MockContentFilterSettings::setBlockedString):
2167         (WebCore::MockContentFilterSettings::decisionPoint):
2168         (WebCore::MockContentFilterSettings::setDecisionPoint):
2169         (WebCore::MockContentFilterSettings::decision):
2170         (WebCore::MockContentFilterSettings::setDecision):
2171         * testing/MockContentFilterSettings.idl: Copied from Source/WebCore/platform/ContentFilter.h.
2172
2173 2015-03-09  Zalan Bujtas  <zalan@apple.com>
2174
2175         Simple line layout should not be limited to RenderText.
2176         https://bugs.webkit.org/show_bug.cgi?id=142504
2177
2178         Reviewed by Antti Koivisto.
2179
2180         This is in transition to support br element.
2181
2182         No change in functionality.
2183
2184         * rendering/RenderText.cpp:
2185         (WebCore::RenderText::absoluteRects):
2186         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
2187         (WebCore::RenderText::absoluteQuads):
2188         (WebCore::RenderText::firstRunLocation):
2189         (WebCore::RenderText::linesBoundingBox):
2190         (WebCore::RenderText::caretMinOffset):
2191         (WebCore::RenderText::caretMaxOffset):
2192         (WebCore::RenderText::containsCaretOffset):
2193         * rendering/SimpleLineLayoutFlowContents.cpp:
2194         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer):
2195         * rendering/SimpleLineLayoutFlowContents.h:
2196         * rendering/SimpleLineLayoutFunctions.cpp:
2197         (WebCore::SimpleLineLayout::computeBoundingBox):
2198         (WebCore::SimpleLineLayout::computeFirstRunLocation):
2199         (WebCore::SimpleLineLayout::collectAbsoluteRects):
2200         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
2201         (WebCore::SimpleLineLayout::computeTextBoundingBox): Deleted.
2202         (WebCore::SimpleLineLayout::computeTextFirstRunLocation): Deleted.
2203         (WebCore::SimpleLineLayout::collectTextAbsoluteRects): Deleted.
2204         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads): Deleted.
2205         * rendering/SimpleLineLayoutFunctions.h:
2206         (WebCore::SimpleLineLayout::findCaretMinimumOffset):
2207         (WebCore::SimpleLineLayout::findCaretMaximumOffset):
2208         (WebCore::SimpleLineLayout::containsCaretOffset):
2209         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset): Deleted.
2210         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset): Deleted.
2211         (WebCore::SimpleLineLayout::containsTextCaretOffset): Deleted.
2212         * rendering/SimpleLineLayoutResolver.cpp:
2213         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2214         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
2215         * rendering/SimpleLineLayoutResolver.h:
2216         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2217         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2218
2219 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
2220
2221         svg/custom/svg-fonts-without-missing-glyph.xhtml fails after fonts/font-fallback-prefers-pictographs.html
2222         https://bugs.webkit.org/show_bug.cgi?id=142470
2223
2224         Reviewed by Anders Carlsson.
2225
2226         After each test, reset all internal settings.
2227
2228         Covered by svg/custom/svg-fonts-without-missing-glyph.xhtml
2229
2230         * testing/InternalSettings.cpp:
2231         (WebCore::InternalSettings::Backup::Backup):
2232         (WebCore::InternalSettings::Backup::restoreTo):
2233         * testing/InternalSettings.h:
2234
2235 2015-03-09  Commit Queue  <commit-queue@webkit.org>
2236
2237         Unreviewed, rolling out r181268.
2238         https://bugs.webkit.org/show_bug.cgi?id=142508
2239
2240         Broke tests (Requested by ap on #webkit).
2241
2242         Reverted changeset:
2243
2244         "Simple line layout: Merge
2245         TextFragmentIterator::findNextBreakablePosition() and
2246         TextFragmentIterator::findNextNonWhitespacePosition()."
2247         https://bugs.webkit.org/show_bug.cgi?id=142344
2248         http://trac.webkit.org/changeset/181268
2249
2250 2015-03-09  Benjamin Poulain  <benjamin@webkit.org>
2251
2252         CSS JIT: add aliases between :nth-child()/:nth-last-child() and :first-child/:last-child
2253         https://bugs.webkit.org/show_bug.cgi?id=142472
2254
2255         Reviewed by Andreas Kling.
2256
2257         The pseudo class :first-child has weaker tree marking than :nth-child(1).
2258         This patch aliases :nth-child(1) to :first-child in the CSS JIT to take
2259         advantage of that.
2260
2261         The strength of :last-child and :nth-last-child(1) are pretty much identical
2262         but :last-child is a bit simpler so I changed it too. It is also easier
2263         to handle both the same.
2264
2265         Tests: fast/selectors/nth-child-matching-first-on-root.html
2266                fast/selectors/nth-child-matching-first.html
2267                fast/selectors/nth-last-child-matching-first-on-root.html
2268                fast/selectors/nth-last-child-matching-first.html
2269
2270         * cssjit/SelectorCompiler.cpp:
2271         (WebCore::SelectorCompiler::addNthChildType):
2272         (WebCore::SelectorCompiler::addPseudoClassType):
2273
2274 2015-03-09  Benjamin Poulain  <bpoulain@apple.com>
2275
2276         Merge TrivialAtom and CharacterSet into a Term abstraction, prepare Term for composition
2277         https://bugs.webkit.org/show_bug.cgi?id=142429
2278
2279         Reviewed by Darin Adler.
2280
2281         This patch merges CharacterSet and Trivial atom into a new class: Term. A Term is
2282         a combination of an Atom and one Quantifier.
2283
2284         With term being the basic block, we can use the PrefixTree for any construct,
2285         greatly reducing the size of the NFA graph.
2286
2287         Term is built on top of an union holding the Atom storage. This is done in preparation
2288         for more complicated Atoms like a disjunction.
2289
2290         Everything else is pretty much the same. BuildMode is gone since we use the prefix
2291         tree for everything. FloatingAtomType is gone, a TrivialAtom is now represented
2292         by a single character CharacterSet (or two for case insensitive).
2293
2294         * contentextensions/ContentExtensionParser.cpp:
2295         (WebCore::ContentExtensions::parseRuleList):
2296         * contentextensions/NFA.cpp:
2297         (WebCore::ContentExtensions::NFA::addRuleId):
2298         * contentextensions/URLFilterParser.cpp:
2299         (WebCore::ContentExtensions::Term::Term):
2300         (WebCore::ContentExtensions::Term::~Term):
2301         (WebCore::ContentExtensions::Term::isValid):
2302         (WebCore::ContentExtensions::Term::addCharacter):
2303         (WebCore::ContentExtensions::Term::quantify):
2304         (WebCore::ContentExtensions::Term::quantifier):
2305         (WebCore::ContentExtensions::Term::isUniversalTransition):
2306         (WebCore::ContentExtensions::Term::visitSimpleTransitions):
2307         (WebCore::ContentExtensions::Term::operator=):
2308         (WebCore::ContentExtensions::Term::operator==):
2309         (WebCore::ContentExtensions::Term::hash):
2310         (WebCore::ContentExtensions::Term::isEmptyValue):
2311         (WebCore::ContentExtensions::Term::isDeletedValue):
2312         (WebCore::ContentExtensions::Term::destroy):
2313         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
2314         (WebCore::ContentExtensions::Term::CharacterSet::hash):
2315         (WebCore::ContentExtensions::TermHash::hash):
2316         (WebCore::ContentExtensions::TermHash::equal):
2317         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2318         (WebCore::ContentExtensions::GraphBuilder::finalize):
2319         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2320         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2321         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2322         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
2323         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2324         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2325         (WebCore::ContentExtensions::GraphBuilder::addTransitions):
2326         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm):
2327         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2328         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
2329         (WebCore::ContentExtensions::URLFilterParser::~URLFilterParser):
2330         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2331         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter): Deleted.
2332         (WebCore::ContentExtensions::quantifyTrivialAtom): Deleted.
2333         (WebCore::ContentExtensions::trivialAtomQuantifier): Deleted.
2334         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin): Deleted.
2335         (WebCore::ContentExtensions::GraphBuilder::sinkAtom): Deleted.
2336         (WebCore::ContentExtensions::GraphBuilder::generateTransition): Deleted.
2337         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom): Deleted.
2338         (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet): Deleted.
2339         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary): Deleted.
2340         * contentextensions/URLFilterParser.h:
2341
2342 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
2343
2344         Fix the !ENABLE(WEBGL) build after r180609
2345         https://bugs.webkit.org/show_bug.cgi?id=142057
2346
2347         Reviewed by Darin Adler.
2348
2349         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2350         (WebCore::GraphicsContext3D::forceContextLost):
2351
2352 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
2353
2354         Work around a Cocoa font parsing bug
2355         https://bugs.webkit.org/show_bug.cgi?id=142446
2356         <rdar://problem/20086223>
2357
2358         Reviewed by Simon Fraser.
2359
2360         Work around a bug in Cocoa regarding font parsing.
2361
2362         * svg/SVGToOTFFontConversion.cpp:
2363
2364 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
2365
2366         Fix the build after r181153
2367         https://bugs.webkit.org/show_bug.cgi?id=142497
2368
2369         Reviewed by Philippe Normand.
2370
2371         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2372         (WebCore::MediaPlayerPrivateGStreamer::load):
2373
2374 2015-03-09  Roger Fong  <roger_fong@apple.com>
2375
2376         Only call showControls if controls are hidden.
2377         https://bugs.webkit.org/show_bug.cgi?id=142496.
2378         <rdar://problem/20083732>
2379
2380         Reviewed by Dean Jackson.
2381
2382         * Modules/mediacontrols/mediaControlsApple.js:
2383         (Controller.prototype.handleWrapperMouseMove):
2384         (Controller.prototype.controlsAreHidden):
2385         Controls are hidden if the ‘show’ class name is not present,
2386         not if the ‘hidden’ class name is.
2387
2388 2015-03-09  Roger Fong  <roger_fong@apple.com>
2389
2390         Unreviewed. Re-add CSS property that was unintentionally removed in r180893
2391         <rdar://problem/20083715>
2392
2393         * Modules/mediacontrols/mediaControlsApple.css:
2394         (audio::-webkit-media-controls-panel):
2395
2396 2015-03-09  Zalan Bujtas  <zalan@apple.com>
2397
2398         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
2399         https://bugs.webkit.org/show_bug.cgi?id=142344
2400
2401         Reviewed by Antti Koivisto.
2402
2403         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
2404         the segment looping and position handling logic are no longer duplicated. It also unifies
2405         the static next*() functions' signature.
2406
2407         No change in functionality.
2408
2409         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2410         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2411         (WebCore::SimpleLineLayout::nextBreakablePosition):
2412         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
2413         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2414         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
2415         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
2416         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
2417         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2418
2419 2015-03-09  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2420
2421         ReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
2422         https://bugs.webkit.org/show_bug.cgi?id=142397
2423
2424         Reviewed by Benjamin Poulain.
2425
2426         No behavior change. Current tests cover the changes.
2427
2428         * bindings/js/ReadableStreamJSSource.cpp:
2429         * bindings/js/ReadableStreamJSSource.h:
2430
2431 2015-03-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2432
2433         ReadableStream does not not need to pass itself as callback parameter
2434         https://bugs.webkit.org/show_bug.cgi?id=142399
2435
2436         Reviewed by Darin Adler.
2437
2438         No change in behavior.
2439
2440         * Modules/streams/ReadableStream.h: Remove ReadableStream parameter from SuccessCallback definition.
2441         * bindings/js/JSReadableStreamCustom.cpp:
2442         (WebCore::JSReadableStream::ready): Capture JSReadableStream instance instead.
2443         (WebCore::JSReadableStream::closed): Capture JSReadableStream instance instead.
2444
2445 2015-03-08  Dean Jackson  <dino@apple.com>
2446
2447         [iOS Media] Video buffer progress missing on iPhones
2448         https://bugs.webkit.org/show_bug.cgi?id=142462
2449
2450         Reviewed by Eric Carlson.
2451
2452         The fullscreen controller on the iPhone idiom was using
2453         the media duration as its maximum loaded time, meaning the
2454         download progress was missing (it looked like everything
2455         was already downloaded). The fix is to calculate
2456         what the maximum buffered time is from the HTMLMediaElement,
2457         and send that to the fullscreen controller.
2458
2459         * Modules/mediacontrols/mediaControlsiOS.js:
2460         (ControllerIOS.prototype.drawTimelineBackground): While implementing
2461         the native function I noticed that the JS controls forgot that
2462         the buffered time ranges are ordered, and thus they don't need
2463         to search through the array. The last range will be the highest.
2464
2465         * html/HTMLMediaElement.cpp:
2466         (WebCore::HTMLMediaElement::maxBufferedTime): New helper function
2467         to calculate the highest buffered time in the media source.
2468         * html/HTMLMediaElement.h:
2469
2470         * platform/ios/WebVideoFullscreenInterface.h: New setBufferedTime method.
2471         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2472
2473         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2474         (WebVideoFullscreenInterfaceAVKit::setDuration): No longer set
2475         the loadedTimeRanges.
2476         (WebVideoFullscreenInterfaceAVKit::setBufferedTime): Calculate a normalized
2477         value of the maximum loaded/buffered time, and tell the platform controller
2478         to show that range.
2479
2480         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2481         (WebVideoFullscreenModelVideoElement::updateForEventName): Send the maximum
2482         buffered time.
2483
2484 2015-03-08  Chris Dumez  <cdumez@apple.com>
2485
2486         Crash in WebCore::NotificationCenter::stop()
2487         https://bugs.webkit.org/show_bug.cgi?id=142444
2488         <rdar://problem/20082520>
2489
2490         Reviewed by Darin Adler.
2491
2492         Rework the patch in r181219 so that we do not need a Ref<NotificationCenter> protector
2493         in NotificationCenter::stop(). Instead, we put the client in a local variable and null
2494         out m_client *before* calling NotificationClient::clearNotifications().
2495
2496         No new tests, already covered by:
2497         http/tests/notifications/event-listener-crash.html
2498
2499         * Modules/notifications/NotificationCenter.cpp:
2500         (WebCore::NotificationCenter::stop):
2501
2502 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
2503
2504         Don't call RenderLayerCompositor::needsToBeComposited() so many times
2505         https://bugs.webkit.org/show_bug.cgi?id=142441
2506
2507         Reviewed by Brent Fulgham.
2508
2509         Save one call to needsToBeComposited() per RenderLayer while rebuilding compositing
2510         layers, and a call to isRunningAcceleratedTransformAnimation() in some cases.
2511         
2512         computeCompositingRequirements() already knows if the layer will be composited, so
2513         pass that to updateBacking() in the form of a "yes/no/don't" know enum. However,
2514         since updateBacking() no longer calls needsToBeComposited(), we need to call 
2515         requiresCompositingForPosition() to get the viewportConstrainedNotCompositedReason flags.
2516         
2517         isRunningAcceleratedTransformAnimation() will only be true for a layer which has a
2518         direct compositing reason, so only call isRunningAcceleratedTransformAnimation()
2519         in that case.
2520         
2521         * rendering/RenderLayerCompositor.cpp:
2522         (WebCore::rendererForCompositingTests):
2523         (WebCore::RenderLayerCompositor::updateBacking):
2524         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2525         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Use references.
2526         (WebCore::RenderLayerCompositor::reasonsForCompositing): Use references.
2527         * rendering/RenderLayerCompositor.h:
2528
2529 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
2530
2531         In RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together in a struct
2532         https://bugs.webkit.org/show_bug.cgi?id=142449
2533
2534         Reviewed by Brent Fulgham.
2535         
2536         Rather than tracking 'layerBounds' and 'haveComputedBounds' separately, group them together
2537         in an OverlapExtent struct and add a function to compute the bounds, which removes
2538         a copy of this code. OverlapExtent will be extended in a future patch.
2539
2540         No behavior change.
2541
2542         * rendering/RenderLayerCompositor.cpp:
2543         (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Allow const access to
2544         the geometryMap, used by computeExtent().
2545         (WebCore::RenderLayerCompositor::computeExtent):
2546         (WebCore::RenderLayerCompositor::addToOverlapMap):
2547         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2548         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2549         * rendering/RenderLayerCompositor.h:
2550
2551 2015-03-07  Chris Dumez  <cdumez@apple.com>
2552
2553         Crash in WebCore::NotificationCenter::stop()
2554         https://bugs.webkit.org/show_bug.cgi?id=142444
2555         <rdar://problem/20082520>
2556
2557         Reviewed by Andreas Kling.
2558
2559         A use-after-free would sometimes cause us to crash in NotificationCenter::stop().
2560         After investigation, it turns out that NotificationCenter::stop() calls
2561         NotificationClient::clearNotifications() which will destroy the Notification
2562         objects, all of which hold a strong reference to the NotificationCenter. If at
2563         this point, only Notifications are ref'ing the NotificationCenter, this means
2564         that the NotificationCenter will get destroyed right after the call to
2565         NotificationClient::clearNotifications(). However, we reset m_client to null
2566         after calling clearNotifications() and it causes us to crash in this case.
2567
2568         The issue is addressed by adding a Ref<NotificationCenter> protector in
2569         NotificationCenter::stop() so that we make sure the NotificationCenter lives
2570         at least until the end of the method execution.
2571
2572         I was able to consistently reproduce the crash by doing:
2573         Tools/Scripts/run-webkit-tests -1 --debug --repeat-each=30 -g http/tests/notifications/event-listener-crash.html
2574
2575         No new tests, already covered by:
2576         http/tests/notifications/event-listener-crash.html
2577
2578         * Modules/notifications/NotificationCenter.cpp:
2579         (WebCore::NotificationCenter::stop):
2580
2581 2015-03-07  Simon Fraser  <simon.fraser@apple.com>
2582
2583         Tidy up RenderLayerCompositor's CompositingState
2584         https://bugs.webkit.org/show_bug.cgi?id=142445
2585
2586         Reviewed by Dan Bernstein.
2587         
2588         Make CompositingState a private struct in RenderLayerCompositor.
2589         Since it's a struct, remove the m_ prefix from its data members.
2590
2591         No behavior change.
2592
2593         * rendering/RenderLayerCompositor.cpp:
2594         (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
2595         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2596         (WebCore::CompositingState::CompositingState): Deleted.
2597         * rendering/RenderLayerCompositor.h:
2598
2599 2015-03-07  Darin Adler  <darin@apple.com>
2600
2601         Unindent EventTarget, EventListener, JSEventLister.h files
2602         https://bugs.webkit.org/show_bug.cgi?id=142440
2603
2604         Reviewed by Alexey Proskuryakov.
2605
2606         * bindings/js/JSEventListener.h:
2607         * dom/EventListener.h:
2608         * dom/EventTarget.h:
2609         Change indentation to match coding style rules.
2610
2611 2015-03-07  Geoffrey Garen  <ggaren@apple.com>
2612
2613         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
2614         https://bugs.webkit.org/show_bug.cgi?id=140900
2615
2616         Reviewed by Mark Hahnenberg.
2617
2618         Re-landing just the removal of BlockAllocator, which is now unused.
2619
2620         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2621         (WebCore::MemoryPressureHandler::install):
2622
2623 2015-03-07  Commit Queue  <commit-queue@webkit.org>
2624
2625         Unreviewed, rolling out r181010.
2626         https://bugs.webkit.org/show_bug.cgi?id=142442
2627
2628         Broke media/video-src-invalid-poster.html (Requested by kling
2629         on #webkit).
2630
2631         Reverted changeset:
2632
2633         "Stale entries in WeakGCMaps are keeping tons of WeakBlocks
2634         alive unnecessarily."
2635         https://bugs.webkit.org/show_bug.cgi?id=142115
2636         http://trac.webkit.org/changeset/181010
2637
2638 2015-03-07  Darin Adler  <darin@apple.com>
2639
2640         Do a bit of EventNames tidying
2641         https://bugs.webkit.org/show_bug.cgi?id=142438
2642
2643         Reviewed by Anders Carlsson.
2644
2645         * dom/EventNames.h: Sorted the event names into a single list instead of
2646         the rudimentary attempts at organizing the list that simply made it hard
2647         to see what is and is not in the list. Removed two unused event names.
2648         I'm sure there are more. Reorganized the EventName class, now a struct,
2649         into a more conventional "public first" order. Got the function bodies
2650         out of the struct so we can see more clearly what is in the struct.
2651         Made more things const.
2652         (WebCore::EventNames::touchEventNames): Changed the return value to a
2653         std::array of reference wrappers rather than a vector of atomic strings.
2654         This should eliminate unnecessary memory allocation and reference count churn.
2655
2656         * dom/EventNames.cpp: Changed initialization based on the above.
2657
2658         * dom/EventTarget.cpp:
2659         (WebCore::EventTarget::getEventListeners): Use NeverDestroyed instead of
2660         DEPRECATED_DEFINE_LOCAL and also just tightened up the function a bit.
2661
2662         * dom/Node.cpp:
2663         (WebCore::Node::didMoveToNewDocument): Streamlined this function with
2664         modern for loops, auto, and also tried to make what it does a bit clearer,
2665         by making loops that are just based on numbers of event listeners look a
2666         bit less like code that actually iterates a vector of listeners. Also used
2667         the type unsigned instead of size_t.
2668
2669         * platform/ThreadGlobalData.h: Updated since it's a struct instead of class now.
2670         (Why is this file in platform!?)
2671
2672 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
2673
2674         [Win] Increase TestWebKitAPI Test Coverage
2675         https://bugs.webkit.org/show_bug.cgi?id=142433
2676
2677         Reviewed by Darin Adler.
2678
2679         Correct some build deficiencies that prevent TestWebKitAPI
2680         from executing certain tests on Windows.
2681
2682         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy the interpreter
2683         headers.
2684         * css/CSSParser.h: Export necessary symbols
2685         * css/CSSParserMode.h: Ditto.
2686         * css/StyleProperties.h: Ditto.
2687
2688 2015-03-07  David Kilzer  <ddkilzer@apple.com>
2689
2690         Rename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
2691         <http://webkit.org/b/142434>
2692
2693         Reviewed by Darin Adler.
2694
2695         * platform/cf/CoreMediaSoftLink.cpp:
2696         * platform/cf/CoreMediaSoftLink.h:
2697         * platform/cf/MediaAccessibilitySoftLink.cpp:
2698         * platform/cf/MediaAccessibilitySoftLink.h:
2699         * platform/mac/SoftLinking.h:
2700         * platform/win/SoftLinking.h:
2701         - Do the rename.
2702
2703 2015-03-06  Sam Weinig  <sam@webkit.org>
2704
2705         [Content Extensions] Move compiling of content extensions to the UIProcess
2706         https://bugs.webkit.org/show_bug.cgi?id=142402
2707
2708         Reviewed by Benjamin Poulain.
2709
2710         * contentextensions/CompiledContentExtension.cpp:
2711         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
2712         (WebCore::ContentExtensions::CompiledContentExtension::create): Deleted.
2713         (WebCore::ContentExtensions::CompiledContentExtension::CompiledContentExtension): Deleted.
2714         * contentextensions/CompiledContentExtension.h:
2715         (WebCore::ContentExtensions::CompiledContentExtension::bytecode): Deleted.
2716         (WebCore::ContentExtensions::CompiledContentExtension::actions): Deleted.
2717         Convert CompiledContentExtension to be an abstract base class so that we can back it however
2718         we like at the WebKit level. Since it doesn't necessarily use Vectors for its backing store
2719         any more, change the interface to use pointer/length.
2720
2721         * contentextensions/ContentExtensionCompiler.cpp:
2722         (WebCore::ContentExtensions::compileRuleList):
2723         * contentextensions/ContentExtensionCompiler.h:
2724         Change compileRuleList to return compiled result as the raw Vectors rather than as
2725         a CompiledContentExtension, since that class is now abstract. It is up to the caller
2726         to copy the data into its final home.
2727
2728         * contentextensions/ContentExtensionRule.cpp:
2729         (WebCore::ContentExtensions::Action::deserialize):
2730         * contentextensions/ContentExtensionRule.h:
2731         Switch Action::deserialize to take pointer/length rather than a Vector.
2732
2733         * contentextensions/ContentExtensionsBackend.cpp:
2734         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
2735         Pull getting the serialized actions from the compiled extension out of the loop
2736         to avoid calling the virtual function multiple times. Pass the bytecode and actions
2737         as pointer/length pairs rather than Vectors.
2738
2739         * contentextensions/DFABytecodeInterpreter.cpp:
2740         (WebCore::ContentExtensions::getBits):
2741         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2742         * contentextensions/DFABytecodeInterpreter.h:
2743         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
2744         Switch the interpreter to take pointer/length rather than a Vector.
2745
2746         * page/UserContentController.cpp:
2747         (WebCore::UserContentController::addUserContentExtension):
2748         (WebCore::UserContentController::removeUserContentExtension):
2749         (WebCore::UserContentController::removeAllUserContentExtensions):
2750         (WebCore::UserContentController::addUserContentFilter): Deleted.
2751         (WebCore::UserContentController::removeUserContentFilter): Deleted.
2752         (WebCore::UserContentController::removeAllUserContentFilters): Deleted.
2753         * page/UserContentController.h:
2754         Unify terminology to use the term UserContentExtension rather than UserContentFilter.
2755
2756 2015-03-06  Roger Fong  <roger_fong@apple.com>
2757
2758         Create new buttons for media controls on OSX.
2759         https://bugs.webkit.org/show_bug.cgi?id=142415.
2760         <rdar://problem/20019441>
2761
2762         Reviewed by Eric Carlson.
2763
2764         * Modules/mediacontrols/mediaControlsApple.css:
2765         (audio::-webkit-media-controls-wireless-playback-picker-button):
2766         (audio::-webkit-media-controls-wireless-playback-picker-button.playing):
2767         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
2768
2769 2015-03-06  Roger Fong  <roger_fong@apple.com>
2770
2771         Redraw timeline background when updating media time.
2772         https://bugs.webkit.org/show_bug.cgi?id=142421.
2773         <rdar://problem/20065104>
2774
2775         Reviewed by Brent Fulgham.
2776
2777         * Modules/mediacontrols/mediaControlsApple.js:
2778         (Controller.prototype.handleTimeUpdate):
2779
2780 2015-03-06  Dhi Aurrahman  <diorahman@rockybars.com>
2781
2782         Enable selectors level 4's :lang() by default
2783         https://bugs.webkit.org/show_bug.cgi?id=142302
2784
2785         Reviewed by Benjamin Poulain.
2786
2787         No behavior change.
2788
2789         * css/CSSGrammar.y.in:
2790         * css/CSSParser.cpp:
2791         (WebCore::CSSParser::detectFunctionTypeToken):
2792         * css/CSSParserValues.cpp:
2793         (WebCore::CSSParserSelector::setLangArgumentList):
2794         * css/CSSParserValues.h:
2795         * css/CSSSelector.cpp:
2796         (WebCore::appendLangArgumentList):
2797         (WebCore::CSSSelector::selectorText):
2798         (WebCore::CSSSelector::setLangArgumentList):
2799         * css/CSSSelector.h:
2800         * css/SelectorChecker.cpp:
2801         (WebCore::SelectorChecker::checkOne):
2802         * css/SelectorCheckerTestFunctions.h:
2803         (WebCore::matchesLangPseudoClass):
2804         (WebCore::matchesLangPseudoClassDeprecated): Deleted.
2805         * cssjit/SelectorCompiler.cpp:
2806         (WebCore::SelectorCompiler::addPseudoClassType):
2807         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2808         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2809
2810 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
2811
2812         Setting scroll-snap-desination to (100% 100%) locks up WebKit
2813         https://bugs.webkit.org/show_bug.cgi?id=142414
2814         <rdar://problem/20077275>
2815
2816         Reviewed by Dean Jackson.
2817
2818         Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.
2819
2820         Correct an infinite loop that is triggered when you combine a repeating (100%)
2821         scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.
2822
2823         * page/scrolling/AxisScrollSnapOffsets.cpp:
2824         (WebCore::updateFromStyle): Make sure we break out of the loop properly when
2825         the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.
2826
2827 2015-03-06  Dean Jackson  <dino@apple.com>
2828
2829         https://bugs.webkit.org/show_bug.cgi?id=142416
2830
2831         Unreviewed build fix.
2832
2833         * platform/spi/cocoa/QuartzCoreSPI.h: Add kCAFilterPlusL.
2834
2835 2015-03-06  Dean Jackson  <dino@apple.com>
2836
2837         Support "plus-lighter" in mix-blend mode
2838         https://bugs.webkit.org/show_bug.cgi?id=142416
2839         <rdar://problem/19993979>
2840
2841         Reviewed by Darin Adler and Sam Weinig.
2842
2843         Support the "plus-lighter" blending mode to CSS.
2844         See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
2845
2846         Test: css3/blending/svg-blend-plus-lighter.html
2847
2848         * css/CSSParser.cpp:
2849         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
2850         new keyword.
2851         * css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
2852         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2853         (WebCore::CSSPrimitiveValue::operator BlendMode):
2854         * css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
2855         are available.
2856         * platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
2857         * platform/graphics/GraphicsTypes.h:
2858         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
2859         (PlatformCAFilters::setBlendingFiltersOnLayer):
2860         * platform/graphics/cg/GraphicsContextCG.cpp:
2861         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
2862         blending flag.
2863
2864 2015-03-06  Alex Christensen  <achristensen@webkit.org>
2865
2866         Soft link MediaAccessibility using new macros.
2867         https://bugs.webkit.org/show_bug.cgi?id=142406
2868
2869         Reviewed by David Kilzer.
2870
2871         * Configurations/WebCore.unexp:
2872         * WebCore.vcxproj/WebCore.vcxproj:
2873         * WebCore.vcxproj/WebCore.vcxproj.filters:
2874         * WebCore.xcodeproj/project.pbxproj:
2875         * page/CaptionUserPreferencesMediaAF.cpp:
2876         * platform/cf/MediaAccessibilitySoftLink.cpp: Added.
2877         * platform/cf/MediaAccessibilitySoftLink.h: Added.
2878
2879 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
2880
2881         Add 'initial' keyword support for scroll snap CSS properties
2882         https://bugs.webkit.org/show_bug.cgi?id=136345
2883         <rdar://problem/18162325>
2884
2885         Reviewed by Dean Jackson.
2886
2887         Tested by css3/scroll-snap/scroll-snap-initial.html
2888
2889         The existing implementation already had 'initial' keyword support, but did not fully follow
2890         the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
2891         scroll-snap-points-y properties was not handled correctly.
2892
2893         Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
2894         state.
2895
2896         * css/CSSComputedStyleDeclaration.cpp:
2897         (WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
2898         * css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
2899         * css/StyleBuilderConverter.h:
2900         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
2901         as a pointer.
2902         * css/StyleBuilderCustom.h:
2903         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
2904         implementation for ScrollSnapPoints.
2905         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
2906         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
2907         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
2908         * page/scrolling/AxisScrollSnapOffsets.cpp:
2909         (WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
2910         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
2911         * rendering/style/RenderStyle.cpp:
2912         (WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
2913         (WebCore::RenderStyle::scrollSnapPointsY): Ditto.
2914         (WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
2915         (WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
2916         (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
2917         (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
2918         * rendering/style/RenderStyle.h:
2919         * rendering/style/StyleScrollSnapPoints.cpp:
2920         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
2921         * rendering/style/StyleScrollSnapPoints.h:
2922
2923 2015-03-05  Roger Fong  <roger_fong@apple.com>
2924
2925         Reskin Captions button and container on OSX.
2926         https://bugs.webkit.org/show_bug.cgi?id=142383.
2927         <rdar://problem/20061466>
2928
2929         Reviewed by Eric Carlson.
2930
2931         * Modules/mediacontrols/mediaControlsApple.css:
2932         (audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
2933         Update caption container to match rest of media controls better.
2934         (audio::-webkit-media-controls-closed-captions-container):
2935         (audio::-webkit-media-controls-closed-captions-container .list):
2936         (audio::-webkit-media-controls-closed-captions-container h3):
2937         (audio::-webkit-media-controls-closed-captions-container ul):
2938         (audio::-webkit-media-controls-closed-captions-container li):
2939         (audio::-webkit-media-controls-closed-captions-container li:focus):
2940         (audio::-webkit-media-controls-closed-captions-container li:hover):
2941         Fix up some fonts to make fonts between captions, status display and time displays consistent.
2942         (audio::-webkit-media-controls-status-display):
2943         (audio::-webkit-media-controls-time-remaining-display):
2944
2945 2015-03-06  Jer Noble  <jer.noble@apple.com>
2946
2947         [Web Audio] Decoding specific .m4a file crashes tab
2948         https://bugs.webkit.org/show_bug.cgi?id=139545
2949
2950         Reviewed by Eric Carlson.
2951
2952         Test: webaudio/decode-audio-data-too-short.html
2953
2954         Bail out early if CoreAudio reports the number of frames in the file to be negative.
2955
2956         * platform/audio/mac/AudioFileReaderMac.cpp:
2957         (WebCore::AudioFileReader::createBus):
2958
2959 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
2960
2961         Scroll to make the video element visible when exiting fullscreen.
2962         https://bugs.webkit.org/show_bug.cgi?id=141439
2963
2964         Reviewed by Simon Fraser.
2965
2966         This patch will scroll the element so it is visible when exiting fullscreen,
2967         but only if the element is completely scrolled off screen.
2968         Also update the element screen rect so exit animation goes to the correct location.
2969
2970         * dom/Element.cpp:
2971         (WebCore::Element::scrollIntoViewIfNotVisible): Added.
2972         * dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
2973         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2974         (-[WebVideoFullscreenController fullscreenMayReturnToInline]):
2975         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2976         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2977         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
2978         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
2979         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2980         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
2981         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2982         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
2983         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2984         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
2985         * rendering/ScrollBehavior.cpp:
2986         * rendering/ScrollBehavior.h:
2987
2988 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
2989
2990         Crash in -[WebCascadeList objectAtIndex:] + 195
2991         https://bugs.webkit.org/show_bug.cgi?id=141274
2992
2993         Reviewed by David Kilzer.
2994
2995         CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
2996         WebCascadeList can too.
2997
2998         Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html
2999
3000         * platform/graphics/FontCascade.cpp:
3001         (WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
3002         * platform/graphics/FontCascade.h:
3003         (WebCore::FontCascade::createWeakPtr):
3004         * platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
3005         to WeakPtr.
3006         (-[WebCascadeList initWithFont:character:]):
3007         (-[WebCascadeList count]):
3008         (-[WebCascadeList objectAtIndex:]):
3009
3010 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3011
3012         Rename BreakingContextInlineHeaders.h to BreakingContext.h
3013         https://bugs.webkit.org/show_bug.cgi?id=142404
3014
3015         Reviewed by Simon Fraser.
3016
3017         No point naming it "InlineHeaders" when there are no non-inline-headers files.
3018
3019         No new tests because this is just a rename of a file.
3020
3021         * WebCore.vcxproj/WebCore.vcxproj:
3022         * WebCore.vcxproj/WebCore.vcxproj.filters:
3023         * WebCore.xcodeproj/project.pbxproj:
3024         * rendering/RenderBlockLineLayout.cpp:
3025         * rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
3026         (WebCore::WordMeasurement::WordMeasurement):
3027         (WebCore::BreakingContext::BreakingContext):
3028         (WebCore::BreakingContext::currentObject):
3029         (WebCore::BreakingContext::lineBreak):
3030         (WebCore::BreakingContext::lineWidth):
3031         (WebCore::BreakingContext::atEnd):
3032         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3033         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
3034         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
3035         (WebCore::BreakingContext::InlineIteratorHistory::push):
3036         (WebCore::BreakingContext::InlineIteratorHistory::update):
3037         (WebCore::BreakingContext::InlineIteratorHistory::renderer):
3038         (WebCore::BreakingContext::InlineIteratorHistory::offset):
3039         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
3040         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
3041         (WebCore::BreakingContext::InlineIteratorHistory::get):
3042         (WebCore::BreakingContext::InlineIteratorHistory::current):
3043         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
3044         (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
3045         (WebCore::BreakingContext::InlineIteratorHistory::increment):
3046         (WebCore::BreakingContext::InlineIteratorHistory::clear):
3047         (WebCore::BreakingContext::initializeForCurrentObject):
3048         (WebCore::BreakingContext::increment):
3049         (WebCore::BreakingContext::handleBR):
3050         (WebCore::borderPaddingMarginStart):
3051         (WebCore::borderPaddingMarginEnd):
3052         (WebCore::shouldAddBorderPaddingMargin):
3053         (WebCore::previousInFlowSibling):
3054         (WebCore::inlineLogicalWidth):
3055         (WebCore::BreakingContext::handleOutOfFlowPositioned):
3056         (WebCore::BreakingContext::handleFloat):
3057         (WebCore::shouldSkipWhitespaceAfterStartObject):
3058         (WebCore::BreakingContext::handleEmptyInline):
3059         (WebCore::BreakingContext::handleReplaced):
3060         (WebCore::firstPositiveWidth):
3061         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
3062         (WebCore::nextCharacter):
3063         (WebCore::updateCounterIfNeeded):
3064         (WebCore::measureHyphenWidth):
3065         (WebCore::textWidth):
3066         (WebCore::ensureCharacterGetsLineBox):
3067         (WebCore::tryHyphenating):
3068         (WebCore::BreakingContext::handleText):
3069         (WebCore::textBeginsWithBreakablePosition):
3070         (WebCore::BreakingContext::canBreakAtThisPosition):
3071         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3072         (WebCore::checkMidpoints):
3073         (WebCore::BreakingContext::handleEndOfLine):
3074         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
3075         * rendering/line/LineBreaker.cpp:
3076
3077 2015-03-06  Dan Bernstein  <mitz@apple.com>
3078
3079         Expose some of the functionality of extract-localizable-strings.pl as a module
3080         https://bugs.webkit.org/show_bug.cgi?id=142038
3081
3082         Reviewed by Sam Weinig.
3083
3084         * LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
3085         (setTreatWarningsAsErrors): Added this setter for the variable moved here.
3086         (sawError): Added a getter.
3087         (emitError): Added. Emits the error message and sets $sawError.
3088         (unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
3089         a lowercase letter.
3090         (keyCollisionCount): Added this getter.
3091         (localizedCount): Added this getter.
3092         (HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
3093         localized string count.
3094         (writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
3095         (verifyStringsFile): Ditto.
3096
3097         * WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
3098         phase.
3099
3100         * extract-localizable-strings.pl:
3101         (emitWarning): Moved to the module.
3102         (UnescapeHexSequence): Ditto.
3103         (HandleUIString): Ditto.
3104
3105 2015-03-06  Darin Adler  <darin@apple.com>
3106
3107         Remove unused C++ DOM event handler attribute functions
3108         https://bugs.webkit.org/show_bug.cgi?id=142398
3109
3110         Reviewed by Anders Carlsson.
3111
3112         * dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
3113         DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
3114         DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
3115         DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.
3116
3117         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3118         (WebCore::AudioScheduledSourceNode::setOnended): Deleted.
3119         (WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
3120         instead of one-off event-sending code. Also use a lambda to avoid needing two
3121         additional member functions to implement this.
3122         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
3123         (WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
3124         * Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.
3125
3126         * Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
3127         including ones created with macros from EventTarget.h.
3128         * Modules/encryptedmedia/MediaKeySession.h: Ditto.
3129         * Modules/indexeddb/IDBDatabase.h: Ditto.
3130         * Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
3131         * Modules/indexeddb/IDBRequest.h: Ditto.
3132         * Modules/indexeddb/IDBTransaction.h: Ditto.
3133         * Modules/mediastream/MediaStream.h: Ditto.
3134         * Modules/mediastream/MediaStreamTrack.h: Ditto.
3135         * Modules/mediastream/RTCDTMFSender.h: Ditto.
3136         * Modules/mediastream/RTCDataChannel.h: Ditto.
3137         * Modules/mediastream/RTCPeerConnection.h: Ditto.
3138         * Modules/notifications/Notification.h: Ditto.
3139         * Modules/speech/SpeechSynthesisUtterance.h: Ditto.
3140         * Modules/webaudio/AudioContext.h: Ditto.
3141         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
3142         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
3143         * Modules/websockets/WebSocket.h: Ditto.
3144         * css/FontLoader.h: Ditto.
3145         * dom/Document.h: Ditto.
3146         * dom/Element.cpp: Ditto.
3147         * dom/Element.h: Ditto.
3148         * dom/MessagePort.h: Ditto.
3149         * fileapi/FileReader.h: Ditto.
3150         * html/HTMLBodyElement.h: Ditto.
3151         * html/HTMLFormElement.h: Ditto.
3152         * html/HTMLFrameSetElement.h: Ditto.
3153         * html/HTMLInputElement.h: Ditto.
3154         * html/HTMLMediaElement.h: Ditto.
3155         * html/HTMLVideoElement.h: Ditto.
3156         * html/track/TextTrack.h: Ditto.
3157         * html/track/TextTrackCue.h: Ditto.
3158         * html/track/TrackListBase.h: Ditto.
3159         * loader/appcache/DOMApplicationCache.h: Ditto.
3160         * page/DOMWindow.h: Ditto.
3161         * page/EventSource.h: Ditto.
3162         * page/Performance.h: Ditto.
3163         * workers/AbstractWorker.h: Ditto.
3164         * workers/DedicatedWorkerGlobalScope.h: Ditto.
3165         * workers/Worker.h: Ditto.
3166         * workers/WorkerGlobalScope.h: Ditto.
3167         * xml/XMLHttpRequest.h: Ditto.
3168         * xml/XMLHttpRequestUpload.h: Ditto.
3169
3170 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
3171
3172         Setting any of the <object> element plugin controlling attributes does not have any affect.
3173         https://bugs.webkit.org/show_bug.cgi?id=141936.
3174
3175         Reviewed by Simon Fraser.
3176         
3177         When setting any of the <object> element plugin controlling attributes
3178         dynamically we need to mark the the element to be dirty by calling
3179         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
3180
3181         Tests: fast/css/image-object-hover-inherit.html
3182                svg/as-object/svg-in-object-dynamic-attribute-change.html
3183
3184         * dom/Element.h: Delete unimplemented function.
3185         
3186         * html/HTMLObjectElement.cpp:
3187         (WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
3188         calling setNeedsStyleRecalc() when one of the plugin controlling attributes
3189         gets changed. We have to clear m_useFallbackContent because the attribute's
3190         new value might fix the object rendering.
3191         
3192         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
3193
3194 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3195
3196         Test horiz-origin-x and horiz-origin-y in SVG fonts
3197         https://bugs.webkit.org/show_bug.cgi?id=142403
3198
3199         Reviewed by Simon Fraser.
3200
3201         Remove incorrect comment.
3202
3203         Test: svg/fonts/svg-font-horiz-origin.html
3204
3205         * svg/SVGToOTFFontConversion.cpp:
3206         (WebCore::CFFBuilder::CFFBuilder):
3207
3208 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
3209
3210         Allow tree dumping functions to be used in release builds by switching a flag
3211         https://bugs.webkit.org/show_bug.cgi?id=142379
3212
3213         Reviewed by Zalan Bujtas.
3214
3215         There are various tree dumping functions that are useful for debugging, and sometimes
3216         you want to be able to use them in release builds. Currently they are surrounded by
3217         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
3218         in wtf/Platform.h
3219
3220         * dom/DocumentMarkerController.cpp:
3221         * dom/DocumentMarkerController.h:
3222         * dom/Element.cpp:
3223         * dom/Element.h:
3224         * dom/Node.cpp:
3225         * dom/Node.h:
3226         * dom/Position.cpp:
3227         * dom/Position.h:
3228         * dom/Range.cpp:
3229         * dom/Range.h:
3230         * dom/Text.cpp:
3231         * dom/Text.h:
3232         * editing/FrameSelection.cpp:
3233         * editing/FrameSelection.h:
3234         * editing/VisiblePosition.cpp:
3235         * editing/VisiblePosition.h:
3236         * editing/VisibleSelection.cpp:
3237         * editing/VisibleSelection.h:
3238         * html/parser/HTMLElementStack.cpp:
3239         * html/parser/HTMLFormattingElementList.cpp:
3240         * rendering/CounterNode.cpp:
3241         * rendering/CounterNode.h:
3242         * rendering/InlineBox.cpp:
3243         * rendering/InlineBox.h:
3244         * rendering/InlineFlowBox.cpp:
3245         * rendering/InlineFlowBox.h:
3246         * rendering/InlineTextBox.cpp:
3247         * rendering/InlineTextBox.h:
3248         * rendering/RenderBlockFlow.cpp:
3249         * rendering/RenderBlockFlow.h:
3250         * rendering/RenderCounter.cpp:
3251         * rendering/RenderCounter.h:
3252         * rendering/RenderLayer.cpp:
3253         * rendering/RenderLayer.h:
3254         * rendering/RenderLayerBacking.cpp:
3255         (WebCore::RenderLayerBacking::createGraphicsLayer):
3256         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
3257         (WebCore::RenderLayerBacking::updateForegroundLayer):
3258         (WebCore::RenderLayerBacking::updateBackgroundLayer):
3259         * rendering/RenderLayerCompositor.cpp:
3260         (WebCore::CompositingState::CompositingState):
3261         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3262         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3263         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3264         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3265         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3266         (WebCore::RenderLayerCompositor::ensureRootLayer):
3267         * rendering/RenderObject.cpp:
3268         * rendering/RenderObject.h:
3269         * rendering/RootInlineBox.cpp:
3270         * rendering/RootInlineBox.h:
3271         * rendering/SimpleLineLayoutFunctions.cpp:
3272         * rendering/SimpleLineLayoutFunctions.h:
3273         * rendering/svg/SVGResources.cpp:
3274         * rendering/svg/SVGResources.h:
3275
3276 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
3277
3278         An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
3279         https://bugs.webkit.org/show_bug.cgi?id=141725.
3280
3281         Reviewed by Darin Adler.
3282
3283         The current viewport of the <svg> element should be retrieved from its
3284         renderer if the renderer is available. If the renderer is not created yet,
3285         this means the viewport is needed to calculate the size of the renderer.
3286         In this case, we should return the element size if it is intrinsic size.
3287         
3288         Test: svg/css/svg-css-different-intrinsic-sizes.html
3289
3290         * svg/SVGSVGElement.cpp:
3291         (WebCore::SVGSVGElement::currentViewportSize): Change the order for
3292         returning the viewport of the <svg> element. We should consider the case
3293         of a valid renderer before considering the case of an intrinsic size.
3294
3295 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
3296
3297         Allow composited clip-path to be updated without a layer repaint
3298         https://bugs.webkit.org/show_bug.cgi?id=142384
3299
3300         Reviewed by Zalan Bujtas.
3301         
3302         When clip-path is mapped to a compositing shape layer mask, we can just
3303         push a new shape to the GraphicsLayer to update the clip path, without
3304         needing to repaint.
3305         
3306         Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
3307         stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
3308         a StyleDifferenceRepaint.
3309         
3310         We ask RenderLayerCompositor whether the clip path can be composited
3311         to hide platform differences related to whether GraphicsLayer supports
3312         shape masks.
3313
3314         Test: compositing/masks/compositing-clip-path-change-no-repaint.html
3315
3316         * rendering/RenderElement.cpp:
3317         (WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
3318         about opacity. Handle ContextSensitivePropertyClipPath.
3319         * rendering/RenderLayerCompositor.cpp:
3320         (WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
3321         we have to paint the mask + clip path into the mask layer (mirrors code in
3322         RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
3323         * rendering/RenderLayerCompositor.h:
3324         * rendering/style/RenderStyle.cpp:
3325         (WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
3326         and don't return, as is normal for context-sensitive property handling.
3327         * rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
3328         fumbles, and remove unnecessary braces.
3329
3330 2015-03-06  Alex Christensen  <achristensen@webkit.org>
3331
3332         [Content Extensions] Process all actions when blocking a URL.
3333         https://bugs.webkit.org/show_bug.cgi?id=142363
3334
3335         Reviewed by Darin Adler.
3336
3337         This can only be tested once we implement css selectors.
3338
3339         * contentextensions/ContentExtensionsBackend.cpp:
3340         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
3341         Do not return early when adding a block action.
3342         * loader/cache/CachedResourceLoader.cpp:
3343         (WebCore::CachedResourceLoader::requestResource):
3344         Process all actions before returning.
3345
3346 2015-03-05  Darin Adler  <darin@apple.com>
3347
3348         Make JavaScript binding get and set legacy event listener attributes directly
3349         https://bugs.webkit.org/show_bug.cgi?id=142282
3350
3351         Reviewed by Antti Koivisto.
3352
3353         Test: fast/dom/legacy-event-handler-attributes.html
3354
3355         This patch changes the JavaScript getters and setters for these attributes
3356         to work directly without requiring any functions in the C++ DOM implementation.
3357         A subsequent patch will remove the now-unused C++ DOM implementation.
3358
3359         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3360         (WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
3361         m_hasEndedListener; this was incorrect since it only detected event listeners
3362         set up with the event handler attribute, not with addEventListener.
3363         (WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
3364         m_hasEndedListener after making changes to the event listeners.
3365         (WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
3366         (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
3367         * Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
3368
3369         * Modules/webaudio/ScriptProcessorNode.cpp:
3370         (WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
3371         m_hasAudioProcessListener; this was incorrect since it only detected event listeners
3372         set up with the event handler attribute, not with addEventListener.
3373         (WebCore::ScriptProcessorNode::addEventListener): Added code to update
3374         m_hasAudioProcessListener after making changes to the event listeners.
3375         (WebCore::ScriptProcessorNode::removeEventListener): Ditto.
3376         (WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
3377         * Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
3378
3379         * bindings/js/JSEventListener.cpp:
3380         (WebCore::legacyEventListenerAttribute): Added.
3381         (WebCore::createEventListenerForLegacyAttribute): Added.
3382         (WebCore::setLegacyEventListenerAttribute): Added.
3383         (WebCore::legacyWindowEventListenerAttribute): Added.
3384         (WebCore::setLegacyWindowEventListenerAttribute): Added.
3385
3386         * bindings/js/JSEventListener.h:
3387         (WebCore::createJSEventListenerForAttribute): Deleted.
3388
3389         * bindings/scripts/CodeGeneratorJS.pm:
3390         (GenerateAttributeEventListenerCall): Deleted.
3391         (LegacyEventListenerAttributeEventName): Added.
3392         (LegacyEventListenerAttributePrefix): Added.
3393         (GenerateImplementation): Use "auto" in lots of places to simplify the code
3394         generation. Replaced the old inlined code to deal with legacy event listener
3395         attributes with code that simply calls the new functions from JSEventLister.h.
3396         (GenerateCallWith): Use "auto".
3397         (GenerateConstructorDefinition): Ditto.
3398
3399         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
3400         results since these now use auto.
3401         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
3402         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
3403         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
3404         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
3405         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
3406         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
3407         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
3408         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
3409         * bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
3410         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
3411         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
3412         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
3413         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
3414         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
3415         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
3416         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
3417
3418         * dom/MessagePort.cpp:
3419         (WebCore::MessagePort::addEventListener): Moved logic that calls the start
3420         function in here from setOnmessage, since the latter will no longer be called.
3421         * dom/MessagePort.h: Ditto.
3422
3423 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3424
3425         [iOS] SVG fonts are garbled
3426         https://bugs.webkit.org/show_bug.cgi?id=142377