e1c520fa287c8fe5133e9f586e5370e5d21b75f3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-03  Tim Horton  <timothy_horton@apple.com>
2
3         Fix the iOS build after r173230
4
5         * WebCore.exp.in:
6
7 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
8
9         Remove unnecessary function from TextPainter
10         https://bugs.webkit.org/show_bug.cgi?id=136497
11
12         Reviewed by Simon Fraser.
13
14         Function is never called.
15
16         No new tests because there is no behavior change.
17
18         * rendering/TextPainter.cpp:
19         (WebCore::TextPainter::paintTextInContext): Deleted.
20         * rendering/TextPainter.h:
21
22 2014-09-03  Anders Carlsson  <andersca@apple.com>
23
24         Don't use DEPRECATED_DEFINE_STATIC_LOCAL for mutexes
25         https://bugs.webkit.org/show_bug.cgi?id=136510
26
27         Reviewed by Andreas Kling.
28
29         Mutexes are intended to be used from multiple threads, and DEPRECATED_DEFINE_STATIC_LOCAL is not thread safe.
30
31         * bindings/objc/DOMInternal.mm:
32         (wrapperCacheLock):
33         (getDOMWrapper):
34         (addDOMWrapper):
35         (removeDOMWrapper):
36         Use LazyNeverDestroyed + std::call_once, and switch the mutex over to an std::mutex.
37
38         * dom/EventListenerMap.cpp:
39         (WebCore::EventListenerMap::assertNoActiveIterators):
40         (WebCore::EventListenerIterator::EventListenerIterator):
41         (WebCore::EventListenerIterator::~EventListenerIterator):
42         (WebCore::activeIteratorCountMutex):
43         (WebCore::EventListenerMap::EventListenerMap): Deleted.
44         * dom/EventListenerMap.h:
45         Use an std::atomic<int> instead of a mutex here.
46
47 2014-09-03  Enrica Casucci  <enrica@apple.com>
48
49         Remove PLATFORM(IOS) from WebCore/editing (Part 1).
50         https://bugs.webkit.org/show_bug.cgi?id=136474
51
52         Reviewed by Tim Horton.
53
54         This is the first part of the work to remove PLATFORM(IOS) everywhere
55         in the editing code.
56
57         * dom/Range.cpp:
58         (WebCore::Range::create): Adding create function that takes VisiblePosition.
59         * dom/Range.h:
60         * editing/CompositeEditCommand.cpp:
61         (WebCore::CompositeEditCommand::apply):
62         (WebCore::CompositeEditCommand::inputText):
63         * editing/CompositeEditCommand.h:
64         * editing/DeleteButton.h: No need for the platform guard since it is already under
65         DELETION_UI
66         * editing/DeleteButtonController.cpp:
67         (WebCore::DeleteButtonController::enable):
68         (WebCore::DeleteButtonController::disable):
69         * editing/EditAction.h:
70         * editing/EditCommand.h:
71         (WebCore::EditCommand::isInsertTextCommand):
72         * editing/Editor.cpp:
73         (WebCore::ClearTextCommand::CreateAndApply):
74         * editing/Editor.h:
75         * editing/EditorCommand.cpp:
76         (WebCore::executeClearText):
77         (WebCore::enabledCopy):
78         (WebCore::enabledCut):
79         (WebCore::enabledClearText):
80         (WebCore::createCommandMap):
81         * editing/FrameSelection.cpp:
82         (WebCore::FrameSelection::modifyExtendingRight):
83         (WebCore::FrameSelection::modifyExtendingForward):
84         (WebCore::FrameSelection::modifyMovingRight):
85         (WebCore::FrameSelection::modifyMovingForward):
86         (WebCore::FrameSelection::modifyExtendingLeft):
87         (WebCore::FrameSelection::modifyExtendingBackward):
88         (WebCore::FrameSelection::modifyMovingLeft):
89         (WebCore::FrameSelection::modifyMovingBackward):
90         * editing/InsertTextCommand.h:
91         * editing/TextCheckingHelper.cpp:
92         * editing/TextGranularity.h:
93         * editing/VisiblePosition.h:
94         (WebCore::operator>=):
95         * editing/VisibleSelection.cpp:
96         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
97         * editing/VisibleUnits.cpp:
98         * editing/VisibleUnits.h:
99
100 2014-09-03  Anders Carlsson  <andersca@apple.com>
101
102         Get rid of some uses of OwnPtr
103         https://bugs.webkit.org/show_bug.cgi?id=136503
104
105         Reviewed by Sam Weinig.
106
107         * dom/ElementRareData.cpp:
108         * dom/ElementRareData.h:
109         (WebCore::ElementRareData::create): Deleted.
110         * dom/MutationObserverRegistration.cpp:
111         (WebCore::MutationObserverRegistration::create): Deleted.
112         * dom/MutationObserverRegistration.h:
113         * dom/Node.cpp:
114         (WebCore::Node::materializeRareData):
115         (WebCore::Node::didMoveToNewDocument):
116         (WebCore::eventTargetDataMap):
117         (WebCore::Node::eventTargetData):
118         (WebCore::Node::ensureEventTargetData):
119         (WebCore::Node::mutationObserverRegistry):
120         (WebCore::Node::registerMutationObserver):
121         (WebCore::Node::unregisterMutationObserver):
122         (WebCore::Node::notifyMutationObserversNodeWillDetach):
123         * dom/Node.h:
124         * dom/NodeRareData.h:
125         (WebCore::NodeListsNodeData::NodeListsNodeData):
126         (WebCore::NodeRareData::NodeRareData):
127         (WebCore::NodeRareData::clearNodeLists):
128         (WebCore::NodeRareData::ensureNodeLists):
129         (WebCore::NodeRareData::ensureMutationObserverData):
130         (WebCore::NodeListsNodeData::create): Deleted.
131         (WebCore::NodeMutationObserverData::create): Deleted.
132         (WebCore::NodeRareData::create): Deleted.
133
134 2014-09-02  Maciej Stachowiak  <mjs@apple.com>
135
136         Clean up naming for and slightly refactor legacy video fullscreen support
137         https://bugs.webkit.org/show_bug.cgi?id=136446
138
139         Reviewed by Jer Noble.
140
141         Key changes:
142         supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
143         enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
144         exitFullscreenForNode(Node*) --> exitVideoFullscreen()
145         
146         The old versions had unnecessary parameters, did not clearly distinguish their purpose
147         from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
148         Also changed many other places to use HTMLVideoElement* instead of Node* or 
149         HTMLMediaElement* when they were in fact only used for video elements and would only
150         work for such.
151
152         The implications of this include a bunch of renaming in some iOS fullscreen code.
153
154         * html/HTMLMediaElement.cpp:
155         (WebCore::HTMLMediaElement::HTMLMediaElement): Rename m_isFullscreen flag to 
156         m_isInVideoFullscreen, since it only covers the case of legacy video fullscreen,
157         not element fullscreen.
158         (WebCore::HTMLMediaElement::stop): ditto
159         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): ditto
160         (WebCore::HTMLMediaElement::isFullscreen): ditto
161         (WebCore::HTMLMediaElement::enterFullscreen): Rename m_isFullscreen flag to
162         m_isInVideoFullscreen. Hoist video element check here from all supportsFullscrenForNode
163         clients. Adjust for relevant ChromeClient refactorings.
164         (WebCore::HTMLMediaElement::enterFullscreen): ditto above
165         * html/HTMLMediaElement.h:
166         * html/HTMLVideoElement.cpp:
167         (WebCore::HTMLVideoElement::supportsFullscreen): Adjust for relevant ChromeClient 
168         refactorings.
169         * page/ChromeClient.h:
170         (WebCore::ChromeClient::supportsVideoFullscreen): Renamed from 
171         supportsFullscreenForNode, and removed Node* parameter.
172         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): Renamed from
173         enterFulscreenForNode and changed Node* parameter to HTMLVideoElement*.
174         (WebCore::ChromeClient::exitVideoFullscreen): Renamed from 
175         exitFullscreenForNode, and removed Node* parameter.
176         * platform/ios/WebVideoFullscreenControllerAVKit.h:
177         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
178         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement;
179         return a video element and not just a media element.
180         (-[WebVideoFullscreenController dealloc]): Renamed _mediaElement data member
181         to _videoElement and changed type accordingly.
182         (-[WebVideoFullscreenController setVideoElement:]): Renamed from setMediaElement:
183         and adjust parameter type accordingly.
184         (-[WebVideoFullscreenController enterFullscreen:]): Video elements, not media
185         elements.
186         (-[WebVideoFullscreenController exitFullscreen]): ditto
187         (-[WebVideoFullscreenController didCleanupFullscreen]): ditto
188         * platform/ios/WebVideoFullscreenInterface.h:
189         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove gratuitous HTMLMEdiaElement.h include
190         and fix declarations accordingly.
191         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include WTFString.h
192         * platform/ios/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h.
193         * platform/ios/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm.
194         (WebVideoFullscreenModelVideoElement) Renamed from WebVideoFullscreenModelMediaElement
195         (WebVideoFullscreenModelVideoElement::setVideoElement): Renamed from setMediaElement and
196         change param type accordingly. Also no need to check for actual videoness of the element.
197         (WebVideoFullscreenModelVideoElement::updateForEventName): Rename data member from m_mediaElement
198         to m_videoElement and change type accordingly.
199         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): ditto
200         (WebVideoFullscreenModelVideoElement::play): ditto
201         (WebVideoFullscreenModelVideoElement::pause): ditto
202         (WebVideoFullscreenModelVideoElement::togglePlayState): ditto
203         (WebVideoFullscreenModelVideoElement::beginScrubbing): ditto
204         (WebVideoFullscreenModelVideoElement::endScrubbing): ditto
205         (WebVideoFullscreenModelVideoElement::seekToTime): ditto
206         (WebVideoFullscreenModelVideoElement::fastSeek): ditto
207         (WebVideoFullscreenModelVideoElement::beginScanningForward): ditto
208         (WebVideoFullscreenModelVideoElement::beginScanningBackward): ditto
209         (WebVideoFullscreenModelVideoElement::endScanning): ditto
210         (WebVideoFullscreenModelVideoElement::requestExitFullscreen): ditto
211         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): ditto
212         (WebVideoFullscreenModelVideoElement::setVideoLayerGravity): ditto
213         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): ditto
214         * platform/mac/WebVideoFullscreenController.h:
215         * platform/mac/WebVideoFullscreenController.mm:
216         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement
217         and update return type accordingly.
218         (-[WebVideoFullscreenController setVideoElement:]): Renamed from 
219         setMediaElement and update return type accordingly.
220         (-[WebVideoFullscreenController videoElementRect]): Renamed
221         from mediaElementRect.
222         (-[WebVideoFullscreenController enterFullscreen:]): Update for
223         rename.
224         (-[WebVideoFullscreenController exitFullscreen]): ditto
225         (-[WebVideoFullscreenController updatePowerAssertions]): Rename
226         member from _mediaElement to _videoElement
227         (-[WebVideoFullscreenController _requestExit]): ditto
228         * WebCore.exp.in: Adjust for function and class renames.
229         * WebCore.xcodeproj/project.pbxproj: Adjust for file renames.
230
231 2014-09-03  Benjamin Poulain  <benjamin@webkit.org>
232
233         Fix style invalidation of elements with multiple siblings dependencies
234         https://bugs.webkit.org/show_bug.cgi?id=136472
235
236         Reviewed by Andreas Kling.
237
238         Previously, style invalidation of siblings was driven by a pair of flags:
239         -ChildrenAffectedByDirectAdjacentRules.
240         -ChildrenAffectedByForwardPositionalRules.
241
242         When ChildrenAffectedByDirectAdjacentRules was set, the element after an element
243         with "needsStyleRecalc" was also recomputed. While this work for pair of elements:
244             a + b
245         It does not work for more than that. For example, with
246             a.propery + b + c
247         When the state of <a> changes, the style of <b> was updated, which is useless. The style
248         of <c> was untouched, which is incorrect.
249
250         When ChildrenAffectedByForwardPositionalRules, all elements after one with "needsStyleRecalc"
251         were invalidated. While more correct, it caused avalanche of style recalc and was not a very
252         useful "optimization".
253
254  
255         To fix the correctness issues (e.g. "a + b + c"), I could have gone two ways:
256         1) Invalidate the parent of a, b, c. The children would always get a correct style
257            when their parent's style would be resolved.
258         2) Create invalidation relations to enforce that the right siblings are invalidated.
259
260         I have decided for a weak version of (2). The reason is that most DOM trees are very
261         shallow while being very wide. Invalidating the parent generally causes massive style
262         recalculation.
263
264         To keep things simple for now, there is no explicit dependency list between siblings.
265         Instead, each element has a pair of flag:
266         1) The element's style depends on the state of a previous sibling.
267         2) The element's state affects following siblings.
268
269         With the notation "<-" for (1), "->" for (2), the selector "a + b + c" create this kind
270         of marking:
271             a  +  b  +  c
272             ->    ->
273                        <-
274
275         When <a> is invalidated, the style resolver will go through the chain of dependent elements
276         and invalidate any element that can be affected by a prior invalidation, here <c>.
277
278         Overlaps are possible. For example with the two selector, "a + b + c", "b ~ d"
279         the marking would be
280             a  +  b  +  c  +  d
281             ->    ->    ->
282                        <-    <-
283
284         A change in <a> would invalidate both <c> and <d>. This is overkill, but the end result
285         is correct and it is a net improvement over the previous flags.
286
287
288         As usual, the CSS JIT makes an effort at compile time to reduce tree marking. SelectorChecker
289         marks everything as usual.
290
291         Tests: fast/css/direct-adjacent-style-update-optimization.html
292                fast/css/indirect-adjacent-style-update-optimization.html
293                fast/css/non-matching-adjacent-style-update.html
294                fast/selectors/first-of-type-direct-adjacent-style-update.html
295                fast/selectors/first-of-type-sibling-style-update.html
296                fast/selectors/id-direct-adjacent-style-update.html
297                fast/selectors/id-sibling-style-update.html
298                fast/selectors/nth-child-as-first-simple-selector-style-update.html
299                fast/selectors/nth-child-direct-adjacent-style-update.html
300                fast/selectors/nth-child-style-update.html
301
302         * css/SelectorChecker.cpp:
303         (WebCore::isFirstOfType):
304         (WebCore::countElementsBefore):
305         (WebCore::countElementsOfTypeBefore):
306         Counting selectors are not unlike adjacent combinators, they are handled the exact same way.
307         For example a :nth-child(4) would generate somewhat similar marking as
308             :first-child + * + * + *
309
310         Everything prior to the element with the counter affects the style of the element.
311
312         (WebCore::hasScrollbarPseudoElement):
313         The assertion was incorrect. You can get an scrollbar pseudo ID on an element without scrollbar.
314         It will never match, but such case is possible.
315
316         (WebCore::SelectorChecker::matchRecursively):
317         (WebCore::SelectorChecker::checkOne):
318         * css/StyleResolver.cpp:
319         (WebCore::StyleResolver::canShareStyleWithElement):
320         Previously, any subtree affected by sibling selectors were unshareable. That was done by checking
321         for Element::hasFlagsSetDuringStylingOfChildren().
322
323         Now that sibling relation are local, they no longer prevent sharing of all children. Instead, we can
324         test locally for subgroup with sibling relations.
325
326         * cssjit/SelectorCompiler.cpp:
327         (WebCore::SelectorCompiler::isAdjacentRelation):
328         (WebCore::SelectorCompiler::shouldMarkStyleIsAffectedByPreviousSibling):
329         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
330         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
331         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
332         (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle):
333         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
334         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): Deleted.
335         * dom/Document.cpp:
336         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
337         * dom/Element.cpp:
338         (WebCore::checkForSiblingStyleChanges):
339         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
340         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
341         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules): Deleted.
342         * dom/Element.h:
343         (WebCore::Element::affectsNextSiblingElementStyle):
344         (WebCore::Element::setAffectsNextSiblingElementStyle):
345         (WebCore::Element::setStyleIsAffectedByPreviousSibling):
346         (WebCore::Element::childrenAffectedByPositionalRules): Deleted.
347         (WebCore::Element::childrenAffectedByDirectAdjacentRules): Deleted.
348         (WebCore::Element::childrenAffectedByForwardPositionalRules): Deleted.
349         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
350         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
351         * dom/ElementRareData.h:
352         (WebCore::ElementRareData::ElementRareData):
353         (WebCore::ElementRareData::resetDynamicRestyleObservations):
354         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules): Deleted.
355         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
356         * dom/Node.h:
357         (WebCore::Node::styleIsAffectedByPreviousSibling):
358         (WebCore::Node::flagAffectsNextSiblingElementStyle):
359         (WebCore::Node::flagStyleIsAffectedByPreviousSibling):
360         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag): Deleted.
361         * html/HTMLElement.h:
362         (WebCore::HTMLElement::isHTMLUnknownElement):
363         * html/HTMLUnknownElement.h:
364         * style/StyleResolveTree.cpp:
365         (WebCore::Style::resetStyleForNonRenderedDescendants):
366         (WebCore::Style::resolveTree):
367
368 2014-09-03  Simon Fraser  <simon.fraser@apple.com>
369
370         Dump SimpleLineLayout info in showRenderTree() output
371         https://bugs.webkit.org/show_bug.cgi?id=136489
372
373         Reviewed by Zalan Bujtas.
374         
375         Include info about SimpleLineLayout to showRenderTree() output.
376         
377         Also show RenderText length, and truncate the RenderText contents
378         to 80 chars (since the string is replicated in inline boxes or simple line layout output).
379
380         * rendering/RenderBlockFlow.cpp:
381         (WebCore::RenderBlockFlow::showLineTreeAndMark):
382         * rendering/RenderObject.cpp:
383         (WebCore::RenderObject::showRenderObject):
384         * rendering/SimpleLineLayoutFunctions.cpp:
385         (WebCore::SimpleLineLayout::printPrefix):
386         (WebCore::SimpleLineLayout::showLineTreeForFlow):
387         * rendering/SimpleLineLayoutFunctions.h:
388
389 2014-09-03  Tim Horton  <timothy_horton@apple.com>
390
391         iOS build fix after r173217 
392
393         * platform/graphics/ios/FontServicesIOS.h:
394         (WebCore::FontServicesIOS::capHeight):
395         * platform/graphics/ios/FontServicesIOS.mm:
396         (WebCore::FontServicesIOS::FontServicesIOS):
397         This fixes the build, but I don't know if it's completely correct.
398
399 2014-09-03  Anders Carlsson  <andersca@apple.com>
400
401         Get rid of DOMImplementationFront
402         https://bugs.webkit.org/show_bug.cgi?id=136495
403
404         Reviewed by Andreas Kling.
405
406         DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
407         on Mac this is no longer an issue.
408
409         * WebCore.xcodeproj/project.pbxproj:
410         * bindings/objc/DOMImplementationFront.cpp: Removed.
411         * bindings/objc/DOMImplementationFront.h: Removed.
412         Remove files.
413
414         * bindings/objc/DOMUtility.mm:
415         (JSC::createDOMWrapper):
416         Remove call to implementationFront.
417
418         * bindings/scripts/CodeGeneratorObjC.pm:
419         (GetImplClassName):
420         Remove DOMImplementation special case
421
422         (AddIncludesForType):
423         Ditto.
424
425         (GenerateHeader):
426         Use the class header name in the #import in the internal header.
427
428         (GenerateImplementation):
429         Remove DOMImplementation special case.
430
431 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
432
433         [Win] Improper release of unretained AVCFAssetResourceLoaderRef
434         https://bugs.webkit.org/show_bug.cgi?id=136493
435         <rdar://problem/18112559>
436
437         Reviewed by Eric Carlson.
438
439         Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
440         RetainPtr. We don't hold onto this value or want to control its lifetime; we just
441         want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.
442
443         Use of the RetainPtr created a double-release and crash.
444
445         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
446         (WebCore::AVFWrapper::createAssetForURL): 
447
448 2014-09-03  David Hyatt  <hyatt@apple.com>
449
450         Add support for the initial-letter CSS property to first-letter
451         https://bugs.webkit.org/show_bug.cgi?id=136484
452
453         Reviewed by Dean Jackson.
454         
455         New tests in fast/css-generated-content/initial-letter-*.html
456
457         This patch add support for the CSS initial-letter property, enabling
458         better drop caps support in WebKit. Letters size to a specified number of
459         paragraph lines, and align to the cap-height of the first line and the baseline
460         of the last line.
461
462         * css/CSSComputedStyleDeclaration.cpp:
463         (WebCore::ComputedStyleExtractor::propertyValue):
464         Add -webkit-initial-letter to the list.
465
466         * css/CSSLineBoxContainValue.cpp:
467         (WebCore::CSSLineBoxContainValue::customCSSText):
468         * css/CSSLineBoxContainValue.h:
469         Add support for a new value of line-box-contain, initial-letter, that causes
470         lines to use cap-height above the baseline and the glyph bounds below the
471         baseline.
472
473         * css/CSSParser.cpp:
474         (WebCore::CSSParser::parseValue):
475         Add support for parsing of initial-letter.
476
477         (WebCore::CSSParser::parseLineBoxContain):
478         Add the new line-box-contain value for first-letters with initial-letter set.
479
480         * css/CSSPropertyNames.in:
481         Add the new initial-letter property.
482
483         * css/CSSValueKeywords.in:
484         Add the new initial-letter line-box-contain value.
485
486         * css/StyleResolver.cpp:
487         (WebCore::StyleResolver::applyProperty):
488         Map initial-letter into the RenderStyle.
489
490         * platform/graphics/FontMetrics.h:
491         (WebCore::FontMetrics::hasCapHeight):
492         (WebCore::FontMetrics::floatCapHeight):
493         (WebCore::FontMetrics::setCapHeight):
494         (WebCore::FontMetrics::capHeight):
495         * platform/graphics/ios/SimpleFontDataIOS.mm:
496         (WebCore::SimpleFontData::platformInit):
497         * platform/graphics/mac/SimpleFontDataMac.mm:
498         (WebCore::SimpleFontData::platformInit):
499         Add support for cap-height to the font system. iOS and Mac have been patched.
500         Other platforms will need to add support for cap-height to get this feature.
501         hasCapHeight() will return false for unsupported platforms for graceful
502         degradation.
503
504         * rendering/RenderBlock.cpp:
505         (WebCore::styleForFirstLetter):
506         Modified to check for initialLetterDrop/Height and to adjust the style
507         accordingly (e.g., to apply float when needed).
508
509         * rendering/RenderBlockFlow.cpp:
510         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
511         Code to adjust the float's position and margin to do cap-height alignment
512         and sunken letters.
513
514         * rendering/RenderBlockFlow.h:
515         Remove the const from computeLogicalLocationForFloat, since the margin of the
516         float can now be modified dynamically for sunken first-letters.
517
518         * rendering/RootInlineBox.cpp:
519         (WebCore::RootInlineBox::ascentAndDescentForBox):
520         Add support for initial-letter line-box-contain value.
521
522         * rendering/RootInlineBox.h:
523         Add the includeInitialLetterForBox method to support the new line-box-contain value.
524
525         * rendering/style/RenderStyle.cpp:
526         (WebCore::RenderStyle::changeRequiresLayout):
527         * rendering/style/RenderStyle.h:
528         * rendering/style/StyleRareNonInheritedData.cpp:
529         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
530         (WebCore::StyleRareNonInheritedData::operator==):
531         * rendering/style/StyleRareNonInheritedData.h:
532         Normal maintenance stuff for addition of a new CSS property (making sure it is diffed
533         properly for layout changes and copied on assignment, etc.)
534
535 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
536
537         [Win] Prevent double-release on AVCFURLAssetRef
538         https://bugs.webkit.org/show_bug.cgi?id=136492
539         <rdar://problem/18206746>
540
541         Reviewed by Eric Carlson.
542
543         The AVFWrapper::setAsset method needs to retain the passed argument, since it
544         originates from AVCFPlayerItemGetAsset, which does not increment the
545         reference count of its return value as expected by Cocoa Get/Create/Copy
546         semantics.
547
548         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
549         (WebCore::AVFWrapper::setAsset): Retain the passed argument.
550
551 2014-09-03  Dan Bernstein  <mitz@apple.com>
552
553         Get rid of HIGH_DPI_CANVAS leftovers
554         https://bugs.webkit.org/show_bug.cgi?id=136491
555
556         Reviewed by Benjamin Poulain.
557
558         * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
559         and removed it from FEATURE_DEFINES.
560         * html/HTMLCanvasElement.cpp:
561         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Removed #if ENABLE(HIGH_DPI_CANVAS)
562         code.
563
564 2014-09-03  Joseph Pecoraro  <pecoraro@apple.com>
565
566         Use StringBuilder append(char) and appendLiteral in more places
567         https://bugs.webkit.org/show_bug.cgi?id=136470
568
569         Reviewed by Andreas Kling.
570
571         * Modules/indexeddb/IDBKeyData.cpp:
572         (WebCore::IDBKeyData::loggingString):
573         * Modules/websockets/WebSocket.cpp:
574         (WebCore::encodeProtocolString):
575         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
576         (WebCore::WebSocketExtensionDispatcher::createHeaderValue):
577         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
578         * Modules/websockets/WebSocketHandshake.cpp:
579         (WebCore::WebSocketHandshake::clientLocation):
580         (WebCore::WebSocketHandshake::clientHandshakeMessage):
581         * css/CSSCalculationValue.cpp:
582         (WebCore::buildCssText):
583         * css/CSSComputedStyleDeclaration.cpp:
584         (WebCore::CSSComputedStyleDeclaration::cssText):
585         * css/CSSMediaRule.cpp:
586         (WebCore::CSSMediaRule::cssText):
587         * css/CSSSelectorList.cpp:
588         (WebCore::CSSSelectorList::selectorsText):
589         * css/CSSSupportsRule.cpp:
590         (WebCore::CSSSupportsRule::cssText):
591         * css/MediaQuery.cpp:
592         (WebCore::MediaQuery::serialize):
593         * editing/MarkupAccumulator.cpp:
594         (WebCore::MarkupAccumulator::generateUniquePrefix):
595         * editing/markup.cpp:
596         (WebCore::urlToMarkup):
597         * fileapi/FileReaderLoader.cpp:
598         (WebCore::FileReaderLoader::convertToDataURL):
599         * html/EmailInputType.cpp:
600         (WebCore::EmailInputType::sanitizeValue):
601         * html/FormController.cpp:
602         (WebCore::recordFormStructure):
603         * html/parser/XSSAuditorDelegate.cpp:
604         (WebCore::buildConsoleError):
605         * html/track/WebVTTParser.cpp:
606         (WebCore::WebVTTParser::collectCueText):
607         * mathml/MathMLMencloseElement.cpp:
608         (WebCore::MathMLMencloseElement::longDivLeftPadding):
609         * page/PageSerializer.cpp:
610         (WebCore::SerializerMarkupAccumulator::appendElement):
611         * page/SecurityOrigin.cpp:
612         (WebCore::SecurityOrigin::toRawString):
613         * page/scrolling/ScrollingCoordinator.cpp:
614         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
615         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
616         (WebCore::logThreadedScrollingMode):
617         * platform/PODInterval.h:
618         (WebCore::PODInterval::toString):
619         * platform/PODRedBlackTree.h:
620         (WebCore::PODRedBlackTree::dumpFromNode):
621         * platform/UUID.cpp:
622         (WebCore::createCanonicalUUIDString):
623         * platform/network/ProxyServer.cpp:
624         (WebCore::appendProxyServerString):
625         (WebCore::toString):
626         * platform/text/DateTimeFormat.cpp:
627         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
628         * platform/text/PlatformLocale.cpp:
629         (WebCore::DateTimeStringBuilder::zeroPadString):
630         (WebCore::Locale::convertFromLocalizedNumber):
631         * platform/text/TextStream.cpp:
632         (WebCore::TextStream::operator<<):
633         * rendering/RenderListMarker.cpp:
634         (WebCore::listMarkerText):
635         * testing/Internals.cpp:
636         (WebCore::Internals::parserMetaData):
637         (WebCore::Internals::getCurrentCursorInfo):
638
639 2014-09-03  Bear Travis  <betravis@adobe.com>
640
641         [CSS Font Loading] Enable Page Caching
642         https://bugs.webkit.org/show_bug.cgi?id=136044
643
644         Reviewed by Andreas Kling.
645
646         Modifying FontLoader to track fonts loaded via the loadFont
647         method as well as via CSS rules. Fonts loaded via loadFont are
648         tracked in m_numLoadingFromJS, while fonts loaded via CSS rules
649         are tracked in m_numLoadingFromCSS. The page is cacheable when no
650         fonts are currently loading.
651
652         Added fast/css/fontloader-page-cache.html
653
654         * css/FontLoader.cpp:
655         (WebCore::LoadFontCallback::create): Modified to take and store
656         the number of fonts it will be loading.
657         (WebCore::LoadFontCallback::createFromParams): Ditto.
658         (WebCore::LoadFontCallback::familyCount): Getter for number of
659         fonts loaded via this callback.
660         (WebCore::LoadFontCallback::LoadFontCallback):
661         (WebCore::LoadFontCallback::notifyLoaded): Callback the FontLoader
662         to let it update its count when all the fonts have finished loading.
663         (WebCore::FontLoader::loadFontDone): Ditto.
664         (WebCore::FontLoader::FontLoader):
665         (WebCore::FontLoader::beginFontLoading): Track the number of fonts
666         loading.
667         (WebCore::FontLoader::fontLoaded): Ditto.
668         (WebCore::FontLoader::loadError): Ditto.
669         (WebCore::FontLoader::loadFont):
670         * css/FontLoader.h:
671         (WebCore::FontLoader::loading):
672
673 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
674
675         Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
676         https://bugs.webkit.org/show_bug.cgi?id=136402
677
678         Reviewed by Andreas Kling.
679
680         When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
681         Updating the fire/repeat interval on TimerBase requires a delta, but in
682         DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
683         timers we can get the current interval to calculate the delta by calling repeatInterval(),
684         but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
685         that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
686         not the actual interval). The way this currently works is that when the minimum interval
687         changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
688         timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
689         based on what the interval would have been.
690
691         We can simplify & unify with the code to throttle interval timers when the nesting
692         threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
693         using this to compute the delta in all cases.
694
695         * dom/ScriptExecutionContext.cpp:
696         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
697             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
698         * page/DOMTimer.cpp:
699         (WebCore::DOMTimer::DOMTimer):
700             initialize m_currentTimerInterval
701         (WebCore::DOMTimer::fired):
702             - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
703         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
704             - compute delta based on m_currentTimerInterval
705         (WebCore::DOMTimer::intervalClampedToMinimum):
706             - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
707               as its inputs, so remove arguments.
708         (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
709             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
710         * page/DOMTimer.h:
711             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval
712
713 2014-09-03  Daniel Bates  <dabates@apple.com>
714
715         [XSLT] Make WebKit build when XSLT is disabled
716         https://bugs.webkit.org/show_bug.cgi?id=136471
717
718         Reviewed by Simon Fraser.
719
720         Fixes a Clang compiler warning that file-static function WebCore::hasNoStyleInformation is unused.
721         This function is only called from ENABLE(XSLT)-guarded code. So, add a ENABLE(XSLT)-guard around
722         WebCore::hasNoStyleInformation().
723
724         * xml/parser/XMLDocumentParserLibxml2.cpp:
725         (WebCore::hasNoStyleInformation):
726
727 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
728
729         LegacyProfiler: remove redundant ProfileNode members and other cleanup
730         https://bugs.webkit.org/show_bug.cgi?id=136380
731
732         Reviewed by Timothy Hatcher.
733
734         Remove Profile.idleTime, rename head to rootNode, and remove ProfileNode members.
735
736         Covered by existing tests.
737
738         * inspector/ScriptProfile.idl:
739         * inspector/ScriptProfileNode.idl:
740         * inspector/TimelineRecordFactory.cpp:
741
742 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
743
744         Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
745         https://bugs.webkit.org/show_bug.cgi?id=136462
746
747         Reviewed by Timothy Hatcher.
748
749         It's not used by the frontend anymore.
750
751         No new tests, no behavior changed.
752
753         * CMakeLists.txt:
754         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
755         * WebCore.order:
756         * WebCore.vcxproj/WebCore.vcxproj:
757         * WebCore.vcxproj/WebCore.vcxproj.filters:
758         * WebCore.xcodeproj/project.pbxproj:
759         * inspector/InspectorAllInOne.cpp:
760         * inspector/InspectorController.cpp:
761         (WebCore::InspectorController::InspectorController):
762         * inspector/InspectorController.h:
763         * inspector/InspectorInstrumentation.cpp:
764         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
765         * inspector/InstrumentingAgents.cpp:
766         (WebCore::InstrumentingAgents::InstrumentingAgents):
767         (WebCore::InstrumentingAgents::reset):
768         * inspector/InstrumentingAgents.h:
769         (WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
770         (WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.
771         * inspector/PageProfilerAgent.cpp: Removed.
772         * inspector/PageProfilerAgent.h: Removed.
773         * inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.
774         (WebCore::buildInspectorObject):
775         (WebCore::buildProfileInspectorObject):
776         (WebCore::TimelineRecordFactory::appendProfile):
777         * inspector/WebProfilerAgent.cpp: Removed.
778         * inspector/WebProfilerAgent.h: Removed.
779         * inspector/WorkerInspectorController.cpp:
780         (WebCore::WorkerInspectorController::WorkerInspectorController):
781         * inspector/WorkerProfilerAgent.cpp: Removed.
782         * inspector/WorkerProfilerAgent.h: Removed.
783         * inspector/protocol/Timeline.json:
784
785 2014-09-02  Jer Noble  <jer.noble@apple.com>
786
787         [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
788         https://bugs.webkit.org/show_bug.cgi?id=136016
789
790         Reviewed by Eric Carlson.
791
792         The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
793         of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
794         one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
795         it would be better if a given MediaKeys could create a session without actually being connected to a
796         HTMLMediaElement (yet).
797
798         To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
799         is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
800         in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.
801
802         Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
803         to support adding the session to the HTMLMediaElement after the session has been created.
804
805         Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
806         enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.
807
808         * Modules/encryptedmedia/CDM.cpp:
809         (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
810         (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
811         * Modules/encryptedmedia/MediaKeySession.h:
812         * Modules/encryptedmedia/MediaKeys.cpp:
813         (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
814         * WebCore.xcodeproj/project.pbxproj:
815         * platform/graphics/CDMSession.h:
816         (WebCore::CDMSession::type): Added.
817         * platform/graphics/MediaPlayer.cpp:
818         (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
819         * platform/graphics/MediaPlayer.h:
820         * platform/graphics/MediaPlayerPrivate.h:
821         (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
822         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
823         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
824         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
825         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
826         (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
827         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
828         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
829         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
830         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
831         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
832         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
833         (WebCore::CDMSessionAVFoundationObjC::type): Added.
834         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
835         (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
836         (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
837         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
838         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
839         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
840         (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
841         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
842         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
843         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
844         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
845         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
846         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
847         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
848         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
849         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
850         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
851
852 2014-09-02  Daniel Bates  <dabates@apple.com>
853
854         [Win] Attempt to fix the Windows build after <http://trac.webkit.org/changeset/173192>
855         (https://bugs.webkit.org/show_bug.cgi?id=136467)
856
857         Declare ResourceHandleClient::connectionProperties() when building for iOS or when USE(CFNETWORK).
858
859         * platform/network/ResourceHandleClient.h:
860
861 2014-09-02  Daniel Bates  <dabates@apple.com>
862
863         [iOS] Support using Foundation networking code
864         https://bugs.webkit.org/show_bug.cgi?id=136467
865
866         Reviewed by Pratik Solanki.
867
868         We should support building iOS WebKit with the Foundation networking code
869         (i.e. !USE(CFNETWORK)).
870
871         Additionally, disable USE(CFNETWORK) and use the Foundation networking code
872         by default when building iOS WebKit without the Apple Internal SDK.
873
874         * Configurations/WebCore.xcconfig: Remove file WebCoreURLResponse.mm from the list of excluded files
875         so that we compile an implementation for function WebCore::synthesizeRedirectResponseIfNecessary when
876         building without USE(CFNETWORK).
877         * WebCore.exp.in: Add symbols for WebCore::synthesizeRedirectResponseIfNecessary() and WebCore::ResourceHandleClient::willCacheResponseAsync().
878         * WebCore.xcodeproj/project.pbxproj: Add new files CFNetworkConnectionCacheSPI.h and CFURLRequestSPI.h.
879         Also move group platform/spi such that it appears in alphabetical order in the platform group.
880         * platform/cf/URLCF.cpp: Remove unnecessary header <CoreFoundation/CFPriv.h>.
881         * platform/network/ResourceHandle.h: Declare iOS-specific variant of ResourceHandle::createNSURLConnection().
882         * platform/network/ResourceHandleClient.h: Always include header <wtf/RetainPtr.h> when building for iOS.
883         (WebCore::ResourceHandleClient::connectionProperties): Add PLATFORM(IOS)-guard around declaration.
884         * platform/network/cf/ResourceRequestCFNet.cpp: Substitute header CFNetworkConnectionCacheSPI.h for
885         <CFNetwork/CFNetworkConnectionCachePriv.h>.
886         * platform/network/mac/CredentialStorageMac.mm:
887         (WebCore::CredentialStorage::saveToPersistentStorage): Use Credential::nsCredential() and ProtectionSpace::nsSpace()
888         instead of WebCore::mac(const {Credential, ProtectionSpace}&) as the latter were removed in <http://trac.webkit.org/changeset/171801>
889         and <http://trac.webkit.org/changeset/171540>, respectively.
890         * platform/network/mac/ResourceErrorMac.mm: Add USE(CFNETWORK)-guard around <CFNetwork/CFSocketStreamPriv.h>.
891         * platform/network/mac/ResourceHandleMac.mm: Substitute header CFURLRequestSPI.h for <CFNetwork/CFURLRequest.h>.
892         (WebCore::ResourceHandle::start): Modified to use ResourceHandle::makeDelegate() instead of d->m_proxy, which 
893         was removed in <http://trac.webkit.org/changeset/147476>.
894         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
895         * platform/network/mac/WebCoreURLResponse.mm:
896         (WebCore::synthesizeRedirectResponseIfNecessary): Add !USE(CFNETWORK)- and PLATFORM(IOS)- guards.
897         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Added.
898         * platform/spi/cf/CFURLRequestSPI.h: Added.
899
900 2014-09-02  Myles C. Maxfield  <mmaxfield@apple.com>
901
902         Use references in public EventSender functions
903         https://bugs.webkit.org/show_bug.cgi?id=136463
904
905         Reviewed by Dan Bates.
906
907         Passing nullptr to EventSender shouldn't be allowed.
908
909         No new tests because there is no behavior change.
910
911         * dom/EventSender.h:
912         (WebCore::EventSender::hasPendingEvents):
913         (WebCore::EventSender<T>::dispatchEventSoon):
914         (WebCore::EventSender<T>::cancelEvent):
915         (WebCore::EventSender<T>::dispatchPendingEvents):
916         * html/HTMLLinkElement.cpp:
917         (WebCore::HTMLLinkElement::~HTMLLinkElement):
918         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
919         * html/HTMLStyleElement.cpp:
920         (WebCore::HTMLStyleElement::~HTMLStyleElement):
921         (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
922         * loader/ImageLoader.cpp:
923         (WebCore::ImageLoader::~ImageLoader):
924         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent):
925         (WebCore::ImageLoader::updateFromElement):
926         (WebCore::ImageLoader::notifyFinished):
927         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
928
929 2014-09-02  Daniel Bates  <dabates@apple.com>
930
931         [iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
932         and ENABLE_IOS_GESTURE_EVENTS, respectively
933         https://bugs.webkit.org/show_bug.cgi?id=136456
934
935         Reviewed by Andy Estes.
936
937         It's sufficient to exclude the touch and gesture files when building without
938         ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS, respectively. Currently we
939         exclude these files when building without the Apple Internal SDK, which is
940         heavy handed.
941
942         * Configurations/WebCore.xcconfig:
943
944 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
945
946         Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
947         https://bugs.webkit.org/show_bug.cgi?id=136464
948
949         Reviewed by Tim Horton.
950
951         Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
952         when layout might be stale; there's not point trying to update the backing store state
953         when detaching, only when attaching.
954
955         * rendering/RenderLayerCompositor.cpp:
956         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
957
958 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
959
960         Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
961         https://bugs.webkit.org/show_bug.cgi?id=136400
962
963         Reviewed by Tim Horton.
964         
965         RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
966         with visibility:hidden, and for layers with a mask, and both would cause additional
967         backing store in some cases.
968         
969         We can move the hasVisibleContent() to the top of the function, since visibility:hidden
970         will always hide any content of this layer. The hasMask() check can also be removed;
971         a mask can only mask content that is already visible; it never contributes additional
972         pixels.
973
974         Tests: compositing/backing/masked-child-no-backing.html
975                compositing/backing/replaced-child-no-backing.html
976
977         * rendering/RenderLayer.cpp:
978         (WebCore::RenderLayer::calculateClipRects):
979
980 2014-09-02  Joseph Pecoraro  <pecoraro@apple.com>
981
982         Use jsNontrivialString for strings we know are more than a single character
983         https://bugs.webkit.org/show_bug.cgi?id=136393
984
985         Reviewed by Geoffrey Garen.
986
987         * bindings/js/JSCryptoKeySerializationJWK.cpp:
988         (WebCore::addUsagesToJSON):
989
990 2014-09-02  Alex Christensen  <achristensen@webkit.org>
991
992         Fix bindings tests after r173176.
993         https://bugs.webkit.org/show_bug.cgi?id=136460
994
995         Reviewed by Simon Fraser.
996
997         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
998         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
999         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1000         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1001         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1002         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1003         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1004         * bindings/scripts/test/JS/JSTestEventTarget.h:
1005         * bindings/scripts/test/JS/JSTestException.cpp:
1006         * bindings/scripts/test/JS/JSTestException.h:
1007         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1008         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1009         * bindings/scripts/test/JS/JSTestInterface.cpp:
1010         * bindings/scripts/test/JS/JSTestInterface.h:
1011         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1012         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1013         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1014         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1015         * bindings/scripts/test/JS/JSTestNode.cpp:
1016         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1017         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1018         * bindings/scripts/test/JS/JSTestObj.cpp:
1019         * bindings/scripts/test/JS/JSTestObj.h:
1020         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1021         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1022         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1023         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1024         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1025         * bindings/scripts/test/JS/JSTestTypedefs.h:
1026         * bindings/scripts/test/JS/JSattribute.cpp:
1027         * bindings/scripts/test/JS/JSattribute.h:
1028         * bindings/scripts/test/JS/JSreadonly.cpp:
1029         * bindings/scripts/test/JS/JSreadonly.h:
1030         * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
1031         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
1032         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
1033         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
1034         * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
1035         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
1036         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
1037         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h:
1038         * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
1039         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
1040         * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
1041         * bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
1042         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h:
1043         * bindings/scripts/test/ObjC/DOMTestObjInternal.h:
1044         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
1045         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
1046         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
1047         * bindings/scripts/test/ObjC/DOMattributeInternal.h:
1048         * bindings/scripts/test/ObjC/DOMreadonlyInternal.h:
1049         Added new WEBCORE_EXPORT macros.
1050
1051 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
1052
1053         Non-composited child RenderLayers cause allocation of unncessary backing store
1054         https://bugs.webkit.org/show_bug.cgi?id=136375
1055
1056         Reviewed by David Hyatt.
1057         
1058         A composited element that has non-composited descendant elements that fall into
1059         RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
1060         was simply checking the "visibility:visible" bit on descendant non-composited layers,
1061         instead of actually asking them if they have any visual content.
1062         
1063         Added a couple of FIXME comments.
1064
1065         Test: compositing/backing/child-layer-no-backing.html
1066
1067         * rendering/RenderLayer.cpp:
1068         (WebCore::RenderLayer::calculateClipRects):
1069         * rendering/RenderLayerBacking.cpp:
1070         (WebCore::descendentLayerPaintsIntoAncestor):
1071
1072 2014-09-02  Commit Queue  <commit-queue@webkit.org>
1073
1074         Unreviewed, rolling out r173175.
1075         https://bugs.webkit.org/show_bug.cgi?id=136454
1076
1077         it broke debug builds (Requested by jessieberlin on #webkit).
1078
1079         Reverted changeset:
1080
1081         "Introduce CSS_BASIC_TYPE_CASTS, and use it"
1082         https://bugs.webkit.org/show_bug.cgi?id=136403
1083         http://trac.webkit.org/changeset/173175
1084
1085 2014-09-02  Alex Christensen  <achristensen@webkit.org>
1086
1087         More use of WEBCORE_EXPORT.
1088
1089         Reviewed by Darin Adler.
1090
1091         These changes from a patch attached to https://bugs.webkit.org/show_bug.cgi?id=136172
1092         contain more deployment of the WEBCORE_EXPORT macro. As of this writing, the macro is
1093         defined to do nothing, so landing these is a harmless way to get closer to be the point
1094         where we can throw the switch to use these instead of explicit export files on OS X,
1095         iOS, and Windows.
1096
1097         * bindings/js/JSDOMBinding.h:
1098         * bindings/js/JSDOMGlobalObject.h:
1099         * bindings/js/JSDOMWindowBase.h:
1100         * bindings/scripts/CodeGeneratorJS.pm:
1101         (GenerateHeader):
1102         (GenerateImplementation):
1103         * bindings/scripts/CodeGeneratorObjC.pm:
1104         (GenerateHeader):
1105         * bridge/runtime_method.cpp:
1106         * bridge/runtime_object.cpp:
1107         * dom/Document.h:
1108         * dom/Element.h:
1109         * dom/Position.h:
1110         * dom/Range.h:
1111         * dom/StaticNodeList.h:
1112         * dom/make_names.pl:
1113         (printInit):
1114         (printNamesCppFile):
1115         * editing/Editor.h:
1116         * editing/FrameSelection.h:
1117         * editing/TextIterator.h:
1118         * inspector/InspectorFrontendClient.h:
1119         * inspector/InspectorFrontendClientLocal.h:
1120         * loader/DocumentLoader.h:
1121         * loader/FrameLoader.h:
1122         * loader/cache/MemoryCache.h:
1123         * loader/cocoa/DiskCacheMonitorCocoa.h:
1124         * loader/mac/LoaderNSURLExtras.h:
1125         * page/Page.h:
1126         * page/PageGroup.h:
1127         * page/SecurityPolicy.h:
1128         * page/Settings.h:
1129         * page/make_settings.pl:
1130         (printGetterAndSetter):
1131         * page/scrolling/ScrollingStateScrollingNode.h:
1132         * platform/CrossThreadCopier.h:
1133         * platform/LocalizedStrings.h:
1134         * platform/MemoryPressureHandler.cpp:
1135         * platform/PlatformScreen.h:
1136         * platform/PublicSuffix.h:
1137         * platform/graphics/Gradient.h:
1138         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
1139         * platform/graphics/filters/FilterOperation.h:
1140         * platform/ios/WebVideoFullscreenControllerAVKit.h:
1141         * platform/mac/PlatformEventFactoryMac.h:
1142         * platform/mac/WebCoreFullScreenPlaceholderView.h:
1143         * platform/mac/WebCoreFullScreenWindow.h:
1144         * platform/mac/WebCoreNSStringExtras.h:
1145         * platform/mac/WebCoreObjCExtras.h:
1146         * platform/mac/WebFontCache.h:
1147         * platform/mac/WebVideoFullscreenController.h:
1148         * platform/mac/WebWindowAnimation.h:
1149         * platform/network/BlobRegistryImpl.h:
1150         * platform/network/CredentialStorage.h:
1151         * platform/network/PlatformCookieJar.h:
1152         * platform/network/ProxyServer.h:
1153         * platform/sql/SQLiteStatement.h:
1154         * platform/text/TextEncoding.h:
1155         * rendering/HitTestResult.h:
1156         * rendering/RenderTreeAsText.h:
1157         * testing/Internals.h:
1158         Add many more correct uses of WEBCORE_EXPORT; remove a few incorrect ones.
1159
1160 2014-09-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1161
1162         Introduce CSS_BASIC_TYPE_CASTS, and use it
1163         https://bugs.webkit.org/show_bug.cgi?id=136403
1164
1165         Reviewed by Darin Adler.
1166
1167         toCSSBasicFoo() will help to detect wrong type casting. So this patch generates it, and use it
1168         instead of static_cast<const CSSBasicFoo*>().
1169
1170         No new tests no behavior changes.
1171
1172         * css/BasicShapeFunctions.cpp:
1173         (WebCore::basicShapeForValue):
1174         * css/CSSBasicShapes.cpp:
1175         (WebCore::CSSBasicShapeCircle::equals):
1176         (WebCore::CSSBasicShapeEllipse::equals):
1177         (WebCore::CSSBasicShapePolygon::equals):
1178         (WebCore::CSSBasicShapeInset::equals):
1179         * css/CSSBasicShapes.h:
1180
1181 2014-09-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1182
1183         CachedResourceLoader should check redirections to reuse or not cached resources
1184         https://bugs.webkit.org/show_bug.cgi?id=131757
1185
1186         Reviewed by Antti Koivisto.
1187
1188         Added cache-control redirection check to properly determine revalidation policy.
1189         Tightened redirection cache-control header check by testing for no-cache and must-revalidate directives.
1190         Added redirection freshness check.
1191
1192         Test: http/tests/cache/cache-redirections.html
1193
1194         * loader/cache/CachedRawResource.cpp:
1195         (WebCore::CachedRawResource::canReuse): Removed redirection check (now handled by CachedResource::redirectChainAllowsReuse).
1196         * loader/cache/CachedResource.cpp:
1197         (WebCore::currentAge): Moved from WebCore::CachedResource::currentAge method to static function. Added response and responseTimestamp as parameters.
1198         (WebCore::CachedResource::CachedResource): Initialized redirection chain status (no redirection and expiracy date set to never).
1199         (WebCore::CachedResource::isExpired): Updated according new currentAge/freshnessLifetime method parameters.
1200         (WebCore::CachedResource::freshnessLifetime): Added response as parameter.
1201         (WebCore::CachedResource::willSendRequest): Computes whether a redirection can be cached, and if cached for how long it will remain fresh.
1202         (WebCore::CachedResource::redirectChainAllowsReuse): Return false if any of the redirection in the redirection chain cannot be cached or expired. 
1203         * loader/cache/CachedResource.h: Added cache chain member that stores whether the redirection chain can be cached and if so when it will be expired.
1204         * loader/cache/CachedResourceLoader.cpp:
1205         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Added check of the redirection chain.
1206
1207 2014-09-02  Daewoong Jang  <daewoong.jang@navercorp.com>
1208
1209         Prevent decoded images from being destroyed when they're in use.
1210         https://bugs.webkit.org/show_bug.cgi?id=136259.
1211
1212         Reviewed by Darin Adler.
1213
1214         Try to fix a regression introduced by r172790. Before the patch,
1215         CachedImage does not release its Image object if it still has clients.
1216         However this behavior was changed due to removal of CachedResource::isSafeToMakePurgeable(),
1217         which implied a call to CachedResource::hasClients(). This patch restores
1218         the behavior by adding a check to hasClients() in CachedImage::destroyDecodedData().
1219
1220         * loader/cache/CachedImage.cpp:
1221         (WebCore::CachedImage::destroyDecodedData):
1222
1223 2014-09-01  Tim Horton  <timothy_horton@apple.com>
1224
1225         RenderThemeMac::paintProgressBar creates a buffer without respecting the destination's acceleration setting
1226         https://bugs.webkit.org/show_bug.cgi?id=136427
1227
1228         Reviewed by Dan Bernstein.
1229
1230         No new tests, just a performance improvement.
1231
1232         * rendering/RenderThemeMac.mm:
1233         (WebCore::RenderThemeMac::paintProgressBar):
1234
1235 2014-09-01  Tim Horton  <timothy_horton@apple.com>
1236
1237         Remove an unnecessary local in GraphicsLayerCA::ensureStructuralLayer
1238         https://bugs.webkit.org/show_bug.cgi?id=136426
1239
1240         Reviewed by Dan Bernstein.
1241
1242         * platform/graphics/ca/GraphicsLayerCA.cpp:
1243         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1244         This was here so that we could call PlatformCALayerClient::platformLayerChanged,
1245         but that no longer exists!
1246
1247 2014-08-29  Sergio Villar Senin  <svillar@igalia.com>
1248
1249         [CSS Grid Layout] Resolved value of grid-template-* must include every track listed
1250         https://bugs.webkit.org/show_bug.cgi?id=136362
1251
1252         Reviewed by Darin Adler.
1253
1254         Section 5.1.5 of the specs clearly states that the resolved value
1255         for grid-template-* must include every listed track, whether
1256         explicitly or implicitly created. We were only listing the
1257         explicit grid tracks.
1258
1259         * css/CSSComputedStyleDeclaration.cpp:
1260         (WebCore::valueForGridTrackList):
1261
1262 2014-09-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1263
1264         [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
1265         https://bugs.webkit.org/show_bug.cgi?id=136194
1266
1267         Reviewed by Csaba Osztrogonác.
1268
1269         Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.
1270
1271         * CMakeLists.txt:
1272
1273 2014-08-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1274
1275         Unreviewed, fix build break on EFL and GTK since r173152.
1276
1277         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1278         (WebCore::GraphicsContext::platformInit): Remove a bool parameter because it was removed from function's declaration.
1279
1280 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1281
1282         Remove GraphicsContext constructor that takes shouldUseContextColors
1283         https://bugs.webkit.org/show_bug.cgi?id=136421
1284
1285         Reviewed by Dan Bernstein.
1286
1287         * WebCore.exp.in:
1288         * platform/graphics/GraphicsContext.cpp:
1289         (WebCore::GraphicsContext::GraphicsContext):
1290         * platform/graphics/GraphicsContext.h:
1291         (WebCore::GraphicsContextState::GraphicsContextState):
1292         * platform/graphics/cg/GraphicsContextCG.cpp:
1293         (WebCore::GraphicsContext::platformInit):
1294         (WebCore::GraphicsContext::drawLinesForText):
1295         As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
1296         Adjust all code to assume shouldUseContextColors=true.
1297
1298 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1299
1300         Remove unused ARMv6-specific #if branches in WebCore::canHyphenate
1301         https://bugs.webkit.org/show_bug.cgi?id=136420
1302
1303         Reviewed by Dan Bernstein.
1304
1305         * platform/text/cf/HyphenationCF.cpp:
1306         (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey):
1307         Use kCFAllocatorDefault instead of 0.
1308
1309         (WebCore::canHyphenate):
1310         Remove ARMv6-specific code.
1311
1312 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1313
1314         Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
1315         https://bugs.webkit.org/show_bug.cgi?id=136416
1316
1317         Reviewed by Dan Bernstein.
1318
1319         * WebCore.exp.in:
1320         * platform/graphics/GraphicsContext.h:
1321         * platform/graphics/cg/GraphicsContextCG.cpp:
1322         (WebCore::setStrokeAndFillColor): Deleted.
1323         Remove.
1324
1325 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1326
1327         Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
1328         https://bugs.webkit.org/show_bug.cgi?id=136413
1329
1330         Reviewed by Dan Bernstein.
1331
1332         No new tests, just cleanup.
1333
1334         * platform/graphics/GraphicsContext.cpp:
1335         (WebCore::GraphicsContext::drawRaisedEllipse):
1336         There's nothing iOS specific about this function.
1337
1338         * platform/graphics/GraphicsContext.h:
1339         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1340         (WebCore::GraphicsContext::drawEllipse):
1341         * platform/graphics/cg/GraphicsContextCG.cpp:
1342         (WebCore::GraphicsContext::drawEllipse):
1343         Un-ifdef drawRaisedEllipse; delete the reimplementation of drawEllipse that takes
1344         a FloatRect and make the normal one take a FloatRect instead.
1345
1346         (WebCore::GraphicsContext::platformInit):
1347         Make sure that the CGContext's line width starts out in sync with GraphicsContext's.
1348         By default, CGContext has a line width of 1 and GraphicsContext 0, so they could previously
1349         have been out of sync until someone set the width explicitly.
1350
1351 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1352
1353         Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
1354         https://bugs.webkit.org/show_bug.cgi?id=136412
1355
1356         Reviewed by Alexey Proskuryakov.
1357
1358         No new tests, just cleanup.
1359
1360         * platform/graphics/BitmapImage.cpp:
1361         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1362         Drop the leading 'c' and the 'static' on the cutoff parameter.
1363         Remove the duplicated early return (seems like it happened in the merge).
1364         Remove reference to the exact size in the comment, since it's different on iOS.
1365
1366 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1367
1368         Use SinkDocument instead of PDFDocument; get rid of PDFDocument
1369         https://bugs.webkit.org/show_bug.cgi?id=136414
1370
1371         Reviewed by Alexey Proskuryakov.
1372
1373         * WebCore.xcodeproj/project.pbxproj:
1374         * loader/DocumentWriter.cpp:
1375         (WebCore::DocumentWriter::createDocument):
1376         * pdf/ios/PDFDocument.cpp: Removed.
1377         * pdf/ios/PDFDocument.h: Removed.
1378         Use the generic SinkDocument, which ignores all incoming data just like PDFDocument.
1379         Delete the unnecessary and iOS-specific PDFDocument.cpp/h
1380
1381 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1382
1383         Adjust an antique comment in Image::drawPattern
1384         https://bugs.webkit.org/show_bug.cgi?id=136411
1385
1386         Reviewed by Dan Bernstein.
1387
1388         * platform/graphics/cg/ImageCG.cpp:
1389         (WebCore::Image::drawPattern):
1390         Reword the comment.
1391
1392 2014-08-31  Tim Horton  <timothy_horton@apple.com>
1393
1394         SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
1395         https://bugs.webkit.org/show_bug.cgi?id=136408
1396         <rdar://problem/12013317>
1397
1398         Reviewed by Dan Bernstein.
1399
1400         No new tests required, just a performance improvement.
1401
1402         * svg/graphics/SVGImage.cpp:
1403         (WebCore::SVGImage::drawPatternForContainer):
1404         Use ImageBuffer::createCompatibleBuffer, which passes the destination's
1405         acceleration setting through to the ImageBuffer constructor.
1406
1407         I didn't use GraphicsContext::createCompatibleBuffer because adjusting
1408         how this function applies the destination's CTM is outside the scope of this patch.
1409
1410 2014-08-30  Joseph Pecoraro  <pecoraro@apple.com>
1411
1412         Convert string literals to character literals in makeString usage
1413         https://bugs.webkit.org/show_bug.cgi?id=136394
1414
1415         Reviewed by Sam Weinig.
1416
1417         * inspector/InspectorOverlay.cpp:
1418         (WebCore::InspectorOverlay::evaluateInOverlay):
1419         * loader/FrameLoader.cpp:
1420         (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
1421         * loader/MixedContentChecker.cpp:
1422         (WebCore::MixedContentChecker::logWarning):
1423         * page/ContentSecurityPolicy.cpp:
1424         (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
1425         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
1426         (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter):
1427         Also reorder some code to ensure single string creation.
1428
1429 2014-08-26  Maciej Stachowiak  <mjs@apple.com>
1430
1431         Use RetainPtr::autorelease in some places where it seems appropriate
1432         https://bugs.webkit.org/show_bug.cgi?id=136280
1433
1434         Reviewed by Darin Adler.
1435
1436         * platform/mac/URLMac.mm:
1437         (WebCore::URL::operator NSURL *): Use autorelease() instead of
1438         CFBridgingRelease(leakRef())
1439
1440 2014-08-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1441
1442         CSS: Refactor :visited handling in SelectorChecker
1443         https://bugs.webkit.org/show_bug.cgi?id=135639
1444
1445         Reviewed by Benjamin Poulain.
1446
1447         :visited is specially handled in the SelectorChecker and style resolution
1448         because of security issues. That is nested links and adjacent combinators.
1449         Since we propagate linkState from the ancestors,
1450
1451             1. linkStates of ancestors from the target node are only used to calculate
1452             the linkState of the current node.
1453             This is why adjacent combinators disable :visited.
1454
1455             2. linkState is overrides by the closest link element in the ancestors.
1456             This is why :visited is effective on the closest link element.
1457
1458         In this patch, we fix 3 things.
1459
1460             1. Simplify SelectorChecker. Move m_mode to CheckingContext and it makes
1461             CheckingContext more similar to SelectorCompiler::CheckingContext in CSS JIT.
1462             And hide visitedMatchType parameter from the caller of SelectorChecker.
1463
1464             2. Disable :visited inside :-webkit-any. Currently, :-webkit-any provides MatchAll
1465             link match type. So considering visited match type in the matching phase of :visited
1466             provides inconsistency. In this patch, :-webkit-any(:visited) never matches.
1467             And :-webkit-any(:link) acts like a :-webkit-any(:any-link). This behavior represents
1468             that visited match type is always considered as disabled inside :-webkit-any.
1469             This behavior may be changed when Selector Level4 is implemented.
1470
1471             3. Fix the issue when traversing the descendant element,
1472             first encountered link check is missing.
1473
1474         Tests: fast/history/link-inside-any.html
1475                fast/history/link-inside-not.html
1476                fast/history/nested-visited-test-override.html
1477                fast/history/visited-inside-any.html
1478                fast/history/visited-inside-not.html
1479
1480         * css/ElementRuleCollector.cpp:
1481         (WebCore::ElementRuleCollector::ruleMatches):
1482         * css/SelectorChecker.cpp:
1483         (WebCore::SelectorChecker::SelectorChecker):
1484         (WebCore::SelectorChecker::match):
1485         (WebCore::hasScrollbarPseudoElement):
1486         (WebCore::checkingContextForParent):
1487         (WebCore::SelectorChecker::matchRecursively):
1488         (WebCore::SelectorChecker::checkOne):
1489         * css/SelectorChecker.h:
1490         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1491         * css/StyleResolver.h:
1492         (WebCore::checkRegionSelector):
1493         * dom/SelectorQuery.cpp:
1494         (WebCore::SelectorDataList::selectorMatches):
1495
1496 2014-08-29  Zalan Bujtas  <zalan@apple.com>
1497
1498         Subpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator.
1499         https://bugs.webkit.org/show_bug.cgi?id=136383.
1500
1501         Reviewed by Simon Fraser.
1502
1503         There's only one subpixel denominator now.
1504
1505         No change in functionality.
1506
1507         * platform/LayoutUnit.h:
1508         (WebCore::LayoutUnit::LayoutUnit):
1509         (WebCore::LayoutUnit::fromFloatCeil):
1510         (WebCore::LayoutUnit::fromFloatFloor):
1511         (WebCore::LayoutUnit::toInt):
1512         (WebCore::LayoutUnit::toFloat):
1513         (WebCore::LayoutUnit::toDouble):
1514         (WebCore::LayoutUnit::operator++):
1515         (WebCore::LayoutUnit::ceil):
1516         (WebCore::LayoutUnit::round):
1517         (WebCore::LayoutUnit::floor):
1518         (WebCore::LayoutUnit::ceilToFloat):
1519         (WebCore::LayoutUnit::fraction):
1520         (WebCore::LayoutUnit::epsilon):
1521         (WebCore::LayoutUnit::nearlyMax):
1522         (WebCore::LayoutUnit::nearlyMin):
1523         (WebCore::LayoutUnit::isInBounds):
1524         (WebCore::LayoutUnit::setValue):
1525         (WebCore::boundedMultiply):
1526         (WebCore::operator*):
1527         (WebCore::operator/):
1528         (WebCore::operator%):
1529         (WebCore::roundToDevicePixel):
1530         (WebCore::floorToDevicePixel):
1531         (WebCore::ceilToDevicePixel):
1532
1533 2014-08-29  Zalan Bujtas  <zalan@apple.com>
1534
1535         Rename updatePreferredWidth to make it more explicit.
1536         https://bugs.webkit.org/show_bug.cgi?id=136389
1537
1538         Reviewed by Simon Fraser.
1539
1540         No change in functionality.
1541
1542         * rendering/RenderBlock.cpp:
1543         (WebCore::preferredWidth):
1544         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1545         (WebCore::updatePreferredWidth): Deleted.
1546
1547 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
1548
1549         Make timerNestingLevel threadsafe
1550         https://bugs.webkit.org/show_bug.cgi?id=136401
1551
1552         Reviewed by Tim Horton.
1553
1554         timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested'
1555         (repeating, possible due to a timer rescheduling itself) is a global. Since
1556         worker threads can set timers too this is not thread safe.
1557
1558         * dom/ScriptExecutionContext.cpp:
1559         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1560             - added initialize m_timerNestingLevel
1561         * dom/ScriptExecutionContext.h:
1562         (WebCore::ScriptExecutionContext::timerNestingLevel):
1563         (WebCore::ScriptExecutionContext::setTimerNestingLevel):
1564             - added accessors
1565         * page/DOMTimer.cpp:
1566         (WebCore::DOMTimer::DOMTimer):
1567         (WebCore::DOMTimer::fired):
1568             - move timerNestingLevel to the context
1569
1570 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
1571
1572         DOMTimer::m_nestingLevel is prone to overflow
1573         https://bugs.webkit.org/show_bug.cgi?id=136399
1574
1575         Reviewed by Alexey Proskuryakov.
1576
1577         Since this would happen after the 2 billionth timer fire this is unlikely,
1578         and consequences aren't severe (breaks throttling).
1579
1580         This change has the following consequences.
1581
1582             - m_nestingLevel saturates to its max value.
1583             - unnested timers are indicated by a nesting level of 0.
1584             - repeat timers update m_nestingLevel on every fire,
1585               not just those that should have been throttled.
1586
1587         The last point is subtle, but ultimately should be inconsequential. Timers
1588         whose requested timeout is less that the minimum interval will saturate quickly
1589         anyway; timers with an original interval greater than the minimum previously
1590         wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since
1591         they won't be throttled when they hit the threshold. This simplifies things
1592         conceptually a little & reduces the test performed on each timer fire.
1593
1594         * page/DOMTimer.cpp:
1595         (WebCore::shouldForwardUserGesture):
1596             - unnested timers are indicated by a nesting level of 0
1597         (WebCore::DOMTimer::DOMTimer):
1598             - don't increment nesting level on construction
1599         (WebCore::DOMTimer::fired):
1600             - saturating increments
1601         (WebCore::DOMTimer::adjustMinimumTimerInterval):
1602         (WebCore::DOMTimer::intervalClampedToMinimum):
1603             - added ASSERTs
1604
1605 2014-08-29  Zalan Bujtas  <zalan@apple.com>
1606
1607         Improve showRenderTree() output.
1608         https://bugs.webkit.org/show_bug.cgi?id=136244
1609
1610         Reviewed by Darin Adler.
1611
1612         Add more debugging information to showRenderTree().
1613
1614         Not testable.
1615
1616         * rendering/InlineBox.cpp:
1617         (WebCore::InlineBox::showLineTreeForThis):
1618         (WebCore::InlineBox::showLineTreeAndMark):
1619         (WebCore::InlineBox::showLineBox):
1620         (showNodeTree):
1621         (showLineTree):
1622         (WebCore::InlineBox::showBox): Deleted.
1623         * rendering/InlineBox.h:
1624         * rendering/InlineFlowBox.cpp:
1625         (WebCore::InlineFlowBox::showLineTreeAndMark):
1626         * rendering/InlineFlowBox.h:
1627         * rendering/InlineTextBox.cpp:
1628         (WebCore::InlineTextBox::showLineBox):
1629         (WebCore::InlineTextBox::showBox): Deleted.
1630         * rendering/InlineTextBox.h:
1631         * rendering/RenderBlock.cpp:
1632         (WebCore::RenderBlock::showLineTreeAndMark): Deleted.
1633         * rendering/RenderBlock.h:
1634         * rendering/RenderBlockFlow.cpp:
1635         (WebCore::RenderBlockFlow::showLineTreeAndMark):
1636         * rendering/RenderBlockFlow.h:
1637         * rendering/RenderObject.cpp:
1638         (WebCore::showRenderTreeLegend):
1639         (WebCore::RenderObject::showNodeTreeForThis):
1640         (WebCore::RenderObject::showRenderTreeForThis):
1641         (WebCore::RenderObject::showLineTreeForThis):
1642         (WebCore::RenderObject::showRegionsInformation):
1643         (WebCore::RenderObject::showRenderObject):
1644         (WebCore::RenderObject::showRenderSubTreeAndMark):
1645         (showNodeTree):
1646         (showLineTree):
1647         (showRenderTree):
1648         (WebCore::RenderObject::showRenderTreeAndMark): Deleted.
1649         * rendering/RenderObject.h:
1650         * rendering/RootInlineBox.h:
1651
1652 2014-08-29  Csaba Osztrogonác  <ossy@webkit.org>
1653
1654         Unreviewed, remove empty directories.
1655
1656         * Modules/networkinfo: Removed.
1657         * inspector/front-end: Removed.
1658         * inspector/front-end/Images: Removed.
1659         * inspector/front-end/UglifyJS: Removed.
1660         * inspector/front-end/ace: Removed.
1661         * inspector/front-end/cm: Removed.
1662         * platform/audio/ffmpeg: Removed.
1663         * platform/audio/ipp: Removed.
1664         * platform/graphics/gpu/opencl: Removed.
1665
1666 2014-08-29  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1667
1668         [EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
1669         https://bugs.webkit.org/show_bug.cgi?id=135560
1670
1671         Reviewed by Gyuyoung Kim.
1672
1673         No new tests required, no new functionality.
1674
1675         * PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards.
1676         * platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
1677         (WebCore::GraphicsContext3D::platformLayer):
1678         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
1679         * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
1680         (WebCore::GraphicsContext3DPrivate::initialize):
1681         (WebCore::GraphicsContext3DPrivate::releaseResources):
1682         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1683         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
1684         * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
1685         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard.
1686
1687 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1688
1689         RenderThemeGtk depends on classes outside of platform
1690         https://bugs.webkit.org/show_bug.cgi?id=22176
1691
1692         Reviewed by Martin Robinson.
1693
1694         Move RenderThemeGtk.cpp from platform to rendering.
1695
1696         * PlatformGTK.cmake:
1697         * rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.
1698
1699 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1700
1701         [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
1702         https://bugs.webkit.org/show_bug.cgi?id=136338
1703
1704         Reviewed by Philippe Normand.
1705
1706         Remove the dependency by creating the GtkStyleContext for the
1707         scrollbars in ScrollbarThemeGtk.
1708
1709         * platform/gtk/RenderThemeGtk.cpp:
1710         (WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
1711         (WebCore::getStyleContext): Remove the scrollbar style context support.
1712         * platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
1713         * platform/gtk/ScrollbarThemeGtk.cpp:
1714         (WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
1715         class to create the global GtkStyleContext for scrollbars.
1716         (WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
1717         (WebCore::ScrollbarStyleContext::context):
1718         (WebCore::gtkScrollbarStyleContext):
1719         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
1720         (WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
1721         GtkStylecontext and call updateThemeProperties().
1722         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
1723         global style context.
1724         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
1725         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
1726         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
1727         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
1728         * platform/gtk/ScrollbarThemeGtk.h:
1729
1730 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1731
1732         [GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
1733         https://bugs.webkit.org/show_bug.cgi?id=136336
1734
1735         Reviewed by Philippe Normand.
1736
1737         There's no reason to have two files now that there's no GTK+2
1738         support. Also fix coding style issues and compile warnings.
1739
1740         * PlatformGTK.cmake:
1741         * platform/gtk/RenderThemeGtk.cpp:
1742         * platform/gtk/RenderThemeGtk.h:
1743         * platform/gtk/RenderThemeGtk3.cpp: Removed.
1744         * platform/gtk/ScrollbarThemeGtk.cpp:
1745         * platform/gtk/ScrollbarThemeGtk3.cpp: Removed.
1746
1747 2014-08-28  Mark Lam  <mark.lam@apple.com>
1748
1749         DebuggerCallFrame::scope() should return a DebuggerScope.
1750         <https://webkit.org/b/134420>
1751
1752         Reviewed by Geoffrey Garen.
1753
1754         No new tests.
1755
1756         Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.
1757
1758         * bindings/js/ScriptController.cpp:
1759         (WebCore::ScriptController::attachDebugger):
1760         - We should acquire the JSLock before modifying a JS global object.
1761
1762 2014-08-28  Enrica Casucci  <enrica@apple.com>
1763
1764         Can't hit tab key more than 3 times continuously.
1765         https://bugs.webkit.org/show_bug.cgi?id=136357
1766         rdar://problem/17927266
1767
1768         Reviewed by Dean Jackson.
1769
1770         Test: fast/css/multiple-tabs.html
1771
1772         When computing the tabWidth disregard increments of less than half the size of the space character
1773         for the given font.
1774
1775         * platform/graphics/Font.h:
1776         (WebCore::Font::tabWidth):
1777
1778 2014-08-28  Daniel Bates  <dabates@apple.com>
1779
1780         [iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit.org/changeset/172814/>
1781         (https://bugs.webkit.org/show_bug.cgi?id=136108)
1782
1783         Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
1784         build for clients that include this header.
1785
1786         * platform/ios/wak/WebCoreThread.h:
1787
1788 2014-08-28  Pratik Solanki  <psolanki@apple.com>
1789
1790         WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
1791         https://bugs.webkit.org/show_bug.cgi?id=136347
1792         <rdar://problem/18073745>
1793
1794         Reviewed by Andreas Kling.
1795
1796         When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
1797         set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
1798         churn since we would create a new buffer for every data chunk we get. Fix this by at least
1799         doubling the capacity of the buffer when we duplicate it.
1800
1801         * platform/SharedBuffer.cpp:
1802         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
1803
1804 2014-08-28  Dan Bernstein  <mitz@apple.com>
1805
1806         iOS build fix.
1807
1808         * WebCore.exp.in: Updated symbol.
1809
1810 2014-08-28  Benjamin Poulain  <bpoulain@apple.com>
1811
1812         Scrolling with spacebar on a page with fixed header breaks reading flow
1813         https://bugs.webkit.org/show_bug.cgi?id=135506
1814
1815         Reviewed by Simon Fraser.
1816
1817         When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page,
1818         and substract that height from the step to scroll.
1819
1820         Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html
1821                scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html
1822                scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html
1823                scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html
1824                scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html
1825                scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html
1826                scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
1827                scrollbars/scrolling-by-page-on-keyboard-spacebar.html
1828
1829         * WebCore.exp.in:
1830         * page/FrameView.cpp:
1831         (WebCore::FrameView::adjustScrollStepForFixedContent):
1832         * page/FrameView.h:
1833         * platform/ScrollableArea.cpp:
1834         (WebCore::ScrollableArea::adjustScrollStepForFixedContent):
1835         (WebCore::ScrollableArea::scroll):
1836         * platform/ScrollableArea.h:
1837
1838 2014-08-28  Zalan Bujtas  <zalan@apple.com>
1839
1840         Subpixel layout: Remove unused pixel snapping functions.
1841         https://bugs.webkit.org/show_bug.cgi?id=136341
1842
1843         Reviewed by Simon Fraser.
1844
1845         Let's not encourage integral snapping by having these functions around.
1846         
1847         No change in functionality.
1848
1849         * accessibility/AccessibilityObject.h:
1850         (WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted.
1851         (WebCore::AccessibilityObject::pixelSnappedSize): Deleted.
1852         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1853         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1854         * html/HTMLImageElement.cpp:
1855         (WebCore::HTMLImageElement::width):
1856         (WebCore::HTMLImageElement::height):
1857         * page/FrameView.cpp:
1858         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
1859         * platform/graphics/LayoutPoint.h:
1860         (WebCore::snappedIntSize):
1861         (WebCore::snapSizeToDevicePixel):
1862         * platform/graphics/LayoutRect.h:
1863         (WebCore::LayoutRect::pixelSnappedLocation): Deleted.
1864         (WebCore::LayoutRect::pixelSnappedX): Deleted.
1865         (WebCore::LayoutRect::pixelSnappedY): Deleted.
1866         (WebCore::LayoutRect::pixelSnappedWidth): Deleted.
1867         (WebCore::LayoutRect::pixelSnappedHeight): Deleted.
1868         (WebCore::LayoutRect::pixelSnappedMaxX): Deleted.
1869         (WebCore::LayoutRect::pixelSnappedMaxY): Deleted.
1870         (WebCore::snappedIntRectFromEdges): Deleted.
1871         * rendering/RenderBlockFlow.h:
1872         (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted.
1873         (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted.
1874         (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted.
1875         (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted.
1876         * rendering/RenderBox.h:
1877         (WebCore::RenderBox::pixelSnappedLogicalHeight):
1878         (WebCore::RenderBox::pixelSnappedLogicalWidth):
1879         (WebCore::RenderBox::pixelSnappedBorderBoxRect):
1880         (WebCore::RenderBox::pixelSnappedWidth): Deleted.
1881         (WebCore::RenderBox::pixelSnappedHeight): Deleted.
1882         (WebCore::RenderBox::pixelSnappedFrameRect): Deleted.
1883         * rendering/RenderFileUploadControl.cpp:
1884         (WebCore::nodeWidth):
1885         (WebCore::nodeHeight):
1886         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1887         * rendering/RenderLayer.cpp:
1888         (WebCore::RenderLayer::updateLayerPosition):
1889         (WebCore::RenderLayer::isPointInResizeControl):
1890         * rendering/RenderLayerCompositor.cpp:
1891         (WebCore::RenderLayerCompositor::ensureRootLayer):
1892         * rendering/RenderMediaControls.cpp:
1893         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
1894         * rendering/RenderMultiColumnSet.cpp:
1895         (WebCore::RenderMultiColumnSet::paintColumnRules):
1896         * rendering/RenderScrollbar.cpp:
1897         (WebCore::RenderScrollbar::buttonRect):
1898         * rendering/RenderView.h:
1899
1900 2014-08-27  Enrica Casucci  <enrica@apple.com>
1901
1902         textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
1903         https://bugs.webkit.org/show_bug.cgi?id=136323
1904         rdar://problem/18141964
1905
1906         Reviewed by Antti Koivisto.
1907
1908         For underline style we need to check typingStyle first and use that information to populate
1909         the dictionary. If there is no typing style we can use the render style.
1910
1911         * WebCore.exp.in:
1912         * editing/ios/EditorIOS.mm:
1913         (WebCore::Editor::fontAttributesForSelectionStart):
1914
1915 2014-08-28  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1916
1917         [GTK] Add WaylandEventSource
1918         https://bugs.webkit.org/show_bug.cgi?id=136213
1919
1920         Reviewed by Martin Robinson.
1921
1922         Add the WaylandEventSource class. Its static method, createEventSource(),
1923         creates a new GSource object that is attached to the main context and
1924         enables handling Wayland display events through the GLib's main loop.
1925
1926         The method will be called by the nested Wayland compositor during its
1927         initialization, which will also take the control over the ownership and
1928         will be tasked with properly removing the GSource from the main context.
1929
1930         GLibSource is a GSource-based struct that additionally holds a GPollFD object
1931         and the pointer to the wl_display object whose event loop we'll be
1932         dispatching during the GSource dispatch. This is the type that g_source_new
1933         uses when allocating the new GSource object.
1934
1935         The GSource is assigned the default priorty, can recurse, and is attached
1936         to the main context.
1937
1938         * PlatformGTK.cmake:
1939         * platform/graphics/wayland/WaylandEventSource.cpp: Added.
1940         (WebCore::GLibSource::initialize):
1941         (WebCore::GLibSource::check):
1942         (WebCore::GLibSource::dispatch):
1943         (WebCore::prepareCallback):
1944         (WebCore::checkCallback):
1945         (WebCore::dispatchCallback):
1946         (WebCore::WaylandEventSource::createDisplayEventSource):
1947         * platform/graphics/wayland/WaylandEventSource.h: Added.
1948
1949 2014-08-28  Chris Fleizach  <cfleizach@apple.com>
1950
1951         AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
1952         https://bugs.webkit.org/show_bug.cgi?id=136333
1953
1954         Reviewed by David Kilzer.
1955
1956         If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
1957         We can avoid this by checking that the node is in a document before asking for its document.
1958
1959         I was not able to make a test case.      
1960
1961         * accessibility/AXObjectCache.cpp:
1962         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
1963
1964 2014-08-28  Andreas Kling  <akling@apple.com>
1965
1966         ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html
1967         <https://webkit.org/b/136329>
1968
1969         Cancel any pending compositing layer updates when moving a document
1970         into the page cache.
1971
1972         Reviewed by Zalan Bujtas.
1973
1974         * dom/Document.cpp:
1975         (WebCore::Document::documentWillSuspendForPageCache):
1976         * rendering/RenderLayerCompositor.cpp:
1977         (WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate):
1978         * rendering/RenderLayerCompositor.h:
1979
1980 2014-08-28  Mihnea Ovidenie  <mihnea@adobe.com>
1981
1982         [CSSRegions] Incorrect selection clearing on a document without regions
1983         https://bugs.webkit.org/show_bug.cgi?id=134901
1984
1985         Reviewed by David Hyatt.
1986
1987         When we select all the content of document with named flows but without regions,
1988         the start and end points of selection is cached in RenderView. However, since
1989         the document has named flows, the selection is split between the subtrees. During the split,
1990         it is possible that the cached end-points of the original selection are not included
1991         in any of the resulting subtree selection and they are not marked accordingly.
1992         In order to process the selection clearing correctly, we have to take the original
1993         selection end-points into account.
1994
1995         Test: fast/regions/selection/select-all-without-regions.html
1996
1997         * rendering/RenderObject.cpp:
1998         (WebCore::RenderObject::isSelectionBorder):
1999
2000 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2001
2002         [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
2003         https://bugs.webkit.org/show_bug.cgi?id=136248
2004
2005         Reviewed by Gustavo Noronha Silva.
2006
2007         Move the code to update the SoupMessageHeaders to a new public
2008         method.
2009
2010         * platform/network/soup/ResourceResponse.h:
2011         * platform/network/soup/ResourceResponseSoup.cpp:
2012         (WebCore::ResourceResponse::updateSoupMessageHeaders):
2013         (WebCore::ResourceResponse::toSoupMessage):
2014
2015 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2016
2017         [GTK] Remove support for GTK+2 theme rendering
2018         https://bugs.webkit.org/show_bug.cgi?id=136285
2019
2020         Reviewed by Philippe Normand.
2021
2022         GTK+2 is only used by the plugin process that doesn't need to
2023         render html controls themed. Since the theme files are still
2024         built for WebCorePlatformGTK2, we need to provide dummy
2025         implementations for the pure virtual methods when
2026         GTK_API_VERSION_2 is defined.
2027
2028         * PlatformGTK.cmake: Remove deleted files from compilation.
2029         * platform/gtk/RenderThemeGtk.cpp:
2030         (WebCore::RenderThemeGtk::create):
2031         (WebCore::RenderTheme::themeForPage):
2032         (WebCore::getScreenDPI):
2033         (WebCore::RenderThemeGtk::systemFont):
2034         (WebCore::RenderThemeGtk::sliderTickSize):
2035         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
2036         (WebCore::RenderThemeGtk::getScreenDPI): Deleted.
2037         * platform/gtk/RenderThemeGtk.h:
2038         * platform/gtk/RenderThemeGtk2.cpp: Removed.
2039         * platform/gtk/RenderThemeGtk3.cpp:
2040         * platform/gtk/ScrollbarThemeGtk.cpp:
2041         (WebCore::ScrollbarThemeGtk::hasThumb):
2042         (WebCore::ScrollbarThemeGtk::backButtonRect):
2043         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
2044         (WebCore::ScrollbarThemeGtk::trackRect):
2045         (WebCore::ScrollbarThemeGtk::registerScrollbar):
2046         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
2047         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
2048         * platform/gtk/ScrollbarThemeGtk.h:
2049         * platform/gtk/ScrollbarThemeGtk2.cpp: Removed.
2050         * platform/gtk/WidgetRenderingContext.cpp: Removed.
2051         * platform/gtk/WidgetRenderingContext.h: Removed.
2052
2053 2014-08-28  Zan Dobersek  <zdobersek@igalia.com>
2054
2055         Unreviewed GTK build fix for the Wayland windowing target after r173052.
2056
2057         * platform/graphics/wayland/WaylandSurface.cpp: Include the IntSize header.
2058         * platform/graphics/wayland/WaylandSurface.h: Forward-declare IntSize.
2059
2060 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
2061
2062         One more URTBF after r173047.
2063
2064         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2065         (webkitAccessibleComponentGetExtents):
2066
2067 2014-08-27  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2068
2069         [GTK] Add WaylandSurface
2070         https://bugs.webkit.org/show_bug.cgi?id=136220
2071
2072         Reviewed by Martin Robinson.
2073
2074         Add the WaylandSurface class. An objects of this type is meant to be used
2075         by the LayerTreeHostGtk in the WebProcess and is constructed via the
2076         WaylandDisplay::createSurface() method.
2077
2078         LayerTreeHostGtk uses such object to perform frame requests to the nested
2079         Wayland compositor in the UIProcess, and to create the GLContextEGL object
2080         that's used during the layer flushing and compositing.
2081
2082         The resize() method is called whenever LayerTreeHostGtk is being resized,
2083         and basically only wraps the wl_egL_window_resize() call.
2084
2085         * PlatformGTK.cmake:
2086         * platform/graphics/wayland/WaylandSurface.cpp: Added.
2087         (WebCore::frameCallback):
2088         (WebCore::WaylandSurface::WaylandSurface):
2089         (WebCore::WaylandSurface::~WaylandSurface):
2090         (WebCore::WaylandSurface::resize):
2091         (WebCore::WaylandSurface::createGLContext):
2092         (WebCore::WaylandSurface::requestFrame):
2093         * platform/graphics/wayland/WaylandSurface.h: Added.
2094         (WebCore::WaylandSurface::surface):
2095         (WebCore::WaylandSurface::nativeWindowHandle):
2096
2097 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
2098
2099         URTBF after r173047.
2100
2101         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
2102         (webkitAccessibleImageGetImagePosition):
2103
2104 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2105
2106         Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
2107         https://bugs.webkit.org/show_bug.cgi?id=136264
2108
2109         Reviewed by Simon Fraser.
2110         
2111         1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping
2112         functions. ->snappedIntSize()/snapSizeToDevicePixel().
2113         2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality.
2114
2115         Covered by existing tests.
2116
2117         * platform/LayoutUnit.h:
2118         (WebCore::snapSizeToPixel): Deleted.
2119         (WebCore::snapSizeToDevicePixel): Deleted.
2120         * platform/graphics/LayoutPoint.h:
2121         (WebCore::snappedIntSize):
2122         (WebCore::snapSizeToDevicePixel):
2123         (WebCore::pixelSnappedIntSize): Deleted.
2124         * platform/graphics/LayoutRect.h:
2125         (WebCore::LayoutRect::pixelSnappedSize):
2126         (WebCore::LayoutRect::pixelSnappedWidth):
2127         (WebCore::LayoutRect::pixelSnappedHeight):
2128         (WebCore::pixelSnappedIntRect):
2129         (WebCore::pixelSnappedIntRectFromEdges):
2130         (WebCore::pixelSnappedForPainting):
2131         (WebCore::directionalPixelSnappedForPainting):
2132         * rendering/RenderBox.cpp:
2133         (WebCore::RenderBox::pixelSnappedClientWidth):
2134         (WebCore::RenderBox::pixelSnappedClientHeight):
2135         (WebCore::RenderBox::pixelSnappedOffsetWidth):
2136         (WebCore::RenderBox::pixelSnappedOffsetHeight):
2137         (WebCore::RenderBox::scrollWidth):
2138         (WebCore::RenderBox::scrollHeight):
2139         * rendering/RenderBoxModelObject.cpp:
2140         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth):
2141         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight):
2142         * rendering/RenderLayer.cpp:
2143         (WebCore::RenderLayer::updateLayerPosition):
2144         (WebCore::RenderLayer::scrollWidth):
2145         (WebCore::RenderLayer::scrollHeight):
2146         * rendering/RenderTreeAsText.cpp:
2147         (WebCore::writeLayers):
2148
2149 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2150
2151         Subpixel layout: Rename LayoutRect's device pixel snapping functions.
2152         https://bugs.webkit.org/show_bug.cgi?id=136319
2153
2154         Reviewed by Simon Fraser.
2155
2156         From pixelSnappedForPainting() to snapRectToDevicePixels() and 
2157         pixelSnappedIntRect*() to snappedIntRect*().
2158
2159         No change in functionality.
2160
2161         * accessibility/AccessibilityObject.cpp:
2162         (WebCore::AccessibilityObject::boundingBoxForQuads):
2163         (WebCore::AccessibilityObject::isOnscreen):
2164         (WebCore::AccessibilityObject::scrollToMakeVisible):
2165         * accessibility/AccessibilityObject.h:
2166         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect):
2167         (WebCore::AccessibilityObject::pixelSnappedElementRect):
2168         * accessibility/AccessibilityRenderObject.cpp:
2169         (WebCore::AccessibilityRenderObject::isOffScreen):
2170         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
2171         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2172         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
2173         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
2174         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2175         (-[WebAccessibilityObjectWrapper position]):
2176         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
2177         * bindings/objc/DOMUIKitExtensions.mm:
2178         (-[DOMHTMLAreaElement boundingBoxWithOwner:]):
2179         (-[DOMHTMLAreaElement absoluteQuadWithOwner:]):
2180         * css/CSSComputedStyleDeclaration.cpp:
2181         (WebCore::computedTransform):
2182         * dom/Node.h:
2183         (WebCore::Node::pixelSnappedBoundingBox):
2184         (WebCore::Node::pixelSnappedRenderRect):
2185         * editing/RenderedPosition.cpp:
2186         (WebCore::RenderedPosition::absoluteRect):
2187         * editing/mac/FrameSelectionMac.mm:
2188         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2189         * html/HTMLCanvasElement.cpp:
2190         (WebCore::HTMLCanvasElement::paint):
2191         * inspector/InspectorOverlay.cpp:
2192         (WebCore::buildObjectForElementInfo):
2193         * inspector/InspectorPageAgent.cpp:
2194         (WebCore::InspectorPageAgent::didPaint):
2195         * page/FrameSnapshotting.cpp:
2196         (WebCore::snapshotNode):
2197         * page/FrameView.cpp:
2198         (WebCore::FrameView::scrollContentsFastPath):
2199         (WebCore::FrameView::extendedBackgroundRectForPainting):
2200         (WebCore::FrameView::windowClipRectForFrameOwner):
2201         (WebCore::FrameView::convertFromRendererToContainingView):
2202         * page/Page.cpp:
2203         (WebCore::Page::addRelevantRepaintedObject):
2204         (WebCore::Page::addRelevantUnpaintedObject):
2205         * page/ios/FrameIOS.mm:
2206         (WebCore::ancestorRespondingToClickEvents):
2207         * platform/DragImage.cpp:
2208         (WebCore::createDragImageForImage):
2209         * platform/graphics/LayoutRect.cpp:
2210         (WebCore::enclosingRectToDevicePixels):
2211         (WebCore::enclosingRectForPainting): Deleted.
2212         * platform/graphics/LayoutRect.h:
2213         (WebCore::snappedIntRect):
2214         (WebCore::snappedIntRectFromEdges):
2215         (WebCore::snapRectToDevicePixels):
2216         (WebCore::snapRectToDevicePixelsWithWritingDirection):
2217         (WebCore::pixelSnappedIntRect): Deleted.
2218         (WebCore::pixelSnappedIntRectFromEdges): Deleted.
2219         (WebCore::pixelSnappedForPainting): Deleted.
2220         (WebCore::directionalPixelSnappedForPainting): Deleted.
2221         * platform/graphics/RoundedRect.cpp:
2222         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
2223         * platform/graphics/ca/GraphicsLayerCA.cpp:
2224         (WebCore::GraphicsLayerCA::computePixelAlignment):
2225         * platform/text/TextStream.cpp:
2226         (WebCore::TextStream::operator<<):
2227         * rendering/EllipsisBox.cpp:
2228         (WebCore::EllipsisBox::paintSelection):
2229         * rendering/FilterEffectRenderer.cpp:
2230         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2231         * rendering/InlineFlowBox.cpp:
2232         (WebCore::InlineFlowBox::paint):
2233         * rendering/InlineTextBox.cpp:
2234         (WebCore::InlineTextBox::paintSelection):
2235         (WebCore::InlineTextBox::paintCompositionBackground):
2236         (WebCore::InlineTextBox::paintTextMatchMarker):
2237         (WebCore::InlineTextBox::positionForOffset):
2238         * rendering/RenderBlock.cpp:
2239         (WebCore::RenderBlock::addVisualOverflowFromTheme):
2240         (WebCore::RenderBlock::paint):
2241         (WebCore::RenderBlock::blockSelectionGap):
2242         (WebCore::RenderBlock::logicalLeftSelectionGap):
2243         (WebCore::RenderBlock::logicalRightSelectionGap):
2244         (WebCore::RenderBlock::absoluteRects):
2245         (WebCore::RenderBlock::addFocusRingRects):
2246         * rendering/RenderBlockFlow.cpp:
2247         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
2248         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
2249         * rendering/RenderBox.cpp:
2250         (WebCore::RenderBox::absoluteRects):
2251         (WebCore::RenderBox::absoluteContentBox):
2252         (WebCore::RenderBox::outlineBoundsForRepaint):
2253         (WebCore::RenderBox::addFocusRingRects):
2254         (WebCore::RenderBox::getBackgroundPaintedExtent):
2255         (WebCore::RenderBox::pushContentsClip):
2256         (WebCore::RenderBox::computeRectForRepaint):
2257         * rendering/RenderBox.h:
2258         (WebCore::RenderBox::pixelSnappedFrameRect):
2259         * rendering/RenderBoxModelObject.cpp:
2260         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2261         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2262         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2263         (WebCore::RenderBoxModelObject::paintBorder):
2264         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2265         (WebCore::RenderBoxModelObject::paintBoxShadow):
2266         * rendering/RenderDetailsMarker.cpp:
2267         (WebCore::RenderDetailsMarker::paint):
2268         * rendering/RenderEmbeddedObject.cpp:
2269         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2270         (WebCore::RenderEmbeddedObject::isReplacementObscured):
2271         * rendering/RenderFieldset.cpp:
2272         (WebCore::RenderFieldset::paintBoxDecorations):
2273         * rendering/RenderFlowThread.cpp:
2274         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
2275         * rendering/RenderFrameSet.cpp:
2276         (WebCore::RenderFrameSet::paint):
2277         (WebCore::RenderFrameSet::layout):
2278         (WebCore::RenderFrameSet::positionFramesWithFlattening):
2279         * rendering/RenderHTMLCanvas.cpp:
2280         (WebCore::RenderHTMLCanvas::paintReplaced):
2281         * rendering/RenderImage.cpp:
2282         (WebCore::RenderImage::paintReplaced):
2283         * rendering/RenderInline.cpp:
2284         (WebCore::RenderInline::paintOutlineForLine):
2285         * rendering/RenderLayer.cpp:
2286         (WebCore::RenderLayer::updateTransform):
2287         (WebCore::RenderLayer::currentTransform):
2288         (WebCore::RenderLayer::beginTransparencyLayers):
2289         (WebCore::RenderLayer::scrollRectToVisible):
2290         (WebCore::RenderLayer::scrollCornerRect):
2291         (WebCore::RenderLayer::drawPlatformResizerImage):
2292         (WebCore::RenderLayer::paintResizer):
2293         (WebCore::RenderLayer::hitTestOverflowControls):
2294         (WebCore::RenderLayer::clipToRect):
2295         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2296         (WebCore::RenderLayer::paintOverflowControlsForFragments):
2297         (WebCore::RenderLayer::hitTestResizerInFragments):
2298         (WebCore::RenderLayer::calculateClipRects):
2299         * rendering/RenderLayerBacking.cpp:
2300         (WebCore::RenderLayerBacking::updateTransform):
2301         (WebCore::RenderLayerBacking::updateGeometry):
2302         (WebCore::RenderLayerBacking::resetContentsRect):
2303         (WebCore::RenderLayerBacking::updateImageContents):
2304         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
2305         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2306         (WebCore::RenderLayerBacking::paintContents):
2307         * rendering/RenderLayerCompositor.cpp:
2308         (WebCore::RenderLayerCompositor::addToOverlapMap):
2309         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
2310         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
2311         (WebCore::RenderLayerCompositor::paintContents):
2312         * rendering/RenderListBox.cpp:
2313         (WebCore::RenderListBox::addFocusRingRects):
2314         (WebCore::RenderListBox::paintScrollbar):
2315         (WebCore::RenderListBox::paintItemBackground):
2316         * rendering/RenderListMarker.cpp:
2317         (WebCore::RenderListMarker::paint):
2318         * rendering/RenderMeter.cpp:
2319         (WebCore::RenderMeter::updateLogicalWidth):
2320         (WebCore::RenderMeter::computeLogicalHeight):
2321         * rendering/RenderMultiColumnSet.cpp:
2322         (WebCore::RenderMultiColumnSet::paintColumnRules):
2323         * rendering/RenderObject.cpp:
2324         (WebCore::RenderObject::drawLineForBoxSide):
2325         (WebCore::RenderObject::addPDFURLRect):
2326         (WebCore::RenderObject::paintOutline):
2327         (WebCore::RenderObject::absoluteBoundingBoxRect):
2328         (WebCore::RenderObject::repaintUsingContainer):
2329         (WebCore::RenderObject::repaintSlowRepaintObject):
2330         (WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
2331         * rendering/RenderProgress.cpp:
2332         (WebCore::RenderProgress::computeLogicalHeight):
2333         * rendering/RenderReplaced.cpp:
2334         (WebCore::RenderReplaced::paint):
2335         * rendering/RenderScrollbarPart.cpp:
2336         (WebCore::RenderScrollbarPart::paintIntoRect):
2337         * rendering/RenderSearchField.cpp:
2338         (WebCore::RenderSearchField::showPopup):
2339         * rendering/RenderSnapshottedPlugIn.cpp:
2340         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2341         * rendering/RenderTableCell.cpp:
2342         (WebCore::RenderTableCell::paintCollapsedBorders):
2343         * rendering/RenderTextControl.cpp:
2344         (WebCore::RenderTextControl::addFocusRingRects):
2345         * rendering/RenderTextControlSingleLine.cpp:
2346         (WebCore::RenderTextControlSingleLine::paint):
2347         * rendering/RenderTheme.cpp:
2348         (WebCore::RenderTheme::paint):
2349         (WebCore::RenderTheme::paintBorderOnly):
2350         (WebCore::RenderTheme::paintDecorations):
2351         * rendering/RenderThemeMac.mm:
2352         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2353         * rendering/RenderTreeAsText.cpp:
2354         (WebCore::write):
2355         * rendering/RenderVideo.cpp:
2356         (WebCore::RenderVideo::videoBox):
2357         (WebCore::RenderVideo::paintReplaced):
2358         * rendering/RenderView.cpp:
2359         (WebCore::RenderView::repaintViewRectangle):
2360         (WebCore::RenderView::computeRectForRepaint):
2361         (WebCore::RenderView::absoluteRects):
2362         (WebCore::RenderView::selectionBounds):
2363         (WebCore::RenderView::unscaledDocumentRect):
2364         * rendering/RenderView.h:
2365         * rendering/RenderWidget.cpp:
2366         (WebCore::RenderWidget::paintContents):
2367         (WebCore::RenderWidget::paint):
2368         * rendering/SimpleLineLayoutFunctions.cpp:
2369         (WebCore::SimpleLineLayout::paintDebugBorders):
2370         * rendering/shapes/Shape.cpp:
2371         (WebCore::Shape::createRasterShape):
2372         * rendering/svg/RenderSVGModelObject.cpp:
2373         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
2374         * rendering/svg/RenderSVGRoot.cpp:
2375         (WebCore::RenderSVGRoot::paintReplaced):
2376         * rendering/svg/SVGInlineTextBox.cpp:
2377         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
2378
2379 2014-08-27  Daniel Bates  <dabates@apple.com>
2380
2381         Scrollbar corner can be drawn outside containing frame
2382         https://bugs.webkit.org/show_bug.cgi?id=133131
2383         <rdar://problem/16382769>
2384
2385         Reviewed by Simon Fraser.
2386
2387         Merged from Blink (patch by Levi Weintraub):
2388         <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>
2389
2390         Fixes an issue where the scroll corner may be painted outside the rectangle of
2391         its associated frame by setting a clip rectangle before painting the scroll bar(s)
2392         and scroll corner.
2393
2394         Test: scrollbars/custom-scrollbars-paint-outside-iframe.html
2395
2396         * platform/ScrollView.cpp:
2397         (WebCore::ScrollView::paint):
2398
2399 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2400
2401         Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
2402         https://bugs.webkit.org/show_bug.cgi?id=136314
2403
2404         Reviewed by Simon Fraser.
2405
2406         From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
2407
2408         EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
2409         but currently untestable.
2410
2411         * WebCore.exp.in:
2412         * inspector/InspectorOverlay.cpp:
2413         (WebCore::InspectorOverlay::showPaintRect):
2414         * platform/graphics/FloatPoint.h:
2415         (WebCore::flooredIntSize):
2416         (WebCore::floorPointToDevicePixels):
2417         (WebCore::ceilPointToDevicePixels):
2418         (WebCore::flooredToDevicePixels): Deleted.
2419         (WebCore::ceiledToDevicePixels): Deleted.
2420         * platform/graphics/FloatRect.cpp:
2421         (WebCore::enclosingRectToDevicePixels):
2422         (WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed.
2423         (WebCore::enclosedIntRect): Deleted. Not needed.
2424         * platform/graphics/FloatRect.h:
2425
2426 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2427
2428         Subpixel layout: Rename LayoutPoint's device pixel snapping functions.
2429         https://bugs.webkit.org/show_bug.cgi?id=136306
2430
2431         Reviewed by Simon Fraser.
2432
2433         From *edForPainting() to *PointToDevicePixels() (* = floor/round/ceil)
2434
2435         No change in functionality.
2436
2437         * platform/graphics/LayoutPoint.h:
2438         (WebCore::roundPointToDevicePixels):
2439         (WebCore::floorPointToDevicePixels):
2440         (WebCore::ceilPointToDevicePixels):
2441         (WebCore::roundedForPainting): Deleted.
2442         (WebCore::flooredForPainting): Deleted.
2443         (WebCore::ceiledForPainting): Deleted.
2444         * platform/graphics/LayoutRect.cpp:
2445         (WebCore::enclosingRectForPainting):
2446         * platform/graphics/LayoutRect.h:
2447         (WebCore::directionalPixelSnappedForPainting):
2448         * rendering/RenderBoxModelObject.cpp:
2449         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2450         * rendering/RenderLayer.cpp:
2451         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2452         (WebCore::RenderLayer::calculateClipRects):
2453         * rendering/RenderLayerBacking.cpp:
2454         (WebCore::RenderLayerBacking::updateGeometry):
2455
2456 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2457
2458         Subpixel layout: Rename LayoutSize's device pixel snapping functions.
2459         https://bugs.webkit.org/show_bug.cgi?id=136310
2460
2461         Reviewed by Simon Fraser.
2462
2463         From *edForPainting() to *SizeToDevicePixels() (* = floor/round/ceil)
2464
2465         No change in functionality.
2466
2467          * platform/graphics/LayoutSize.h:
2468         (WebCore::floorSizeToDevicePixels):
2469         (WebCore::flooredForPainting): Deleted.
2470         * rendering/style/StyleGeneratedImage.cpp:
2471         (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
2472
2473 2014-08-27  Brian J. Burg  <burg@cs.washington.edu>
2474
2475         Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage
2476         https://bugs.webkit.org/show_bug.cgi?id=136318
2477
2478         Reviewed by Simon Fraser.
2479
2480         This regressed in a replay-related patch. Revert back to uint8_t storage size.
2481
2482         * platform/PlatformWheelEvent.h:
2483         * platform/ScrollTypes.h:
2484         * replay/WebInputs.json:
2485
2486 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
2487
2488         Speling is hard.
2489
2490         Reviewed by Tim Horton.
2491
2492         * page/EventHandler.cpp:
2493         (WebCore::EventHandler::handleMousePressEvent):
2494         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2495         (WebCore::EventHandler::handleMouseMoveEvent):
2496         (WebCore::EventHandler::handleMouseReleaseEvent):
2497         (WebCore::EventHandler::handlePasteGlobalSelection):
2498         (WebCore::EventHandler::updateMouseEventTargetNode):
2499         (WebCore::EventHandler::dispatchMouseEvent):
2500         (WebCore::EventHandler::sendContextMenuEventForKey):
2501         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
2502
2503 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
2504
2505         Fix the iOS build.
2506
2507         * page/EventHandler.cpp:
2508         (WebCore::EventHandler::handleMousePressEvent):
2509
2510 2014-08-27  Andreas Kling  <akling@apple.com>
2511
2512         Drawing text in an SVG font causes load events to be fired.
2513         <https://webkit.org/b/136269>
2514         <rdar://problem/15724915>
2515
2516         Don't flush pending load events in Document::implicitClose() for frameless documents.
2517         This is a targeted fix for an issue where parsing SVG fonts during layout would cause
2518         event dispatch to happen in the main document, leading to arbitrary JS execution.
2519
2520         Note that the testcase only works in DRT/WTR, since once the SVG font is in cached
2521         by WebCore, we won't reparse it again. Caches are cleared between tests, so it will
2522         correctly fail if this should regress.
2523
2524         Longer-term, we should clean this up and get rid of the global dispatch entirely.
2525
2526         Reviewed by Simon Fraser.
2527
2528         Test: fast/text/svg-font-trigger-load-event.html
2529
2530         * dom/Document.cpp:
2531         (WebCore::Document::implicitClose):
2532
2533 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
2534
2535         Some EventHandler naming cleanup
2536         https://bugs.webkit.org/show_bug.cgi?id=136303
2537
2538         Reviewed by Beth Dakin.
2539         
2540         Rename "mev" variables to "mouseEvent".
2541         
2542         No behavior change.
2543
2544         * page/EventHandler.cpp:
2545         (WebCore::EventHandler::handleMousePressEvent):
2546         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2547         (WebCore::EventHandler::handleMouseMoveEvent):
2548         (WebCore::EventHandler::handleMouseReleaseEvent):
2549         (WebCore::EventHandler::updateDragAndDrop):
2550         (WebCore::EventHandler::prepareMouseEvent):
2551         (WebCore::EventHandler::sendContextMenuEvent):
2552         (WebCore::EventHandler::passMousePressEventToScrollbar):
2553         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
2554
2555 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
2556
2557         Some EventHandler naming cleanup
2558         https://bugs.webkit.org/show_bug.cgi?id=136303
2559
2560         Reviewed by Beth Dakin.
2561
2562         Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent"
2563         so that a later patch can rename "mev" to "mouseEvent".
2564         
2565         0 => nullptr.
2566         
2567         No behavior change.
2568
2569         * page/EventHandler.cpp:
2570         (WebCore::EventHandler::clear):
2571         (WebCore::EventHandler::handleMousePressEvent):
2572         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2573         (WebCore::EventHandler::handleMouseMoveEvent):
2574         (WebCore::EventHandler::invalidateClick):
2575         (WebCore::EventHandler::handleMouseReleaseEvent):
2576         (WebCore::EventHandler::handlePasteGlobalSelection):
2577         (WebCore::EventHandler::updateMouseEventTargetNode):
2578         (WebCore::EventHandler::dispatchMouseEvent):
2579         (WebCore::EventHandler::sendContextMenuEventForKey):
2580         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
2581
2582 2014-08-27  Beth Dakin  <bdakin@apple.com>
2583
2584         Make isScrollableOrRubberbandable() a virtual function on RenderLayerModelObject
2585         https://bugs.webkit.org/show_bug.cgi?id=136307
2586
2587         Reviewed by Simon Fraser.
2588
2589         Remove extra parentheses. 
2590         * page/FrameView.cpp:
2591         (WebCore::FrameView::isScrollable):
2592
2593         Mark isScrollableOrRubberbandable() as override now that the root implementation 
2594         is moving to RenderLayerModelObject. It can also be private now.
2595         * rendering/RenderBox.h:
2596
2597         isBox() check and cast are no longer necessary.
2598         * rendering/RenderLayer.cpp:
2599         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
2600
2601         Base implementation should return false.
2602         * rendering/RenderLayerModelObject.h:
2603         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable):
2604
2605         Mark as override.
2606         * rendering/RenderView.h:
2607
2608 2014-08-27  Antti Koivisto  <antti@apple.com>
2609
2610         REGRESSION(r172946): Plugin tests asserting on Yosemite debug bot
2611         https://bugs.webkit.org/show_bug.cgi?id=136301
2612
2613         Reviewed by Alexey Proskuryakov.
2614
2615         Don't pull the priority from the platform request if it is not defined.
2616
2617         * platform/network/cf/ResourceRequestCFNet.cpp:
2618         (WebCore::ResourceRequest::doUpdateResourceRequest):
2619         * platform/network/cocoa/ResourceRequestCocoa.mm:
2620         (WebCore::ResourceRequest::doUpdateResourceRequest):
2621
2622 2014-08-27  Timothy Hatcher  <timothy@apple.com>
2623
2624         Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
2625         https://bugs.webkit.org/show_bug.cgi?id=136293
2626
2627         Reviewed by Joseph Pecoraro.
2628
2629         * inspector/InspectorIndexedDBAgent.cpp:
2630         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
2631         IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.
2632
2633 2014-08-27  Beth Dakin  <bdakin@apple.com>
2634
2635         overflow:scroll elements should not latch to the body if the body is 
2636         overflow:hidden
2637         https://bugs.webkit.org/show_bug.cgi?id=136273
2638
2639         Reviewed by Darin Adler.
2640
2641         This patch adds an optional parameter to isScrollable(). The Scrollability 
2642         parameter that allows the caller to define what they mean by 'scrollable.' Most 
2643         callers are interested in the default value, Scrollability::Scrollable, which 
2644         means that there is actually content to scroll to, and a scrollbar that will allow 
2645         you to access it. In some cases, such as this latching case, callers want to know 
2646         if the FrameView is allowed to rubber-band, which the main frame might be allowed 
2647         to do even if there is no content to scroll to. In that case, callers use 
2648         Scrollability::ScrollableOrRubberbandable.
2649         * page/FrameView.cpp:
2650         (WebCore::FrameView::isScrollable):
2651         (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
2652
2653         New virtual function on ScrollableArea answers whether a ScrollableArea has any 
2654         scrollable or rubber-bandable ancestor.
2655         * page/FrameView.h:
2656         * platform/ScrollableArea.h:
2657
2658         Events should only be allowed to prevent stretching if there is some ancestor 
2659         ScrollableArea that will be able to make use of the event. 
2660         * platform/mac/ScrollAnimatorMac.mm:
2661         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
2662         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
2663
2664         New ScrollableArea virtual function.
2665         * platform/win/PopupMenuWin.h:
2666
2667         New RenderBox isScrollableOrRubberbandable() returns just 
2668         canBeScrolledAndHasScrollableArea() for most RenderBox, but will be overridden by 
2669         RenderView.
2670         * rendering/RenderBox.cpp:
2671         (WebCore::RenderBox::isScrollableOrRubberbandable):
2672         * rendering/RenderBox.h:
2673
2674         Recurse up the parent chain to find out if anything is scrollable or just rubber-
2675         bandable.
2676         * rendering/RenderLayer.cpp:
2677         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
2678         * rendering/RenderLayer.h:
2679
2680         Call into RenderLayer.
2681         * rendering/RenderListBox.cpp:
2682         (WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):
2683         * rendering/RenderListBox.h:
2684
2685         Override isScrollableOrRubberbandable() to handle the main frame case where the 
2686         main frame is typically allowed to rubber-band even if there is no content to 
2687         scroll to.
2688         * rendering/RenderView.cpp:
2689         (WebCore::RenderView::isScrollableOrRubberbandable):
2690         * rendering/RenderView.h:
2691
2692 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
2693
2694         Updating attributes on HTML elements do not invalidate the style correctly unless the attribute name is lowercase in the stylesheet
2695         https://bugs.webkit.org/show_bug.cgi?id=136270
2696
2697         Reviewed by Andreas Kling.
2698
2699         In HTML, WebKit treats every attribute name lowercase to implement case-insensitive matching.
2700         When invalidating style, the StyleResolver was ignoring HTML and always using the XML names.
2701
2702         This patch split the names on RuleFeatureSet in two sets: one for XML, one for HTML.
2703         In StyleResolver, the name used depends on the type of the element being updated.
2704
2705         This patch also adds nodeNeedsStyleRecalc() to Internals to test the optimization and various cases
2706         of style update.
2707
2708         Tests: fast/css/attribute-for-content-property-style-update-html.html
2709                fast/css/attribute-for-content-property-style-update-xhtml.xhtml
2710                fast/css/attribute-style-invalidation-optimization-html.html
2711                fast/css/attribute-style-invalidation-optimization-xhtml.xhtml
2712                fast/css/attribute-style-update-html.html
2713                fast/selectors/attribute-style-update-html.html
2714                fast/selectors/attribute-style-update-svg-in-html.html
2715                fast/selectors/attribute-style-update-xhtml.xhtml
2716
2717         * css/RuleFeature.cpp:
2718         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
2719         (WebCore::RuleFeatureSet::add):
2720         (WebCore::RuleFeatureSet::clear):
2721         * css/RuleFeature.h:
2722         * css/StyleResolver.cpp:
2723         (WebCore::StyleResolver::applyProperty):
2724         * css/StyleResolver.h:
2725         (WebCore::StyleResolver::hasSelectorForAttribute):
2726         * dom/Element.cpp:
2727         (WebCore::Element::willModifyAttribute):
2728         * testing/Internals.cpp:
2729         (WebCore::Internals::address):
2730         (WebCore::Internals::nodeNeedsStyleRecalc):
2731         * testing/Internals.h:
2732         * testing/Internals.idl:
2733
2734 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
2735
2736         Update the CSS Grammar selector names to get closer to the latest terminology
2737         https://bugs.webkit.org/show_bug.cgi?id=136277
2738
2739         Reviewed by Andreas Kling.
2740
2741         CSS Selector Level 4 gives useful definitions for various parts of a selector
2742         (see http://dev.w3.org/csswg/selectors4/#structure). This patch updates our names to be closer
2743         to that spec.
2744
2745         Stricto sensu, our definition of "simple selector list" is wrong. I did not attempt to fix this
2746         because updates of CSS Selector Level 4 and WebVTT will eventually make that whole concept useless.
2747
2748         * css/CSSGrammar.y.in:
2749
2750 2014-08-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2751
2752         [EFL] Unskip compositing test
2753         https://bugs.webkit.org/show_bug.cgi?id=136151
2754
2755         Reviewed by Csaba Osztrogonác.
2756
2757         * rendering/RenderLayerBacking.cpp: Set true to setContentsOpaque() to support compositing test.
2758         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2759
2760 2014-08-26  Vivek Galatage  <vivek.vg@samsung.com>
2761
2762         Canvas direction should reflect change in dir attribute and also across save/restore operations
2763         https://bugs.webkit.org/show_bug.cgi?id=136098
2764
2765         Reviewed by Darin Adler.
2766
2767         Changed State.m_direction type from TextDirection to Direction enum to accomodate 'inherit'
2768         as a separate value. Modified the getter to compute the 'live' value for the direction attribute.
2769         Removed explicit passing of direction to CanvasRenderingContext2D::State constructor.
2770
2771         Updated existing canvas-direction.html with additional cases to reflect this change.
2772
2773         * html/canvas/CanvasRenderingContext2D.cpp:
2774         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2775         (WebCore::CanvasRenderingContext2D::reset):
2776         (WebCore::CanvasRenderingContext2D::State::State):
2777         (WebCore::CanvasRenderingContext2D::toTextDirection):
2778         (WebCore::CanvasRenderingContext2D::direction):
2779         (WebCore::CanvasRenderingContext2D::setDirection):
2780         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2781         (WebCore::inheritedDirection): Deleted.
2782         * html/canvas/CanvasRenderingContext2D.h:
2783
2784 2014-08-26  Benjamin Poulain  <bpoulain@apple.com>
2785
2786         Minor style tweak on StyleResolveTree
2787         https://bugs.webkit.org/show_bug.cgi?id=136233
2788
2789         Reviewed by Sam Weinig.
2790
2791         * style/StyleResolveTree.cpp:
2792         (WebCore::Style::resolveTree):
2793         Clang likely optimized it away, but I find that explicit style cleaner.
2794
2795 2014-08-26  Brian J. Burg  <burg@cs.washington.edu>
2796
2797         Web Inspector: put feature flags for Inspector domains in the protocol specification
2798         https://bugs.webkit.org/show_bug.cgi?id=136027
2799
2800         Reviewed by Timothy Hatcher.
2801
2802         Add 'featureGuard' settings to wrap domains with ENABLE macros.
2803
2804         No new tests. No behavior was changed.
2805
2806         * inspector/protocol/Database.json:
2807         * inspector/protocol/IndexedDB.json:
2808         * inspector/protocol/Replay.json:
2809
2810 2014-08-26  Andy Estes  <aestes@apple.com>
2811
2812         [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
2813         https://bugs.webkit.org/show_bug.cgi?id=136267
2814
2815         Reviewed by Dan Bernstein.
2816
2817         INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
2818         Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
2819         engineering configurations.
2820
2821         Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
2822         used instead.
2823
2824         * WebCore.xcodeproj/project.pbxproj:
2825
2826 2014-08-26  Brent Fulgham  <bfulgham@apple.com>
2827
2828         [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
2829         https://bugs.webkit.org/show_bug.cgi?id=136258
2830         <rdar://problem/18134138>
2831
2832         Reviewed by Tim Horton.
2833
2834         Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
2835         values from passing through the 32-bit OLE_HANDLE data type.
2836
2837         * platform/win/WindowMessageBroadcaster.cpp:
2838         (WebCore::WindowMessageBroadcaster::addListener):
2839         (WebCore::WindowMessageBroadcaster::removeListener):
2840         (WebCore::WindowMessageBroadcaster::destroy):
2841         (WebCore::WindowMessageBroadcaster::unsubclassWindow):
2842         (WebCore::WindowMessageBroadcaster::SubclassedWndProc):
2843
2844 2014-08-25  Maciej Stachowiak  <mjs@apple.com>
2845
2846         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
2847         https://bugs.webkit.org/show_bug.cgi?id=136082
2848
2849         Reviewed by Alexey Proskuryakov.
2850
2851         * platform/mac/Language.mm:
2852         (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
2853         with new WebCoreNSStringExtras helper.
2854         * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
2855         WKCopyCFLocalizationPreferredName.
2856         (preferredBundleLocalizationName): New helper - most preferred localization available
2857         in the main bundle, canonicalized the way we like it.
2858         (canonicalLocalizationName): Convert a lcalization name to a string with language and
2859         country code, using default if necessary (e.g. "en" maps to "en_US").
2860         * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
2861         * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
2862         * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
2863         * platform/mac/WebCoreSystemInterface.h: ditto
2864         * platform/mac/WebCoreSystemInterface.mm: ditto
2865         * platform/spi/cf: Added.
2866         * platform/spi/cf/CFLocaleSPI.h: Added. Declare
2867         CFLocaleGetLanguageRegionEncodingForLocaleIdentifier.
2868
2869 2014-08-26  Zoltan Horvath  <zoltan@webkit.org>
2870
2871         [CSS Shapes] Positioned polygon reftests failing
2872         https://bugs.webkit.org/show_bug.cgi?id=135925
2873
2874         Reviewed by David Hyatt.
2875
2876         We didn't respect the shape-margin before a positioned polygon, since we checked
2877         the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior,
2878         removes the tests from the skipped list and updates 1 test, which was incorrect.
2879
2880         Updated existing test and removed tests from skipped list.
2881
2882         * rendering/shapes/PolygonShape.cpp:
2883         (WebCore::clippedCircleXRange):
2884         (WebCore::PolygonShape::getExcludedInterval):
2885
2886 2014-08-26  Zalan Bujtas  <zalan@apple.com>
2887
2888         Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers.
2889         https://bugs.webkit.org/show_bug.cgi?id=136253
2890
2891         Reviewed by Simon Fraser.
2892
2893         These functions wrap LayoutUnit::fromFloatCeil/fromFloatRound() functions to ceil/round float to LayoutUnit.
2894         Their usage is limited and can easily be confused with the snapping functions (snap to css/device pixels).
2895
2896         No change in functionality.
2897
2898         * platform/LayoutUnit.h:
2899         (WebCore::roundedLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatRound() function.
2900         (WebCore::ceiledLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatCeil() function.
2901         * rendering/RenderBlock.cpp:
2902         (WebCore::updatePreferredWidth):
2903         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2904         (WebCore::adjustFloatForSubPixelLayout): Deleted.
2905         * rendering/RenderBox.cpp:
2906         (WebCore::RenderBox::positionLineBox):
2907         * rendering/RenderFlexibleBox.cpp:
2908         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2909         * rendering/RenderInline.cpp:
2910         (WebCore::RenderInline::offsetForInFlowPositionedInline):
2911         * rendering/RenderTextControlSingleLine.cpp:
2912         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2913
2914 2014-08-26  Simon Fraser  <simon.fraser@apple.com>
2915
2916         Ensure that layout is up-to-date before hit testing
2917         https://bugs.webkit.org/show_bug.cgi?id=136242
2918         rdar://problem/17435564
2919
2920         Reviewed by Tim Horton.
2921         
2922         Various code paths can call into RenderView::hitTest() but fail to
2923         ensure that layout is up-to-date. This is a conservative change that
2924         fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
2925         including WebPage::acceptsFirstMouse() and WebFrame::hitTest().
2926         
2927         This change is not general enough that we can ASSERT(!needsLayout())
2928         in RenderView::hitTest() yet.
2929         
2930         * page/EventHandler.cpp:
2931         (WebCore::EventHandler::hitTestResultAtPoint):
2932
2933 2014-08-26  Beth Dakin  <bdakin@apple.com>
2934
2935         Rubber-banding in overflow:scroll regions does not work correctly with 
2936         direction:rtl
2937         https://bugs.webkit.org/show_bug.cgi?id=136176
2938
2939         Reviewed by Tim Horton.
2940
2941         Small cleanup.
2942         * rendering/RenderLayer.cpp:
2943         (WebCore::RenderLayer::visibleContentRectInternal):
2944
2945 2014-08-26  Tim Horton  <timothy_horton@apple.com>
2946
2947         Fix the build after r172963
2948
2949         * page/DOMTimer.h:
2950
2951 2014-08-25  Gavin Barraclough  <barraclough@apple.com>
2952
2953         DOMTimer may be deleted during timer fire
2954         https://bugs.webkit.org/show_bug.cgi?id=136198
2955
2956         Reviewed by Geoff Garen.
2957
2958         Consequentially ScheduledActions may also be deleted mid execution.
2959         This is fairly surprising & fragile, let's make this simpler.
2960
2961         Currently DOMTimer instances are effectively owned by the ScriptExecutionContext.
2962         There is a 1-1 mapping between timers and contexts, all timers are help in a map
2963         on the context and if the context goes away all timers are deleted. Rather than
2964         being implemented in a straightforward fashion (a smart pointer type for the map
2965         value) this is currently implemented by having the timer objects listen for the
2966         context going away using contextDestroyed, and deleting themselves if so.
2967
2968         Switch to using a smart pointer for values of m_timeouts in ScriptExecutionContext.
2969         By using a RefCounted object we can also extend the lifetime of the DOMTimer instance
2970         from within the DOMTimer::fired method, so the object is not destroyed while the
2971         member function is still on the stack.
2972
2973         * WebCore.xcodeproj/project.pbxproj:
2974             - project -> private since DOMTimer could no longer be a forward declare in ScriptExecutionContext.h.
2975         * dom/ScriptExecutionContext.cpp:
2976         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
2977         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
2978             - auto* -> auto& since value type in map is no longer a raw pointer.
2979         * dom/ScriptExecutionContext.h:
2980         (WebCore::ScriptExecutionContext::addTimeout):
2981             - DOMTimer* -> PassRefPtr<DOMTimer>
2982         * page/DOMTimer.cpp:
2983         (WebCore::DOMTimer::DOMTimer):
2984             - adopt the initial ref, and pass to addTimeout.
2985         (WebCore::DOMTimer::install):
2986             - updated comment.
2987         (WebCore::DOMTimer::removeById):
2988             - instead of explicitly deleting the timer and assuming this will implicitly remove it from the context map,
2989               we explicitly remove it from the context map and assume this will implicitly deleting the timer!
2990         (WebCore::DOMTimer::fired):
2991             - Add a RefPtr to keep the DOMTimer object alive until the fired method completes; to cancel a one-shot timer
2992               just remove it from the context's map, rather than explicitly deleting it.
2993         (WebCore::DOMTimer::~DOMTimer): Deleted.
2994         (WebCore::DOMTimer::contextDestroyed): Deleted.
2995             - no need! object lifetime management now handled by smart pointers.
2996         * page/DOMTimer.h:
2997             - added parent class RefCounted<DOMTimer>.
2998
2999 2014-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3000
3001         [GTK] Selection background is rendered white when unfocused with recent GTK+
3002         https://bugs.webkit.org/show_bug.cgi?id=136251
3003
3004         Reviewed by Martin Robinson.
3005
3006         This is due to a change in the GTK+ theme, but because we are not
3007         using the right flags to get the selections colors. We should use
3008         GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED when focused and
3009         GTK_STATE_FLAG_SELECTED when unfocused, instead of
3010         GTK_STATE_FLAG_ACTIVE when unfocused.
3011
3012         * platform/gtk/RenderThemeGtk3.cpp:
3013         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
3014         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
3015         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
3016         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
3017         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
3018         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
3019         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
3020         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
3021
3022 2014-08-26  Krzysztof Czech  <k.czech@samsung.com>
3023
3024         [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
3025         https://bugs.webkit.org/show_bug.cgi?id=136127
3026
3027         Reviewed by Gyuyoung Kim.
3028
3029         Utilize espeak API to have support for speak, cancel and initializeVoiceList.
3030
3031         * PlatformEfl.cmake:
3032         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
3033         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
3034         (WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue):
3035         (WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue):
3036         (WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue):
3037         (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
3038         (WebCore::PlatformSpeechSynthesisProviderEfl::engineInit):
3039         (WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice):
3040         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
3041         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
3042         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
3043         (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
3044         * platform/efl/PlatformSpeechSynthesisProviderEfl.h:
3045         * platform/efl/PlatformSpeechSynthesizerEfl.cpp:
3046         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3047         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3048         (WebCore::PlatformSpeechSynthesizer::pause):
3049         (WebCore::PlatformSpeechSynthesizer::resume):
3050         (WebCore::PlatformSpeechSynthesizer::speak):
3051         (WebCore::PlatformSpeechSynthesizer::cancel):
3052
3053 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
3054
3055         [EFL] Build break using clang
3056         https://bugs.webkit.org/show_bug.cgi?id=136245
3057
3058         Reviewed by Gyuyoung Kim.
3059
3060         * css/ViewportStyleResolver.cpp: Includes NodeRenderStyle.h
3061
3062 2014-08-26  Mark Rowe  <mrowe@apple.com>
3063
3064         Build fix after r172951.
3065
3066         * fileapi/Blob.h: Give the argument the name that the predicates expect.
3067
3068 2014-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3069
3070         Generate toFile() instead of manual functions.
3071         https://bugs.webkit.org/show_bug.cgi?id=136207
3072
3073         Reviewed by Darin Adler.
3074
3075         No new tests, no behavior changes.
3076
3077         * fileapi/Blob.h: Define BLOB_TYPE_CASTS.
3078         * fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile().
3079         (WebCore::toFile): Deleted.
3080
3081 2014-08-25  Zalan Bujtas  <zalan@apple.com>
3082
3083         Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
3084         https://bugs.webkit.org/show_bug.cgi?id=136236
3085
3086         Reviewed by Simon Fraser.
3087
3088         These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
3089
3090         Non change in functionality.
3091
3092         * dom/MouseRelatedEvent.cpp:
3093         (WebCore::MouseRelatedEvent::computePageLocation):
3094         (WebCore::MouseRelatedEvent::computeRelativePosition):
3095         * dom/Touch.cpp:
3096         (WebCore::Touch::Touch):
3097         * html/shadow/SliderThumbElement.cpp:
3098         (WebCore::SliderThumbElement::setPositionFromPoint):
3099         * page/DragController.cpp:
3100         (WebCore::elementUnderMouse):
3101         * page/EventHandler.cpp:
3102         (WebCore::selectionExtentRespectingEditingBoundary):
3103         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3104         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
3105         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3106         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
3107         * platform/graphics/LayoutPoint.h:
3108         (WebCore::roundedLayoutPoint): Deleted.
3109         * platform/graphics/LayoutSize.h:
3110         (WebCore::roundedLayoutSize): Deleted.
3111         * rendering/EllipsisBox.cpp:
3112         (WebCore::EllipsisBox::nodeAtPoint):
3113         * rendering/RenderBlock.cpp:
3114         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3115         * rendering/RenderBox.cpp:
3116         (WebCore::RenderBox::mapLocalToContainer):
3117         (WebCore::RenderBox::positionLineBox):
3118         * rendering/RenderEmbeddedObject.cpp:
3119         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
3120         * rendering/RenderEmbeddedObject.h:
3121         * rendering/RenderInline.cpp:
3122         (WebCore::RenderInline::localCaretRect):
3123         (WebCore::RenderInline::mapLocalToContainer):
3124         * rendering/RenderLayer.cpp:
3125         (WebCore::RenderLayer::absoluteToContents):
3126         (WebCore::RenderLayer::calculateClipRects):
3127         * rendering/RenderMultiColumnFlowThread.cpp:
3128         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
3129         * rendering/RenderObject.cpp:
3130         (WebCore::RenderObject::mapLocalToContainer):
3131         * rendering/shapes/ShapeOutsideInfo.cpp:
3132         (WebCore::ShapeOutsideInfo::createShapeForImage):
3133         * rendering/svg/RenderSVGContainer.cpp:
3134         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3135         * rendering/svg/RenderSVGForeignObject.cpp:
3136         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
3137         * rendering/svg/RenderSVGImage.cpp:
3138         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3139         * rendering/svg/RenderSVGShape.cpp:
3140         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3141         * testing/Internals.cpp:
3142         (WebCore::Internals::nodesFromRect):
3143
3144 2014-08-25  Zalan Bujtas  <zalan@apple.com>
3145
3146         Rename RenderObject::showTree() and showTreeForThis() to showNodeTree*().
3147         https://bugs.webkit.org/show_bug.cgi?id=136238
3148
3149         Reviewed by Simon Fraser.
3150
3151         showNodeTree()/showNodeTreeForThis() reflects the functionality better.
3152
3153         No change in functionality.
3154
3155         * rendering/InlineBox.cpp:
3156         (WebCore::InlineBox::showNodeTreeForThis):
3157         (showNodeTree):
3158         (WebCore::InlineBox::showTreeForThis): Deleted.
3159         (showTree): Deleted.
3160         * rendering/InlineBox.h:
3161         * rendering/RenderObject.cpp:
3162         (WebCore::RenderObject::showNodeTreeForThis):
3163         (showNodeTree):
3164         (WebCore::RenderObject::showTreeForThis): Deleted.
3165         (showTree): Deleted.
3166         * rendering/RenderObject.h:
3167
3168 2014-08-25  Antti Koivisto  <antti@apple.com>
3169
3170         Don't pass priority as parameter to ResourceLoadScheduler
3171         https://bugs.webkit.org/show_bug.cgi?id=136232
3172
3173         Reviewed by Sam Weinig.
3174
3175         It is part of the ResourceRequest which is also passed in.
3176
3177         * WebCore.exp.in:
3178         * loader/ResourceLoadScheduler.cpp:
3179         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
3180         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
3181         (WebCore::ResourceLoadScheduler::scheduleLoad):
3182         * loader/ResourceLoadScheduler.h:
3183         * loader/cache/CachedResource.cpp:
3184         (WebCore::CachedResource::load):
3185         * platform/network/cf/ResourceRequestCFNet.cpp:
3186         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
3187         * platform/network/cocoa/ResourceRequestCocoa.mm:
3188         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
3189
3190             Restore the original request priority when a delegate modifies the request.
3191
3192 2014-08-25  Beth Dakin  <bdakin@apple.com>
3193
3194         Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl
3195         https://bugs.webkit.org/show_bug.cgi?id=136176
3196
3197         Reviewed by Sam Weinig.
3198
3199         Use scrollPosition() instead of scrollXOffset() and scrollYOffset() which both add 
3200         in the scrollOrigin(). Other implementations of visibleContentRectInternal() do 
3201         not add in the scrollOrigin(), so RenderLayer's shouldn't either in order to be
3202         consistent. This makes rubber-banding work for RTL because 
3203         ScrollAnimatorMac::pinnedInDirection() and 
3204         ScrollAnimatorMac::absoluteScrollPosition() both return the expect values now.
3205
3206         * rendering/RenderLayer.cpp:
3207         (WebCore::RenderLayer::visibleContentRectInternal):
3208
3209 2014-08-25  Benjamin Poulain  <benjamin@webkit.org>
3210
3211         Reduce style marking when using the pseudo class :placeholder-shown
3212         https://bugs.webkit.org/show_bug.cgi?id=136203
3213
3214         Reviewed by Darin Adler.
3215
3216         When the :placeholder-shown filter is hit, we were always marking the RenderStyle as unique.
3217         As a result, if :placeholder-shown was used without a more restrictive filter (e.g. "*:placeholder-shown"
3218         or simply ":placeholder-shown"), style sharing was disabled for the whole tree.
3219
3220         This patch rescope the tree marking to any element that can be affected by a placeholder:
3221         any the subclass of HTMLTextFormControlElement. For other elements, any change in internal state
3222         would be irrelevant for "isPlaceholderVisible".
3223
3224         Styling of :placeholder-shown is covered by the existing tests. Style sharing of :placeholder-shown
3225         is covered by LayoutTests/fast/css/placeholder-shown-basics.html.
3226
3227         * css/SelectorChecker.cpp:
3228         (WebCore::SelectorChecker::checkOne):
3229         * css/SelectorCheckerTestFunctions.h:
3230         (WebCore::isPlaceholderShown): Deleted.
3231         * cssjit/SelectorCompiler.cpp:
3232         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3233         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3234         (WebCore::SelectorCompiler::isPlaceholderShown):
3235         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
3236         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
3237
3238 2014-08-25  Antti Koivisto  <antti@apple.com>
3239
3240         Remove ResourceLoader::didChangePriority
3241         https://bugs.webkit.org/show_bug.cgi?id=136230
3242
3243         Reviewed by Andreas Kling.
3244
3245         It doesn't do anything on any platform.
3246
3247         * loader/ResourceLoader.cpp:
3248         (WebCore::ResourceLoader::didChangePriority): Deleted.
3249         * loader/ResourceLoader.h:
3250         * loader/cache/CachedResource.cpp:
3251         (WebCore::CachedResource::setLoadPriority):
3252         * platform/network/ResourceHandle.cpp:
3253         (WebCore::ResourceHandle::didChangePriority): Deleted.
3254         * platform/network/ResourceHandle.h:
3255
3256 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
3257
3258         Web Inspector: rename Inspector::TypeBuilder to Inspector::Protocol
3259         https://bugs.webkit.org/show_bug.cgi?id=136031
3260
3261         Reviewed by Timothy Hatcher.
3262
3263         Rename TypeBuilder namespace to Protocol. Disambiguate where
3264         necessary. Also rename InspectorTypeBuilder to ProtocolTypes.
3265
3266         * CMakeLists.txt:
3267         * DerivedSources.make:
3268         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Removed.
3269         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Removed.
3270         * WebCore.order:
3271         * WebCore.vcxproj/WebCore.vcxproj:
3272         * WebCore.vcxproj/WebCore.vcxproj.filters:
3273         * WebCore.xcodeproj/project.pbxproj:
3274         * inspector/CommandLineAPIHost.cpp:
3275         (WebCore::CommandLineAPIHost::inspectImpl):
3276         * inspector/InspectorApplicationCacheAgent.cpp:
3277         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3278         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
3279         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
3280         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
3281         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
3282         * inspector/InspectorApplicationCacheAgent.h:
3283         * inspector/InspectorCSSAgent.cpp:
3284         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3285         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
3286         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
3287         (WebCore::InspectorCSSAgent::getAllStyleSheets):
3288         (WebCore::InspectorCSSAgent::getStyleSheet):
3289         (WebCore::InspectorCSSAgent::setStyleText):
3290         (WebCore::InspectorCSSAgent::setPropertyText):
3291         (WebCore::InspectorCSSAgent::toggleProperty):
3292         (WebCore::InspectorCSSAgent::setRuleSelector):
3293         (WebCore::InspectorCSSAgent::addRule):
3294         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
3295         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3296         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
3297         (WebCore::InspectorCSSAgent::collectStyleSheets):
3298         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3299         (WebCore::InspectorCSSAgent::detectOrigin):
3300         (WebCore::InspectorCSSAgent::buildObjectForRule):
3301         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
3302         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3303         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3304         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3305         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
3306         * inspector/InspectorCSSAgent.h:
3307         * inspector/InspectorDOMAgent.cpp:
3308         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3309         (WebCore::InspectorDOMAgent::getDocument):
3310         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
3311         (WebCore::InspectorDOMAgent::querySelectorAll):
3312         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
3313         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3314         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
3315         (WebCore::InspectorDOMAgent::getSearchResults):
3316         (WebCore::InspectorDOMAgent::resolveNode):
3317         (WebCore::InspectorDOMAgent::getAttributes):
3318         (WebCore::InspectorDOMAgent::buildObjectForNode):
3319         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3320         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
3321         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3322         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
3323         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3324         (WebCore::InspectorDOMAgent::didCommitLoad):
3325         (WebCore::InspectorDOMAgent::didInsertDOMNode):
3326         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
3327         * inspector/InspectorDOMAgent.h:
3328         * inspector/InspectorDOMDebuggerAgent.cpp:
3329         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
3330         * inspector/InspectorDOMStorageAgent.cpp:
3331         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
3332         (WebCore::InspectorDOMStorageAgent::storageId):
3333         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
3334         * inspector/InspectorDOMStorageAgent.h:
3335         * inspector/InspectorDatabaseAgent.cpp:
3336         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
3337         * inspector/InspectorDatabaseAgent.h:
3338         * inspector/InspectorDatabaseResource.cpp:
3339         (WebCore::InspectorDatabaseResource::bind):
3340         * inspector/InspectorIndexedDBAgent.cpp:
3341         * inspector/InspectorLayerTreeAgent.cpp:
3342         (WebCore::InspectorLayerTreeAgent::layersForNode):
3343         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
3344         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
3345         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3346         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
3347         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
3348         * inspector/InspectorLayerTreeAgent.h:
3349         * inspector/InspectorPageAgent.cpp:
3350         (WebCore::InspectorPageAgent::resourceTypeJson):
3351         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
3352         (WebCore::buildObjectForCookie):
3353         (WebCore::buildArrayForCookies):
3354         (WebCore::InspectorPageAgent::getCookies):
3355         (WebCore::InspectorPageAgent::getResourceTree):
3356         (WebCore::InspectorPageAgent::searchInResource):
3357         (WebCore::buildObjectForSearchResult):
3358         (WebCore::InspectorPageAgent::searchInResources):
3359         (WebCore::InspectorPageAgent::buildObjectForFrame):
3360         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
3361         * inspector/InspectorPageAgent.h:
3362         * inspector/InspectorReplayAgent.cpp:
3363         (WebCore::buildInspectorObjectForPosition):
3364         (WebCore::buildInspectorObjectForInput):
3365         (WebCore::buildInspectorObjectForSession):
3366         (WebCore::buildInspectorObjectForSessionState):
3367         (WebCore::buildInspectorObjectForSegmentState):
3368         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
3369         (WebCore::SerializeInputToJSONFunctor::operator()):
3370         (WebCore::buildInspectorObjectForSegment):
3371         (WebCore::InspectorReplayAgent::switchSession):
3372         (WebCore::InspectorReplayAgent::insertSessionSegment):
3373         (WebCore::InspectorReplayAgent::removeSessionSegment):
3374         (WebCore::InspectorReplayAgent::currentReplayState):
3375         (WebCore::InspectorReplayAgent::getAvailableSessions):
3376         (WebCore::InspectorReplayAgent::getSessionData):
3377         (WebCore::InspectorReplayAgent::getSegmentData):
3378         * inspector/InspectorReplayAgent.h:
3379         * inspector/InspectorResourceAgent.cpp:
3380         (WebCore::buildObjectForTiming):
3381         (WebCore::buildObjectForResourceRequest):
3382         (WebCore::buildObjectForResourceResponse):
3383         (WebCore::buildObjectForCachedResource):
3384         (WebCore::InspectorResourceAgent::willSendRequest):
3385         (WebCore::InspectorResourceAgent::didReceiveResponse):
3386         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3387         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3388         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3389         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3390         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
3391         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
3392         * inspector/InspectorResourceAgent.h:
3393         * inspector/InspectorStyleSheet.cpp:
3394         (WebCore::buildSourceRangeObject):
3395         (WebCore::buildMediaObject):
3396         (WebCore::fillMediaListChain):
3397         (WebCore::InspectorStyle::buildObjectForStyle):
3398         (WebCore::InspectorStyle::buildArrayForComputedStyle):
3399         (WebCore::InspectorStyle::styleWithProperties):
3400         (WebCore::InspectorStyleSheet::create):
3401         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3402         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3403         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3404         (WebCore::selectorsFromSource):
3405         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
3406         (WebCore::InspectorStyleSheet::buildObjectForRule):
3407         (WebCore::InspectorStyleSheet::buildObjectForStyle):
3408         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
3409         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
3410         (WebCore::InspectorStyleSheetForInlineStyle::create):
3411         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3412         * inspector/InspectorStyleSheet.h:
3413         (WebCore::InspectorStyleSheet::canBind):
3414         * inspector/InspectorTimelineAgent.cpp:
3415         (WebCore::toProtocol):
3416         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
3417         (WebCore::InspectorTimelineAgent::sendEvent):
3418         * inspector/PageRuntimeAgent.cpp:
3419
3420 2014-08-25  Brendan Long  <b.long@cablelabs.com>
3421
3422         [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
3423         https://bugs.webkit.org/show_bug.cgi?id=136132
3424
3425         adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
3426         WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
3427         don't construct this ourselves, I assume this is happening in Playbin.
3428
3429         If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
3430         which removes the floating reference and doesn't increment the reference count.
3431         This should work, but actually causes the page to either lock up or crash (different
3432         results for different testers).
3433
3434         In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
3435         but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
3436         usually we don't want to adopt floating pointers.
3437
3438         This is all a long way of saying that making m_src a raw pointer and manually
3439         calling gst_object_ref(), and calling gst_object_unref in the destructor is the
3440         best solution in this case, since it fixes the problem while leaving the ASSERT
3441         to protect us in the much more common case where adopting a floating reference is bad.
3442
3443         Reviewed by Philippe Normand.
3444
3445         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3446         (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
3447         (StreamingClient::~StreamingClient): Unref m_src.
3448         (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
3449         (StreamingClient::handleResponseReceived): Same.
3450         (StreamingClient::handleDataReceived): Same.
3451         (StreamingClient::handleNotifyFinished): Same.
3452         (CachedResourceStreamingClient::notifyFinished): Same.
3453         (ResourceHandleStreamingClient::didFail): Same.
3454         (ResourceHandleStreamingClient::wasBlocked): Same.
3455         (ResourceHandleStreamingClient::cannotShowURL): Same.
3456
3457 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
3458
3459         [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk
3460         https://bugs.webkit.org/show_bug.cgi?id=136211
3461
3462         Reviewed by Carlos Garcia Campos.
3463
3464         Remove the two classes from the codebase. They're not used anymore
3465         after the WebKit1 layer of the GTK port was removed some time ago.
3466
3467         * PlatformGTK.cmake:
3468         * platform/gtk/PopupMenuGtk.cpp: Removed.
3469         * platform/gtk/PopupMenuGtk.h: Removed.
3470         * platform/gtk/SearchPopupMenuGtk.cpp: Removed.
3471         * platform/gtk/SearchPopupMenuGtk.h: Removed.
3472
3473 2014-08-25  Shivakumar JM  <shiva.jm@samsung.com>
3474
3475         Web Core: Fix unused parameter build warning.
3476         https://bugs.webkit.org/show_bug.cgi?id=136208
3477
3478         Reviewed by Darin Adler.
3479
3480         Fix unused build warning by removing parameter, which is not used.
3481
3482         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3483         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
3484
3485 2014-08-22  Sergio Villar Senin  <svillar@igalia.com>
3486
3487         ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList
3488         https://bugs.webkit.org/show_bug.cgi?id=136149
3489
3490         Reviewed by Darin Adler.
3491
3492         The second argument of the repeat() function is a <track-list>
3493         that must have at least one <track-size>. Should it not be found,
3494         the declaration must be invalidated.
3495
3496         * css/CSSParser.cpp:
3497         (WebCore::CSSParser::parseGridTrackRepeatFunction):
3498
3499 2014-08-24  Zan Dobersek  <zdobersek@igalia.com>
3500
3501         Move WebCore storage code to C++11 lambdas, std::function
3502         https://bugs.webkit.org/show_bug.cgi?id=126435
3503
3504         Reviewed by Darin Adler.
3505
3506         Use C++11 lambdas instead of WTF::bind and std::function<void ()>
3507         instead of WTF::Function<void ()> in StorageAreaSync, StorageSyncManager,
3508         StorageThread and StorageTracker classes.
3509
3510         * storage/StorageAreaSync.cpp:
3511         (WebCore::StorageAreaSync::StorageAreaSync):
3512         (WebCore::StorageAreaSync::scheduleFinalSync):
3513         (WebCore::StorageAreaSync::syncTimerFired):
3514         * storage/StorageSyncManager.cpp:
3515         (WebCore::StorageSyncManager::dispatch):
3516         * storage/StorageSyncManager.h:
3517         * storage/StorageThread.cpp:
3518         (WebCore::StorageThread::dispatch):
3519         (WebCore::StorageThread::terminate):
3520         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
3521         * storage/StorageThread.h:
3522         * storage/StorageTracker.cpp:
3523         (WebCore::StorageTracker::importOriginIdentifiers):
3524         (WebCore::StorageTracker::syncImportOriginIdentifiers):
3525         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
3526         (WebCore::StorageTracker::setOriginDetails):
3527         (WebCore::StorageTracker::deleteAllOrigins):
3528         (WebCore::StorageTracker::deleteOrigin):
3529
3530 2014-08-24  Alexey Proskuryakov  <ap@apple.com>
3531
3532         ASSERT(extractable()) when storing a non-extractable key in IndexedDB
3533         https://bugs.webkit.org/show_bug.cgi?id=136202
3534         rdar://problem/17993967
3535
3536         Reviewed by Darin Adler.
3537
3538         Test: crypto/subtle/rsa-indexeddb-non-exportable.html
3539
3540         Removed the obsolete assertion.
3541
3542         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData):
3543         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData):
3544         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData):
3545
3546 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
3547
3548         Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator
3549         https://bugs.webkit.org/show_bug.cgi?id=136025
3550
3551         Reviewed by Joseph Pecoraro.
3552
3553         Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE.
3554         This workaround used to be special-cased in the bindings generator.
3555
3556         Type names are not used in protocol messages, so this does not introduce legacy issues.
3557
3558         * inspector/protocol/DOM.json:
3559
3560 2014-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3561
3562         [GTK] Toggle buttons visually broken with GTK+ 3.13.7
3563         https://bugs.webkit.org/show_bug.cgi?id=136130
3564
3565         Reviewed by Martin Robinson.
3566
3567         No new tests. Hopefully covered by existing tests, and our tests only
3568         run with GTK+ 3.6 anyway.
3569
3570         * platform/gtk/RenderThemeGtk3.cpp:
3571         (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
3572         GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.
3573
3574 2014-08-23  Brady Eidson  <beidson@apple.com>
3575
3576         Random Gamepad cleanup
3577         https://bugs.webkit.org/show_bug.cgi?id=136193
3578
3579         Reviewed by Sam Weinig.
3580
3581         No new tests (Not tested yet, and no change in behavior anyways)
3582
3583         - Use DOMWindow WeakPtrs when iterating
3584         - More references instead of pointers
3585
3586         * Modules/gamepad/GamepadEvent.cpp:
3587         (WebCore::GamepadEvent::GamepadEvent):
3588         * Modules/gamepad/GamepadEvent.h:
3589         (WebCore::GamepadEvent::create):
3590
3591         * Modules/gamepad/GamepadManager.cpp:
3592         (WebCore::GamepadManager::platformGamepadDisconnected):
3593         (WebCore::GamepadManager::makeGamepadVisible):
3594         * Modules/gamepad/NavigatorGamepad.cpp:
3595         (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
3596         (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted.
3597         * Modules/gamepad/NavigatorGamepad.h:
3598
3599         * page/DOMWindow.cpp:
3600         (WebCore::DOMWindow::DOMWindow):
3601         * page/DOMWindow.h:
3602
3603 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
3604
3605         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
3606         https://bugs.webkit.org/show_bug.cgi?id=109658
3607
3608         Reviewed by Martin Robinson.
3609  
3610         Based on patch originally written by Tim Horton.
3611         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
3612  
3613         * WebCore.exp.in:
3614         Adjust exports.
3615  
3616         * platform/graphics/GraphicsLayer.h:
3617         Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
3618         and into GraphicsLayer, so we can use it as a parameter.
3619         Add ContentsLayerForPlugin.
3620  
3621         (WebCore::GraphicsLayer::setContentsToPlatformLayer):
3622         Remove setContentsToMedia and setContentsToCanvas, and replace them
3623         with setContentsToPlatformLayer, which previously existed but was unused
3624         and simply called setContentsToMedia.
3625         setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
3626         so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
3627         the layer when parenting it (canvas) or not (everything else).
3628  
3629         * platform/graphics/ca/GraphicsLayerCA.cpp:
3630         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
3631         Rename function setContentsToMedia -> setContentsToPlatformLayer.
3632         Rename argument mediaLayer -> platformLayer.
3633         Store the passed-in ContentsLayerPurpose.
3634         Remove setContentsToCanvas.
3635  
3636         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3637         (WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
3638         Remove updateContentsMediaLayer and updateContentsCanvas layer,
3639         add updateContentsPlatformLayer.
3640  
3641         * platform/graphics/ca/GraphicsLayerCA.h:
3642         Do the same to the LayerChange enum.
3643  
3644         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3645         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
3646         (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
3647         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3648         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3649         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
3650         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
3651         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
3652         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
3653         (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
3654         (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
3655         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
3656         Fold these together in the same way as elsewhere.
3657  
3658         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3659         Do the same to the LayerChange enum.
3660  
3661         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3662         (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
3663         (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
3664         (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
3665         (WebCore::CoordinatedGraphicsScene::setLayerState):
3666         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3667         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
3668         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
3669         Rename canvasLayer -> platformLayer.
3670  
3671         * rendering/RenderLayerBacking.cpp:
3672         (WebCore::RenderLayerBacking::updateConfiguration):
3673         Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.
3674
3675 2014-08-23  Joseph Pecoraro  <pecoraro@apple.com>
3676
3677         Web Inspector: Do not copy large module source strings
3678         https://bugs.webkit.org/show_bug.cgi?id=136191
3679
3680         Reviewed by Benjamin Poulain.
3681
3682         * inspector/CommandLineAPIModule.cpp:
3683         (WebCore::CommandLineAPIModule::source):
3684
3685 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
3686
3687         Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel
3688         https://bugs.webkit.org/show_bug.cgi?id=133954
3689
3690         Reviewed by Darin Adler.
3691
3692         Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper
3693         and WorkerThreadableWebSocketChannel classes.
3694
3695         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3696         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3697         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3698         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3699         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3700         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3701         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3702         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3703         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3704         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted.
3705         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted.
3706         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted.
3707         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted.
3708         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted.
3709         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted.
3710         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted.
3711         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted.
3712         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3713         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3714         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
3715         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
3716         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
3717         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
3718         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3719         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
3720         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3721         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3722         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
3723         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3724         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
3725         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3726         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
3727         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
3728         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
3729         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
3730         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
3731         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
3732         (WebCore::workerGlobalScopeDidSend): Deleted.
3733         (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted.
3734         (WebCore::workerGlobalScopeDidConnect): Deleted.
3735         (WebCore::workerGlobalScopeDidReceiveMessage): Deleted.
3736         (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted.
3737         (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted.
3738         (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted.
3739         (WebCore::workerGlobalScopeDidClose): Deleted.
3740         (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted.
3741         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted.
3742         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted.
3743         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted.
3744         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted.
3745         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted.
3746         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted.
3747         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted.
3748         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted.
3749         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted.
3750         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted.
3751         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3752
3753 2014-08-23  Yusuke Suzuki  <utatane.tea@gmail.com>
3754
3755         Clean up build warnings: control reaches end of non-void function
3756         https://bugs.webkit.org/show_bug.cgi?id=135889
3757
3758         Reviewed by Alexey Proskuryakov.
3759
3760         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3761         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
3762         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
3763         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
3764         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
3765         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
3766         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
3767         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
3768         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
3769         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
3770         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
3771         * crypto/CryptoKey.cpp:
3772         (WebCore::CryptoKey::type):
3773
3774 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
3775
3776         [TexMap] Only notify of a required flush on the first layer property change
3777         https://bugs.webkit.org/show_bug.cgi?id=136104
3778
3779         Reviewed by Martin Robinson.
3780
3781         The GraphicsLayer's client should only be notified that a flush is required
3782         when the first change of one of the layer's properties is initiated, instead
3783         of requesting the flush on every such change.
3784
3785         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3786         (WebCore::GraphicsLayerTextureMapper::notifyChange):
3787
3788 2014-08-22  Dan Bernstein  <mitz@apple.com>
3789
3790         Try to fix the Mac build using the internal SDK.
3791
3792         * bindings/objc/PublicDOMInterfaces.h:
3793
3794 2014-08-22  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
3795
3796         Remove LevelDB.
3797         https://bugs.webkit.org/show_bug.cgi?id=136170
3798
3799         Reviewed by Gyuyoung Kim.
3800
3801         * CMakeLists.txt:
3802         * Modules/indexeddb/IDBObjectStore.cpp:
3803         (WebCore::IDBObjectStore::createIndex):
3804         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
3805         (WebCore::IDBTransactionCoordinator::canRunTransaction):
3806         (WebCore::doScopesOverlap): Deleted.
3807         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed.
3808         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed.
3809         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed.
3810         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed.
3811         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed.
3812         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed.
3813         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed.
3814         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed.
3815         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed.
3816         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed.
3817         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed.
3818         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed.
3819         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed.
3820         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed.
3821         * WebCore.vcxproj/WebCore.vcxproj:
3822         * WebCore.vcxproj/WebCore.vcxproj.filters:
3823         * WebCore.xcodeproj/project.pbxproj:
3824         * platform/DatabaseStrategy.cpp:
3825         (WebCore::DatabaseStrategy::createIDBFactoryBackend):
3826         * platform/leveldb/LevelDBComparator.h: Removed.
3827         * platform/leveldb/LevelDBDatabase.cpp: Removed.
3828         * platform/leveldb/LevelDBDatabase.h: Removed.
3829         * platform/leveldb/LevelDBIterator.h: Removed.
3830         * platform/leveldb/LevelDBSlice.h: Removed.
3831         * platform/leveldb/LevelDBTransaction.cpp: Removed.
3832         * platform/leveldb/LevelDBTransaction.h: Removed.
3833         * platform/leveldb/LevelDBWriteBatch.cpp: Removed.
3834         * platform/leveldb/LevelDBWriteBatch.h: Removed.
3835
3836 2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>
3837
3838         [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED.
3839         https://bugs.webkit.org/show_bug.cgi?id=136110
3840
3841         Reviewed by Gyuyoung Kim.
3842
3843         WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on.
3844
3845         No new tests because no functional changes.
3846
3847         * PlatformEfl.cmake:
3848
3849 2014-08-22  Benjamin Poulain  <benjamin@webkit.org>
3850
3851         Style invalidation does not work for adjacent node updates
3852         https://bugs.webkit.org/show_bug.cgi?id=136145
3853
3854         Reviewed by Antti Koivisto.
3855
3856         There were a bunch of cases in which the style would be in an inconsistent
3857         state until the style resolver kicks in for the entire document.
3858
3859         For example, let's take the selector "foo.bar + target". When the class "bar"
3860         changes, the element foo is invalidated. The element target is untouched.
3861
3862         Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc()
3863         returns false and the old style is accessed.
3864
3865         At some point, when the style of the entire document is resolved, the node
3866         "foo" is styled, and "target" is invalidated.
3867
3868
3869         To fix the issue, this patch adds an extra flag keeping track of subtrees that
3870         have any node needing style recalc: DirectChildNeedsStyleRecalcFlag.
3871
3872         When invalidating the node "foo", its parent is marked with
3873         DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style.
3874
3875         When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag
3876         in addition to the siblings dependencies to find if the node is part of a subtree that may
3877         be invalid due to sibling selectors.
3878
3879         Similarly, in the style resolver, we use the flag to clear the style on all elements
3880         that could potentially be invalid.
3881
3882
3883         This patch removes the changes introduced by r172721
3884         (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element).
3885         That bug was just a special case of what is solved here.
3886
3887
3888         Tests: fast/selectors/attribute-direct-adjacent-style-update.html
3889                fast/selectors/attribute-sibling-style-update.html
3890                fast/selectors/class-direct-adjacent-style-update.html
3891                fast/selectors/class-sibling-style-update.html
3892                fast/selectors/first-child-direct-adjacent-style-update.html
3893                fast/selectors/first-child-sibling-style-update.html
3894
3895         * css/SelectorChecker.cpp:
3896         (WebCore::SelectorChecker::checkOne):
3897         * cssjit/SelectorCompiler.cpp:
3898         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
3899         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted.
3900         * dom/ContainerNode.h:
3901         (WebCore::ContainerNode::directChildNeedsStyleRecalc):
3902         (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
3903         Remove the special case for :empty.
3904
3905         * dom/Document.cpp:
3906         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
3907         * dom/Element.cpp:
3908         (WebCore::checkForEmptyStyleChange):
3909         (WebCore::checkForSiblingStyleChanges):
3910         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted.
3911         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted.
3912         * dom/Element.h:
3913         (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted.
3914         * dom/ElementRareData.h:
3915         (WebCore::ElementRareData::ElementRareData):
3916         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted.
3917         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted.
3918         * dom/Node.cpp:
3919         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
3920         (WebCore::Node::setNeedsStyleRecalc):
3921         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted.
3922         * dom/Node.h:
3923         (WebCore::Node::clearChildNeedsStyleRecalc):
3924         * style/StyleResolveTree.cpp:
3925         (WebCore::Style::resetStyleForNonRenderedDescendants):
3926
3927 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
3928
3929         Remove unused legacy InspectorFrontendHost methods
3930         https://bugs.webkit.org/show_bug.cgi?id=136186
3931
3932         Reviewed by Andreas Kling.
3933
3934         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3935         (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted.
3936         (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted.
3937         (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted.
3938         * inspector/InspectorFrontendHost.idl:
3939
3940 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
3941
3942         Remove unnecessary WTFString creation in Dictionary getter
3943         https://bugs.webkit.org/show_bug.cgi?id=136184
3944
3945         Reviewed by Benjamin Poulain.
3946
3947         * bindings/js/Dictionary.cpp:
3948         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
3949         * bindings/js/Dictionary.h:
3950         * bindings/js/JSDictionary.cpp:
3951         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
3952         * bindings/js/JSDictionary.h:
3953
3954 2014-08-22  Commit Queue  <commit-queue@webkit.org>
3955
3956         Unreviewed, rolling out r172866.
3957         https://bugs.webkit.org/show_bug.cgi?id=136177
3958
3959         Broke iOS build (Requested by othermaciej on #webkit).
3960
3961         Reverted changeset:
3962
3963         "Replace use of WKCopyCFLocalizationPreferredName with
3964         NSLocale public API"
3965         https://bugs.webkit.org/show_bug.cgi?id=136082
3966         http://trac.webkit.org/changeset/172866
3967
3968 2014-08-22  David Hyatt  <hyatt@apple.com>
3969
3970         Add proper support for letter-spacing to bopomofo Ruby
3971         https://bugs.webkit.org/show_bug.cgi?id=136171
3972
3973         Reviewed by Sam Weinig.
3974
3975         Added fast/ruby/bopomofo-letter-spacing.html
3976
3977         * rendering/RenderRubyRun.cpp:
3978         (WebCore::RenderRubyRun::layout):
3979         Alter the layout of bopomofo ruby so that the distance between the base characters is the max of
3980         the letter-spacing between the characters and the minimum required width to hold two rows of
3981         Ruby.
3982
3983         Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character
3984         and not after all the letter-spacing.
3985
3986 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
3987
3988         Fix showing paint rects when selecting lines in the timeline
3989         https://bugs.webkit.org/show_bug.cgi?id=136173
3990
3991         Reviewed by Joseph Pecoraro.
3992
3993         Fix the condition used to decide when to show the overlay.
3994
3995         * inspector/InspectorOverlay.cpp:
3996         (WebCore::InspectorOverlay::shouldShowOverlay):
3997
3998 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
3999
4000         Use the correct rect for paint flashing
4001         https://bugs.webkit.org/show_bug.cgi?id=136169
4002
4003         Reviewed by Sam Weinig.
4004
4005         Use the rect we've converted to root document coordinates for paint flashing.
4006
4007         * inspector/InspectorPageAgent.cpp:
4008         (WebCore::InspectorPageAgent::didPaint):
4009
4010 2014-08-22  Dean Jackson  <dino@apple.com>
4011
4012         Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
4013         https://bugs.webkit.org/show_bug.cgi?id=136168
4014
4015         Reviewed by Tim Horton.
4016
4017         When Google maps are using their 2D "lite" fallback and you're drawing in a huge
4018         window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
4019         that we'd exceeded the maximum IOSurface size.