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