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