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