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