cff63f998aefc3d1a91ba35660601c0bee78ef71
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-11-04  Reza Abbasian  <rabbasian@apple.com>
2
3         [iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
4         https://bugs.webkit.org/show_bug.cgi?id=137930.
5
6         Reviewed by Jer Noble.
7
8         When a fullscreen video gets dismissed programmatically, for instance for removing
9         a webview from the view hierarchy, it can put the device in an incorrect orientation.
10         Make sure we retain the window of parentView when we attempt to go to fullscreen and use
11         the retained window for putting the device in correct orientation after dismissal.
12
13         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
14         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
15         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
16         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
17         (WebVideoFullscreenInterfaceAVKit::invalidate):
18
19 2014-11-04  Andreas Kling  <akling@apple.com>
20
21         Remove two unused ScrollingCoordinator methods.
22         <https://webkit.org/b/138377>
23
24         Reviewed by Chris Dumez.
25
26         These appear to be leftovers from the now-defunct chromium port.
27
28         * page/scrolling/ScrollingCoordinator.cpp:
29         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted.
30         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted.
31         * page/scrolling/ScrollingCoordinator.h:
32
33 2014-11-04  Chris Dumez  <cdumez@apple.com>
34
35         Add ptr() method to Ref class
36         https://bugs.webkit.org/show_bug.cgi?id=138361
37
38         Reviewed by Darin Adler.
39
40         Use the new Ref::ptr() method.
41
42         No new tests, no behavior change.
43
44         * accessibility/AccessibilityMenuList.cpp:
45         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
46         * bindings/js/JSHTMLAllCollectionCustom.cpp:
47         (WebCore::getNamedItems):
48         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
49         (WebCore::getNamedItems):
50         * css/CSSStyleRule.h:
51         * css/CSSStyleSheet.cpp:
52         (WebCore::CSSStyleSheet::insertRule):
53         * css/CSSValueList.h:
54         (WebCore::CSSValueList::item):
55         (WebCore::CSSValueList::itemWithoutBoundsCheck):
56         * css/InspectorCSSOMWrappers.cpp:
57         (WebCore::InspectorCSSOMWrappers::collect):
58         * dom/ChildListMutationScope.cpp:
59         (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator):
60         (WebCore::ChildListMutationAccumulator::childAdded):
61         * dom/ChildNodeList.cpp:
62         (WebCore::ChildNodeList::namedItem):
63         * dom/ContainerNode.cpp:
64         (WebCore::ContainerNode::removeChild):
65         * dom/CurrentScriptIncrementer.h:
66         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
67         (WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
68         * dom/MutationRecord.cpp:
69         * dom/NodeRareData.h:
70         (WebCore::NodeListsNodeData::ensureChildNodeList):
71         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
72         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
73         * dom/Range.cpp:
74         (WebCore::Range::setDocument):
75         * dom/ScriptElement.cpp:
76         (WebCore::ScriptElement::requestScript):
77         (WebCore::ScriptElement::executeScript):
78         * dom/StaticNodeList.cpp:
79         (WebCore::StaticNodeList::item):
80         (WebCore::StaticElementList::item):
81         * editing/CompositeEditCommand.cpp:
82         (WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
83         * editing/DictationCommand.cpp:
84         (WebCore::DictationCommand::insertText):
85         * editing/DictationCommand.h:
86         * editing/Editor.cpp:
87         (WebCore::Editor::insertTextWithoutSendingTextEvent):
88         * editing/ReplaceNodeWithSpanCommand.cpp:
89         (WebCore::swapInNodePreservingAttributesAndChildren):
90         * editing/SimplifyMarkupCommand.cpp:
91         (WebCore::SimplifyMarkupCommand::doApply):
92         * editing/markup.cpp:
93         (WebCore::hasOneChild):
94         (WebCore::hasOneTextChild):
95         (WebCore::replaceChildrenWithFragment):
96         (WebCore::replaceChildrenWithText):
97         * html/HTMLFormControlElement.cpp:
98         (WebCore::HTMLFormControlElement::checkValidity):
99         * html/HTMLFormElement.cpp:
100         (WebCore::HTMLFormElement::getNamedElements):
101         * html/HTMLLinkElement.cpp:
102         (WebCore::HTMLLinkElement::shouldLoadLink):
103         * inspector/InspectorStyleSheet.cpp:
104         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
105         (WebCore::InspectorStyleSheet::buildObjectForRule):
106         (WebCore::InspectorStyleSheet::revalidateStyle):
107         * loader/FrameLoader.cpp:
108         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
109         * page/FocusController.cpp:
110         (WebCore::FocusController::setFocusedElement):
111         * page/PageSerializer.cpp:
112         (WebCore::PageSerializer::retrieveResourcesForRule):
113         * page/PageSerializer.h:
114         * page/animation/AnimationController.cpp:
115         (WebCore::AnimationController::updateAnimations):
116         * platform/graphics/ca/TileCoverageMap.cpp:
117         (WebCore::TileCoverageMap::platformCALayerPaintContents):
118         * rendering/ClipPathOperation.h:
119         * rendering/RenderBlock.cpp:
120         (WebCore::styleForFirstLetter):
121         (WebCore::RenderBlock::updateFirstLetterStyle):
122         (WebCore::RenderBlock::createFirstLetterRenderer):
123         * rendering/RenderBlockFlow.cpp:
124         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
125         * rendering/RenderBlockFlow.h:
126         * rendering/RenderBox.cpp:
127         (WebCore::RenderBox::styleDidChange):
128         * rendering/RenderElement.cpp:
129         (WebCore::RenderElement::setStyle):
130         (WebCore::RenderElement::styleDidChange):
131         * rendering/RenderNamedFlowFragment.cpp:
132         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
133         * rendering/RenderTextControl.cpp:
134         (WebCore::RenderTextControl::adjustInnerTextStyle):
135         * rendering/RenderTextControl.h:
136         * rendering/RenderTextControlMultiLine.cpp:
137         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
138         * rendering/RenderTextControlSingleLine.cpp:
139         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
140         * rendering/style/DataRef.h:
141         (WebCore::DataRef::get):
142         (WebCore::DataRef::access):
143         (WebCore::DataRef::operator==):
144         (WebCore::DataRef::operator!=):
145         * rendering/style/RenderStyle.cpp:
146         (WebCore::RenderStyle::changeRequiresLayout):
147         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
148         (WebCore::RenderStyle::changeRequiresLayerRepaint):
149         (WebCore::RenderStyle::changeRequiresRepaint):
150         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
151         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
152         (WebCore::RenderStyle::diff):
153         (WebCore::RenderStyle::diffRequiresLayerRepaint):
154         * rendering/style/RenderStyle.h:
155         * rendering/style/StyleGeneratedImage.cpp:
156         (WebCore::StyleGeneratedImage::cssValue):
157         * rendering/style/StyleGeneratedImage.h:
158         * style/StyleResolveForDocument.cpp:
159         (WebCore::Style::resolveForDocument):
160         * style/StyleResolveTree.cpp:
161         (WebCore::Style::determineChange):
162         (WebCore::Style::resolveLocal):
163         (WebCore::Style::resolveTree):
164         * style/StyleResolveTree.h:
165
166 2014-11-04  Chris Dumez  <cdumez@apple.com>
167
168         Move -webkit-text-emphasis-position to the new StyleBuilder
169         https://bugs.webkit.org/show_bug.cgi?id=138359
170
171         Reviewed by Andreas Kling.
172
173         Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the
174         new StyleBuilder so that it is now generated from CSSPropertyNames.in.
175         A new TextEmphasisPosition Converter was added to support this.
176
177         No new tests, no behavior change.
178
179         * css/CSSPropertyNames.in:
180         * css/DeprecatedStyleBuilder.cpp:
181         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
182         (WebCore::valueToEmphasisPosition): Deleted.
183         (WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted.
184         (WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted.
185         * css/StyleBuilderConverter.h:
186         (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
187         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
188
189 2014-11-04  Andreas Kling  <akling@apple.com>
190
191         RenderBox shouldn't need a pre-destructor hook.
192         <https://webkit.org/b/138367>
193
194         Reviewed by Antti Koivisto.
195
196         Move teardown logic from willBeDestroyed() to the regular ~RenderBox()
197         destructor since none of it depends on being in-tree or having a fully
198         constructed vtable.
199
200         * rendering/RenderBox.cpp:
201         (WebCore::RenderBox::~RenderBox):
202         (WebCore::RenderBox::willBeDestroyed): Deleted.
203         * rendering/RenderBox.h:
204
205 2014-11-04  Myles C. Maxfield  <mmaxfield@apple.com>
206
207         [OSX] CJK characters styled with font-family: cursive are italicized
208         https://bugs.webkit.org/show_bug.cgi?id=138328
209         rdar://problem/18801907
210
211         Reviewed by Simon Fraser.
212
213         FontCache::createFontPlatformData doesn’t set the oblique flag if
214         the requested font isn’t oblique, but
215         FontCache::systemFallbackForCharacters() does. This patch simply
216         adopts this behavior in both places.
217
218         Test: fast/text/font-cursive-italic-cjk.html
219
220         * platform/graphics/mac/FontCacheMac.mm:
221         (WebCore::FontCache::systemFallbackForCharacters):
222
223 2014-11-04  Benjamin Poulain  <bpoulain@apple.com>
224
225         When computing the specificity of selectors, use saturated arithmetic per component
226         https://bugs.webkit.org/show_bug.cgi?id=138336
227
228         Reviewed by Andreas Kling.
229
230         The code handling overflow in CSSSelector::specificity() was assuming that the value
231         returned by specificityForOneSelector() can only overflow one field at a time.
232
233         That assumption is no longer correct with the extended :not(). It is now possible to have
234         a complex selector saturating multiple fields inside a single :not().
235
236         This patch solves the problem by considering each field independently.
237
238         Test: fast/selectors/specificity-overflow-2.html
239
240         * css/CSSSelector.cpp:
241         (WebCore::CSSSelector::specificity):
242
243 2014-11-04  Zalan Bujtas  <zalan@apple.com>
244
245         Windows build fix after r175565.
246
247         MSVC requires default c'tor even if it's never called. -0 length array.
248
249         * rendering/SimpleLineLayout.h:
250         (WebCore::SimpleLineLayout::Run::Run):
251
252 2014-11-04  Zalan Bujtas  <zalan@apple.com>
253
254         Simple line layout: Cleanup line initialization and line closing.
255         https://bugs.webkit.org/show_bug.cgi?id=138273
256
257         Reviewed by Antti Koivisto.
258
259         This is in preparation to support multiple render elements.
260
261         Move line start and line end activities to dedicated functions.
262
263         Covered by existing tests.
264
265         * rendering/SimpleLineLayout.cpp:
266         (WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit
267         about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment
268         so that line closing can handled separately.
269         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
270         (WebCore::SimpleLineLayout::LineState::addUncommitted):
271         (WebCore::SimpleLineLayout::LineState::jumpTo):
272         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function.  
273         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
274         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace):
275         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace()
276         so that all trailing whitespace handling is in one function.
277         (WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset.
278         (WebCore::SimpleLineLayout::createLineRuns):
279         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities.
280         (WebCore::SimpleLineLayout::createTextRuns):
281         (WebCore::SimpleLineLayout::create):
282         (WebCore::SimpleLineLayout::initializeLine): Deleted.
283         * rendering/SimpleLineLayout.h:
284         (WebCore::SimpleLineLayout::Run::Run): Deleted.
285
286 2014-11-04  Tim Horton  <timothy_horton@apple.com>
287
288         Implement yellow highlight over data detected items
289         https://bugs.webkit.org/show_bug.cgi?id=138340
290         <rdar://problem/18840102>
291
292         Reviewed by Anders Carlsson.
293
294         * platform/spi/mac/DataDetectorsSPI.h:
295         Add completionHandler SPI.
296
297 2014-11-04  Darin Adler  <darin@apple.com>
298
299         Eliminate ResourceBuffer and use SharedBuffer directly instead
300         https://bugs.webkit.org/show_bug.cgi?id=138174
301
302         Reviewed by Antti Koivisto.
303
304         Refactoring, with test coverage across many existing tests.
305
306         * CMakeLists.txt: Deleted ResourceBuffer.cpp.
307
308         * WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
309         for one function that used to take a PassRefPtr but now takes a reference instead.
310
311         * WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
312         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
313         * WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
314
315         * bindings/objc/DOMUIKitExtensions.mm:
316         (-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
317         * editing/ios/EditorIOS.mm:
318         (WebCore::Editor::writeImageToPasteboard): Ditto.
319         * editing/mac/EditorMac.mm:
320         (WebCore::Editor::writeImageToPasteboard): Ditto.
321
322         * html/ImageDocument.cpp:
323         (WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
324         also pass a reference only if non-null rather than passing a pointer.
325         (WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
326
327         * inspector/InspectorPageAgent.cpp:
328         (WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
329         (WebCore::InspectorPageAgent::mainResourceContent): Ditto.
330         * inspector/InspectorResourceAgent.cpp:
331         (WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
332         (WebCore::InspectorResourceAgent::didFailLoading): Ditto.
333
334         * loader/DocumentLoader.cpp:
335         (WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
336         and use the copy function rather than a hand-written alternative.
337         (WebCore::DocumentLoader::maybeCreateArchive): Ditto.
338         (WebCore::DocumentLoader::mainResource): Ditto.
339         (WebCore::DocumentLoader::subresource): Ditto.
340         (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
341
342         * loader/DocumentLoader.h: Changed mainResourceData to return a
343         PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
344         but it currently returns a newly created buffer when there is substitute
345         data and can also return null, even though many callers assume it will not!
346
347         * loader/MediaResourceLoader.cpp:
348         (WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
349         function bufferReceived.
350         (WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
351         argument to client function loadFinished.
352
353         * loader/ResourceBuffer.cpp: Removed.
354         * loader/ResourceBuffer.h: Removed.
355
356         * loader/ResourceLoader.cpp:
357         (WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
358
359         * loader/ResourceLoader.h:
360         (WebCore::ResourceLoader::resourceData): Use SharedBuffer.
361
362         * loader/SubresourceLoader.cpp:
363         (WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
364         (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
365
366         * loader/TextTrackLoader.cpp:
367         (WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
368         * loader/appcache/ApplicationCacheGroup.cpp:
369         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
370         * loader/archive/cf/LegacyWebArchive.cpp:
371         (WebCore::LegacyWebArchive::create): Ditto.
372
373         * loader/cache/CachedCSSStyleSheet.cpp:
374         (WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
375         * loader/cache/CachedCSSStyleSheet.h: Ditto.
376         * loader/cache/CachedFont.cpp:
377         (WebCore::CachedFont::finishLoading): Ditto.
378         (WebCore::CachedFont::ensureCustomFontData): Ditto.
379         * loader/cache/CachedFont.h: Ditto.
380
381         * loader/cache/CachedImage.cpp:
382         (WebCore::CachedImage::didAddClient): Use SharedBuffer.
383         (WebCore::CachedImage::didRemoveClient): Ditto.
384         (WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
385         a reference rather than a pointer.
386         (WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
387         to base class and changed to take a reference rather than a pointer.
388         (WebCore::CachedImage::addData): Ditto. Also added call through to base class.
389         (WebCore::CachedImage::finishLoading): Ditto.
390         * loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
391         to be unsigned instead of unsigend char.
392
393         * loader/cache/CachedRawResource.cpp:
394         (WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
395         (WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
396         a reference rather than a pointer.
397         (WebCore::CachedRawResource::addData): Ditto.
398         (WebCore::CachedRawResource::finishLoading): Ditto.
399         (WebCore::CachedRawResource::canReuse): Ditto.
400         * loader/cache/CachedRawResource.h: Ditto.
401
402         * loader/cache/CachedResource.cpp:
403         (WebCore::CachedResource::CachedResource): Reordered data members due to change
404         in header.
405         (WebCore::CachedResource::addDataBuffer): Changed argument type.
406         (WebCore::CachedResource::finishLoading): Ditto.
407         (WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
408         table lookup by using the return value from the remove function.
409         (WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
410         of using a function named "schedule" to allocate the callback object.
411         (WebCore::CachedResource::Callback::Callback): Changed function and data member
412         name.
413         (WebCore::CachedResource::Callback::cancel): Ditto.
414         (WebCore::CachedResource::Callback::timerFired): Ditto.
415         (WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
416
417         * loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
418         data members and one function member private instead of protected. Also renamed the
419         CachedResource::CachedResourceCallback function CachedResource::Callback and moved
420         its definition out of the CachedResource class definition.
421
422         * loader/cache/CachedResourceClient.h: Removed unneeded include.
423
424         * loader/cache/CachedSVGDocument.cpp:
425         (WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
426
427         * loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
428
429         * loader/cache/CachedScript.cpp:
430         (WebCore::CachedScript::finishLoading): Use SharedBuffer.
431         * loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
432         forward declaration.
433
434         * loader/cache/CachedTextTrack.cpp:
435         (WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
436         call addDataBuffer.
437         (WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
438         (WebCore::CachedTextTrack::finishLoading): Ditto.
439         * loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
440         destructor. Updated for above changes.
441
442         * loader/cache/CachedXSLStyleSheet.cpp:
443         (WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
444         * loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
445         private rather than protected. Added an explicit virtual constructor so we can
446         compile without knowing how to ref/deref TextResourceDecoder.
447
448         * loader/cf/SubresourceLoaderCF.cpp:
449         (WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
450         and to call addDataBuffer only if there is a new data buffer.
451
452         * loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
453         * loader/cocoa/DiskCacheMonitorCocoa.mm:
454         (WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
455         (WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
456
457         * loader/icon/IconLoader.cpp:
458         (WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
459         RefPtr<ResourceBuffer>.
460
461         * loader/mac/ResourceBuffer.mm: Removed.
462
463         * loader/mac/ResourceLoaderMac.mm:
464         (WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
465
466         * platform/SharedBuffer.cpp:
467         (WebCore::SharedBuffer::clear): Use a modern for loop.
468         (WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
469         this never returns null. Use modern for loops.
470         (WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
471
472         * platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
473         Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
474         a pointer.
475
476         * platform/cf/SharedBufferCF.cpp:
477         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
478         instead of a pointer.
479
480         * platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
481         bufferReceived and unneeded buffer argument from loadFinished. Also marked the
482         constructor explicit.
483
484         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
485         Removed include of ResourceBuffer.h.
486         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
487         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
488         SharedBuffer directly.
489
490         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
491         (CachedResourceStreamingClient::loadFinished): Updated for change to
492         PlatformMediaResourceLoaderClient.
493
494         * platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
495
496         * platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
497         tryReplaceContentsWithPlatformBuffer function.
498
499 2014-11-04  Chris Dumez  <cdumez@apple.com>
500
501         Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
502         https://bugs.webkit.org/show_bug.cgi?id=138345
503
504         Reviewed by Andreas Kling.
505
506         Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
507         instead of old-fashion toXXX() functions.
508
509         No new tests, no behavior change.
510
511         * css/CSSMediaRule.cpp:
512         (WebCore::CSSMediaRule::mediaQueries):
513         * css/CSSSupportsRule.cpp:
514         (WebCore::CSSSupportsRule::conditionText):
515         * css/StyleRule.h:
516         (isType):
517         (WebCore::toStyleRuleMedia): Deleted.
518         (WebCore::toStyleRuleSupports): Deleted.
519         (WebCore::toStyleRuleRegion): Deleted.
520         * css/WebKitCSSRegionRule.cpp:
521         (WebCore::WebKitCSSRegionRule::cssText):
522
523 2014-11-04  Andreas Kling  <akling@apple.com>
524
525         RenderQuote shouldn't need a pre-destructor hook.
526         <https://webkit.org/b/138352>
527
528         Reviewed by Antti Koivisto.
529
530         The willBeDestroyed() hook in RenderQuote came from the time when it was
531         potential unsafe to access the RenderView from a renderer destructor.
532
533         Move the code to the plain ol' destructor instead.
534
535         * rendering/RenderQuote.cpp:
536         (WebCore::RenderQuote::~RenderQuote):
537         (WebCore::RenderQuote::willBeDestroyed): Deleted.
538         * rendering/RenderQuote.h:
539
540 2014-11-04  Csaba Osztrogonác  <ossy@webkit.org>
541
542         Fix the !ENABLE(VIDEO) build after r175380
543         https://bugs.webkit.org/show_bug.cgi?id=138322
544
545         Reviewed by Benjamin Poulain.
546
547         * html/HTMLImageLoader.cpp:
548         (WebCore::HTMLImageLoader::dispatchLoadEvent):
549
550 2014-11-03  Philippe Normand  <pnormand@igalia.com>
551
552         [LEAK] [GStreamer] Removing video element will not free assigned memory
553         https://bugs.webkit.org/show_bug.cgi?id=46560
554
555         Reviewed by Eric Carlson.
556
557         Moved the ::extraMemoryCost() implementation to the
558         MediaPlayerPivateInterface base class. This default implementation
559         is now shared between the various MediaPlayerPrivate backends,
560         excepted the AVF MediaSource player which still reports no extra
561         memory cost.
562
563         * platform/graphics/MediaPlayerPrivate.h:
564         (WebCore::MediaPlayerPrivateInterface::totalBytes): Make
565         totalBytes() part of the MediaPlayerPrivate interface.
566         (WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default
567         implementation.
568         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
569         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Deleted.
570         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
571         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
572
573 2014-11-04  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
574
575         Fix animation of orient attribute on marker element
576         https://bugs.webkit.org/show_bug.cgi?id=137942
577
578         Reviewed by Dirk Schulze.
579
580         Fixed implementation of SVG animated angles and the SVG
581         marker element orient attribute.
582         SVG animated angle was missing the logic to support animation
583         from auto to a numeric angle value - this is now added.
584         The SVG marker element getter for orientType was not returning
585         the animated value for orientType so in some cases (i.e. when
586         the initial value and the animated values were of different types)
587         the animation was not being rendered - although it was running.
588
589         Tests: svg/animations/animate-marker-orienttype-1.html
590                svg/animations/animate-marker-orienttype-2.html
591                svg/animations/animate-marker-orienttype-3.html
592
593         * svg/SVGAnimatedAngle.cpp:
594         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
595         Added logic to support auto to angle animation.
596         * svg/SVGMarkerElement.cpp:
597         (WebCore::SVGMarkerElement::orientType):
598         This method now returns the animated value if an animation is
599         running.
600         * svg/SVGMarkerElement.h:
601
602 2014-11-03  Chris Dumez  <cdumez@apple.com>
603
604         Allow implicit conversion from Ref<T> to T&
605         https://bugs.webkit.org/show_bug.cgi?id=138331
606
607         Reviewed by Andreas Kling.
608
609         Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
610         converted implicitly to a T&.
611
612         No new tests, no behavior change.
613
614 2014-11-03  Simon Fraser  <simon.fraser@apple.com>
615
616         Non-fast scrollable region overlay offsets the overlay by topContentInset
617         https://bugs.webkit.org/show_bug.cgi?id=138344
618
619         Reviewed Tim Horton.
620         
621         Offset the region by topContentInset, and make it not green.
622
623         * page/DebugPageOverlays.cpp:
624         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
625
626 2014-11-03  Andreas Kling  <akling@apple.com>
627
628         Clarify RenderListMarker ownership model.
629         <https://webkit.org/b/138329>
630
631         Reviewed by Antti Koivisto.
632
633         A RenderListMarker is either in-tree and owned by the tree, or out-of-tree
634         and owned by a RenderListItem.
635
636         This patch changes RenderListItem::m_marker to be a raw pointer, and removes
637         the special handling of list markers in RenderElement child teardown.
638
639         We also remove the willBeDestroyed() hook. It was used to clear out the
640         m_marker pointer, but this is now done in the regular ~RenderListItem()
641         destructor with an assertion for marker sanity. m_marker is automatically
642         nulled out by a didDestroyListMarker() callback on RenderListItem.
643
644         * rendering/RenderElement.cpp:
645         (WebCore::RenderElement::destroyLeftoverChildren):
646
647             Removed special handling of list marker renderers when deleting a
648             RenderElement's children.
649
650         * rendering/RenderListItem.cpp:
651         (WebCore::RenderListItem::RenderListItem):
652         (WebCore::RenderListItem::~RenderListItem):
653         (WebCore::RenderListItem::styleDidChange):
654         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
655         (WebCore::RenderListItem::positionListMarker):
656
657             Made m_marker a raw pointer instead of a RenderPtr since the ownership
658             really switches between weak and strong reference.
659
660         (WebCore::RenderListItem::willBeDestroyed):
661         * rendering/RenderListMarker.cpp:
662         (WebCore::RenderListMarker::~RenderListMarker):
663
664             Added a regular destructor to replace the willBeDestroyed() hook.
665
666         * rendering/RenderListItem.h:
667         (WebCore::RenderListItem::didDestroyListMarker):
668
669             Added. Called by ~RenderListMarker to null out RenderListItem::m_marker.
670
671 2014-11-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
672
673         Move WebCore/bridge to std::unique_ptr
674         https://bugs.webkit.org/show_bug.cgi?id=138280
675
676         Reviewed by Anders Carlsson.
677
678         Clean up OwnPtr in WebCore/bridge.
679
680         No new tests, no behavior changes.
681
682         * bridge/c/c_class.cpp:
683         (JSC::Bindings::CClass::methodNamed):
684         (JSC::Bindings::CClass::fieldNamed):
685         * bridge/c/c_class.h: Use std::unique_ptr instead of OwnPtr.
686         * bridge/objc/objc_class.h: ditto.
687         * bridge/objc/objc_class.mm:
688         (JSC::Bindings::ObjcClass::methodNamed):
689         (JSC::Bindings::ObjcClass::fieldNamed):
690         * bridge/objc/objc_runtime.mm:
691         (JSC::Bindings::callObjCFallbackObject):
692         * bridge/runtime_method.h:
693
694 2014-11-03  Dan Bernstein  <mitz@apple.com>
695
696         Client certificate credentials with session persistence don’t work
697         https://bugs.webkit.org/show_bug.cgi?id=138330
698
699         Reviewed by Alexey Proskuryakov.
700
701         I think this is not testable with our test HTTP server.
702
703         * platform/network/CredentialStorage.cpp:
704         (WebCore::CredentialStorage::set): Don’t require a valid URL for client certificate
705         credentials, since they don’t apply to a specific path. Don’t save such credentials to
706         CFNetwork’s persistent storage (we only do that as a workaround for sharing credentials
707         with the media framework, and we don’t want to expand the scope of the workaround).
708         * platform/network/cf/ResourceHandleCFNet.cpp:
709         (WebCore::ResourceHandle::receivedCredential): Changed to use the Credential consturctor
710         that takes a Credential and a new persistence, so that this code works not only with
711         user+password credentials.
712
713 2014-11-03  Simon Fraser  <simon.fraser@apple.com>
714
715         Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
716         https://bugs.webkit.org/show_bug.cgi?id=138257
717
718         Reviewed by Tim Horton.
719
720         Add code for debugging page overlays that show the non-fast scrollable region,
721         and the region with wheel event handlers. The list of region types is intended
722         to be easily extensible.
723         
724         A singleton DebugPageOverlays maintains a map of Frame -> vector of overlays.
725         A purely inline code path is provided so that DebugPageOverlays::didLayout() is
726         fast.
727         
728         For each region type, a PageOverlay::Client subclass knows how to generate
729         the region, which is painted into a document-level page overlay.
730         
731         Add a set of bitflags to Settings to control region visibility.
732
733         * WebCore.exp.in:
734         * WebCore.xcodeproj/project.pbxproj:
735         * page/DebugPageOverlays.cpp: Added.
736         (WebCore::RegionOverlay::overlay):
737         (WebCore::MouseWheelRegionOverlay::updateRegion):
738         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
739         (WebCore::RegionOverlay::create):
740         (WebCore::RegionOverlay::RegionOverlay):
741         (WebCore::RegionOverlay::~RegionOverlay):
742         (WebCore::RegionOverlay::pageOverlayDestroyed):
743         (WebCore::RegionOverlay::willMoveToPage):
744         (WebCore::RegionOverlay::didMoveToPage):
745         (WebCore::RegionOverlay::drawRect):
746         (WebCore::RegionOverlay::mouseEvent):
747         (WebCore::RegionOverlay::didScrollFrame):
748         (WebCore::RegionOverlay::recomputeRegion):
749         (WebCore::DebugPageOverlays::shared):
750         (WebCore::indexOf):
751         (WebCore::DebugPageOverlays::ensureRegionOverlayForFrame):
752         (WebCore::DebugPageOverlays::showRegionOverlay):
753         (WebCore::DebugPageOverlays::hideRegionOverlay):
754         (WebCore::DebugPageOverlays::regionChanged):
755         (WebCore::DebugPageOverlays::regionOverlayForFrame):
756         (WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
757         (WebCore::DebugPageOverlays::settingsChanged):
758         * page/DebugPageOverlays.h: Added.
759         (WebCore::DebugPageOverlays::hasOverlaysForFrame):
760         (WebCore::DebugPageOverlays::hasOverlays):
761         (WebCore::DebugPageOverlays::didLayout):
762         * page/FrameView.cpp:
763         (WebCore::FrameView::layout):
764         * page/Settings.h:
765         * page/Settings.in:
766
767 2014-11-03  Simon Fraser  <simon.fraser@apple.com>
768
769         Video controls have lots of compositing layers
770         https://bugs.webkit.org/show_bug.cgi?id=138294
771
772         Reviewed by Eric Carlson.
773
774         After r175268 we get lots of separate small layers in the video
775         controls (but they pop into a single layer when opacity animates).
776         
777         Fix this by putting an explicit z-index on -webkit-media-controls-panel
778         which is the element that animates opacity.
779
780         * Modules/mediacontrols/mediaControlsApple.css:
781         (audio::-webkit-media-controls-panel):
782
783 2014-11-03  Commit Queue  <commit-queue@webkit.org>
784
785         Unreviewed, rolling out r175406, r175413, and r175423.
786         https://bugs.webkit.org/show_bug.cgi?id=138327
787
788         Multipart tests are still broken (Requested by ap on #webkit).
789
790         Reverted changesets:
791
792         "Eliminate ResourceBuffer and use SharedBuffer directly
793         instead"
794         https://bugs.webkit.org/show_bug.cgi?id=138174
795         http://trac.webkit.org/changeset/175406
796
797         "Unreviewed, iOS build fix since 175406."
798         http://trac.webkit.org/changeset/175413
799
800         "Fix assertion in CachedResource::addDataBuffer"
801         http://trac.webkit.org/changeset/175423
802
803 2014-11-03  Chris Dumez  <cdumez@apple.com>
804
805         Unreviewed, fix bad assertion in r175487.
806
807         I mistakenly used it != values.end() instead of it == values.end()
808         so the debug bots are crashing.
809
810         * css/StyleResolver.cpp:
811         (WebCore::createGridPosition):
812
813 2014-11-03  Csaba Osztrogonác  <ossy@webkit.org>
814
815         Fix the !ENABLE(VIDEO) build after r175279
816         https://bugs.webkit.org/show_bug.cgi?id=138320
817
818         Reviewed by Jer Noble.
819
820         * page/ChromeClient.h:
821
822 2014-11-03  Chris Dumez  <cdumez@apple.com>
823
824         Support modern range loops over CSSValueList
825         https://bugs.webkit.org/show_bug.cgi?id=138285
826
827         Reviewed by Andreas Kling.
828
829         Add support for modern range loops over CSSValueList objects.
830         Port the code base to using range loops for CSSValueList objects and
831         drop the CSSValueListInspector / CSSValueListIterator classes as they
832         are no longer needed.
833
834         No new tests, no behavior change.
835
836 2014-11-03  Andreas Kling  <akling@apple.com>
837
838         RenderCounter shouldn't need a pre-destructor hook.
839         <https://webkit.org/b/138316>
840
841         Reviewed by Antti Koivisto.
842
843         RenderCounter will automatically register/unregister itself with
844         the RenderView when constructed/destroyed.
845
846         It was using a willBeDestroyed() hook because it used to be that you
847         couldn't get to the RenderView in the destructor. That's no longer
848         an issue as Document promises that RenderView is the last render tree
849         node to go away.
850
851         * rendering/RenderCounter.cpp:
852         (WebCore::RenderCounter::~RenderCounter):
853         (WebCore::RenderCounter::willBeDestroyed): Deleted.
854         * rendering/RenderCounter.h:
855
856 2014-11-03  Tim Horton  <timothy_horton@apple.com>
857
858         Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
859         https://bugs.webkit.org/show_bug.cgi?id=138300
860         <rdar://problem/18855863>
861
862         Reviewed by Simon Fraser.
863
864         * WebCore.exp.in:
865         * page/FrameSnapshotting.cpp:
866         (WebCore::snapshotSelection):
867         Move knowledge that selectionBounds can be empty down to WebCore.
868
869 2014-11-03  Joseph Pecoraro  <pecoraro@apple.com>
870
871         Web Inspector: Show Selector's Specificity
872         https://bugs.webkit.org/show_bug.cgi?id=138189
873
874         Reviewed by Timothy Hatcher.
875
876         Test: inspector/css/selector-specificity.html
877
878         * css/CSSSelector.h:
879         Remove very stale comment. '*' is a starAtom now instead of a special -1 tag.
880         Made the specificity masks public class constants.
881
882         * inspector/InspectorStyleSheet.h:
883         * inspector/InspectorStyleSheet.cpp:
884         (WebCore::InspectorStyle::buildArrayForComputedStyle):
885         (WebCore::InspectorStyle::styleWithProperties):
886         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
887         Drive by use release() in some cases to reduce ref count churn.
888
889         (WebCore::buildObjectForSelectorHelper):
890         (WebCore::selectorsFromSource):
891         (WebCore::InspectorStyleSheet::buildObjectForSelector):
892         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
893         Build CSSSelector objects for SelectorLists.
894
895 2014-11-03  Chris Dumez  <cdumez@apple.com>
896
897         Move -webkit-shape-outside to the new StyleBuilder
898         https://bugs.webkit.org/show_bug.cgi?id=138296
899
900         Reviewed by Zoltan Horvath.
901
902         Move -webkit-shape-outside to the new StyleBuilder, using custom
903         code as it does not always call setShapeOutside().
904
905         No new tests, no behavior change.
906
907         * css/CSSPropertyNames.in:
908         * css/DeprecatedStyleBuilder.cpp:
909         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
910         (WebCore::ApplyPropertyShape::setValue): Deleted.
911         (WebCore::ApplyPropertyShape::applyValue): Deleted.
912         (WebCore::ApplyPropertyShape::createHandler): Deleted.
913         * css/StyleBuilderCustom.h:
914         (WebCore::StyleBuilderFunctions::applyValueWebkitShapeOutside):
915
916 2014-11-03  Alexey Proskuryakov  <ap@apple.com>
917
918         REGRESSION: Using a media element changes window.name
919         https://bugs.webkit.org/show_bug.cgi?id=138278
920         rdar://problem/18704134
921
922         Apply the same fix to mediaControlsBase.js. I do not know who uses this file, but
923         there is no reason to have the bug there.
924
925         * Modules/mediacontrols/mediaControlsBase.js:
926         (Controller.prototype.addVideoListeners):
927         (Controller.prototype.removeVideoListeners):
928         (Controller.prototype.disconnectControls):
929
930 2014-11-03  Andreas Kling  <akling@apple.com>
931
932         RenderLayerModelObject shouldn't need a pre-destructor hook.
933         <https://webkit.org/b/138314>
934
935         Reviewed by Antti Koivisto.
936
937         Move code from the willBeDestroyed() pre-destructor hook to the regular
938         ~RenderLayerModelObject() destructor.
939
940         We just need to unregister the renderer from the FrameView's set of
941         viewport-constrained objects. That doesn't require being able to walk
942         the render tree or call virtuals, which is the main reason you'd use
943         willBeDestroyed().
944
945         * rendering/RenderLayerModelObject.cpp:
946         (WebCore::RenderLayerModelObject::~RenderLayerModelObject):
947         (WebCore::RenderLayerModelObject::willBeDestroyed): Deleted.
948         * rendering/RenderLayerModelObject.h:
949
950 2014-11-03  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
951
952         [EFL] Fix the build if LOG_DISABLED=0 in release mode
953         https://bugs.webkit.org/show_bug.cgi?id=138309
954
955         Reviewed by Chris Dumez.
956
957         * platform/efl/LoggingEfl.cpp:
958
959 2014-11-03  Chris Dumez  <cdumez@apple.com>
960
961         Move 'zoom' CSS property to the new StyleBuilder
962         https://bugs.webkit.org/show_bug.cgi?id=138297
963
964         Reviewed by Antti Koivisto.
965
966         Move 'zoom' CSS property from DeprecatedStyleBuilder to the new
967         StyleBuilder by using custom code as it requires special handling.
968
969         No new tests, no behavior change.
970
971         * css/makeprop.pl:
972         Add support for Custom=All StyleBuilder option to indicate
973         that the property requires custom code to set the initial,
974         inherit and current values.
975
976 2014-11-03  Sungmann Cho  <sungmann.cho@navercorp.com>
977
978         AX: Fix some minor typos related to the word "accessibility".
979         https://bugs.webkit.org/show_bug.cgi?id=138299
980
981         Reviewed by Chris Fleizach.
982
983         No new tests, no behavior change.
984
985         * accessibility/AccessibilityNodeObject.cpp:
986         (WebCore::shouldUseAccessibilityObjectInnerText):
987         (WebCore::AccessibilityNodeObject::textUnderElement):
988         (WebCore::shouldUseAccessiblityObjectInnerText): Deleted.
989         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
990         (getRunAttributesFromAccessibilityObject):
991         (webkitAccessibleTextGetRunAttributes):
992         (getRunAttributesFromAccesibilityObject): Deleted.
993         * page/CaptionUserPreferencesMediaAF.cpp:
994         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
995
996 2014-11-02  Chris Dumez  <cdumez@apple.com>
997
998         Move string-typed properties to the new StyleBuilder
999         https://bugs.webkit.org/show_bug.cgi?id=138295
1000
1001         Reviewed by Antti Koivisto.
1002
1003         Move string-typed properties to the new StyleBuilder:
1004         -webkit-hyphenate-character
1005         -webkit-line-grid
1006         -webkit-flow-into
1007         -webkit-flow-from
1008
1009         No new tests, no behavior change.
1010
1011 2014-11-02  Chris Dumez  <cdumez@apple.com>
1012
1013         Unreviewed, rebaseline bindings tests after r175462.
1014
1015         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1016         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1017         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1018         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1019         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1020         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1021         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1022         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1023         * bindings/scripts/test/JS/JSTestInterface.cpp:
1024         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
1025         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1026         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1027         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1028         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1029         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1030         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1031         * bindings/scripts/test/JS/JSTestObj.cpp:
1032         (WebCore::JSTestObjConstructor::constructJSTestObj):
1033         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1034         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1035         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1036         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1037         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1038         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1039         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1040         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1041         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1042         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1043         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1044         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1045         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1046         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1047         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1048         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
1049         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1050         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1051         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1052         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1053         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1054         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1055         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1056         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1057         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1058         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1059         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1060         (WebCore::jsTestObjConstructorFunctionClassMethod2):
1061         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1062         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1063         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1064         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1065         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1066         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1067         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
1068         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
1069         (WebCore::jsTestObjPrototypeFunctionConvert1):
1070         (WebCore::jsTestObjPrototypeFunctionConvert2):
1071         (WebCore::jsTestObjPrototypeFunctionConvert4):
1072         (WebCore::jsTestObjPrototypeFunctionConvert5):
1073         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1074         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
1075         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
1076         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1077         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1078         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1079         (WebCore::jsTestObjPrototypeFunctionAny):
1080         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1081         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
1082         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
1083         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
1084         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
1085         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1086         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1087         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1088         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1089         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1090         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1091         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1092         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
1093         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1094
1095 2014-11-02  Chris Dumez  <cdumez@apple.com>
1096
1097         Reduce the cost of argumentCount checks in the JS bindings
1098         https://bugs.webkit.org/show_bug.cgi?id=138289
1099
1100         Reviewed by Sam Weinig.
1101
1102         Slightly reduce the cost of argumentCount checks in the JS bindings by
1103         hinting to the compiler that it is UNLIKELY that those methods are
1104         called with too few arguments.
1105
1106         I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
1107         performance test.
1108
1109         No new tests, no behavior change.
1110
1111         * bindings/scripts/CodeGeneratorJS.pm:
1112         (GenerateArgumentsCountCheck):
1113
1114 2014-11-01  Alexey Proskuryakov  <ap@apple.com>
1115
1116         REGRESSION: Using a media element changes window.name
1117         https://bugs.webkit.org/show_bug.cgi?id=138278
1118         rdar://problem/18704134
1119
1120         Reviewed by Jer Noble.
1121
1122         Test: fast/media/window-name.html
1123
1124         Use an actual variable for name (and while at it, for "item" as well).
1125
1126         * Modules/mediacontrols/mediaControlsApple.js:
1127         (Controller.prototype.addVideoListeners):
1128         (Controller.prototype.removeVideoListeners):
1129         (Controller.prototype.disconnectControls):
1130
1131 2014-11-01  Chris Dumez  <cdumez@apple.com>
1132
1133         Move "direction" CSS property to the new StyleBuilder
1134         https://bugs.webkit.org/show_bug.cgi?id=138288
1135
1136         Reviewed by Sam Weinig.
1137
1138         Move "direction" CSS property to the new StyleBuilder by using custom
1139         code as it requires special handling to call
1140         Document::setDirectionSetOnDocumentElement() when necessary.
1141
1142         No new tests, no behavior change.
1143
1144         * css/CSSPropertyNames.in:
1145         * css/DeprecatedStyleBuilder.cpp:
1146         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1147         (WebCore::ApplyPropertyDirection::applyValue): Deleted.
1148         (WebCore::ApplyPropertyDirection::createHandler): Deleted.
1149         * css/StyleBuilderCustom.h:
1150         (WebCore::StyleBuilderFunctions::applyValueDirection):
1151
1152 2014-11-01  Sam Weinig  <sam@webkit.org>
1153
1154         Move the -webkit-transform property to the new StyleBuilder
1155         https://bugs.webkit.org/show_bug.cgi?id=138283
1156
1157         Reviewed by Chris Dumez.
1158
1159         Move the -webkit-transform property from StyleResolver to the new
1160         generated StyleBuilder. Adds a converter for TransformOperations.
1161
1162         * css/CSSPropertyNames.in:
1163         * css/StyleBuilderConverter.h:
1164         (WebCore::StyleBuilderConverter::convertTransform):
1165         * css/StyleResolver.cpp:
1166         (WebCore::StyleResolver::applyProperty):
1167         * css/TransformFunctions.cpp:
1168         (WebCore::transformsForValue):
1169         * css/TransformFunctions.h:
1170         * css/WebKitCSSMatrix.cpp:
1171         (WebCore::WebKitCSSMatrix::setMatrixValue):
1172
1173 2014-11-01  Benjamin Poulain  <bpoulain@apple.com>
1174
1175         Fix the specificity of the extended :not() selector
1176         https://bugs.webkit.org/show_bug.cgi?id=138275
1177
1178         Reviewed by Andreas Kling.
1179
1180         The current draft says "The specificity of a :not() pseudo-class
1181         is the specificity of the most specifc complex selector in its selector list."
1182
1183         It is still unclear how :not() plays with other new selectors. Until that is clarified,
1184         this only handle the simple cases.
1185
1186         Tests: fast/css/not-self-specificity.html
1187                fast/css/not-specificity-1.html
1188                fast/css/not-specificity-2.html
1189                fast/css/not-specificity-3.html
1190                fast/css/not-specificity-4.html
1191                fast/css/not-specificity-5.html
1192                fast/css/not-specificity-6.html
1193
1194         * css/CSSSelector.cpp:
1195         (WebCore::CSSSelector::specificityForOneSelector):
1196
1197 2014-10-31  Benjamin Poulain  <bpoulain@apple.com>
1198
1199         Fix the Debug builds after r175446
1200
1201         * css/CSSSelector.cpp:
1202         (WebCore::CSSSelector::selectorText):
1203
1204 2014-10-31  Dhi Aurrahman  <diorahman@rockybars.com>
1205
1206         Add initial parsing functionality of :lang pseudo class in Selectors Level 4.
1207         https://bugs.webkit.org/show_bug.cgi?id=138170
1208
1209         Reviewed by Benjamin Poulain.
1210
1211         Add initial parsing functionality of :lang pseudo class in Selectors Level 4,
1212         as specified in [1].
1213
1214         It parses comma-separated list of string arguments. Currently, it throws error
1215         on arguments with "*" (e.g. :lang(zh, *-hant)).
1216
1217         Add additional test file fast/selectors/lang-invalid.html along side the 
1218         fast/css/css-selector-text.html.
1219
1220         [1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
1221
1222         Test: fast/selectors/lang-invalid.html
1223
1224         * css/CSSGrammar.y.in:
1225         * css/CSSParser.cpp:
1226         (WebCore::CSSParser::detectFunctionTypeToken):
1227         * css/CSSParserValues.cpp:
1228         (WebCore::CSSParserSelector::setArgumentList):
1229         * css/CSSParserValues.h:
1230         * css/CSSSelector.cpp:
1231         (WebCore::appendArgumentList):
1232         (WebCore::CSSSelector::selectorText):
1233         (WebCore::CSSSelector::setArgumentList):
1234         * css/CSSSelector.h:
1235         (WebCore::CSSSelector::argumentList):
1236         * css/SelectorChecker.cpp:
1237         (WebCore::SelectorChecker::checkOne):
1238         * cssjit/SelectorCompiler.cpp:
1239         (WebCore::SelectorCompiler::addPseudoClassType):
1240
1241 2014-10-31  Chris Dumez  <cdumez@apple.com>
1242
1243         StyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines
1244         https://bugs.webkit.org/show_bug.cgi?id=138270
1245
1246         Reviewed by Antti Koivisto.
1247
1248         Stop using custom code for -webkit-hyphenate-limit-lines in the new
1249         StyleBuilder. We don't really need to, we can just have a Converter
1250         specific to this property.
1251
1252         No new tests, no behavior change.
1253
1254         * css/CSSPropertyNames.in:
1255         * css/StyleBuilderConverter.h:
1256         (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
1257         * css/StyleBuilderCustom.h:
1258         (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): Deleted.
1259
1260 2014-10-31  Chris Dumez  <cdumez@apple.com>
1261
1262         Support throttling of DOMTimers using nested setTimeout() calls
1263         https://bugs.webkit.org/show_bug.cgi?id=138262
1264
1265         Reviewed by Gavin Barraclough.
1266
1267         Extend DOMTimers throttling support to timers that are using nested
1268         setTimeout() calls instead of a setInterval(). To achieve this, this
1269         patch introduces a NestedTimersVector singleton class where nested
1270         timers are appended, and for which we potentially update the next
1271         firing time, after the parent timer is done executing.
1272
1273         I have verified this helps on cnn.com for example, which has timers
1274         interacting with non-visible plugins that are scheduled using nested
1275         setTimeout() calls with a frequency of 150 / 200 ms.
1276
1277         * page/DOMTimer.cpp:
1278         (WebCore::NestedTimersVector::NestedTimersVector):
1279         (WebCore::NestedTimersVector::~NestedTimersVector):
1280         (WebCore::NestedTimersVector::registerTimer):
1281         (WebCore::NestedTimersVector::begin):
1282         (WebCore::NestedTimersVector::end):
1283         (WebCore::DOMTimer::install):
1284         (WebCore::DOMTimer::updateThrottlingStateIfNecessary):
1285         (WebCore::DOMTimer::fired):
1286         * page/DOMTimer.h:
1287
1288 2014-10-31  Chris Dumez  <cdumez@apple.com>
1289
1290         Move -webkit-marquee-increment property to the new StyleBuilder
1291         https://bugs.webkit.org/show_bug.cgi?id=138208
1292
1293         Reviewed by Andreas Kling.
1294
1295         Move -webkit-marquee-increment property from DeprecatedStyleBuilder to
1296         the new StyleBuilder so that it is generated from CSSPropertyNames.in.
1297         Custom code is used to set the value due to the !length.isUndefined()
1298         check before calling setMarqueeIncrement().
1299
1300         Test: fast/css/webkit-marquee-increment-bad-value.html
1301
1302         * css/CSSPropertyNames.in:
1303         * css/DeprecatedStyleBuilder.cpp:
1304         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1305         (WebCore::ApplyPropertyLength::setValue): Deleted.
1306         (WebCore::ApplyPropertyLength::applyValue): Deleted.
1307         (WebCore::ApplyPropertyLength::createHandler): Deleted.
1308         (WebCore::ApplyPropertyMarqueeIncrement::applyValue): Deleted.
1309         (WebCore::ApplyPropertyMarqueeIncrement::createHandler): Deleted.
1310         * css/StyleBuilderCustom.h:
1311         (WebCore::StyleBuilderFunctions::applyValueWebkitMarqueeIncrement):
1312
1313 2014-10-31  Simon Fraser  <simon.fraser@apple.com>
1314
1315         Brace cleanup in StyleResolver::adjustRenderStyle()
1316         https://bugs.webkit.org/show_bug.cgi?id=138267
1317
1318         Reviewed by Chris Dumez.
1319
1320         No braces for single-line clauses.
1321
1322         * css/StyleResolver.cpp:
1323         (WebCore::StyleResolver::adjustRenderStyle):
1324
1325 2014-10-31  Chris Dumez  <cdumez@apple.com>
1326
1327         Fix several warnings reported by clang static analyzer in WebCore
1328         https://bugs.webkit.org/show_bug.cgi?id=138258
1329
1330         Reviewed by Joseph Pecoraro.
1331
1332         Fix several warnings reported by clang static analyzer in WebCore
1333         related to variable unnecessary assignments and scope.
1334
1335         No new tests, no behavior change.
1336
1337         * dom/ContainerNode.cpp:
1338         (WebCore::ContainerNode::getUpperLeftCorner):
1339         * html/HTMLMediaElement.cpp:
1340         (WebCore::HTMLMediaElement::parseAttribute):
1341         * inspector/InspectorStyleTextEditor.cpp:
1342         (WebCore::InspectorStyleTextEditor::replaceProperty):
1343         * page/ContextMenuController.cpp:
1344         (WebCore::openNewWindow):
1345         * page/DragController.cpp:
1346         (WebCore::createMouseEvent):
1347         * rendering/RenderBlockFlow.cpp:
1348         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
1349         * rendering/svg/SVGInlineTextBox.cpp:
1350         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1351
1352 2014-10-31  Simon Fraser  <simon.fraser@apple.com>
1353
1354         Whitespace cleanup in Screen.h
1355         https://bugs.webkit.org/show_bug.cgi?id=138265
1356
1357         Reviewed by Chris Dumez.
1358
1359         No indent for namespaces. Mark 'final'. Fix * placement.
1360
1361         * page/Screen.h:
1362         (WebCore::Screen::create):
1363
1364 2014-10-31  Simon Fraser  <simon.fraser@apple.com>
1365
1366         Change the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnMainThread(), which has Obj-C overhead
1367         https://bugs.webkit.org/show_bug.cgi?id=138263
1368
1369         Reviewed by Geoffrey Garen.
1370
1371         callOnMainThread() uses -performSelector:onMainThread:withObject:waitUntilDone:, so
1372         it's slightly more efficient to use RunLoop::main().dispatch().
1373
1374         * page/scrolling/ThreadedScrollingTree.cpp:
1375         (WebCore::ThreadedScrollingTree::invalidate):
1376         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
1377         (WebCore::ThreadedScrollingTree::handleWheelEventPhase):
1378
1379 2014-10-31  Benjamin Poulain  <bpoulain@apple.com>
1380
1381         Pseudo classes with an escaped parenthesis generate invalid rules
1382         https://bugs.webkit.org/show_bug.cgi?id=138266
1383
1384         Reviewed by Antti Koivisto.
1385
1386         Since the functional pseudo classes are part of the list of PseudoClassAndCompatibilityElement,
1387         they could be created by the rule
1388              pseudo:
1389                  ':' IDENT
1390         if the parenthesis is escaped. For example, with ":not\\(", the IDENT would be
1391         "not(", CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector would
1392         find a pseudo class type of PseudoClassNot, and the action would create an invalid
1393         CSSSelector for a :not() without nested selector.
1394
1395         This patch fixes the issue by detecting the function case in
1396         CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector().
1397
1398         An other solution would be to split PseudoClassAndCompatibilityElement into simple pseudo class
1399         and functional pseudo classes. We may do that some day but at the moment it is a lot of work with
1400         a little benefit.
1401
1402         Tests: fast/css/crash-on-incomplete-webkit-any.html
1403                fast/css/pseudo-escaped-parenthesis.html
1404                fast/selectors/invalid-functional-pseudo-class.html
1405
1406         * css/CSSParserValues.cpp:
1407         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
1408
1409 2014-10-31  Chris Dumez  <cdumez@apple.com>
1410
1411         Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
1412         https://bugs.webkit.org/show_bug.cgi?id=138227
1413
1414         Reviewed by Benjamin Poulain.
1415
1416         Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement()
1417         a bit to do less if checks. The previous implementation was doing 7 if
1418         checks no matter the input value. The new implementation does less
1419         if checks depending on the input type.
1420
1421         Also, the isImageControlsRootElement() was showing in the profiles so
1422         I updated the condition to only do this virtual function call if the
1423         input is an HTMLDivElement (which we can check more efficiently).
1424
1425         With the change, I see that we're spending about ~26% less time in
1426         this method when running speedometer. However, the impact on the
1427         overall score is within noise.
1428
1429         No new tests, no behavior change.
1430
1431         * css/CSSDefaultStyleSheets.cpp:
1432         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1433
1434 2014-10-31  Antti Koivisto  <antti@apple.com>
1435
1436         Fix assertion in CachedResource::addDataBuffer
1437
1438         * loader/cache/CachedRawResource.cpp:
1439         (WebCore::CachedRawResource::addDataBuffer):
1440
1441             Don't call to base class if buffering mode changed (happens with some special top level document types).
1442
1443 2014-10-31  Said Abou-Hallawa  <sabouhallawa@apple.com>
1444
1445         Remove webkit prefix from CSS columns.
1446         https://bugs.webkit.org/show_bug.cgi?id=137132.
1447
1448         Reviewed by Dean Jackson.
1449
1450         CSS columns properties are ready for un-prefixing. There are still a couple
1451         that we haven't implemented, such as the ones starting with "break-", so we're
1452         just going to do the ones starting with "column-".  The list of column un-
1453         prefixed properties in this change set is:
1454             - column-count
1455             - column-fill
1456             - column-gap
1457             - column-progression
1458             - column-rule
1459             - column-rule-color
1460             - column-rule-style
1461             - column-rule-width
1462             - column-span
1463             - column-width
1464             - columns
1465
1466         Tests: fast/multicol/column-box-alignment-rtl.html
1467                fast/multicol/multicol-aliases.html
1468                imported/w3c/css/multicol/multicol-basic-001.html
1469                imported/w3c/css/multicol/multicol-basic-002.html
1470                imported/w3c/css/multicol/multicol-basic-003.html
1471                imported/w3c/css/multicol/multicol-basic-004.html
1472
1473         Add new un-prefixed column properties and make the -webkit* ones be aliases
1474         to the new ones.
1475         * css/CSSPropertyNames.in:
1476
1477         Use the new enums CSSPropertyColumn* instead of the prefixed ones.
1478         * css/CSSComputedStyleDeclaration.cpp:
1479         (WebCore::ComputedStyleExtractor::propertyValue):
1480         * css/CSSParser.cpp:
1481         (WebCore::isColorPropertyID):
1482         (WebCore::isValidKeywordPropertyAndValue):
1483         (WebCore::isKeywordPropertyID):
1484         (WebCore::CSSParser::parseValue):
1485         * css/DeprecatedStyleBuilder.cpp:
1486         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1487         * css/StyleProperties.cpp:
1488         (WebCore::StyleProperties::getPropertyValue):
1489         * css/StylePropertyShorthand.cpp:
1490         (WebCore::webkitColumnsShorthand):
1491         (WebCore::webkitColumnRuleShorthand):
1492         (WebCore::shorthandForProperty):
1493         (WebCore::matchingShorthandsForLonghand):
1494         * css/StyleResolver.cpp:
1495         (WebCore::isValidVisitedLinkProperty):
1496         (WebCore::StyleResolver::applyProperty):
1497         * page/animation/CSSPropertyAnimation.cpp:
1498         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1499         * rendering/RenderMultiColumnSet.cpp:
1500         (WebCore::RenderMultiColumnSet::paintColumnRules):
1501         * rendering/style/RenderStyle.cpp:
1502         (WebCore::RenderStyle::colorIncludingFallback):
1503
1504 2014-10-31  Tim Horton  <timothy_horton@apple.com>
1505
1506         Remove "Add to iPhoto" from the action menu's sharing menu
1507         https://bugs.webkit.org/show_bug.cgi?id=138251
1508         <rdar://problem/18837197>
1509
1510         Reviewed by Anders Carlsson.
1511
1512         * platform/spi/mac/NSSharingServiceSPI.h:
1513         Add 'name' to the NSSharingService SPI header.
1514
1515 2014-10-31  Akos Kiss  <akiss@inf.u-szeged.hu>
1516
1517         Fix type clash warning in supports_error rule of CSSGrammar.
1518         https://bugs.webkit.org/show_bug.cgi?id=138248
1519
1520         Reviewed by Antti Koivisto.
1521
1522         Added explicit actions to supports_error rule in CSSGrammar.y.in since
1523         the default actions caused bison to emit type clash warnings.
1524
1525         No new tests because there is no behavior change.
1526
1527         * css/CSSGrammar.y.in:
1528
1529 2014-10-31  Adrian Perez de Castro  <aperez@igalia.com>
1530
1531         [GTK] Support script message handlers WebKitUserContentManager
1532         https://bugs.webkit.org/show_bug.cgi?id=133730
1533
1534         Reviewed by Carlos Garcia Campos.
1535
1536         Support user script message handlers in WebKitUserContentManager.
1537         This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
1538         an option is added to the CMake build files. The option is disabled
1539         globally by default, and the WebKitGTK port enables it. On the API
1540         level, two new methods to register and unregister names are provided
1541         in the "window.webkit" namespace, and on message reception the
1542         "WebKitUserContentManager::script-message-received" signal is
1543         emitted, using the registered names as signal detail.
1544
1545         * CMakeLists.txt: Conditionally add the needed files to the build
1546         when the ENABLE_USER_MESSAGE_HANDLERS feature is enabled.
1547
1548 2014-10-31  Andrzej Badowski  <a.badowski@samsung.com>
1549
1550         [ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
1551         https://bugs.webkit.org/show_bug.cgi?id=137737
1552
1553         Reviewed by Chris Fleizach.
1554
1555         Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
1556         to more accurately determine accessibility role of the table cell.
1557
1558         Test: accessibility/table-cells-roles.html
1559
1560         * accessibility/AccessibilityARIAGridCell.cpp:
1561         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1562         Change to const.
1563         * accessibility/AccessibilityARIAGridCell.h:
1564         Change rowIndexRange function to const.
1565         * accessibility/AccessibilityTableCell.cpp:
1566         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
1567         Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
1568         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
1569         Add a case of direct placement a row in the table.
1570         (WebCore::AccessibilityTableCell::isRowHeaderCell):
1571         Add a case of direct placement a row in the table.
1572         (WebCore::AccessibilityTableCell::rowIndexRange):
1573         Change to const.
1574         * accessibility/AccessibilityTableCell.h:
1575         Change rowIndexRange function to const.
1576
1577 2014-10-30  Darin Adler  <darin@apple.com>
1578
1579         Eliminate ResourceBuffer and use SharedBuffer directly instead
1580         https://bugs.webkit.org/show_bug.cgi?id=138174
1581
1582         Reviewed by Antti Koivisto.
1583
1584         Refactoring, with test coverage across many existing tests.
1585
1586         * CMakeLists.txt: Deleted ResourceBuffer.cpp.
1587
1588         * WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
1589         for one function that used to take a PassRefPtr but now takes a reference instead.
1590
1591         * WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
1592         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1593         * WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
1594
1595         * bindings/objc/DOMUIKitExtensions.mm:
1596         (-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
1597         * editing/ios/EditorIOS.mm:
1598         (WebCore::Editor::writeImageToPasteboard): Ditto.
1599         * editing/mac/EditorMac.mm:
1600         (WebCore::Editor::writeImageToPasteboard): Ditto.
1601
1602         * html/ImageDocument.cpp:
1603         (WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
1604         also pass a reference only if non-null rather than passing a pointer.
1605         (WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
1606
1607         * inspector/InspectorPageAgent.cpp:
1608         (WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
1609         (WebCore::InspectorPageAgent::mainResourceContent): Ditto.
1610         * inspector/InspectorResourceAgent.cpp:
1611         (WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
1612         (WebCore::InspectorResourceAgent::didFailLoading): Ditto.
1613
1614         * loader/DocumentLoader.cpp:
1615         (WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
1616         and use the copy function rather than a hand-written alternative.
1617         (WebCore::DocumentLoader::maybeCreateArchive): Ditto.
1618         (WebCore::DocumentLoader::mainResource): Ditto.
1619         (WebCore::DocumentLoader::subresource): Ditto.
1620         (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
1621
1622         * loader/DocumentLoader.h: Changed mainResourceData to return a
1623         PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
1624         but it currently returns a newly created buffer when there is substitute
1625         data and can also return null, even though many callers assume it will not!
1626
1627         * loader/MediaResourceLoader.cpp:
1628         (WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
1629         function bufferReceived.
1630         (WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
1631         argument to client function loadFinished.
1632
1633         * loader/ResourceBuffer.cpp: Removed.
1634         * loader/ResourceBuffer.h: Removed.
1635
1636         * loader/ResourceLoader.cpp:
1637         (WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
1638
1639         * loader/ResourceLoader.h:
1640         (WebCore::ResourceLoader::resourceData): Use SharedBuffer.
1641
1642         * loader/SubresourceLoader.cpp:
1643         (WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
1644         (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
1645
1646         * loader/TextTrackLoader.cpp:
1647         (WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
1648         * loader/appcache/ApplicationCacheGroup.cpp:
1649         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
1650         * loader/archive/cf/LegacyWebArchive.cpp:
1651         (WebCore::LegacyWebArchive::create): Ditto.
1652
1653         * loader/cache/CachedCSSStyleSheet.cpp:
1654         (WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
1655         * loader/cache/CachedCSSStyleSheet.h: Ditto.
1656         * loader/cache/CachedFont.cpp:
1657         (WebCore::CachedFont::finishLoading): Ditto.
1658         (WebCore::CachedFont::ensureCustomFontData): Ditto.
1659         * loader/cache/CachedFont.h: Ditto.
1660
1661         * loader/cache/CachedImage.cpp:
1662         (WebCore::CachedImage::didAddClient): Use SharedBuffer.
1663         (WebCore::CachedImage::didRemoveClient): Ditto.
1664         (WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
1665         a reference rather than a pointer.
1666         (WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
1667         to base class and changed to take a reference rather than a pointer.
1668         (WebCore::CachedImage::addData): Ditto. Also added call through to base class.
1669         (WebCore::CachedImage::finishLoading): Ditto.
1670         * loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
1671         to be unsigned instead of unsigend char.
1672
1673         * loader/cache/CachedRawResource.cpp:
1674         (WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
1675         (WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
1676         a reference rather than a pointer.
1677         (WebCore::CachedRawResource::addData): Ditto.
1678         (WebCore::CachedRawResource::finishLoading): Ditto.
1679         (WebCore::CachedRawResource::canReuse): Ditto.
1680         * loader/cache/CachedRawResource.h: Ditto.
1681
1682         * loader/cache/CachedResource.cpp:
1683         (WebCore::CachedResource::CachedResource): Reordered data members due to change
1684         in header.
1685         (WebCore::CachedResource::addDataBuffer): Changed argument type.
1686         (WebCore::CachedResource::finishLoading): Ditto.
1687         (WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
1688         table lookup by using the return value from the remove function.
1689         (WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
1690         of using a function named "schedule" to allocate the callback object.
1691         (WebCore::CachedResource::Callback::Callback): Changed function and data member
1692         name.
1693         (WebCore::CachedResource::Callback::cancel): Ditto.
1694         (WebCore::CachedResource::Callback::timerFired): Ditto.
1695         (WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
1696
1697         * loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
1698         data members and one function member private instead of protected. Also renamed the
1699         CachedResource::CachedResourceCallback function CachedResource::Callback and moved
1700         its definition out of the CachedResource class definition.
1701
1702         * loader/cache/CachedResourceClient.h: Removed unneeded include.
1703
1704         * loader/cache/CachedSVGDocument.cpp:
1705         (WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
1706
1707         * loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
1708
1709         * loader/cache/CachedScript.cpp:
1710         (WebCore::CachedScript::finishLoading): Use SharedBuffer.
1711         * loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
1712         forward declaration.
1713
1714         * loader/cache/CachedTextTrack.cpp:
1715         (WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
1716         call addDataBuffer.
1717         (WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
1718         (WebCore::CachedTextTrack::finishLoading): Ditto.
1719         * loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
1720         destructor. Updated for above changes.
1721
1722         * loader/cache/CachedXSLStyleSheet.cpp:
1723         (WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
1724         * loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
1725         private rather than protected. Added an explicit virtual constructor so we can
1726         compile without knowing how to ref/deref TextResourceDecoder.
1727
1728         * loader/cf/SubresourceLoaderCF.cpp:
1729         (WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
1730         and to call addDataBuffer only if there is a new data buffer.
1731
1732         * loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
1733         * loader/cocoa/DiskCacheMonitorCocoa.mm:
1734         (WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
1735         (WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
1736
1737         * loader/icon/IconLoader.cpp:
1738         (WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
1739         RefPtr<ResourceBuffer>.
1740
1741         * loader/mac/ResourceBuffer.mm: Removed.
1742
1743         * loader/mac/ResourceLoaderMac.mm:
1744         (WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
1745
1746         * platform/SharedBuffer.cpp:
1747         (WebCore::SharedBuffer::clear): Use a modern for loop.
1748         (WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
1749         this never returns null. Use modern for loops.
1750         (WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
1751
1752         * platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
1753         Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
1754         a pointer.
1755
1756         * platform/cf/SharedBufferCF.cpp:
1757         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
1758         instead of a pointer.
1759
1760         * platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
1761         bufferReceived and unneeded buffer argument from loadFinished. Also marked the
1762         constructor explicit.
1763
1764         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1765         Removed include of ResourceBuffer.h.
1766         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1767         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
1768         SharedBuffer directly.
1769
1770         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1771         (CachedResourceStreamingClient::loadFinished): Updated for change to
1772         PlatformMediaResourceLoaderClient.
1773
1774         * platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
1775
1776         * platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
1777         tryReplaceContentsWithPlatformBuffer function.
1778
1779 2014-10-30  Chris Dumez  <cdumez@apple.com>
1780
1781         Move border-image-source / -webkit-mask-box-image-source to the new StyleBuilder
1782         https://bugs.webkit.org/show_bug.cgi?id=138209
1783
1784         Reviewed by Andreas Kling.
1785
1786         Move border-image-source / -webkit-mask-box-image-source CSS properties
1787         from DeprecatedStyleBuilder to the new StyleBuilder so that they are
1788         now generated from CSSPropertyNames.in.
1789
1790         No new tests, no behavior change.
1791
1792         * css/CSSPropertyNames.in:
1793         * css/DeprecatedStyleBuilder.cpp:
1794         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1795         (WebCore::ApplyPropertyBorderImageSource::applyValue): Deleted.
1796         (WebCore::ApplyPropertyBorderImageSource::createHandler): Deleted.
1797         * css/StyleBuilderConverter.h:
1798         (WebCore::StyleBuilderConverter::convertBorderImageSource):
1799
1800 2014-10-30  Jer Noble  <jer.noble@apple.com>
1801
1802         [EME] Add Setting for accessing storage location for MediaKeys data
1803         https://bugs.webkit.org/show_bug.cgi?id=138147
1804
1805         Reviewed by Brady Eidson.
1806
1807         Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
1808         by piping that request down from WebKit and WebKit2 into Settings.
1809
1810         * html/HTMLMediaElement.cpp:
1811         (WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
1812             append the current origin.
1813         * html/HTMLMediaElement.h:
1814         * page/Settings.h:
1815         (WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
1816         (WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
1817         * platform/graphics/MediaPlayer.cpp:
1818         (WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
1819         * platform/graphics/MediaPlayer.h:
1820         (WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
1821         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1822         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
1823         (WebCore::sessionStorageDirectory): Deleted.
1824
1825 2014-10-30  Dana Burkart  <dburkart@apple.com>
1826
1827         <rdar://problem/18821260> Prepare for the mysterious future
1828
1829         Reviewed by Lucas Forschler.
1830
1831         * Configurations/Base.xcconfig:
1832         * Configurations/DebugRelease.xcconfig:
1833         * Configurations/FeatureDefines.xcconfig:
1834         * Configurations/Version.xcconfig:
1835
1836 2014-10-30  Simon Fraser  <simon.fraser@apple.com>
1837
1838         Short-circuit repaints with empty rects
1839         https://bugs.webkit.org/show_bug.cgi?id=138234
1840
1841         Reviewed by Zalan Bujtas.
1842         
1843         Repaints with an empty rectangle are common enough that it's worth
1844         short-circuiting them.
1845
1846         * rendering/RenderObject.cpp:
1847         (WebCore::RenderObject::repaintUsingContainer):
1848
1849 2014-10-30  Chris Dumez  <cdumez@apple.com>
1850
1851         Clean up virtual functions in css/
1852         https://bugs.webkit.org/show_bug.cgi?id=138230
1853
1854         Reviewed by Benjamin Poulain.
1855
1856         Clean up virtual functions in css/ by:
1857         - Making virtual functions final when possible
1858         - Making classes final when possible
1859         - Using 'override' when appropriate
1860         - Explicitly marking functions / destructors as virtual when they are
1861           inherently virtual
1862         - Making isXXX() virtual functions private on XXX classes to avoid
1863           unnecessary type checks
1864
1865         No new tests, no behavior change.
1866
1867         * WebCore.exp.in:
1868         * css/CSSBasicShapes.h:
1869         * css/CSSCharsetRule.h:
1870         * css/CSSComputedStyleDeclaration.h:
1871         * css/CSSCrossfadeValue.h:
1872         * css/CSSFilterImageValue.h:
1873         * css/CSSFontFaceLoadEvent.h:
1874         * css/CSSFontFaceRule.h:
1875         * css/CSSFontFaceSource.h:
1876         * css/CSSImportRule.h:
1877         * css/CSSMediaRule.h:
1878         * css/CSSPageRule.h:
1879         * css/CSSRuleList.h:
1880         (WebCore::StaticCSSRuleList::ref): Deleted.
1881         (WebCore::StaticCSSRuleList::styleSheet): Deleted.
1882         (WebCore::StaticCSSRuleList::length): Deleted.
1883         (WebCore::StaticCSSRuleList::item): Deleted.
1884         (WebCore::LiveCSSRuleList::ref): Deleted.
1885         (WebCore::LiveCSSRuleList::deref): Deleted.
1886         (WebCore::LiveCSSRuleList::length): Deleted.
1887         (WebCore::LiveCSSRuleList::item): Deleted.
1888         (WebCore::LiveCSSRuleList::styleSheet): Deleted.
1889         * css/CSSStyleRule.h:
1890         * css/CSSSupportsRule.h:
1891         * css/CSSUnknownRule.h:
1892         * css/FontLoader.h:
1893         * css/PropertySetCSSStyleDeclaration.h:
1894         (WebCore::PropertySetCSSStyleDeclaration::parentElement):
1895         * css/WebKitCSSKeyframeRule.h:
1896         * css/WebKitCSSViewportRule.h:
1897
1898 2014-10-30  Tim Horton  <timothy_horton@apple.com>
1899
1900         Long spins under rangeExpandedAroundPosition on Yahoo Mail
1901         https://bugs.webkit.org/show_bug.cgi?id=138223
1902         <rdar://problem/18819547>
1903
1904         Reviewed by Enrica Casucci.
1905
1906         * WebCore.exp.in:
1907         Export some things.
1908
1909 2014-10-30  Ada Chan  <adachan@apple.com>
1910
1911         The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
1912         https://bugs.webkit.org/show_bug.cgi?id=138215
1913
1914         Reviewed by Eric Carlson.
1915
1916         Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
1917         to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
1918         update its muted state again taking the Page's muted state into account.
1919
1920         Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
1921         HTMLMediaElement, taking the Page's muted state into account.
1922
1923         Test: media/video-muted-after-setting-page-muted-state.html
1924
1925         * dom/Document.cpp:
1926         (WebCore::Document::pageMutedStateDidChange):
1927         (WebCore::Document::setMuted): Deleted.
1928         * dom/Document.h:
1929         * html/HTMLMediaElement.cpp:
1930         (WebCore::HTMLMediaElement::setMuted):
1931         Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
1932         (WebCore::HTMLMediaElement::updateVolume):
1933         Ditto, and also make sure the MediaController's muted state does not override the Page's
1934         muted state.
1935         (WebCore::HTMLMediaElement::updatePlayState):
1936         Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
1937         (WebCore::HTMLMediaElement::pageMutedStateDidChange):
1938         Call updateVolume(), which will update the MediaPlayer's muted state.
1939         (WebCore::HTMLMediaElement::effectiveMuted):
1940         Figure out the muted value taking Page's muted state into account.
1941         * html/HTMLMediaElement.h:
1942         * page/AudioProducer.h:
1943         * page/Page.cpp:
1944         (WebCore::Page::Page):
1945         (WebCore::Page::setMuted):
1946         Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
1947         if m_muted changes.
1948         * page/Page.h:
1949         (WebCore::Page::isMuted):
1950         * testing/Internals.cpp:
1951         (WebCore::Internals::setPageMuted):
1952         Expose a way to set the Page's muted state in Internals for testing.
1953         * testing/Internals.h:
1954         * testing/Internals.idl:
1955
1956 2014-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
1957
1958         Use references in calculateMinimumPageHeight() for non-optional arguments
1959         https://bugs.webkit.org/show_bug.cgi?id=138231
1960
1961         Reviewed by Dean Jackson.
1962
1963         No new tests because there is no behavior change.
1964
1965         * rendering/RenderBlockFlow.cpp:
1966         (WebCore::calculateMinimumPageHeight):
1967         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
1968
1969 2014-10-30  Chris Dumez  <cdumez@apple.com>
1970
1971         Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
1972         https://bugs.webkit.org/show_bug.cgi?id=138207
1973
1974         Reviewed by Andreas Kling.
1975
1976         Move -webkit-border-image / -webkit-mask-box-image CSS properties to
1977         the new StyleBuilder so that they are now generated from
1978         CSSPropertyNames.in.
1979
1980         No new tests, no behavior change.
1981
1982         * css/CSSPropertyNames.in:
1983         * css/DeprecatedStyleBuilder.cpp:
1984         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1985         (WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
1986         (WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
1987         * css/StyleBuilderConverter.h:
1988         (WebCore::StyleBuilderConverter::convertBorderImage):
1989         (WebCore::StyleBuilderConverter::convertBorderMask):
1990
1991 2014-10-30  Chris Dumez  <cdumez@apple.com>
1992
1993         Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
1994         https://bugs.webkit.org/show_bug.cgi?id=138202
1995
1996         Reviewed by Benjamin Poulain.
1997
1998         Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
1999         1. Using is<HTMLMediaElement>() instead of
2000            (is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
2001            interested in both video and audio elements. This is faster because
2002            it ends up doing:
2003                - virtual call to Element::isMediaElement()
2004            instead of
2005                - Node::isHTMLElement() +
2006                  virtual call to HTMLElement::isHTMLUnknownElement() +
2007                  2 * HTMLElement::hasTagName()
2008         2. Updating HTMLVideoElement / HTMLAudioElement type traits
2009            specializations to:
2010            - Avoid doing any virtual function call if the input type is an
2011              HTMLMediaElement (which is common in the code base).
2012            - Speed up check if the input is an Element by doing:
2013                - virtual call to Element::isMediaElement() +
2014                  HTMLElement::hasTagName()
2015              instead of
2016                - Node::isHTMLElement() +
2017                  virtual call to !HTMLElement::isHTMLUnknownElement() +
2018                  HTMLElement::hasTagName()
2019              The speed stays the same if the input is a Node or an HTMLElement.
2020
2021         No new tests, no behavior change.
2022
2023         * css/CSSDefaultStyleSheets.cpp:
2024         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2025         * dom/make_names.pl:
2026         (defaultTagPropertyHash):
2027         (printTypeHelpers):
2028         * html/HTMLAudioElement.h:
2029         (isType):
2030         * html/HTMLImageLoader.cpp:
2031         * html/HTMLTagNames.in:
2032         * html/HTMLVideoElement.h:
2033         (isType):
2034         * page/ChromeClient.h:
2035
2036 2014-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
2037
2038         Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
2039         https://bugs.webkit.org/show_bug.cgi?id=138228
2040
2041         Reviewed by Simon Fraser.
2042
2043         No new tests because there is no behavior change.
2044
2045         * WebCore.xcodeproj/project.pbxproj:
2046         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2047         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2048         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2049         * platform/spi/cocoa/CoreTextSPI.h: Added.
2050
2051 2014-10-30  Eric Carlson  <eric.carlson@apple.com>
2052
2053         Add diagnostic logging to track page loads.
2054         https://bugs.webkit.org/show_bug.cgi?id=138205
2055         <rdar://problem/18173017>
2056
2057         Reviewed by Jer Noble.
2058
2059         * loader/FrameLoader.cpp:
2060         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
2061
2062         * page/DiagnosticLoggingKeys.cpp:
2063         (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
2064         * page/DiagnosticLoggingKeys.h:
2065
2066 2014-10-24  Philippe Normand  <pnormand@igalia.com>
2067
2068         [GStreamer] Video resolution changes trigger a crash in the TextureMapper
2069         https://bugs.webkit.org/show_bug.cgi?id=137065
2070
2071         Reviewed by Gustavo Noronha Silva.
2072
2073         Switch to GstSample for buffer+caps communication between the
2074         video sink and the player. Using a single object type for this
2075         avoid issues where the caps might not correctly describe the
2076         buffer contents anymore, for example when the video resolution is
2077         changed.
2078
2079         * platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
2080         instead of GstBuffer+GstCaps.
2081         (WebCore::ImageGStreamer::createImage):
2082         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
2083         (ImageGStreamer::ImageGStreamer):
2084         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2085         (WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
2086         now uses a GstSample instead of a GstBuffer.
2087         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2088         Store the current sample instead of a buffer. Also renamed the
2089         mutex protecting access to the sample.
2090         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
2091         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
2092         early if no sample is available. The caps used to get the video
2093         size are store in the sample.
2094         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
2095         GstSample instead of GstBuffer.
2096         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
2097         (WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
2098         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2099         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
2100         GstSample internally. Also removed the now useless current-caps property.
2101         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
2102         mutex protecting access to the sample.
2103         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
2104         (webkit_video_sink_init): Disable last-sample in basesink since we
2105         already store one in our sink anyway.
2106         (webkitVideoSinkTimeoutCallback): Switch to GstSample.
2107         (webkitVideoSinkRender): Ditto.
2108         (unlockSampleMutex): Ditto.
2109         (webkitVideoSinkUnlock): Ditto.
2110         (webkitVideoSinkUnlockStop): Ditto.
2111         (webkitVideoSinkStop): Ditto!
2112         (webkitVideoSinkStart): Ditto.
2113         (webkit_video_sink_class_init): Drop current-caps property.
2114         (webkitVideoSinkGetProperty): Deleted.
2115         (unlockBufferMutex): Deleted.
2116
2117 2014-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2118
2119         FormDataBuilder should not use Document
2120         https://bugs.webkit.org/show_bug.cgi?id=138172
2121
2122         Reviewed by Alexey Proskuryakov.
2123
2124         It's only used by encodingFromAcceptCharset() to fallback to
2125         document input encoding. That method is only used by
2126         FormSubmission::create(), so it could be moved as a static
2127         function to FormSubmission.cpp.
2128
2129         * loader/FormSubmission.cpp:
2130         (WebCore::encodingFromAcceptCharset):
2131         (WebCore::FormSubmission::create):
2132         * platform/network/FormDataBuilder.cpp:
2133         (WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
2134         * platform/network/FormDataBuilder.h:
2135
2136 2014-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
2137
2138         ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
2139         https://bugs.webkit.org/show_bug.cgi?id=138054.
2140
2141         Reviewed by Zalan Bujtas.
2142
2143         A Length of type 'Calculated' can be generated from blending two lengths of
2144         different types. Setting the wordSpacing of the render style should be handled
2145         correctly when the type of the new value is 'Calculated'.
2146
2147         Tests: css3/calculated-word-spacing.html.
2148
2149         Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
2150         * rendering/style/RenderStyle.cpp:
2151         (WebCore::RenderStyle::setWordSpacing):
2152
2153 2014-10-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2154
2155         [CoordinatedGraphics] Use modern for-loops
2156         https://bugs.webkit.org/show_bug.cgi?id=138168
2157
2158         Reviewed by Andreas Kling.
2159
2160         No new tests as there is no change in functionality.
2161
2162         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
2163         (WebCore::CompositingCoordinator::renderNextFrame):
2164         (WebCore::CompositingCoordinator::paintToSurface):
2165         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
2166         (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
2167         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2168         (WebCore::CoordinatedGraphicsLayer::syncChildren):
2169         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
2170         (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
2171         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
2172         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
2173         (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
2174
2175 2014-10-29  Chris Dumez  <cdumez@apple.com>
2176
2177         Final-ize more of TextFieldInputType's virtual functions
2178         https://bugs.webkit.org/show_bug.cgi?id=138194
2179
2180         Reviewed by Andreas Kling.
2181
2182         Final-ize more of TextFieldInputType's virtual functions for
2183         performance.
2184
2185         No new tests, no behavior change.
2186
2187         * html/TextFieldInputType.h:
2188
2189 2014-10-29  Chris Dumez  <cdumez@apple.com>
2190
2191         Clean up virtual functions in inspector/
2192         https://bugs.webkit.org/show_bug.cgi?id=138190
2193
2194         Reviewed by Andreas Kling.
2195
2196         Clean up virtual functions in inspector/ by:
2197         - Making virtual functions final when possible
2198         - Making classes final when possible
2199         - Explicitly marking functions / destructors as virtual when they are
2200           inherently virtual
2201         - Making isXXX() virtual functions private on XXX classes to avoid
2202           unnecessary type checks
2203
2204         No new tests, no behavior change.
2205
2206         * inspector/InspectorApplicationCacheAgent.h:
2207         (WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted.
2208         * inspector/InspectorCSSAgent.h:
2209         * inspector/InspectorDOMAgent.h:
2210         * inspector/InspectorDOMDebuggerAgent.h:
2211         * inspector/InspectorDOMStorageAgent.h:
2212         * inspector/InspectorDatabaseAgent.h:
2213         * inspector/InspectorFrontendClientLocal.h:
2214         * inspector/InspectorIndexedDBAgent.h:
2215         * inspector/InspectorLayerTreeAgent.h:
2216         * inspector/InspectorPageAgent.h:
2217         * inspector/InspectorReplayAgent.h:
2218         * inspector/InspectorResourceAgent.h:
2219         * inspector/InspectorStyleSheet.h:
2220         * inspector/InspectorTimelineAgent.h:
2221         * inspector/InspectorWorkerAgent.h:
2222         * inspector/PageConsoleAgent.h:
2223         * inspector/WorkerInspectorController.h:
2224
2225 2014-10-29  Andreas Kling  <akling@apple.com>
2226
2227         Generalize dirtying of parent's line boxes when taking a renderer out of tree.
2228         <https://webkit.org/b/138152>
2229
2230         Reviewed by Antti Koivisto.
2231
2232         Instead of calling dirtyLinesFromChangedChild() when certain types of renderers
2233         are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree().
2234
2235         This is part of an effort to make render tree teardown less incomprehensible.
2236
2237         We still don't bother at all if we're in the process of tearing down the entire
2238         render tree, since that would be a waste of time.
2239
2240         * rendering/RenderBlock.cpp:
2241         (WebCore::RenderBlock::willBeDestroyed):
2242         * rendering/RenderBlockFlow.cpp:
2243         (WebCore::RenderBlockFlow::willBeDestroyed):
2244         * rendering/RenderElement.cpp:
2245         (WebCore::RenderElement::willBeRemovedFromTree):
2246         * rendering/RenderInline.cpp:
2247         (WebCore::RenderInline::willBeDestroyed):
2248         * rendering/RenderReplaced.cpp:
2249         (WebCore::RenderReplaced::willBeDestroyed): Deleted.
2250         * rendering/RenderReplaced.h:
2251
2252 2014-10-28  Ada Chan  <adachan@apple.com>
2253
2254         Implement WKPageSetMuted(bool).
2255         https://bugs.webkit.org/show_bug.cgi?id=138158
2256
2257         Reviewed by Anders Carlsson.
2258
2259         * WebCore.exp.in:
2260         * page/Page.h:
2261
2262 2014-10-29  Alexey Proskuryakov  <ap@apple.com>
2263
2264         Notify Settings object when its Page object goes away.
2265         https://bugs.webkit.org/show_bug.cgi?id=138183
2266         rdar://problem/18786900
2267
2268         Reviewed by Andreas Kling.
2269
2270         I could not make a test for this issue.
2271
2272         * page/Page.cpp:
2273         (WebCore::Page::~Page):
2274         * page/Settings.cpp:
2275         (WebCore::setImageLoadingSettings):
2276         (WebCore::Settings::Settings):
2277         (WebCore::Settings::setTextAutosizingEnabled):
2278         (WebCore::Settings::setTextAutosizingWindowSizeOverride):
2279         (WebCore::Settings::setTextAutosizingFontScaleFactor):
2280         (WebCore::Settings::setMediaTypeOverride):
2281         (WebCore::Settings::setScriptEnabled):
2282         (WebCore::Settings::setUserStyleSheetLocation):
2283         (WebCore::Settings::setMinDOMTimerInterval):
2284         (WebCore::Settings::minDOMTimerInterval):
2285         (WebCore::Settings::domTimerAlignmentInterval):
2286         (WebCore::Settings::setUsesPageCache):
2287         (WebCore::Settings::setScreenFontSubstitutionEnabled):
2288         (WebCore::Settings::setFontRenderingMode):
2289         (WebCore::Settings::setDNSPrefetchingEnabled):
2290         (WebCore::Settings::setStorageBlockingPolicy):
2291         (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
2292         (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
2293         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
2294         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
2295         (WebCore::Settings::setFontFallbackPrefersPictographs):
2296         * page/Settings.h:
2297         (WebCore::Settings::pageDestroyed):
2298
2299 2014-10-29  Zalan Bujtas  <zalan@apple.com>
2300
2301         Remove invalid float from RootInlineBox.
2302         https://bugs.webkit.org/show_bug.cgi?id=137707
2303
2304         Reviewed by Antti Koivisto.
2305
2306         In certain cases, floating boxes get attached to the last (root) inline box.
2307         When this particular floating box gets destroyed, it also needs to be detached
2308         from the last inline box.
2309         1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
2310         2. Ensure that it is called when the floating box is being destroyed.
2311
2312         Test: fast/inline/crash-when-inline-box-has-invalid-float.html
2313
2314         * rendering/RenderBlockFlow.cpp:
2315         (WebCore::RenderBlockFlow::removeFloatingObject):
2316         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
2317         tearing down the render tree, we can get to a state where a block element has both inline and block children.
2318         It happens when the style change on an element makes sibling anonymous block wrappers detached.
2319         In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
2320         block child elements as we return early at the childrenInline() check.
2321         * rendering/RootInlineBox.h:
2322         (WebCore::RootInlineBox::removeFloat):
2323
2324 2014-10-29  Antti Koivisto  <antti@apple.com>
2325
2326         Factor cache validity computation functions out of CachedResource
2327         https://bugs.webkit.org/show_bug.cgi?id=138156
2328
2329         Reviewed by Andreas Kling.
2330
2331         These can be used to implement cache logic on WebKit level.
2332
2333         * CMakeLists.txt:
2334         * WebCore.exp.in:
2335         * WebCore.vcxproj/WebCore.vcxproj:
2336         * WebCore.xcodeproj/project.pbxproj:
2337         * loader/CacheValidation.cpp: Added.
2338         (WebCore::computeCurrentAge):
2339         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2340         (WebCore::updateRedirectChainStatus):
2341         (WebCore::redirectChainAllowsReuse):
2342         * loader/CacheValidation.h: Added.
2343         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
2344         * loader/cache/CachedResource.cpp:
2345         (WebCore::updateResponseHeadersAfterRevalidation):
2346         (WebCore::CachedResource::CachedResource):
2347         (WebCore::CachedResource::isExpired):
2348         (WebCore::CachedResource::freshnessLifetime):
2349         (WebCore::CachedResource::willSendRequest):
2350         (WebCore::CachedResource::updateResponseAfterRevalidation):
2351         (WebCore::CachedResource::redirectChainAllowsReuse):
2352         (WebCore::currentAge): Deleted.
2353         * loader/cache/CachedResource.h:
2354
2355 2014-10-29  Antti Koivisto  <antti@apple.com>
2356
2357         Unreviewed, rolling out r175342.
2358
2359         a file ended up in a wrong directory
2360
2361         Reverted changeset:
2362
2363         "Factor cache validity computation functions out of
2364         CachedResource"
2365         https://bugs.webkit.org/show_bug.cgi?id=138156
2366         http://trac.webkit.org/changeset/175342
2367
2368 2014-10-29  Antti Koivisto  <antti@apple.com>
2369
2370         Factor cache validity computation functions out of CachedResource
2371         https://bugs.webkit.org/show_bug.cgi?id=138156
2372
2373         Reviewed by Andreas Kling.
2374
2375         These can be used to implement cache logic on WebKit level.
2376
2377         * CMakeLists.txt:
2378         * WebCore.exp.in:
2379         * WebCore.vcxproj/WebCore.vcxproj:
2380         * WebCore.xcodeproj/project.pbxproj:
2381         * loader/CacheValidation.cpp: Added.
2382         (WebCore::computeCurrentAge):
2383         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2384         (WebCore::updateRedirectChainStatus):
2385         (WebCore::redirectChainAllowsReuse):
2386         * loader/CacheValidation.h: Added.
2387         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
2388         * loader/cache/CachedResource.cpp:
2389         (WebCore::updateResponseHeadersAfterRevalidation):
2390         (WebCore::CachedResource::CachedResource):
2391         (WebCore::CachedResource::isExpired):
2392         (WebCore::CachedResource::freshnessLifetime):
2393         (WebCore::CachedResource::willSendRequest):
2394         (WebCore::CachedResource::updateResponseAfterRevalidation):
2395         (WebCore::CachedResource::redirectChainAllowsReuse):
2396         (WebCore::currentAge): Deleted.
2397         * loader/cache/CachedResource.h:
2398
2399 2014-10-28  Ada Chan  <adachan@apple.com>
2400
2401         Add API to mute/unmute a page.
2402         https://bugs.webkit.org/show_bug.cgi?id=138150
2403
2404         Reviewed by Eric Carlson.
2405
2406         No new tests, since it's difficult to test whether the Page has indeed been muted.
2407
2408         * dom/Document.cpp:
2409         (WebCore::Document::setMuted):
2410         Go through each AudioProducer and call setMuted() on it.
2411         * dom/Document.h:
2412         * page/AudioProducer.h:
2413         Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far,
2414         has already implemented setMuted().
2415         * page/Page.cpp:
2416         (WebCore::Page::setMuted):
2417         Go through all its frames and call setMuted() on each frame's Document.
2418         * page/Page.h:
2419
2420 2014-10-29  Tim Horton  <timothy_horton@apple.com>
2421
2422         Implement action menus for data detected items
2423         https://bugs.webkit.org/show_bug.cgi?id=138178
2424         <rdar://problem/18709436>
2425
2426         Reviewed by Anders Carlsson.
2427
2428         * WebCore.exp.in:
2429         Export a symbol from Position that we need.
2430
2431         * WebCore.xcodeproj/project.pbxproj:
2432         * platform/spi/mac/DataDetectorsSPI.h:
2433         Add a combined SPI header for all of the random bits of DataDetectors that we use.
2434
2435 2014-10-29  Jer Noble  <jer.noble@apple.com>
2436
2437         [EME] NULL-dereference crash in MediaKeys::setMediaElement().
2438         https://bugs.webkit.org/show_bug.cgi?id=138177
2439
2440         Reviewed by Eric Carlson.
2441
2442         NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
2443         has previously had stop() called.
2444
2445         * Modules/encryptedmedia/MediaKeys.cpp:
2446         (WebCore::MediaKeys::setMediaElement):
2447
2448 2014-10-29  Jer Noble  <jer.noble@apple.com>
2449
2450         [EME] MediaKeySession resources persist across page reloads
2451         https://bugs.webkit.org/show_bug.cgi?id=138176
2452
2453         Reviewed by Eric Carlson.
2454
2455         MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
2456         close() the session, releasing all our resources.
2457
2458         * Modules/encryptedmedia/MediaKeySession.h:
2459
2460 2014-10-29  Jer Noble  <jer.noble@apple.com>
2461
2462         [EME][Mac] MediaKeySession type "keyrelease" is ignored.
2463         https://bugs.webkit.org/show_bug.cgi?id=138175
2464
2465         Reviewed by Eric Carlson.
2466
2467         To indicate that they would like to recevie expired session confirmation messages, clients
2468         will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
2469         this type needs to be updated to recognize "keyrelease" as a valid type.
2470
2471         Also, the code which validates update() requests needs to allow updates containing the string
2472         "acknowledged", so that clients can request the confirmation messages be discarded.
2473
2474         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2475         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
2476         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2477         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2478
2479 2014-10-28  Ada Chan  <adachan@apple.com>
2480
2481         Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
2482         https://bugs.webkit.org/show_bug.cgi?id=138153
2483
2484         Reviewed by Jer Noble.
2485
2486         After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
2487         and it doesn't need to query each MediaSession for its characteristics and play state.
2488         MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
2489         can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.
2490
2491         No new tests, no behavior change.
2492
2493         * html/HTMLMediaElement.cpp:
2494         (WebCore::HTMLMediaElement::updatePlayState):
2495         Call setPlaying() rather than setting m_playing directly.
2496         (WebCore::HTMLMediaElement::setPlaying):
2497         Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
2498         (WebCore::HTMLMediaElement::setPausedInternal):
2499         Call setPlaying() rather than setting m_playing directly.
2500         (WebCore::HTMLMediaElement::isPlayingAudio):
2501         Call isPlaying() directly rather than checking the MediaSession's state.
2502         * html/HTMLMediaElement.h:
2503         * platform/audio/MediaSession.cpp:
2504         (WebCore::MediaSession::setState):
2505         MediaSessionClient::mediaStateDidChange() has been removed.
2506         (WebCore::MediaSession::hasMediaCharacteristics): Deleted.
2507         * platform/audio/MediaSession.h:
2508         (WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
2509         * platform/audio/ios/AudioDestinationIOS.h:
2510         * platform/audio/mac/AudioDestinationMac.h:
2511
2512 2014-10-29  Chris Dumez  <cdumez@apple.com>
2513
2514         Clean up virtual functions in html/
2515         https://bugs.webkit.org/show_bug.cgi?id=138166
2516
2517         Reviewed by Andreas Kling.
2518
2519         Clean up virtual functions in html/ by:
2520         - Making virtual functions final when possible
2521         - Making classes final when possible
2522         - Using 'override' when appropriate
2523         - Explicitly marking functions / destructors as virtual when they are
2524           inherently virtual
2525         - Dropping virtual destructors when the class does not have subclasses
2526           and mark the class as final, to get rid of unnecessary vtables
2527         - Making isXXX() virtual functions private on XXX classes to avoid
2528           unnecessary type checks
2529         - De-virtualizing some functions that do not need to be virtual
2530         - Dropping final for virtual functions in classes already marked as
2531           final
2532
2533         No new tests, no behavior change.
2534
2535         * html/ButtonInputType.h:
2536         * html/CheckboxInputType.h:
2537         * html/ColorInputType.h:
2538         * html/DOMSettableTokenList.h:
2539         * html/DateInputType.h:
2540         * html/DateTimeInputType.h:
2541         * html/DateTimeLocalInputType.h:
2542         * html/EmailInputType.h:
2543         * html/FTPDirectoryDocument.h:
2544         * html/HTMLAnchorElement.h:
2545         * html/HTMLDetailsElement.cpp:
2546         * html/HTMLFormControlElement.h:
2547         * html/HTMLFormControlsCollection.h:
2548         * html/HTMLFrameElement.h:
2549         * html/HTMLFrameElementBase.h:
2550         * html/HTMLFrameOwnerElement.h:
2551         * html/HTMLInputElement.h:
2552         * html/HTMLMarqueeElement.h:
2553         * html/HTMLMediaElement.h:
2554         * html/HTMLMediaSession.h:
2555         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
2556         * html/HTMLMeterElement.h:
2557         * html/HTMLNameCollection.h:
2558         * html/HTMLObjectElement.h:
2559         * html/HTMLOptGroupElement.h:
2560         * html/HTMLOptionElement.h:
2561         * html/HTMLSpanElement.h:
2562         * html/HTMLStyleElement.h:
2563         * html/HTMLSummaryElement.cpp:
2564         * html/HTMLSummaryElement.h:
2565         * html/HTMLUnknownElement.h:
2566         * html/HTMLVideoElement.h:
2567         * html/HiddenInputType.h:
2568         * html/ImageInputType.h:
2569         * html/MediaKeyEvent.h:
2570         * html/MonthInputType.h:
2571         * html/NumberInputType.h:
2572         * html/PasswordInputType.h:
2573         * html/PublicURLManager.h:
2574         * html/RadioInputType.h:
2575         * html/ResetInputType.h:
2576         * html/SubmitInputType.h:
2577         * html/TelephoneInputType.h:
2578         * html/TextInputType.h:
2579         * html/TimeInputType.h:
2580         * html/URLInputType.h:
2581         * html/WeekInputType.h:
2582         * html/canvas/ANGLEInstancedArrays.h:
2583         * html/canvas/CanvasRenderingContext2D.h:
2584         * html/canvas/DOMPath.h:
2585         * html/canvas/EXTShaderTextureLOD.h:
2586         * html/canvas/EXTTextureFilterAnisotropic.h:
2587         * html/canvas/OESElementIndexUint.h:
2588         * html/canvas/OESStandardDerivatives.h:
2589         * html/canvas/OESTextureFloat.h:
2590         * html/canvas/OESTextureFloatLinear.h:
2591         * html/canvas/OESTextureHalfFloat.h:
2592         * html/canvas/OESTextureHalfFloatLinear.h:
2593         * html/canvas/OESVertexArrayObject.h:
2594         * html/canvas/WebGLBuffer.h:
2595         * html/canvas/WebGLCompressedTextureATC.h:
2596         * html/canvas/WebGLCompressedTexturePVRTC.h:
2597         * html/canvas/WebGLCompressedTextureS3TC.h:
2598         * html/canvas/WebGLContextAttributes.h:
2599         * html/canvas/WebGLContextEvent.h:
2600         * html/canvas/WebGLDebugRendererInfo.h:
2601         * html/canvas/WebGLDebugShaders.h:
2602         * html/canvas/WebGLDepthTexture.h:
2603         * html/canvas/WebGLDrawBuffers.h:
2604         * html/canvas/WebGLFramebuffer.h:
2605         (WebCore::WebGLFramebuffer::isFramebuffer): Deleted.
2606         * html/canvas/WebGLLoseContext.h:
2607         * html/canvas/WebGLProgram.h:
2608         * html/canvas/WebGLRenderbuffer.h:
2609         * html/canvas/WebGLRenderingContext.h:
2610         * html/canvas/WebGLShader.h:
2611         * html/canvas/WebGLSharedObject.h:
2612         (WebCore::WebGLSharedObject::isFramebuffer): Deleted.
2613         * html/canvas/WebGLTexture.h:
2614         * html/canvas/WebGLVertexArrayObjectOES.h:
2615         (WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted.
2616         * html/shadow/ImageControlsRootElement.h:
2617         * html/shadow/InsertionPoint.h:
2618         * html/shadow/MediaControlElementTypes.h:
2619         * html/shadow/MediaControlElements.h:
2620         * html/shadow/MediaControls.h:
2621         * html/shadow/MediaControlsApple.h:
2622         * html/shadow/SpinButtonElement.h:
2623         * html/track/AudioTrack.h:
2624         * html/track/AudioTrackList.h:
2625         * html/track/DataCue.h:
2626         (WebCore::DataCue::cueType): Deleted.
2627         * html/track/InbandDataTextTrack.h:
2628         * html/track/InbandGenericTextTrack.h:
2629         * html/track/InbandTextTrack.h:
2630         * html/track/InbandWebVTTTextTrack.h:
2631         * html/track/LoadableTextTrack.h:
2632         * html/track/TextTrackList.h:
2633         * html/track/TrackEvent.h:
2634         * html/track/VTTCue.h:
2635         (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
2636         * html/track/VTTRegion.h:
2637         * html/track/VideoTrack.h:
2638         * html/track/VideoTrackList.h:
2639         * html/track/WebVTTParser.h:
2640         (WebCore::WebVTTCueData::~WebVTTCueData): Deleted.
2641
2642 2014-10-17  Sergio Villar Senin  <svillar@igalia.com>
2643
2644         ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks
2645         https://bugs.webkit.org/show_bug.cgi?id=137772
2646
2647         Reviewed by Andreas Kling.
2648
2649         We're hitting the ASSERTION because if the number of tracks an
2650         item spans does greatly exceed the available logical space, then
2651         the result of the division availableLogicalSpace/numberOfTracks is
2652         truncated to 0. So the ASSERTION was theoretically right because
2653         the result has to be always >0 (as the dividend > 0) but the fact
2654         that the result is a LayoutUnit forces us to accept 0 as a valid
2655         outcome of the operation.
2656
2657         Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html
2658
2659         * rendering/RenderGrid.cpp:
2660         (WebCore::RenderGrid::distributeSpaceToTracks):
2661
2662 2014-10-29  Chris Dumez  <cdumez@apple.com>
2663
2664         Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
2665         https://bugs.webkit.org/show_bug.cgi?id=138164
2666
2667         Reviewed by Andreas Kling.
2668
2669         This patch fixes a crash when reloading the following URL:
2670         http://dnd.wizards.com/dungeons-and-dragons/story
2671
2672         We were crashing in CachedRawResource::canReuse() because header.key
2673         would sometimes be a null String and we would call
2674         HashMap::get(nullString).
2675
2676         The real issue was that header.key was null in the first place, which
2677         means that even though the HTTPHeaderMap iterator is valid, it->key
2678         is a null String, which should never happen. There was a bug in the
2679         HTTPHeaderMapConstIterator() constructor that would cause the
2680         iterator key/value pair to not get initialized if the HTTPHeaderMap
2681         contained *only* uncommon HTTP headers. This patch updates the
2682         constructor so that we fall back to updating the key/value from the
2683         uncommon header map, if we failed to initialized from the common
2684         header map (because it was empty).
2685
2686         Test: http/tests/cache/xhr-uncommon-header.html
2687
2688         * platform/network/HTTPHeaderMap.h:
2689         (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):
2690
2691 2014-10-28  Benjamin Poulain  <benjamin@webkit.org>
2692
2693         CSS4 Selectors: Add the pseudo class :any-link
2694         https://bugs.webkit.org/show_bug.cgi?id=138128
2695
2696         Reviewed by Andreas Kling.
2697
2698         Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
2699
2700         After :link and :-webkit-any-link were fixed, :any-link behaves
2701         exactly like :-webkit-any-link. All I had left to do here was
2702         make them synonyms when evaluating selectors.
2703
2704         Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
2705
2706         After :link and :-webkit-any-link were fixed, :any-link behaves
2707         exactly like :-webkit-any-link. All I had left to do here was
2708         make them synonyms when evaluating selectors.
2709
2710         Tests: fast/selectors/any-link-basics-2.html
2711                fast/selectors/any-link-basics.html
2712                fast/selectors/any-link-styling.html
2713
2714         * css/CSSSelector.cpp:
2715         (WebCore::CSSSelector::selectorText):
2716         * css/CSSSelector.h:
2717         * css/RuleSet.cpp:
2718         (WebCore::RuleSet::addRule):
2719         * css/SelectorChecker.cpp:
2720         (WebCore::SelectorChecker::checkOne):
2721         * css/SelectorChecker.h:
2722         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
2723         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2724         * cssjit/SelectorCompiler.cpp:
2725         (WebCore::SelectorCompiler::addPseudoClassType):
2726         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2727
2728 2014-10-28  Jer Noble  <jer.noble@apple.com>
2729
2730         [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
2731         https://bugs.webkit.org/show_bug.cgi?id=138149
2732
2733         Reviewed by Brent Fulgham.
2734
2735         AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
2736         us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.
2737
2738         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2739         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
2740         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2741         (WebCore::sessionStorageDirectory): Deleted.
2742         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2743         (WebCore::sessionStorageDirectory):
2744         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
2745
2746 2014-10-28  Geoffrey Garen  <ggaren@apple.com>
2747
2748         All networking crashes on Mac 32bit
2749         https://bugs.webkit.org/show_bug.cgi?id=138157
2750
2751         Reviewed by Andy Estes.
2752
2753         NEFilterSource content filtering is not available on 32bit, so
2754         soft-linking fails at runtime. The simplest solution is just to disable
2755         it at compile time.
2756
2757         * platform/ContentFilter.h:
2758
2759 2014-10-28  Jeremy Jones  <jeremyj@apple.com>
2760
2761         Add optimized fullscreen mode.
2762         https://bugs.webkit.org/show_bug.cgi?id=138044
2763
2764         Reviewed by Jer Noble.
2765
2766         Enable different types of fullscreen video behavior.
2767         Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
2768         Add gesture for alternate fullscreen.
2769
2770         * Modules/mediacontrols/MediaControlsHost.cpp:
2771         (WebCore::MediaControlsHost::enterFullscreenOptimized): added
2772         * Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized
2773         * Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized
2774         * Modules/mediacontrols/mediaControlsiOS.js:
2775         (ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture
2776         * WebCore.exp.in: added parameter to setupFullscreen
2777         * html/HTMLMediaElement.cpp:
2778         (WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType
2779         (WebCore::HTMLMediaElement::stop) : ditto
2780         (WebCore::HTMLMediaElement::isFullscreen) : ditto
2781         (WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement
2782         (WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType
2783         (WebCore::HTMLMediaElement::enterFullscreenOptimized): added
2784         * html/HTMLMediaElement.h: added enterFullscreenOptimized
2785         * page/ChromeClient.h:
2786         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter
2787         * platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter
2788         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2789         (-[WebVideoFullscreenController enterFullscreen:type:]): add parameter
2790         (-[WebVideoFullscreenController enterFullscreen:]): Deleted.
2791         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public
2792         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2793         (-[WebAVPlayerController player]): this stub is now required
2794         (-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames
2795         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface 
2796         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
2797         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
2798         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2799
2800 2014-10-28  Chris Dumez  <cdumez@apple.com>
2801
2802         Clean up virtual functions in accessibility/
2803         https://bugs.webkit.org/show_bug.cgi?id=138148
2804
2805         Reviewed by Chris Fleizach.
2806
2807         Clean up virtual functions in accessibility/ by:
2808         - Marking classes as final when suitable
2809         - Marking virtual functions as final when suitable
2810         - Dropping final on virtual functions in classes that are already final
2811         - Make isXXX() virtual type checking functions in XXX classes to avoid
2812           useless type checks
2813
2814         No new tests, no behavior change.
2815
2816         * accessibility/AccessibilityARIAGrid.h:
2817         * accessibility/AccessibilityARIAGridCell.h:
2818         * accessibility/AccessibilityARIAGridRow.h:
2819         * accessibility/AccessibilityImageMapLink.h:
2820         * accessibility/AccessibilityList.h:
2821         * accessibility/AccessibilityListBox.h:
2822         * accessibility/AccessibilityListBoxOption.h:
2823         * accessibility/AccessibilityMediaControls.h:
2824         * accessibility/AccessibilityMenuList.h:
2825         * accessibility/AccessibilityMenuListOption.h:
2826         * accessibility/AccessibilityMenuListPopup.h:
2827         * accessibility/AccessibilityMockObject.h:
2828         (WebCore::AccessibilityMockObject::setParent):
2829         * accessibility/AccessibilityNodeObject.h:
2830         * accessibility/AccessibilityProgressIndicator.h:
2831         * accessibility/AccessibilityRenderObject.h:
2832         * accessibility/AccessibilitySVGRoot.h:
2833         * accessibility/AccessibilityScrollView.h:
2834         * accessibility/AccessibilityScrollbar.h:
2835         * accessibility/AccessibilitySearchFieldButtons.h:
2836         * accessibility/AccessibilitySlider.h:
2837         * accessibility/AccessibilitySpinButton.h:
2838         * accessibility/AccessibilityTable.h:
2839         * accessibility/AccessibilityTableCell.h:
2840         * accessibility/AccessibilityTableColumn.h:
2841         * accessibility/AccessibilityTableHeaderContainer.h:
2842         * accessibility/AccessibilityTableRow.h:
2843
2844 2014-10-24  Jeffrey Pfau  <jpfau@apple.com>
2845
2846         FrameProgressTracker expects Page to not have detached
2847         https://bugs.webkit.org/show_bug.cgi?id=138061
2848
2849         Reviewed by Alexey Proskuryakov.
2850
2851         In some cases, a Page may be detached from a Frame before its
2852         FrameLoader is torn down, causing FrameProgressTracker's destructor
2853         to hit a null pointer.
2854
2855         No new tests; it is impossible to reliably simulate the null pointer
2856         case without intrusive code changes.
2857
2858         * loader/FrameLoader.cpp:
2859         (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
2860
2861 2014-10-27  Ada Chan  <adachan@apple.com>
2862
2863         Introduce a new abstract class called AudioProducer and keep a set of AudioProducers
2864         rather than the active MediaSessions in Document
2865         https://bugs.webkit.org/show_bug.cgi?id=138107
2866
2867         Reviewed by Eric Carlson.
2868
2869         No new tests, no behavior change.
2870
2871         * WebCore.xcodeproj/project.pbxproj:
2872         Add AudioProducer.h to the project.
2873         * dom/Document.cpp:
2874         (WebCore::Document::addAudioProducer):
2875         (WebCore::Document::removeAudioProducer):
2876         (WebCore::Document::updateIsPlayingAudio):
2877         Go through the set of AudioProducers and see if any is playing audio.
2878         Now that this method no longer refers to MediaSessions directly, this code
2879         does not need to be guarded by #if ENABLE(VIDEO).
2880         (WebCore::Document::registerMediaSession): Deleted.
2881         (WebCore::Document::unregisterMediaSession): Deleted.
2882         * dom/Document.h:
2883         * html/HTMLMediaElement.cpp:
2884         (WebCore::HTMLMediaElement::registerWithDocument):
2885         (WebCore::HTMLMediaElement::unregisterWithDocument):
2886         (WebCore::HTMLMediaElement::isPlayingAudio):
2887         Return whether this element is playing audio.
2888         * html/HTMLMediaElement.h:
2889         * page/AudioProducer.h: Added.
2890         (WebCore::AudioProducer::~AudioProducer):
2891         * page/Page.cpp:
2892         (WebCore::Page::updateIsPlayingAudio):
2893         This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls
2894         are no longer guarded.
2895         * page/Page.h:
2896
2897 2014-10-28  Chris Dumez  <cdumez@apple.com>
2898
2899         Unreviewed comment fix from r175267.
2900
2901         Fix namespace name in comment.
2902
2903         * css/StyleBuilderCustom.h:
2904
2905 2014-10-28  Jer Noble  <jer.noble@apple.com>
2906
2907         REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
2908         https://bugs.webkit.org/show_bug.cgi?id=137757
2909
2910         Reviewed by Eric Carlson.
2911
2912         In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
2913         of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this 
2914         <div> should be created and added in mediaControlsiOS.js, which requires overloading
2915         Controller.addControls.
2916
2917         * Modules/mediacontrols/mediaControlsApple.css:
2918         (audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
2919         (video::-webkit-media-controls-panel-composited-parent): Deleted.
2920         * Modules/mediacontrols/mediaControlsApple.js:
2921         (Controller.prototype.createControls): Remove the composited parent.
2922         (Controller.prototype.addControls): Ditto.
2923         * Modules/mediacontrols/mediaControlsiOS.js:
2924         (ControllerIOS.prototype.createControls): Create the composited parent.
2925         (ControllerIOS.prototype.addControls): Copied from (previous) apple.js.
2926
2927 2014-10-28  Chris Dumez  <cdumez@apple.com>
2928
2929         Move "Number" CSS properties to the new StyleBuilder
2930         https://bugs.webkit.org/show_bug.cgi?id=138125
2931
2932         Reviewed by Antti Koivisto.
2933
2934         Move "Number" CSS properties from DeprecatedStyleBuilder to the new
2935         StyleBuilder:
2936         -webkit-hyphenate-limit-after
2937         -webkit-hyphenate-limit-before
2938         -webkit-shape-image-threshold
2939         -webkit-hyphenate-limit-lines
2940
2941         They are now generated from CSSPropertyNames.in
2942
2943         For -webkit-hyphenate-limit-lines, I used custom code instead of
2944         the Number converter as it required special handling for the id
2945         value. This patch thus adds support for [Custom=Value] to
2946         CSSPropertyNames.in and the custom code goes into
2947         css/StyleBuilderCustom.h.
2948
2949         No new tests, no behavior change.
2950
2951         * WebCore.xcodeproj/project.pbxproj:
2952         * css/CSSPropertyNames.in:
2953         * css/DeprecatedStyleBuilder.cpp:
2954         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2955         (WebCore::ApplyPropertyNumber::setValue): Deleted.
2956         (WebCore::ApplyPropertyNumber::applyValue): Deleted.
2957         (WebCore::ApplyPropertyNumber::createHandler): Deleted.
2958         * css/StyleBuilderConverter.h:
2959         (WebCore::StyleBuilderConverter::convertNumber):
2960         * css/StyleBuilderCustom.h: Added.
2961         (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
2962         * css/makeprop.pl:
2963
2964 2014-10-28  Zan Dobersek  <zdobersek@igalia.com>
2965
2966         [WebCore] Remove uses of WTF::bind() in the Media Stream module
2967         https://bugs.webkit.org/show_bug.cgi?id=138016
2968
2969         Reviewed by Eric Carlson.
2970
2971         Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
2972         Internal helper methods are removed in favor of inlining the code directly
2973         into the lambdas. Range-based for-loops are deployed where appropriate.
2974
2975         * Modules/mediastream/MediaStreamTrack.cpp:
2976         (WebCore::MediaStreamTrack::scheduleEventDispatch):
2977         (WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
2978         * Modules/mediastream/MediaStreamTrack.h:
2979         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
2980         (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
2981         (WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
2982         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
2983         * Modules/mediastream/UserMediaRequest.cpp:
2984         (WebCore::UserMediaRequest::constraintsValidated):
2985         (WebCore::UserMediaRequest::userMediaAccessGranted):
2986         (WebCore::UserMediaRequest::didCreateStream):
2987         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
2988         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
2989         (WebCore::UserMediaRequest::requestPermission): Deleted.
2990         (WebCore::UserMediaRequest::createMediaStream): Deleted.
2991         (WebCore::UserMediaRequest::callSuccessHandler): Deleted.
2992         (WebCore::UserMediaRequest::callErrorHandler): Deleted.
2993         * Modules/mediastream/UserMediaRequest.h:
2994
2995 2014-10-28  Pascal Jacquemart  <p.jacquemart@samsung.com>
2996
2997         Abandoned select option is reselected when shift selecting new options
2998         https://bugs.webkit.org/show_bug.cgi?id=137553
2999
3000         Reviewed by Ryosuke Niwa.
3001
3002         Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
3003         typeAhead. Fixed by clearing previously selected options before starting a new active selection.
3004
3005         Test: fast/forms/listbox-selection-after-typeahead.html
3006
3007         * html/HTMLSelectElement.cpp:
3008         (WebCore::HTMLSelectElement::selectOption): Code re-ordering
3009
3010 2014-10-28  Milan Crha  <mcrha@redhat.com>
3011
3012         Use constants from wtf/MathExtras.h
3013         https://bugs.webkit.org/show_bug.cgi?id=137967
3014
3015         Reviewed by Darin Adler.
3016
3017         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3018         (WebCore::rotateCairoMatrixForVerticalOrientation):
3019         * rendering/mathml/RenderMathMLMenclose.cpp:
3020         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
3021         (WebCore::RenderMathMLMenclose::updateLogicalHeight):
3022         * rendering/mathml/RenderMathMLOperator.cpp:
3023         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
3024
3025 2014-10-28  David Hyatt  <hyatt@apple.com>
3026
3027         Selection gap painting is ugly for ruby bases.
3028         https://bugs.webkit.org/show_bug.cgi?id=138136
3029
3030         Reviewed by Dean Jackson.
3031
3032         * rendering/RenderBlock.cpp:
3033         (WebCore::RenderBlock::selectionGaps):
3034         For ruby bases don't fill to the end of the block (in the block direction),
3035         since ideographic baselines push that end below the text baseline.
3036
3037         (WebCore::RenderBlock::blockSelectionGaps):
3038         * rendering/RenderBlockFlow.cpp:
3039         Skip ruby bases for block selection gap filling.
3040
3041 2014-10-28  Zalan Bujtas  <zalan@apple.com>
3042
3043         Speed up line parsing for simple line layout.
3044         https://bugs.webkit.org/show_bug.cgi?id=137275
3045
3046         Reviewed by Antti Koivisto.
3047         
3048         This patch speeds up the line parsing for simple line layout by
3049         reducing the number of text measurement calls.
3050         The parsing logic hasn't changed. We simply walk over
3051         the whitespace/non-whitespace fragments and measure them to
3052         figure out whether they fit.
3053         The performance gain mainly comes from the more efficient line wrapping
3054         so that we don't re-measure the fragment when it is pushed to
3055         the next line.
3056
3057         No change in behaviour. (except the empty line-break run removal.)
3058
3059         * rendering/SimpleLineLayout.cpp:
3060         (WebCore::SimpleLineLayout::skipWhitespace): 
3061         (WebCore::SimpleLineLayout::computeLineLeft):
3062         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
3063         (WebCore::SimpleLineLayout::TextFragment::isEmpty):
3064         (WebCore::SimpleLineLayout::LineState::LineState):
3065         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it. 
3066         (WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text. 
3067         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
3068         (WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text. 
3069         (WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
3070         (WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line. 
3071         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): 
3072         (WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
3073         (WebCore::SimpleLineLayout::initializeLine):
3074         (WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
3075         (WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
3076         (WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
3077         (WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
3078         (WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
3079         (WebCore::SimpleLineLayout::isWhitespace): Deleted.
3080         (WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
3081         (WebCore::SimpleLineLayout::measureWord): Deleted.
3082         (WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
3083         * rendering/SimpleLineLayout.h:
3084         (WebCore::SimpleLineLayout::Run::Run):
3085
3086 2014-10-28  Alexey Proskuryakov  <ap@apple.com>
3087
3088         Windows build fix.
3089
3090         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3091         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
3092         for getting current process ID instead of getpid().
3093
3094 2014-10-28  Mihnea Ovidenie  <mihnea@adobe.com>
3095
3096         Clean up subtrees selection code
3097         https://bugs.webkit.org/show_bug.cgi?id=137740
3098
3099         Reviewed by David Hyatt.
3100
3101         Clean up subtrees selection code. Add a new class SelectionSubtreeData
3102         that keeps only the selection data. Have SelectionSubtreeRoot class embed
3103         a SelectionSubtreeData member and keep the business logic methods.
3104         No functionality changed therefore no new layout tests.
3105
3106         * rendering/RenderObject.cpp:
3107         (WebCore::RenderObject::selectionStartEnd):
3108         * rendering/RenderView.cpp:
3109         (WebCore::RenderView::subtreeSelectionBounds):
3110         (WebCore::RenderView::repaintSubtreeSelection):
3111         (WebCore::RenderView::setSelection):
3112         (WebCore::RenderView::splitSelectionBetweenSubtrees):
3113         (WebCore::RenderView::updateSelectionForSubtrees):
3114         (WebCore::RenderView::clearSubtreeSelection):
3115         (WebCore::RenderView::applySubtreeSelection):
3116         * rendering/RenderView.h:
3117         * rendering/SelectionSubtreeRoot.cpp:
3118         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
3119         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
3120         * rendering/SelectionSubtreeRoot.h:
3121         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
3122         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
3123         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
3124         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
3125         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
3126         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
3127         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
3128         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
3129         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
3130         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
3131         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
3132         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
3133         (WebCore::SelectionSubtreeRoot::selectionData):
3134         (WebCore::SelectionSubtreeRoot::setSelectionData):
3135         (WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
3136         (WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
3137         (WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
3138         (WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
3139         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
3140         (WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
3141         (WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
3142         (WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
3143         (WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
3144         (WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.
3145
3146 2014-10-28  Jer Noble  <jer.noble@apple.com>
3147
3148         [Mac] The first software paint of a <video> element takes up to 2.5s.
3149         https://bugs.webkit.org/show_bug.cgi?id=137754
3150
3151         Reviewed by Brent Fulgham.
3152
3153         It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
3154         the video output will not attempt to conform the resulting pixel buffers into a particular format.
3155         This means that adding such a video output to a AVPlayerItem should have almost no performance
3156         penalty, since the video output does not even copy the resulting buffers, but rather just retains
3157         and returns the ones from the AVPlayerLayer.
3158
3159         Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
3160         the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
3161         a video output to an already attached AVPlayerItem.
3162
3163         When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.
3164
3165         Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
3166         whait when asked to paint with the video output.
3167
3168         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3169         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3170         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
3171         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3172
3173 2014-10-28  Chris Dumez  <cdumez@apple.com>
3174
3175         Move text decoration CSS properties to the new StyleBuilder
3176         https://bugs.webkit.org/show_bug.cgi?id=138121
3177
3178         Reviewed by Antti Koivisto.
3179
3180         Move text decoration CSS properties from DeprecatedStyleBuilder to the
3181         new StyleBuilder so that they are generated from CSSPropertyNames.in.
3182
3183         No new tests, no behavior change.
3184
3185         * css/CSSPropertyNames.in:
3186         * css/DeprecatedStyleBuilder.cpp:
3187         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3188         (WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
3189         (WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
3190         * css/StyleBuilderConverter.h:
3191         (WebCore::StyleBuilderConverter::convertTextDecoration):
3192
3193 2014-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3194
3195         [GTK] Remove GDK dependency from SharedTimerGtk
3196         https://bugs.webkit.org/show_bug.cgi?id=138092
3197
3198         Reviewed by Martin Robinson.
3199
3200         It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
3201         use its value directly instead.
3202
3203         * PlatformGTK.cmake:
3204         * platform/gtk/SharedTimerGtk.cpp:
3205         (WebCore::setSharedTimerFireInterval):
3206
3207 2014-10-27  Andreas Kling  <akling@apple.com>
3208
3209         Move RenderBlock::beingDestroyed() to RenderObject.
3210         <https://webkit.org/b/138116>
3211
3212         Reviewed by Antti Koivisto.
3213
3214         Make "is being destroyed" a RenderObject concept instead of restricting
3215         it to RenderBlocks. I'm guessing that this was specific to blocks due to
3216         lack of bitfield space in RenderObject, and that's no longer an issue.
3217
3218         * rendering/RenderBlock.cpp:
3219         (WebCore::RenderBlock::RenderBlock):
3220         (WebCore::RenderBlock::willBeDestroyed):
3221         * rendering/RenderBlock.h:
3222         (WebCore::RenderBlock::beingDestroyed): Deleted.
3223         * rendering/RenderBlockFlow.cpp:
3224         (WebCore::RenderBlockFlow::willBeDestroyed):
3225         * rendering/RenderObject.cpp:
3226         (WebCore::RenderObject::destroy):
3227         * rendering/RenderObject.h:
3228         (WebCore::RenderObject::beingDestroyed):
3229         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3230
3231 2014-10-27  Chris Fleizach  <cfleizach@apple.com>
3232
3233         AX: input type=hidden is being exposed when aria-hidden=false
3234         https://bugs.webkit.org/show_bug.cgi?id=138106
3235
3236         Reviewed by Benjamin Poulain.
3237
3238         If an input type=hidden was inside an aria-hidden=false, it would appear because
3239         the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
3240         We should explicity check for whether the type is hidden and then return an appropriate role. 
3241
3242         Test: accessibility/input-type-hidden-in-aria-hidden-false.html
3243
3244         * accessibility/AccessibilityNodeObject.cpp:
3245         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3246         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
3247
3248 2014-10-27  Alexey Proskuryakov  <ap@apple.com>
3249
3250         https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
3251
3252         * accessibility/AccessibilityRenderObject.cpp:
3253         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3254
3255 2014-10-24  David Hyatt  <hyatt@apple.com>
3256
3257         text-combine needs to center text within the vertical space using glyph bounds
3258         https://bugs.webkit.org/show_bug.cgi?id=138056
3259         <rdar://problem/15403667>
3260
3261         Reviewed by Dean Jackson.
3262
3263         Added fast/text/tatechuyoko.html
3264
3265         * rendering/RenderCombineText.cpp:
3266         (WebCore::RenderCombineText::RenderCombineText):
3267         (WebCore::RenderCombineText::adjustTextOrigin):
3268         (WebCore::RenderCombineText::combineText):
3269         * rendering/RenderCombineText.h:
3270
3271 2014-10-27  Benjamin Poulain  <benjamin@webkit.org>
3272
3273         Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
3274
3275         * accessibility/AccessibilityRenderObject.cpp:
3276         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3277         Darin spotted this mistake.
3278
3279 2014-10-27  Alexey Proskuryakov  <ap@apple.com>
3280
3281         http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
3282         https://bugs.webkit.org/show_bug.cgi?id=138098
3283
3284         Reviewed by Anders Carlsson.
3285
3286         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3287         (WebCore::NetworkStorageSession::switchToNewTestingSession):
3288         Create a separate session for each WKTR/DRT process when testing.
3289
3290 2014-10-27  Chris Dumez  <cdumez@apple.com>
3291
3292         Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
3293         https://bugs.webkit.org/show_bug.cgi?id=138079
3294
3295         Reviewed by Anders Carlsson.
3296
3297         Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
3298         - a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
3299         - a HashMap<String, String, CaseFoldingHash> for uncommon ones
3300
3301         This avoids having to construct Strings from HTTPHeaderMap values for
3302         storing. This also means we have less isolated String copies to do when
3303         creating cross-thread data. The common headers HashMap should also be
3304         a bit more efficient due to faster hashing and faster key comparison in
3305         case of collision.
3306
3307         Some calls sites can also benefit from having direct access to common
3308         headers of the request in HTTPHeaderName type.
3309
3310         This patch adds a new HTTPHeaderMapConstIterator iterator type for
3311         HTTPHeaderMap so that call sites that do not need / want to distinguish
3312         common / uncommon headers still do not need to. They can keep using
3313         modern C++ loops over HTTPHeaderMap objects and get <String, String>
3314         key/value pairs.
3315
3316         No new tests, no behavior change.
3317
3318         * loader/CrossOriginAccessControl.cpp:
3319         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
3320         Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
3321         HTTPHeaderName in argument instead of a String as only common headers
3322         are in the whitelist.
3323
3324         (WebCore::isSimpleCrossOriginAccessRequest):
3325         Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
3326         HTTP headers.
3327
3328         * loader/CrossOriginAccessControl.h:
3329         Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
3330         HTTPHeaderName in argument instead of a String as only common headers
3331         are in the whitelist.
3332
3333         * loader/CrossOriginPreflightResultCache.cpp:
3334         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
3335         Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
3336         HTTP headers.
3337
3338         * loader/DocumentLoader.cpp:
3339         (WebCore::DocumentLoader::responseReceived):
3340         Call httpHeaderFields().commonHeaders().find() instead of
3341         httpHeaderFields().find() as we are looking for a common header.
3342         HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
3343         HashMap dedicated to common headers.
3344
3345         * loader/cache/CachedRawResource.cpp:
3346         (WebCore::shouldIgnoreHeaderForCacheReuse):
3347         Update argument type to be a HTTPHeaderName instead of a String as
3348         only common HTTP headers can be ignored for cache reuse. The
3349         implementation already dealt with HTTPHeaderName type and had to
3350         call findHTTPHeaderName(). This is no longer needed now that the
3351         call site now has direct access to common headers in HTTPHeaderName
3352         type.
3353
3354         (WebCore::CachedRawResource::canReuse):
3355         - Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
3356         - Slightly optimize the second loop (the one over oldHeaderMap) to only
3357           check that the key is present in newHeaderMap, without actually
3358           comparing the String values. If the String values were different, the
3359           first loop would have seen it already and we would have returned
3360           early.
3361
3362 2014-10-27  Andreas Kling  <akling@apple.com>
3363
3364         Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
3365         <https://webkit.org/b/138096>
3366
3367         Reviewed by Chris Dumez.
3368
3369         This function is only ever called on a renderer after we've checked
3370         that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.
3371
3372         * rendering/RenderBox.cpp:
3373         (WebCore::RenderBox::computeLogicalHeight):
3374         * rendering/RenderDeprecatedFlexibleBox.h:
3375         * rendering/RenderObject.h:
3376
3377 2014-10-27  Chris Dumez  <cdumez@apple.com>
3378
3379         Reintroduce null check removed in r175222
3380         https://bugs.webkit.org/show_bug.cgi?id=138087
3381
3382         Reviewed by Andreas Kling.
3383
3384         Reintroduce null check removed in r175222 as several layout tests are
3385         crashing on the bots without them. At least the Pair pointer can be
3386         null according to the assertion hits on the bots.
3387
3388         * css/StyleBuilderConverter.h:
3389         (WebCore::StyleBuilderConverter::convertRadius):
3390
3391 2014-10-27  Chris Dumez  <cdumez@apple.com>
3392
3393         Move radius CSS properties to the new StyleBuilder
3394         https://bugs.webkit.org/show_bug.cgi?id=138087
3395
3396         Reviewed by Andreas Kling.
3397
3398         Move radius CSS properties from DeprecatedStyleBuilder to the new
3399         StyleBuilder so that they are now generated from CSSPropertyNames.in.
3400
3401         No new tests, no behavior change.
3402
3403         * css/CSSPropertyNames.in:
3404         * css/DeprecatedStyleBuilder.cpp:
3405         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3406         (WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
3407         (WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
3408         (WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
3409         * css/StyleBuilderConverter.h:
3410         (WebCore::StyleBuilderConverter::convertRadius):
3411
3412 2014-10-27  Zan Dobersek  <zdobersek@igalia.com>
3413
3414         Shrink MathMLOperatorDictionary::dictionary table
3415         https://bugs.webkit.org/show_bug.cgi?id=137914
3416
3417         Reviewed by Darin Adler.
3418
3419         Improve packing of the Entry structure that's used for elements
3420         of the MathMLOperatorDictionary::dictionary table. This drops the
3421         size of the struct from 16 bytes to just 4 bytes, and shrinks the
3422         size of the dictionary table from rougly 16 kB down to 4 kB.
3423
3424         * rendering/mathml/RenderMathMLOperator.cpp:
3425         (WebCore::MathMLOperatorDictionary::ExtractKey):
3426         (WebCore::RenderMathMLOperator::setOperatorProperties):
3427         * rendering/mathml/RenderMathMLOperator.h:
3428
3429 2014-10-27  Andreas Kling  <akling@apple.com>
3430
3431         Move canContainFixedPositionObjects() to RenderElement.
3432         <https://webkit.org/b/138088>
3433
3434         Reviewed by Mihnea Ovidenie.
3435
3436         Only RenderElement can contain other renderers, so it's not really
3437         natural to answer this question on RenderObject anyway.
3438
3439         Moving it to RenderElement lets it access more efficient getters
3440         that don't have to handle the RenderText case.
3441
3442         * rendering/RenderElement.h:
3443         (WebCore::RenderElement::canContainFixedPositionObjects):
3444         * rendering/RenderObject.h:
3445         (WebCore::RenderObject::canContainFixedPositionObjects): Deleted.
3446
3447 2014-10-26  Benjamin Poulain  <benjamin@webkit.org>
3448
3449         Images with usemap should not have a link state
3450         https://bugs.webkit.org/show_bug.cgi?id=138071
3451
3452         Reviewed by Andreas Kling.
3453
3454         Image tags were incorrectly getting a link state if a usemap is defined.
3455         The <area> of the usemap is supposed to get the link state, but never the image.
3456
3457         Unfortunately, the Accessibility code was relying on the wrong behavior
3458         to set the ImageMapRole, most of the patch is updating that code to get
3459         the correct role without the link state.
3460
3461         Test: fast/selectors/images-with-usemap-should-not-match-link.html
3462
3463         The accessibility code is covered by a few tests in accessibility/.
3464         The test accessibility/aria-used-on-image-maps.html ensure the <area>
3465         elements also get the correct role.
3466
3467         * dom/Node.h:
3468         (WebCore::Node::setIsLink):
3469         (WebCore::Node::clearIsLink): Deleted.
3470         Unused code.
3471
3472         (WebCore::Node::isLink):
3473         Move with its setter for clarity.
3474
3475         * html/HTMLImageElement.cpp:
3476         (WebCore::HTMLImageElement::parseAttribute):
3477         This is the bug.
3478
3479         * accessibility/AccessibilityRenderObject.cpp:
3480         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3481         Here the branches for the role ImageMap where behind isLink() which would
3482         never be valid after the fix.
3483
3484         My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
3485         any usemap attribute qualifies the node for ImageMapRole.
3486
3487         (WebCore::AccessibilityRenderObject::anchorElement):
3488         (WebCore::AccessibilityRenderObject::linkedUIElements):
3489         (WebCore::AccessibilityRenderObject::url):
3490
3491         * accessibility/AccessibilityObject.h:
3492         (WebCore::AccessibilityObject::isAnchor): Deleted.
3493         Something funny I discovered is the Accessibility code worked around the bug
3494         by defining isAnchor() that exclude images from isLink().
3495
3496         Since isLink() will no longer be true for images, the hack can be removed.
3497
3498         * accessibility/AccessibilityNodeObject.cpp:
3499         (WebCore::AccessibilityNodeObject::anchorElement):
3500         (WebCore::AccessibilityNodeObject::isAnchor): Deleted.
3501         * accessibility/AccessibilityNodeObject.h:
3502         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3503         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3504
3505 2014-10-26  Benjamin Poulain  <benjamin@webkit.org>
3506
3507         Replace Element::didAffectSelector() by setNeedsStyleRecalc()
3508         https://bugs.webkit.org/show_bug.cgi?id=138080
3509
3510         Reviewed by Andreas Kling.
3511
3512         Element::didAffectSelector() was probably an optimization at some point,
3513         with the current code is does nothing more than setNeedsStyleRecalc().
3514
3515         * dom/Document.cpp:
3516         (WebCore::Document::setCSSTarget):
3517         * dom/Element.cpp:
3518         (WebCore::Element::didAffectSelector): Deleted.
3519         * dom/Element.h:
3520         * html/HTMLAnchorElement.cpp:
3521         (WebCore::HTMLAnchorElement::parseAttribute):
3522         * html/HTMLFormControlElement.cpp:
3523         (WebCore::HTMLFormControlElement::disabledStateChanged):
3524         * html/HTMLInputElement.cpp:
3525         (WebCore::HTMLInputElement::setChecked):
3526         (WebCore::HTMLInputElement::setIndeterminate):
3527         * html/HTMLLinkElement.cpp:
3528         (WebCore::HTMLLinkElement::parseAttribute):
3529         * html/HTMLOptGroupElement.cpp:
3530         (WebCore::HTMLOptGroupElement::parseAttribute):
3531         * html/HTMLOptionElement.cpp:
3532         (WebCore::HTMLOptionElement::parseAttribute):
3533         (WebCore::HTMLOptionElement::setSelectedState):
3534         * html/HTMLProgressElement.cpp:
3535         (WebCore::HTMLProgressElement::didElementStateChange):
3536
3537 2014-10-26  Andreas Kling  <akling@apple.com>
3538
3539         Move some RenderObject member functions to RenderElement.
3540         <https://webkit.org/b/138085>
3541
3542         Reviewed by Chris Dumez.
3543
3544         Move these two functions to RenderElement:
3545
3546             - handleDynamicFloatPositionChange()
3547             - removeAnonymousWrappersForInlinesIfNecessary()
3548
3549         Also make childBecameNonInline() take a RenderElement& since
3550         that's all we ever pass to it.
3551
3552         * rendering/RenderBlock.cpp:
3553         (WebCore::RenderBlock::childBecameNonInline):
3554         * rendering/RenderBlock.h:
3555         * rendering/RenderBoxModelObject.h:
3556         (WebCore::RenderBoxModelObject::childBecameNonInline):
3557         * rendering/RenderElement.cpp:
3558         (WebCore::RenderElement::handleDynamicFloatPositionChange):
3559         (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
3560         * rendering/RenderElement.h:
3561         * rendering/RenderInline.cpp:
3562         (WebCore::RenderInline::childBecameNonInline):
3563         * rendering/RenderInline.h:
3564         * rendering/RenderObject.cpp:
3565         (WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
3566         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
3567         * rendering/RenderObject.h:
3568
3569 2014-10-26  Andreas Kling  <akling@apple.com>
3570
3571         Move continuation teardown from subclasses to RenderBoxModelObject.
3572         <https://webkit.org/b/138081>
3573
3574         Reviewed by Antti Koivisto.
3575
3576         Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
3577         instead of having every subclass do this themselves.
3578
3579         Also added a RenderElement bit tracking whether the renderer has a
3580         continuation. This avoids a hash lookup every time we destroy a
3581         RenderBoxModelObject that didn't have a continuation.
3582
3583         * rendering/RenderBlock.cpp:
3584         (WebCore::RenderBlock::willBeDestroyed):
3585         * rendering/RenderBlockFlow.cpp:
3586         (WebCore::RenderBlockFlow::willBeDestroyed):
3587         * rendering/RenderBoxModelObject.cpp:
3588         (WebCore::continuationMap):
3589         (WebCore::RenderBoxModelObject::willBeDestroyed):
3590         (WebCore::RenderBoxModelObject::continuation):
3591         (WebCore::RenderBoxModelObject::setContinuation):
3592         * rendering/RenderElement.cpp:
3593         (WebCore::RenderElement::RenderElement):
3594         * rendering/RenderElement.h:
3595         (WebCore::RenderElement::setHasContinuation):
3596         (WebCore::RenderElement::hasContinuation):
3597         * rendering/RenderInline.cpp:
3598         (WebCore::RenderInline::willBeDestroyed):
3599
3600 2014-10-25  Benjamin Poulain  <benjamin@webkit.org>
3601
3602         Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
3603         https://bugs.webkit.org/show_bug.cgi?id=138076
3604
3605         Reviewed by Alexey Proskuryakov.
3606
3607         * cssjit/SelectorCompiler.cpp:
3608         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
3609         The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.
3610
3611 2014-10-18  Brian J. Burg  <burg@cs.washington.edu>
3612
3613         Web Inspector: timelines should not count time elapsed while paused in the debugger
3614         https://bugs.webkit.org/show_bug.cgi?id=136351
3615
3616         Reviewed by Timothy Hatcher.
3617
3618         To avoid counting time elapsed while the debugger is paused, timeline records should
3619         keep track of time elapsed since the start of timeline capturing, rather than wall clock
3620         timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
3621         inspector environment. The stopwatch runs with timelines and is paused with the debugger,
3622         so subsequent time measurements will not include time elapsed while the debugger is paused.
3623
3624         This refactoring is safe because start and end times are only used to graph records; the
3625         timestamp's actual value is irrelevant and is not displayed in the user interface. Date
3626         timestamps are still included with network-related records as part of their header data.
3627
3628         No new tests, because we cannot reliably test timing changes induced by debugger pauses.
3629         It is possible for records to accrue time before the debugger pauses or after it resumes.
3630
3631         * inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
3632         * inspector/InspectorController.cpp:
3633         (WebCore::InspectorController::InspectorController):
3634         (WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
3635         * inspector/InspectorController.h:
3636         * inspector/InspectorPageAgent.cpp:
3637         (WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
3638         (WebCore::InspectorPageAgent::domContentEventFired):
3639         (WebCore::InspectorPageAgent::loadEventFired):
3640         * inspector/InspectorPageAgent.h:
3641         * inspector/InspectorResourceAgent.cpp:
3642         (WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
3643         (WebCore::InspectorResourceAgent::willSendRequest):
3644         (WebCore::InspectorResourceAgent::didReceiveResponse):
3645         (WebCore::InspectorResourceAgent::didReceiveData):
3646         (WebCore::InspectorResourceAgent::didFinishLoading):
3647         (WebCore::InspectorResourceAgent::didFailLoading):
3648         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3649         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3650         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3651         (WebCore::InspectorResourceAgent::didCloseWebSocket):
3652         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
3653         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
3654         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
3655         * inspector/InspectorResourceAgent.h:
3656         * inspector/InspectorTimelineAgent.cpp:
3657         (WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
3658         (WebCore::InspectorTimelineAgent::internalStop):
3659         (WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
3660         (WebCore::startProfiling):
3661         (WebCore::InspectorTimelineAgent::startFromConsole):
3662         (WebCore::InspectorTimelineAgent::willCallFunction):
3663         (WebCore::InspectorTimelineAgent::willEvaluateScript):
3664         (WebCore::TimelineTimeConverter::reset): Deleted.
3665         * inspector/InspectorTimelineAgent.h:
3666         (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
3667         (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
3668         (WebCore::InspectorTimelineAgent::timeConverter): Deleted.
3669         * inspector/TimelineRecordFactory.cpp:
3670         * inspector/WorkerInspectorController.cpp:
3671         (WebCore::WorkerInspectorController::WorkerInspectorController):
3672         (WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
3673         * inspector/WorkerInspectorController.h:
3674
3675 2014-10-25  Dan Bernstein  <mitz@apple.com>
3676
3677         Fix builds using the public SDK.
3678
3679         * platform/spi/cocoa/NSExtensionSPI.h:
3680
3681 2014-10-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
3682
3683         Clamp wordSpacing percentage value.
3684         https://bugs.webkit.org/show_bug.cgi?id=129350.
3685
3686         Reviewed by Zalan Bujtas.
3687
3688         When the CSS wordSpacing property is percentage, its value has to be within the
3689         pre-defined min/max values for the CSS length type. This is done the same way
3690         the wordSpacing of type <length> is handled.
3691
3692         Tests: css3/infinite-word-spacing.html.
3693
3694         Move the definitions of minValueForCssLength and maxValueForCssLength from the
3695         .cpp file to the .h file.
3696         * css/CSSPrimitiveValue.cpp:
3697         * css/CSSPrimitiveValue.h:
3698
3699         Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
3700         its type is percentage.
3701         * css/DeprecatedStyleBuilder.cpp:
3702         (WebCore::ApplyPropertyWordSpacing::applyValue):
3703
3704 2014-10-24  Chris Dumez  <cdumez@apple.com>
3705
3706         [Mac] Use modern loops in ResourceRequestCocoa.mm
3707         https://bugs.webkit.org/show_bug.cgi?id=138052
3708
3709         Reviewed by Darin Adler.
3710
3711         Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
3712         fast enumeration.
3713
3714         No new tests, no behavior change.
3715
3716         * platform/network/cocoa/ResourceRequestCocoa.mm:
3717         (WebCore::ResourceRequest::doUpdateResourceRequest):
3718         - Use NSDictionary's block-based enumeration as we enumerate both keys
3719           and values and this is faster than using fast enumeration of the keys
3720           then calling [NSDictionary objectForKey:]
3721         - Use Objective C's fast enumeration for
3722           contentDispositionEncodingFallbackArray as this is faster and shorter
3723           than index based access. Also use reserveCapacity() /
3724           uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
3725           as we know how many elements were are going to append in the common
3726           case.
3727
3728         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3729         - Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
3730           keys instead of calling [NSDictionary allKeys] and then doing
3731           index-based iteration, to avoid copying the keys to a new array.
3732           Also do a forward enumeration instead of a reverse one. I don't see
3733           why a backward enumeration would be necessary here. We are not
3734           modifying the NSDictionary we are iterating over as
3735           [nsRequest allHTTPHeaderFields] makes a copy.
3736         - Use a modern C++ loop for
3737           m_responseContentDispositionEncodingFallbackArray.
3738
3739 2014-10-24  Zalan Bujtas  <zalan@apple.com>
3740
3741         Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
3742         https://bugs.webkit.org/show_bug.cgi?id=138047
3743
3744         Reviewed by Andreas Kling.
3745
3746         No change in functionality.
3747
3748         * css/CSSPrimitiveValue.cpp:
3749
3750 2014-10-24  Alexey Proskuryakov  <ap@apple.com>
3751
3752         REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
3753         https://bugs.webkit.org/show_bug.cgi?id=138053
3754
3755         Reviewed by Chris Dumez.
3756
3757         Fixes existing tests.
3758
3759         * platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the 
3760         behavior of returning a null string when there are no cookies.
3761
3762 2014-10-24  Chris Dumez  <cdumez@apple.com>
3763
3764         [Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
3765         https://bugs.webkit.org/show_bug.cgi?id=138039
3766
3767         Reviewed by Darin Adler.
3768
3769         Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
3770         for case-insensitive string comparison instead of converting to UTF-8 and then
3771         using strcasecmp().
3772
3773         No new tests, no behavior change.
3774
3775         * platform/mac/QuickLookMac.mm:
3776         (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
3777
3778 2014-10-24  Chris Dumez  <cdumez@apple.com>
3779
3780         Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
3781         https://bugs.webkit.org/show_bug.cgi?id=138049
3782
3783         Reviewed by Alexey Proskuryakov.
3784
3785         Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
3786         / doUpdatePlatformHTTPBody(). It turns out that about half the time, the
3787         m_nsRequest member is already mutable so it is unnecessary to call
3788         [NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
3789         avoid copying.
3790
3791         This patch also moves the code to a new ensureMutableNSURLRequest() method to
3792         avoid duplicating the logic.
3793
3794         I see that we spend ~21% less time in these 2 functions when loading
3795         http://flickr.com/explore/ (39.6ms -> 31.2ms).
3796
3797         No new tests, no behavior change.
3798
3799         * platform/network/cf/ResourceRequest.h:
3800         * platform/network/cocoa/ResourceRequestCocoa.mm:
3801         (WebCore::ResourceRequest::ensureMutableNSURLRequest):
3802         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3803         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3804
3805 2014-10-24  Chris Dumez  <cdumez@apple.com>
3806
3807         Move ComputeLength CSS properties to the new StyleBuilder
3808         https://bugs.webkit.org/show_bug.cgi?id=138036
3809
3810         Reviewed by Andreas Kling.
3811
3812         Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
3813         new StyleBuilder so that they are now generated. 3 Converters are
3814         provided for these properties: ComputedLength / LineWidth / Spacing.
3815
3816         This is inspired by the following Blink revision by
3817         <timloh@chromium.org>:
3818         https://src.chromium.org/viewvc/blink?view=rev&revision=154012
3819
3820         No new tests, no behavior change.
3821
3822         * css/CSSPropertyNames.in:
3823         * css/DeprecatedStyleBuilder.cpp:
3824         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3825         (WebCore::ApplyPropertyComputeLength::setValue): Deleted.
3826         (WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
3827         (WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
3828         * css/StyleBuilderConverter.h:
3829         (WebCore::StyleBuilderConverter::convertComputedLength):
3830         (WebCore::StyleBuilderConverter::convertLineWidth):
3831         (WebCore::StyleBuilderConverter::convertSpacing):
3832
3833 2014-10-24  Chris Dumez  <cdumez@apple.com>
3834
3835         Make ScriptWrappable's destructor protected instead of public
3836         https://bugs.webkit.org/show_bug.cgi?id=138037
3837
3838         Reviewed by Andreas Kling.
3839
3840         Make ScriptWrappable's destructor protected instead of public as it is
3841         not virtual and this class is subclassed a lot.
3842
3843         No new tests, no behavior change.
3844
3845         * bindings/js/ScriptWrappable.h:
3846         (WebCore::ScriptWrappable::~ScriptWrappable):
3847
3848 2014-10-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3849
3850         [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
3851         https://bugs.webkit.org/show_bug.cgi?id=138004
3852
3853         Reviewed by Gustavo Noronha Silva.
3854
3855         Rename all WidgetBackingStore* classes as
3856         BackingStoreBackendCairo* since all of them are actually
3857         BackingStore backends based on cairo, and move them from
3858         platform/cairo and platform/gtk to platform/graphics/cairo.
3859         BackingStoreBackendCairo is the base class that contains common
3860         members like the surface and size. BackingStoreBackendCairoImpl is
3861         the implementation using only cairo, and BackingStoreBackendCairoX11
3862         using xlib. BackingStoreBackendCairoX11 receives all the X11
3863         information it needs as constructor parameters, instead of using a
3864         GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
3865         the surface already created as constructor parameter, so that it
3866         doesn't have any platform specific code now.
3867
3868         * PlatformEfl.cmake: Update compilation files.
3869         * PlatformGTK.cmake: Ditto.
3870         * platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
3871         * platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
3872         (WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
3873         (WebCore::BackingStoreBackendCairo::surface):
3874         (WebCore::BackingStoreBackendCairo::size):
3875         (WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
3876         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
3877         (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
3878         (WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
3879         (WebCore::BackingStoreBackendCairoImpl::scroll):
3880         * platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
3881         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
3882         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
3883         (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
3884         (WebCore::BackingStoreBackendCairoX11::scroll):
3885         * platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
3886         * platform/graphics/cairo/CairoUtilities.cpp:
3887         (WebCore::cairoSurfaceGetDeviceScale):
3888         * platform/graphics/cairo/CairoUtilities.h:
3889
3890 2014-10-23  Zalan Bujtas  <zalan@apple.com>
3891
3892         WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
3893         https://bugs.webkit.org/show_bug.cgi?id=138035
3894
3895         Reviewed by Antti Koivisto.
3896
3897         NULL-check element().renderer() before using it.
3898
3899         * html/SearchInputType.cpp:
3900         (WebCore::SearchInputType::didSetValueByUserEdit):
3901
3902 2014-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3903
3904         Remove HarfBuzzRun::create() factory function
3905         https://bugs.webkit.org/show_bug.cgi?id=137945
3906
3907         Reviewed by Ryosuke Niwa.
3908
3909         As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
3910         Thus HarfBuzzRun::create() is needed no longer.
3911
3912         No new tests, no behavior changes.
3913
3914         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3915         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
3916         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
3917         (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.
3918
3919 2014-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
3920
3921         Unreviewed iOS build fix
3922
3923         * editing/FrameSelection.cpp:
3924
3925 2014-10-23  Chris Dumez  <cdumez@apple.com>
3926
3927         [Mac] Optimize URL::createCFURL() for the common case
3928         https://bugs.webkit.org/show_bug.cgi?id=138030
3929
3930         Reviewed by Alexey Proskuryakov.
3931
3932         Optimize URL::createCFURL() for the common case by adding a fast path
3933         for when the URL String is already 8-bit (common case).
3934         When the string is 8-bit, we don't need to copy the bytes into a
3935         temporary buffer and we can construct the CFURLRef directly from it.
3936
3937         This makes URL::createCFURL() ~34% faster on my machine.
3938
3939         No new tests, no behavior change.
3940
3941         * platform/mac/URLMac.mm:
3942         (WebCore::URL::createCFURL):
3943
3944 2014-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
3945
3946         Carets in GMail and iCloud compositions are the foreground text color
3947         https://bugs.webkit.org/show_bug.cgi?id=138029
3948
3949         Reviewed by Simon Fraser.
3950
3951         Previously, we were only checking whether the background colors of the foreground and background
3952         elements were the same, rather than taking validity and opacity into consideration.
3953
3954         Test: editing/caret/color-span-inside-editable-background.html
3955
3956         * editing/FrameSelection.cpp:
3957         (WebCore::disappearsIntoBackground):
3958         (WebCore::CaretBase::paintCaret):
3959
3960 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
3961
3962         Web Inspector: Provide a way to have alternate inspector agents
3963         https://bugs.webkit.org/show_bug.cgi?id=137901
3964
3965         Reviewed by Brian Burg.
3966
3967         * Configurations/FeatureDefines.xcconfig:
3968
3969 2014-10-23  Simon Fraser  <simon.fraser@apple.com>
3970
3971         Don't assume that style.overflowX() == style.overflowY()
3972         https://bugs.webkit.org/show_bug.cgi?id=138028
3973
3974         Reviewed by Zalan Bujtas.
3975
3976         WebKit doesn't support independent overflow scroll/hidden on different axes,
3977         but the RenderStyle does report the correct values. So check both overflowX()
3978         and overflowY() in a couple of places where we need to.
3979
3980         * rendering/RenderLayerCompositor.cpp:
3981         (WebCore::styleHasTouchScrolling):
3982         (WebCore::styleChangeRequiresLayerRebuild):
3983
3984 2014-10-23  Chris Dumez  <cdumez@apple.com>
3985
3986         Get rid of unnecessary vtables in WebKit
3987         https://bugs.webkit.org/show_bug.cgi?id=138024
3988
3989         Reviewed by Benjamin Poulain.
3990
3991         Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
3992         when possible and marking the class as final to make sure people don't
3993         subclass it.
3994
3995         No new tests, no behavior change.
3996
3997         * WebCore.exp.in:
3998         * css/WebKitCSSMatrix.h:
3999         * css/WebKitCSSMatrix.idl:
4000         * html/canvas/WebGLContextGroup.h:
4001         * html/canvas/WebGLGetInfo.h:
4002         * html/canvas/WebGLUniformLocation.h:
4003         (WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
4004         * html/canvas/WebGLUniformLocation.idl:
4005         * inspector/DOMPatchSupport.h:
4006         * inspector/InspectorHistory.h:
4007         * inspector/InspectorStyleSheet.h:
4008         * page/WheelEventDeltaTracker.h:
4009         * page/scrolling/ScrollLatchingState.h:
4010         * platform/audio/Biquad.h:
4011         * platform/graphics/Pattern.h:
4012
4013 2014-10-23  Chris Dumez  <cdumez@apple.com>
4014
4015         Clean up virtual functions in dom/
4016         https://bugs.webkit.org/show_bug.cgi?id=138019
4017
4018         Reviewed by Benjamin Poulain.
4019
4020         Clean up virtual functions in dom/ by:
4021         - Making virtual functions final when possible
4022         - Making classes final when possible
4023         - Using 'override' when appropriate
4024         - Explicitly marking functions / destructors as virtual when they are
4025           inherently virtual
4026         - Making isXXX() virtual functions private on XXX classes to avoid
4027           unnecessary type checks
4028         - Dropping final for virtual functions in classes already marked as
4029           final
4030
4031         No new tests, no behavior change.
4032
4033         * WebCore.exp.in:
4034         * dom/AutocompleteErrorEvent.h:
4035         * dom/BeforeLoadEvent.h:
4036         (WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
4037         * dom/BeforeTextInsertedEvent.h:
4038         * dom/ClipboardEvent.h:
4039         * dom/CompositionEvent.h:
4040         * dom/CustomEvent.h:
4041         * dom/DeviceMotionController.h:
4042         (WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
4043         * dom/DeviceMotionEvent.h:
4044         * dom/DeviceOrientationController.h:
4045         (WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
4046         * dom/DeviceOrientationEvent.h:
4047         * dom/Document.h:
4048         * dom/DocumentFragment.h:
4049         * dom/ErrorEvent.h:
4050         * dom/FocusEvent.h:
4051         * dom/HashChangeEvent.h:
4052         * dom/KeyboardEvent.h:
4053         * dom/LiveNodeList.h:
4054         * dom/MessageEvent.h:
4055         * dom/MessagePort.h:
4056         * dom/MouseEvent.h:
4057         * dom/MouseRelatedEvent.h:
4058         * dom/MutationEvent.h:
4059         * dom/NamedFlowCollection.h:
4060         * dom/OverflowEvent.h: