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