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