Add toWebKitCSS*Value functions to cast from CSSValue
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         Add toWebKitCSS*Value functions to cast from CSSValue
4         https://bugs.webkit.org/show_bug.cgi?id=121776
5
6         Reviewed by Andreas Kling.
7
8         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
9
10         No new tests, no behavior change.
11
12         * css/CSSValue.cpp:
13         (WebCore::CSSValue::destroy):
14         * css/StyleResolver.cpp:
15         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
16         (WebCore::StyleResolver::createFilterOperations):
17         * css/TransformFunctions.cpp:
18         (WebCore::transformsForValue):
19         * css/WebKitCSSArrayFunctionValue.h:
20         (WebCore::toWebKitCSSArrayFunctionValue):
21         * css/WebKitCSSFilterValue.h:
22         (WebCore::toWebKitCSSFilterValue):
23         * css/WebKitCSSMatFunctionValue.h:
24         (WebCore::toWebKitCSSMatFunctionValue):
25         * css/WebKitCSSMixFunctionValue.h:
26         (WebCore::toWebKitCSSMixFunctionValue):
27         * css/WebKitCSSSVGDocumentValue.h:
28         (WebCore::toWebKitCSSSVGDocumentValue):
29         * css/WebKitCSSShaderValue.h:
30         (WebCore::toWebKitCSSShaderValue):
31         * css/WebKitCSSTransformValue.h:
32         (WebCore::toWebKitCSSTransformValue):
33
34 2013-09-27  Zalan Bujtas  <zalan@apple.com>
35
36         Unexpected word wrapping for wrapped content then raw content.
37         https://bugs.webkit.org/show_bug.cgi?id=121130
38
39         Reviewed by Darin Adler.
40
41         When deciding whether a line is considered empty, we need to check if the current
42         object is fully responsible for the currently uncommitted width. It helps differentiating
43         <span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
44         case when we hit the second <span> the line is still considered empty, as opposed to the
45         second example.
46         This patch introduces a map to keep track of the uncommitted widths.
47
48         Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
49
50         * rendering/LineWidth.cpp:
51         (WebCore::LineWidth::uncommittedWidthForObject):
52         (WebCore::LineWidth::addUncommittedWidth):
53         * rendering/LineWidth.h:
54         * rendering/RenderBlockLineLayout.cpp:
55         (WebCore::LineBreaker::nextSegmentBreak):
56
57 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
58
59         [ATK] Protect entry points in the ATK wrapper against outdated render trees
60         https://bugs.webkit.org/show_bug.cgi?id=121558
61
62         Reviewed by Chris Fleizach.
63
64         Make sure that we protect every entry point in the ATK wrapper
65         against outdated render trees, before using the WebCore's
66         accessibility API, since that might lead to problems (and crashes)
67         if the render and accessibility trees are not stable.
68
69         Thus, call AccessibilityObject::updateBackingStore() in those
70         entry points and check whether the ATK wrapper is detached or not
71         after that, to decide whether to continue or not.
72
73         Besides providing a new test to check that it WebKit does not
74         crash in a given scenario (which actually triggered the
75         investigation here), solving this situation also fixes other tests
76         that were previously failing (aria-used-on-image-maps.html) or
77         that were printing wrong results, not detected until now due to
78         wrong platform specific expectations (file-upload-button-stringvalue
79         and deleting-iframe-destroys-axcache).
80
81         Test: accessibility/heading-crash-after-hidden.html
82
83         * accessibility/atk/WebKitAccessibleUtil.h: Added two new macros
84         to inject the needed code at the beginning of each entry point to
85         allow gracefully exit those functions when the render tree is
86         unstable. Inspired by g_return_if_fail and g_return_val_if_fail, we
87         called them returnIfWebKitAccessibleIsInvalid and returnValIfWebKitAccessibleIsInvalid.
88
89         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
90         (webkitAccessibleHyperlinkActionDoAction): Protect entry point.
91         (webkitAccessibleHyperlinkActionGetNActions): Ditto.
92         (webkitAccessibleHyperlinkActionGetDescription): Ditto.
93         (webkitAccessibleHyperlinkActionGetKeybinding): Ditto.
94         (webkitAccessibleHyperlinkActionGetName): Ditto.
95         (webkitAccessibleHyperlinkGetURI): Ditto.
96         (webkitAccessibleHyperlinkGetObject): Ditto.
97         (webkitAccessibleHyperlinkGetStartIndex): Ditto.
98         (webkitAccessibleHyperlinkGetEndIndex): Ditto.
99         (webkitAccessibleHyperlinkIsValid): Ditto.
100         (webkitAccessibleHyperlinkGetNAnchors): Ditto.
101         (webkitAccessibleHyperlinkIsSelectedLink): Ditto.
102         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
103         (webkitAccessibleActionDoAction): Ditto.
104         (webkitAccessibleActionGetNActions): Ditto.
105         (webkitAccessibleActionGetDescription): Ditto.
106         (webkitAccessibleActionGetKeybinding): Ditto.
107         (webkitAccessibleActionGetName): Ditto.
108         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
109         (webkitAccessibleComponentRefAccessibleAtPoint): Ditto.
110         (webkitAccessibleComponentGetExtents): Ditto.
111         (webkitAccessibleComponentGrabFocus): Ditto.
112         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
113         (webkitAccessibleDocumentGetAttributeValue): Ditto.
114         (webkitAccessibleDocumentGetAttributes): Ditto.
115         (webkitAccessibleDocumentGetLocale): Ditto.
116         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
117         (webkitAccessibleEditableTextSetRunAttributes): Ditto.
118         (webkitAccessibleEditableTextSetTextContents): Ditto.
119         (webkitAccessibleEditableTextInsertText): Ditto.
120         (webkitAccessibleEditableTextCopyText): Ditto.
121         (webkitAccessibleEditableTextCutText): Ditto.
122         (webkitAccessibleEditableTextDeleteText): Ditto.
123         (webkitAccessibleEditableTextPasteText): Ditto.
124         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
125         (webkitAccessibleHypertextGetLink): Ditto.
126         (webkitAccessibleHypertextGetNLinks): Ditto.
127         (webkitAccessibleHypertextGetLinkIndex): Ditto.
128         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
129         (webkitAccessibleImageGetImagePosition): Ditto.
130         (webkitAccessibleImageGetImageDescription): Ditto.
131         (webkitAccessibleImageGetImageSize): Ditto.
132         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
133         (webkitAccessibleSelectionAddSelection): Ditto.
134         (webkitAccessibleSelectionClearSelection): Ditto.
135         (webkitAccessibleSelectionRefSelection): Ditto.
136         (webkitAccessibleSelectionGetSelectionCount): Ditto.
137         (webkitAccessibleSelectionIsChildSelected): Ditto.
138         (webkitAccessibleSelectionRemoveSelection): Ditto.
139         (webkitAccessibleSelectionSelectAllSelection): Ditto.
140         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
141         (webkitAccessibleTableRefAt): Ditto.
142         (webkitAccessibleTableGetIndexAt): Ditto.
143         (webkitAccessibleTableGetColumnAtIndex): Ditto.
144         (webkitAccessibleTableGetRowAtIndex): Ditto.
145         (webkitAccessibleTableGetNColumns): Ditto.
146         (webkitAccessibleTableGetNRows): Ditto.
147         (webkitAccessibleTableGetColumnExtentAt): Ditto.
148         (webkitAccessibleTableGetRowExtentAt): Ditto.
149         (webkitAccessibleTableGetColumnHeader): Ditto.
150         (webkitAccessibleTableGetRowHeader): Ditto.
151         (webkitAccessibleTableGetCaption): Ditto.
152         (webkitAccessibleTableGetColumnDescription): Ditto.
153         (webkitAccessibleTableGetRowDescription): Ditto.
154         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
155         (webkitAccessibleTextGetText): Ditto.
156         (webkitAccessibleTextGetTextAfterOffset): Ditto.
157         (webkitAccessibleTextGetTextAtOffset): Ditto.
158         (webkitAccessibleTextGetTextBeforeOffset): Ditto.
159         (webkitAccessibleTextGetCharacterAtOffset): Ditto.
160         (webkitAccessibleTextGetCaretOffset): Ditto.
161         (webkitAccessibleTextGetRunAttributes): Ditto.
162         (webkitAccessibleTextGetDefaultAttributes): Ditto.
163         (webkitAccessibleTextGetCharacterExtents): Ditto.
164         (webkitAccessibleTextGetRangeExtents): Ditto.
165         (webkitAccessibleTextGetCharacterCount): Ditto.
166         (webkitAccessibleTextGetOffsetAtPoint): Ditto.
167         (webkitAccessibleTextGetNSelections): Ditto.
168         (webkitAccessibleTextGetSelection): Ditto.
169         (webkitAccessibleTextAddSelection): Ditto.
170         (webkitAccessibleTextSetSelection): Ditto.
171         (webkitAccessibleTextRemoveSelection): Ditto.
172         (webkitAccessibleTextSetCaretOffset): Ditto.
173         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
174         (webkitAccessibleValueGetCurrentValue): Ditto.
175         (webkitAccessibleValueGetMaximumValue): Ditto.
176         (webkitAccessibleValueGetMinimumValue): Ditto.
177         (webkitAccessibleValueSetCurrentValue): Ditto.
178         (webkitAccessibleValueGetMinimumIncrement): Ditto.
179         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
180         (core): Removed, as it's not actually needed.
181         (webkitAccessibleGetName):  Protect entry point.
182         (webkitAccessibleGetDescription): Ditto.
183         (webkitAccessibleGetParent): Ditto.
184         (webkitAccessibleGetNChildren): Ditto.
185         (webkitAccessibleRefChild): Ditto.
186         (webkitAccessibleGetIndexInParent): Ditto.
187         (webkitAccessibleGetAttributes): Ditto.
188         (webkitAccessibleGetRole): Ditto.
189         (webkitAccessibleRefStateSet): Ditto.
190         (webkitAccessibleRefRelationSet): Ditto.
191         (webkitAccessibleGetObjectLocale): Ditto.
192         (webkitAccessibleDetach): Ditto.
193         (webkitAccessibleIsDetached): New helper function, to be used from
194         the newly added macros. We need to check whether the wrapper is
195         detached and not just the wrapper AccessibilityObject since once
196         the detachment happens we can't trust anything but the AtkObject
197         from the wrapper (the AccessibilityObject might be invalid).
198         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
199
200         Assert that the render tree is neither being updated nor in need
201         of being updated before trying to compute the text under a given
202         element, since that might lead to crashes due to the constructor
203         of TextIterator calling updateLayoutIgnorePendingStylesheets().
204
205         * accessibility/AccessibilityNodeObject.cpp:
206         (WebCore::AccessibilityNodeObject::textUnderElement): Assert that
207         the render tree is neither being updated nor needing updating.
208
209 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
210
211         [ATK] accessibility/aria-sort.html is failing after r156409
212         https://bugs.webkit.org/show_bug.cgi?id=121947
213
214         Reviewed by Chris Fleizach.
215
216         The WAI-ARIA spec says to translate the value as is from the
217         attribute, so do just that instead of mapping values from the
218         AccessibilitySortDirection enumeration into strings.
219         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
220
221         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
222         (webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
223
224 2013-09-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
225
226         Sync toWebKitCSSShaderValue() behavior with other toCSSFooValue()
227         https://bugs.webkit.org/show_bug.cgi?id=121886
228
229         Reviewed by Darin Adler.
230
231         toWebKitCSSShaderValue() behavior is different from other to CSSFooValue().
232         It shouldn't return null. The type checking should be done before doing type cast.
233
234         * css/StyleResolver.cpp:
235         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
236         * css/WebKitCSSShaderValue.h:
237         (WebCore::toWebKitCSSShaderValue):
238
239 2013-09-26  Antti Koivisto  <antti@apple.com>
240
241         Move m_style to RenderElement
242         https://bugs.webkit.org/show_bug.cgi?id=121936
243
244         Reviewed by Andreas Kling.
245
246         Text renderers always have the same style as their parent. They can get their style via the parent pointer
247         rather than having a member of their own.
248         
249         This shrinks RenderText by a pointer.
250
251         * dom/PseudoElement.cpp:
252         (WebCore::PseudoElement::didRecalcStyle):
253         
254             Text renderers have no independent style. No need to set it.
255
256         * editing/ApplyBlockElementCommand.cpp:
257         * rendering/RenderBlock.cpp:
258         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
259         
260             Avoid getting style from text child before it is added to tree.
261
262         (WebCore::RenderBlock::updateFirstLetterStyle):
263         (WebCore::RenderBlock::createFirstLetterRenderer):
264         * rendering/RenderButton.cpp:
265         (WebCore::RenderButton::styleDidChange):
266         (WebCore::RenderButton::setText):
267         * rendering/RenderCombineText.cpp:
268         (WebCore::RenderCombineText::styleDidChange):
269                 
270             Don't set text style anymore.
271
272         * rendering/RenderElement.cpp:
273         (WebCore::RenderElement::RenderElement):
274         (WebCore::RenderElement::setStyle):
275         
276             Notify child text renderers of style change.
277
278         (WebCore::RenderElement::setAnimatableStyle):
279         (WebCore::RenderElement::setPseudoStyle):
280         
281             Push down to RenderElement, remove text branches.
282
283         (WebCore::RenderElement::addChild):
284         
285             Notify text renderers of style change when added to tree.
286
287         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
288         * rendering/RenderElement.h:
289         (WebCore::RenderElement::style):
290         (WebCore::RenderElement::setStyleInternal):
291         
292             Move m_style from RenderObject.
293
294         (WebCore::RenderObject::style):
295         
296             Inline this in RenderElement.h instead of making it virtual.
297
298         * rendering/RenderInline.cpp:
299         (WebCore::updateStyleOfAnonymousBlockContinuations):
300         (WebCore::RenderInline::styleDidChange):
301         
302             Tighten typing to call RenderElement::setStyle.
303
304         (WebCore::RenderInline::clippedOverflowRectForRepaint):
305         
306             Change assert. This can get legitimately called during layout for the first letter renderers.
307             This was previously avoided by luck.
308
309         * rendering/RenderMenuList.cpp:
310         (WebCore::RenderMenuList::styleDidChange):
311         (WebCore::RenderMenuList::setText):
312         
313             Don't set text style anymore.
314
315         * rendering/RenderObject.cpp:
316         (WebCore::RenderObject::RenderObject):
317         (WebCore::RenderObject::containingBlock):
318         (WebCore::RenderObject::drawLineForBoxSide):
319         (WebCore::RenderObject::hasEntirelyFixedBackground):
320         (WebCore::RenderObject::container):
321         (WebCore::RenderObject::cachedFirstLineStyle):
322
323             Switch to style(), avoid unnecessary repetition.
324             Move code out.
325
326         * rendering/RenderObject.h:
327         
328             Move functions to RenderElement.
329
330         (WebCore::RenderObject::isBeforeContent):
331         (WebCore::RenderObject::isAfterContent):
332         
333             Avoid accessing style for text renderers as these are called before the renderer
334             is added to tree.
335
336         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
337         * rendering/RenderRegion.cpp:
338         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
339         (WebCore::RenderRegion::setObjectStyleInRegion):
340         * rendering/RenderSearchField.cpp:
341         (WebCore::RenderSearchField::updateCancelButtonVisibility):
342         * rendering/RenderText.cpp:
343         * rendering/RenderText.h:
344         
345             Remove setStyle.
346
347         (WebCore::RenderText::style):
348         
349             Get style from parent.
350
351         * rendering/mathml/RenderMathMLOperator.cpp:
352         (WebCore::RenderMathMLOperator::updateFromElement):
353         (WebCore::RenderMathMLOperator::createGlyph):
354         * rendering/style/ContentData.cpp:
355         (WebCore::TextContentData::createRenderer):
356         (WebCore::CounterContentData::createRenderer):
357         (WebCore::QuoteContentData::createRenderer):
358         
359             Pseudo style for RenderText subclasses comes from parent without any explicit setting.
360
361         * style/StyleResolveTree.cpp:
362         (WebCore::Style::createTextRendererIfNeeded):
363         (WebCore::Style::resolveLocal):
364         (WebCore::Style::updateTextStyle):
365         (WebCore::Style::resolveShadowTree):
366         (WebCore::Style::resolveTree):
367         
368             No need to set or update text renderer style separately.
369
370 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
371
372         [MediaStream] make MediaStream testable
373         https://bugs.webkit.org/show_bug.cgi?id=121967
374
375         Reviewed by Dean Jackson.
376
377         No new tests, existing tests updated.
378
379         * CMakeLists.txt: Add MockMediaStreamCenter.
380         * GNUmakefile.list.am: Ditto.
381
382         * Modules/mediastream/MediaStreamTrack.idl: Add SkipVTableValidation.
383         * Modules/mediastream/NavigatorUserMediaError.idl: Add JSGenerateToJSObject.
384         * WebCore.exp.in: Export MockMediaStreamCenter::registerMockMediaStreamCenter.
385
386         * WebCore.xcodeproj/project.pbxproj: Add MockMediaStreamCenter.
387         * dom/DOMError.h: Make the destructor virtual because it has a derived class.
388         * dom/DOMError.idl:
389
390         * platform/mock/MockMediaStreamCenter.cpp: Added.
391         * platform/mock/MockMediaStreamCenter.h: Added.
392
393         * testing/Internals.cpp: Register the mock stream center.
394
395 2013-09-26  Benjamin Poulain  <benjamin@webkit.org>
396
397         Move CSS MatchRequest from StyleResolver to a private definition in ElementRuleCollector
398         https://bugs.webkit.org/show_bug.cgi?id=121986
399
400         Reviewed by Andreas Kling.
401
402         MatchRequest is an internal type of ElementRuleCollector now, move the definition
403         to ElementRuleCollector.
404
405         * css/DocumentRuleSets.h:
406         * css/ElementRuleCollector.h:
407         (WebCore::ElementRuleCollector::MatchRequest::MatchRequest):
408         * css/StyleResolver.h:
409
410 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
411
412         [Windows] Unreviewed build fix after r156487.
413
414         Add explicit casting needed by MSVC to compile this code. Much
415         of this could probably be removed when we move to VS2012 or newer.
416
417         * bindings/js/JSEventListener.cpp:
418         (WebCore::JSEventListener::JSEventListener):
419         * bindings/js/JSEventListener.h:
420         (WebCore::JSEventListener::jsFunction):
421         * bridge/jsc/BridgeJSC.cpp:
422         (JSC::Bindings::Instance::createRuntimeObject):
423
424 2013-09-26  Commit Queue  <commit-queue@webkit.org>
425
426         Unreviewed, rolling out r156510.
427         http://trac.webkit.org/changeset/156510
428         https://bugs.webkit.org/show_bug.cgi?id=121989
429
430         Landed in-progress code along with build fix. (Requested by
431         bfulgham on #webkit).
432
433         * bindings/js/JSEventListener.cpp:
434         (WebCore::JSEventListener::JSEventListener):
435         * bindings/js/JSEventListener.h:
436         (WebCore::JSEventListener::jsFunction):
437         * bridge/jsc/BridgeJSC.cpp:
438         (JSC::Bindings::Instance::createRuntimeObject):
439         * platform/graphics/filters/FEGaussianBlur.cpp:
440         (WebCore::FEGaussianBlur::platformApplyGeneric):
441         (WebCore::FEGaussianBlur::platformApply):
442         * platform/graphics/win/DIBPixelData.cpp:
443         (WebCore::DIBPixelData::writeToFile):
444         * platform/graphics/win/DIBPixelData.h:
445
446 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
447
448         [Windows] Unreviewed build fix after r156487.
449
450         Add explicit casting needed by MSVC to compile this code. Much
451         of this could probably be removed when we move to VS2012 or newer.
452
453         * bindings/js/JSEventListener.cpp:
454         (WebCore::JSEventListener::JSEventListener):
455         * bindings/js/JSEventListener.h:
456         (WebCore::JSEventListener::jsFunction):
457         * bridge/jsc/BridgeJSC.cpp:
458         (JSC::Bindings::Instance::createRuntimeObject):
459         * platform/graphics/filters/FEGaussianBlur.cpp:
460         (WebCore::FEGaussianBlur::platformApplyGeneric):
461         (WebCore::FEGaussianBlur::platformApply):
462         * platform/graphics/win/DIBPixelData.cpp:
463         (WebCore::DIBPixelData::DIBPixelData):
464         (WebCore::DIBPixelData::writeToFile):
465         * platform/graphics/win/DIBPixelData.h:
466
467 2013-09-26  Dean Jackson  <dino@apple.com>
468
469         Expose a setting to disable hardware accelerated animations
470         https://bugs.webkit.org/show_bug.cgi?id=121978
471         <rdar://problem/15091284>
472
473         Reviewed by Eric Carlson.
474
475         Expose acceleratedCompositedAnimationsEnabled
476         to disable CoreAnimation animations.
477
478         Test: LayoutTests/animations/transform-non-accelerated.html
479
480         * WebCore.exp.in: Export new method.
481         * page/Settings.in: Add new setting.
482         * rendering/RenderLayerBacking.cpp:
483         (WebCore::RenderLayerBacking::startAnimation): Don't go
484         to GraphicsLayer if the setting is false.
485
486 2013-09-26  Julien Brianceau  <jbriance@cisco.com>
487
488         [Qt] Fix build after r156487.
489         https://bugs.webkit.org/show_bug.cgi?id=121984
490
491         Reviewed by Anders Carlsson.
492
493         * bridge/qt/qt_runtime.cpp:
494         (JSC::Bindings::QtRuntimeMethod::jsObjectRef):
495
496 2013-09-26  Antti Koivisto  <antti@apple.com>
497
498         Don't mutate style in RenderCombineText
499         https://bugs.webkit.org/show_bug.cgi?id=121979
500
501         Reviewed by Andreas Kling.
502
503         Text renderers should always have the same style as the parent.
504
505         * rendering/InlineTextBox.cpp:
506         (WebCore::fontToUse):
507         (WebCore::InlineTextBox::localSelectionRect):
508         (WebCore::InlineTextBox::paint):
509         (WebCore::InlineTextBox::offsetForPosition):
510         (WebCore::InlineTextBox::positionForOffset):
511         
512             Select the modified font for text-combine.
513
514         * rendering/RenderCombineText.cpp:
515         (WebCore::RenderCombineText::styleDidChange):
516         (WebCore::RenderCombineText::combineText):
517         * rendering/RenderCombineText.h:
518         
519             Move the text-combine specific font style to a member of its own.
520
521 2013-09-26  Anders Carlsson  <andersca@apple.com>
522
523         Remove PassWeak.h
524         https://bugs.webkit.org/show_bug.cgi?id=121971
525
526         Reviewed by Geoffrey Garen.
527
528         * ForwardingHeaders/heap/PassWeak.h: Removed.
529
530 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
531
532         [MediaStream API] implement VideoStreamTrack and AudioStreamTrack
533         https://bugs.webkit.org/show_bug.cgi?id=121950
534
535         Reviewed by Dean Jackson.
536
537         No new tests, blocked by https://bugs.webkit.org/show_bug.cgi?id=121967
538
539         * CMakeLists.txt: Add new files.
540         * DerivedSources.make: Ditto.
541         * GNUmakefile.list.am: Ditto.
542
543         * Modules/mediastream/AudioStreamTrack.cpp: Added.
544         * Modules/mediastream/AudioStreamTrack.h: Added.
545         * Modules/mediastream/AudioStreamTrack.idl: Added.
546
547         * Modules/mediastream/MediaStream.cpp:
548         (WebCore::MediaStream::MediaStream): Create an AudioStreamTrack or a VideoStreamTrack.
549         (WebCore::MediaStream::addRemoteSource): Ditto.
550
551         * Modules/mediastream/MediaStreamTrack.cpp:
552         (WebCore::MediaStreamTrack::create): Removed.
553         * Modules/mediastream/MediaStreamTrack.h:
554
555         * Modules/mediastream/VideoStreamTrack.cpp: Added.
556         * Modules/mediastream/VideoStreamTrack.h: Added.
557         * Modules/mediastream/VideoStreamTrack.idl: Added.
558
559         * WebCore.xcodeproj/project.pbxproj: Add new files.
560
561 2013-09-26  Anders Carlsson  <andersca@apple.com>
562
563         Stop using PassWeak
564         https://bugs.webkit.org/show_bug.cgi?id=121968
565
566         Reviewed by Sam Weinig.
567
568         Update for JavaScriptCore changes.
569
570         * bindings/js/JSDOMBinding.h:
571         (WebCore::setInlineCachedWrapper):
572         (WebCore::cacheWrapper):
573         * bindings/js/JSEventListener.cpp:
574         (WebCore::JSEventListener::JSEventListener):
575         * bindings/js/JSEventListener.h:
576         (WebCore::JSEventListener::setWrapper):
577         (WebCore::JSEventListener::jsFunction):
578         * bindings/js/JSMutationCallback.cpp:
579         (WebCore::JSMutationCallback::JSMutationCallback):
580         * bindings/js/JSNodeFilterCondition.cpp:
581         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
582         * bindings/js/ScriptWrappableInlines.h:
583         (WebCore::ScriptWrappable::setWrapper):
584         * bindings/js/WebCoreTypedArrayController.cpp:
585         * bridge/jsc/BridgeJSC.cpp:
586         (JSC::Bindings::Instance::createRuntimeObject):
587         * bridge/runtime_root.cpp:
588         (JSC::Bindings::RootObject::addRuntimeObject):
589
590 2013-09-25  Sam Weinig  <sam@webkit.org>
591
592         Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
593         https://bugs.webkit.org/show_bug.cgi?id=121934
594
595         Reviewed by Geoffrey Garen.
596
597         Reduce unnecessary loads by passing the JSC::VM to object creation/access functions
598         that don't need the ExecState.
599
600         * WebCore.exp.in:
601         * bindings/js/JSDOMBinding.h:
602         (WebCore::getDOMStructure):
603         (WebCore::deprecatedGetDOMStructure):
604         (WebCore::getDOMPrototype):
605         (WebCore::setInlineCachedWrapper):
606         (WebCore::createWrapper):
607         * bindings/js/JSDOMGlobalObject.h:
608         (WebCore::getDOMConstructor):
609         * bindings/js/JSDOMWindowCustom.cpp:
610         (WebCore::JSDOMWindow::image):
611         * bindings/js/JSDocumentCustom.cpp:
612         (WebCore::JSDocument::location):
613         * bindings/js/JSImageConstructor.cpp:
614         (WebCore::JSImageConstructor::finishCreation):
615         * bindings/js/JSImageConstructor.h:
616         (WebCore::JSImageConstructor::create):
617         * bindings/js/ScriptWrappable.h:
618         * bindings/js/ScriptWrappableInlines.h:
619         (WebCore::ScriptWrappable::setWrapper):
620         * bindings/scripts/CodeGeneratorJS.pm:
621         (GenerateHeader):
622         (GenerateImplementation):
623         (GenerateConstructorDeclaration):
624         (GenerateConstructorHelperMethods):
625         * bridge/c/CRuntimeObject.cpp:
626         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
627         (JSC::Bindings::CRuntimeObject::finishCreation):
628         * bridge/c/CRuntimeObject.h:
629         (JSC::Bindings::CRuntimeObject::create):
630         * bridge/c/c_instance.cpp:
631         (JSC::Bindings::CInstance::newRuntimeObject):
632         * bridge/jsc/BridgeJSC.cpp:
633         (JSC::Bindings::Instance::newRuntimeObject):
634         * bridge/objc/ObjCRuntimeObject.h:
635         (JSC::Bindings::ObjCRuntimeObject::create):
636         * bridge/objc/ObjCRuntimeObject.mm:
637         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
638         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
639         * bridge/objc/objc_instance.mm:
640         (ObjcInstance::newRuntimeObject):
641         * bridge/objc/objc_runtime.h:
642         (JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
643         * bridge/runtime_array.h:
644         (JSC::RuntimeArray::createPrototype):
645         * bridge/runtime_method.h:
646         (JSC::RuntimeMethod::createPrototype):
647         * bridge/runtime_object.cpp:
648         (JSC::Bindings::RuntimeObject::RuntimeObject):
649         (JSC::Bindings::RuntimeObject::finishCreation):
650         * bridge/runtime_object.h:
651         (JSC::Bindings::RuntimeObject::create):
652         (JSC::Bindings::RuntimeObject::createPrototype):
653
654 2013-09-26  Commit Queue  <commit-queue@webkit.org>
655
656         Unreviewed, rolling out r156451.
657         http://trac.webkit.org/changeset/156451
658         https://bugs.webkit.org/show_bug.cgi?id=121965
659
660         Broke two fast/multicol tests. (Requested by kling on
661         #webkit).
662
663         * rendering/FlowThreadController.cpp:
664         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
665         * rendering/RenderElement.cpp:
666         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
667         * rendering/RenderFlowThread.cpp:
668         (WebCore::RenderFlowThread::layout):
669         (WebCore::RenderFlowThread::regionForCompositedLayer):
670         (WebCore::RenderFlowThread::updateRegionForRenderLayer):
671         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
672         * rendering/RenderFlowThread.h:
673         * rendering/RenderGeometryMap.cpp:
674         * rendering/RenderGeometryMap.h:
675         * rendering/RenderLayer.cpp:
676         (WebCore::RenderLayer::calculateLayerBounds):
677         * rendering/RenderLayer.h:
678         * rendering/RenderLayerBacking.cpp:
679         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
680         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
681         * rendering/RenderLayerBacking.h:
682         * rendering/RenderLayerCompositor.cpp:
683         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
684         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
685         (WebCore::RenderLayerCompositor::canBeComposited):
686         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
687         * rendering/RenderLayerCompositor.h:
688         * rendering/RenderMultiColumnSet.cpp:
689         * rendering/RenderMultiColumnSet.h:
690         * rendering/RenderRegion.cpp:
691         (WebCore::RenderRegion::setRequiresLayerForCompositing):
692         * rendering/RenderRegion.h:
693         * rendering/RenderRegionSet.h:
694         * rendering/RenderTreeAsText.cpp:
695         (WebCore::writeLayers):
696
697 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
698
699         [MediaStream] Cleanup platform interface
700         https://bugs.webkit.org/show_bug.cgi?id=121935
701
702         Reviewed by Jer Noble.
703
704         No new tests, tests will be updated in the next patch.
705
706         * CMakeLists.txt: Remove MediaStreamComponent.cpp.
707         * GNUmakefile.list.am: Remove MediaStreamComponent.h|cpp and MediaStreamSourcesQueryClient.h. 
708             Add MediaStreamConstraintsValidationClient.h and MediaStreamCreationClient.h.
709
710         * Modules/mediastream/MediaStream.cpp:
711         (WebCore::processTrack): Duplicate MediaStreamSource when necessary to work around bug 121954.
712         (WebCore::createFromSourceVectors): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
713         (WebCore::MediaStream::MediaStream): *Components -> *Streams.
714         (WebCore::MediaStream::setEnded): New.
715         (WebCore::MediaStream::stop):  MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
716         (WebCore::MediaStream::addTrack): Append the track parameter rather than duplicating it, as per spec.
717         (WebCore::MediaStream::removeTrack): *Components -> *Streams.
718         (WebCore::MediaStream::trackDidEnd): Renamed from trackEnded.
719         (WebCore::MediaStream::streamDidEnd): Renamed from streamEnded.
720         (WebCore::MediaStream::addRemoteSource): Renamed from addRemoteTrack. *Components -> *Streams.
721         (WebCore::MediaStream::removeRemoteSource): Renamed from removeRemoteTrack. *Components -> *Streams.
722         * Modules/mediastream/MediaStream.h:
723
724         * Modules/mediastream/MediaStreamTrack.cpp:
725         (WebCore::MediaStreamTrack::create): *Component -> *Stream.
726         (WebCore::MediaStreamTrack::MediaStreamTrack): Don't assume source is valid.
727         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
728         (WebCore::MediaStreamTrack::kind): Ditto. AtomicString -> const AtomicString&.
729         (WebCore::MediaStreamTrack::setSource): Moved from .h file.
730         (WebCore::MediaStreamTrack::id): Don't assume source is valid. Create ID when the source doesn't have one.
731         (WebCore::MediaStreamTrack::label): Don't assume source is valid.
732         (WebCore::MediaStreamTrack::enabled): 
733         (WebCore::MediaStreamTrack::setEnabled): *Component -> *Stream. MediaStreamCenter::instance -> MediaStreamCenter::shared.
734         (WebCore::MediaStreamTrack::readyState): "muted" is not a readyState, but "new" is.
735         (WebCore::MediaStreamTrack::getSources): MediaStreamCenter::instance -> MediaStreamCenter::shared.
736         (WebCore::MediaStreamTrack::ended): *Component -> *Stream.
737         (WebCore::MediaStreamTrack::sourceChangedState): Dispatch "started" and "unmuted" events.
738         (WebCore::MediaStreamTrack::trackDidEnd): Renamed from didEndTrack. m_component -> m_source.
739         * Modules/mediastream/MediaStreamTrack.h:
740
741         * Modules/mediastream/RTCDTMFSender.cpp:
742         (WebCore::RTCDTMFSender::create): track->component() -> track->source();
743
744         * Modules/mediastream/RTCPeerConnection.cpp:
745         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Ditto.
746
747         * Modules/mediastream/RTCStatsRequestImpl.cpp:
748         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Ditto.
749         (WebCore::RTCStatsRequestImpl::component): Removed, it was unused.
750         * Modules/mediastream/RTCStatsRequestImpl.h:
751
752         * Modules/mediastream/UserMediaClient.h:
753         * Modules/mediastream/UserMediaController.h:
754         (WebCore::UserMediaController::requestPermission): Renamed from requestUserMedia, get rid of source
755             vector parameters.
756         (WebCore::UserMediaController::cancelRequest): Renamed from cancelUserMediaRequest.
757
758         * Modules/mediastream/UserMediaRequest.cpp:
759         (WebCore::parseOptions): MediaConstraintsImpl -> MediaConstraints.
760         (WebCore::UserMediaRequest::create): Ditto.
761         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
762         (WebCore::UserMediaRequest::securityOrigin): New.
763         (WebCore::UserMediaRequest::start): Request constraint validation.
764         (WebCore::UserMediaRequest::constraintsValidated): New. Callback from media engine when constraints
765             can be supported.
766         (WebCore::UserMediaRequest::requestPermission): New. Ask user media client for permission to access media.
767         (WebCore::UserMediaRequest::userMediaAccessGranted): New. Access has been granted.
768         (WebCore::UserMediaRequest::createMediaStream): New. Allowed to access media, ask media engine
769             to create stream sources.
770         (WebCore::UserMediaRequest::userMediaAccessDenied): New. User media client has denied access request.
771         (WebCore::UserMediaRequest::constraintsInvalid): New. Media engine can not support constraints.
772         (WebCore::UserMediaRequest::didCreateStream): New. Media engine has created stream sources.
773         (WebCore::UserMediaRequest::callSuccessHandler): New. Create stream from sources and call success handler.
774         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Renamed from constraintFailure.
775         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Renamed from permissionFailure.
776         (WebCore::UserMediaRequest::callErrorHandler): 
777         (WebCore::UserMediaRequest::contextDestroyed): cancelUserMediaRequest -> cancelRequest.
778         * Modules/mediastream/UserMediaRequest.h:
779
780         * Modules/webaudio/AudioContext.cpp:
781         (WebCore::AudioContext::createMediaStreamSource): localAudio->component()->source() -> localAudio->source().
782
783         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
784         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): MediaStreamSource::TypeAudio ->
785             MediaStreamSource::Audio, MediaStreamSource::ReadyStateLive -> MediaStreamSource::Live.
786             MediaStreamCenter::instance -> MediaStreamCenter::shared.
787
788         * WebCore.exp.in: Export new symbols.
789
790         * WebCore.xcodeproj/project.pbxproj: Add new files and remove deleted files.
791
792         * dom/EventNames.h: Define "started" event.
793
794         * platform/mediastream/MediaStreamCenter.cpp:
795         (WebCore::mediaStreamCenterOverride): Make it possible to override the shared stream center. Will
796             be used for testing in a later patch.
797         (WebCore::MediaStreamCenter::shared): Renamed from instance. Return current stream center.
798         (WebCore::MediaStreamCenter::setSharedStreamCenter): Override current stream center.
799         (WebCore::MediaStreamCenter::endLocalMediaStream): Never call the descriptor client, always call
800             the descriptor and let it deal with the client.
801         * platform/mediastream/MediaStreamCenter.h:
802
803         * platform/mediastream/MediaStreamComponent.cpp: Removed.
804         * platform/mediastream/MediaStreamComponent.h: Removed.
805
806         * platform/mediastream/MediaStreamConstraintsValidationClient.h: Added.
807         * platform/mediastream/MediaStreamCreationClient.h: Added.
808
809         * platform/mediastream/MediaStreamDescriptor.cpp:
810         (WebCore::MediaStreamDescriptor::addSource): *Component -> *Source.
811         (WebCore::MediaStreamDescriptor::removeSource): Ditto.
812         (WebCore::MediaStreamDescriptor::addRemoteSource): Ditto.
813         (WebCore::MediaStreamDescriptor::removeRemoteSource): Ditto.
814         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
815         (WebCore::MediaStreamDescriptor::setEnded): Ditto. Set source readyStates to Ended.
816         * platform/mediastream/MediaStreamDescriptor.h:
817
818         * platform/mediastream/MediaStreamSource.cpp:
819         (WebCore::MediaStreamSource::MediaStreamSource): Initialize new member variables.
820         (WebCore::MediaStreamSource::setReadyState): Early return when the state hasn't changed.
821         (WebCore::MediaStreamSource::setStream): New.
822         (WebCore::MediaStreamSource::setMuted): New.
823         * platform/mediastream/MediaStreamSource.h:
824
825         * platform/mediastream/MediaStreamSourcesQueryClient.h: Removed.
826
827         * platform/mediastream/RTCPeerConnectionHandler.h:
828         * platform/mediastream/RTCStatsRequest.h:
829
830         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Update for new MediaStreamCenter API.
831         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
832
833         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Ditto.
834         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
835
836         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Ditto.
837         * platform/mediastream/mac/MediaStreamCenterMac.h:
838
839 2013-09-26  Gurpreet Kaur  <k.gurpreet@samsung.com>
840
841         Inset box-shadows fail to round around corners when border-radius is set in vh/vw units.
842         https://bugs.webkit.org/show_bug.cgi?id=119187
843
844         Reviewed by Darin Adler.
845
846         Border-radius properties were not applied incase its values
847         were given in vh, vw, vmax, vmin units.
848
849         Tests: fast/css/border-radius-inset-box-shadow-viewportlength.html
850                fast/css/border-radius-viewport-height.html
851                fast/css/border-radius-viewport-vmax.html
852                fast/css/border-radius-viewport-vmin.html
853
854         * css/DeprecatedStyleBuilder.cpp:
855         (WebCore::ApplyPropertyBorderRadius::applyValue):
856         (WebCore::ApplyPropertyComputeLength::applyValue):
857         * css/StyleResolver.h:
858         Calculating the border-radius values which has been specified
859         in viewport units.The vh/vw units are calcultated as percent of
860         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
861         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
862
863 2013-09-26  Seokju Kwon  <seokju@webkit.org>
864
865         Fix ordered comparison warnings in BitmapImage::drawPattern
866         https://bugs.webkit.org/show_bug.cgi?id=121945
867
868         Reviewed by Darin Adler.
869
870         No new tests, no behavior change.
871
872         * platform/graphics/BitmapImage.cpp:
873         (WebCore::BitmapImage::drawPattern):
874
875 2013-09-26  Andreas Kling  <akling@apple.com>
876
877         Remove empty JSFooCustom.cpp files.
878         <https://webkit.org/b/121955>
879
880         Reviewed by Anders Carlsson.
881
882         There's no sense in slowing down build times with empty files that
883         still include a bunch of headers.
884
885         * bindings/js/JSAudioBufferCustom.cpp: Removed.
886         * bindings/js/JSCSSFontFaceRuleCustom.cpp: Removed.
887         * bindings/js/JSCSSImportRuleCustom.cpp: Removed.
888         * bindings/js/JSCSSMediaRuleCustom.cpp: Removed.
889         * bindings/js/JSCSSPageRuleCustom.cpp: Removed.
890         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed.
891         * bindings/js/JSDOMImplementationCustom.cpp: Removed.
892         * bindings/js/JSDOMTokenListCustom.cpp: Removed.
893         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed.
894         * bindings/js/JSMediaListCustom.cpp: Removed.
895         * bindings/js/JSProcessingInstructionCustom.cpp: Removed.
896         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp: Removed.
897         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp: Removed.
898         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: Removed.
899
900 2013-09-26  Mihai Maerean  <mmaerean@adobe.com>
901
902         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
903         https://bugs.webkit.org/show_bug.cgi?id=120457
904
905         Reviewed by David Hyatt.
906
907         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
908
909         The composited layers inside the named flow threads are collected as part of the regions.
910         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
911         that region too (inside RenderFlowThread::updateAllLayerToRegionMappings).
912
913         Tests: fast/regions/layers/accelerated-compositing/crash-transform-inside-region.html
914                fast/regions/layers/accelerated-compositing/floated-region-with-transformed-child.html
915                fast/regions/layers/accelerated-compositing/move-layer-from-one-region-to-another.html
916                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding.html
917                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding-for-video.html
918                fast/regions/layers/accelerated-compositing/region-as-layer-in-another-flowthread.html
919                fast/regions/layers/accelerated-compositing/transform-transparent-positioned-video-inside-region.html
920                fast/regions/layers/accelerated-compositing/transformed-layer-inside-transformed-layer.html
921                fast/regions/layers/accelerated-compositing/z-index.html: Added.
922                fast/regions/layers/accelerated-compositing/z-index-update.html: Added.
923
924         * rendering/FlowThreadController.cpp:
925         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
926         * rendering/RenderFlowThread.cpp:
927         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
928         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
929         painted.
930         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
931         (WebCore::RenderFlowThread::getLayerListForRegion):
932         (WebCore::RenderFlowThread::regionForCompositedLayer):
933         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
934         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
935         from a region to another since the last update.
936         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
937         * rendering/RenderFlowThread.h:
938         * rendering/RenderGeometryMap.cpp:
939         (WebCore::RenderGeometryMap::pushRenderFlowThread):
940         * rendering/RenderGeometryMap.h:
941         * rendering/RenderLayer.cpp:
942         (WebCore::RenderLayer::calculateLayerBounds): The RenderNamedFlowThread is ignored when we calculate the bounds
943         of the RenderView.
944         * rendering/RenderLayer.h:
945         * rendering/RenderLayerBacking.cpp:
946         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's inside an out of flow Flow Thread.
947         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
948         (WebCore::enclosingFlowThreadAncestor):
949         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
950         its borders, paddings, outlines or box-shadows to layers inside it.
951         * rendering/RenderLayerBacking.h:
952         * rendering/RenderLayerCompositor.cpp:
953         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
954         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
955         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly. We
956         are going to collect composited layers as part of regions.
957         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
958         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
959         use composited RenderRegions to render the background of the RenderFlowThread.
960         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a region.
961         * rendering/RenderLayerCompositor.h:
962         * rendering/RenderMultiColumnSet.cpp:
963         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
964         * rendering/RenderMultiColumnSet.h:
965         * rendering/RenderElement.cpp:
966         (WebCore::RenderObject::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
967         through the RenderView::styleDidChange function.
968         * rendering/RenderRegion.cpp:
969         (WebCore::RenderRegion::setRequiresLayerForCompositing):
970         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
971         * rendering/RenderRegion.h:
972         (WebCore::toRenderRegion):
973         * rendering/RenderRegionSet.h:
974         (WebCore::RenderRegionSet::requiresLayer): Never.
975         * rendering/RenderTreeAsText.cpp:
976         (WebCore::writeLayers):
977
978 2013-09-26  Mihnea Ovidenie  <mihnea@adobe.com>
979
980         [CSSRegions] Unable to collect html element in a named flow
981         https://bugs.webkit.org/show_bug.cgi?id=121878
982
983         Reviewed by Antti Koivisto.
984
985         Tests: fast/regions/collect-html-in-named-flow.html
986                fast/regions/iframe-html-collected.html
987
988         It should be possible to collect the html element in a named flow.
989         However, before we check whether adding a child is not restricted
990         by its original parent, we have to make sure that the original parent
991         is an element to safely perform the check.
992
993         * rendering/RenderNamedFlowThread.cpp:
994         (WebCore::RenderNamedFlowThread::isChildAllowed):
995
996 2013-09-25  Brady Eidson  <beidson@apple.com>
997
998         Unreviewed, blind attempt at a build fix.
999
1000         * inspector/InspectorIndexedDBAgent.cpp: Don’t include the keyPathFromIDBKeyPath method for
1001           PLATFORM(MAC) as it is unused.
1002
1003 2013-09-25  Brady Eidson  <beidson@apple.com>
1004
1005         Enable the IndexedDB build on Mac, but leave the feature non-functional
1006         https://bugs.webkit.org/show_bug.cgi?id=121918
1007
1008         Reviewed by Alexey Proskuryakov.
1009
1010         * Configurations/FeatureDefines.xcconfig:
1011
1012         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
1013           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
1014
1015         * inspector/InspectorIndexedDBAgent.cpp: Empty out DatabaseLoader::execute on Mac until the inspector
1016           build gurus can figure out a 32bit-vs-64bit issue that there is no obvious solution for.
1017
1018         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
1019           further use for it.
1020
1021 2013-09-25  Ryuan Choi  <ryuan.choi@samsung.com>
1022
1023         Unreviewed build fix for EFL port.
1024
1025         IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
1026
1027         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
1028         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
1029         (WebCore::IDBTransactionBackendLevelDB::create):
1030         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
1031         (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
1032         (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
1033         (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
1034         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
1035         (WebCore::IDBTransactionBackendLevelDB::database):
1036
1037 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
1038
1039         Do not reenter Document from its destructor
1040         https://bugs.webkit.org/show_bug.cgi?id=121933
1041
1042         Reviewed by Darin Adler.
1043
1044         Following r156422, there are cases where we would reenter Document
1045         during its destruction.
1046
1047         The flow was the following:
1048         -Document's destructor is executed.
1049         -DocumentStyleSheetCollection being part of Document, its destructor
1050          is executed.
1051         -DocumentStyleSheetCollection's destructor detach the owner node of all
1052          its stylesheets avoid keeping stale references to a dead Document.
1053         -CSSStyleSheet::clearOwnerNode() would fetch the dying document
1054          and invoke Document::styleResolverChanged().
1055         This would not fail because the document is detached and Document::styleResolverChanged()
1056         would fail early. This is complicated and error prone so this patch attempt to clear
1057         the process a bit.
1058
1059         With the patch, Document detach all the stylesheets early in the destruction.
1060         Clearing the stylesheet is also changed to avoid re-entering the document.
1061
1062         * css/CSSStyleSheet.h:
1063         * dom/Document.cpp:
1064         (WebCore::Document::~Document):
1065         * dom/DocumentStyleSheetCollection.cpp:
1066         (WebCore::DocumentStyleSheetCollection::detachFromDocument):
1067         * dom/DocumentStyleSheetCollection.h:
1068
1069 2013-09-25  Santosh Mahto  <santosh.ma@samsung.com>
1070
1071         htmlediting.cpp: unnecessary local variable cleanup
1072         https://bugs.webkit.org/show_bug.cgi?id=121903
1073
1074         Reviewed by Darin Adler.
1075
1076         Code cleanup.
1077
1078         * editing/htmlediting.cpp:
1079         (WebCore::lowestEditableAncestor):
1080
1081 2013-09-25  Commit Queue  <commit-queue@webkit.org>
1082
1083         Unreviewed, rolling out r156432.
1084         http://trac.webkit.org/changeset/156432
1085         https://bugs.webkit.org/show_bug.cgi?id=121932
1086
1087         some integer conversion things that need brady to fix
1088         (Requested by thorton on #webkit).
1089
1090         * Configurations/FeatureDefines.xcconfig:
1091         * Modules/indexeddb/IDBFactory.h:
1092         (WebCore::IDBFactory::create):
1093         * WebCore.xcodeproj/project.pbxproj:
1094
1095 2013-09-25  Alex Christensen  <alex.christensen@flexsim.com>
1096
1097         Win64 compile fix after r155226.
1098         https://bugs.webkit.org/show_bug.cgi?id=120969
1099
1100         Reviewed by Brent Fulgham.
1101
1102         * WebCore.vcxproj/WebCore.vcxproj:
1103         Disable building StructuredExceptionHandlerSuppressor.cpp and makesafeseh.asm on Win64.
1104
1105 2013-09-25  Alexey Proskuryakov  <ap@apple.com>
1106
1107         Flaky Test: platform/mac/fonts/han-disunification.html
1108         https://bugs.webkit.org/show_bug.cgi?id=114207
1109
1110         Reviewed by Anders Carlsson.
1111
1112         This test was affected by preceding tests changing font settings.
1113
1114         Save original font if it's changed, and restore it in Backup::restoreTo().
1115
1116         * WebCore.exp.in:
1117         * testing/InternalSettings.cpp:
1118         (WebCore::InternalSettings::Backup::restoreTo):
1119         (WebCore::InternalSettings::setStandardFontFamily):
1120         (WebCore::InternalSettings::setSerifFontFamily):
1121         (WebCore::InternalSettings::setSansSerifFontFamily):
1122         (WebCore::InternalSettings::setFixedFontFamily):
1123         (WebCore::InternalSettings::setCursiveFontFamily):
1124         (WebCore::InternalSettings::setFantasyFontFamily):
1125         (WebCore::InternalSettings::setPictographFontFamily):
1126         * testing/InternalSettings.h:
1127
1128 2013-09-25  Brady Eidson  <beidson@apple.com>
1129
1130         Enable the IndexedDB build on Mac, but leave the feature non-functional
1131         https://bugs.webkit.org/show_bug.cgi?id=121918
1132
1133         Reviewed by Alexey Proskuryakov.
1134
1135         * Configurations/FeatureDefines.xcconfig: Enable the feature.
1136
1137         * Modules/indexeddb/IDBFactory.h:
1138         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
1139           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
1140
1141         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
1142           further use for it.
1143
1144 2013-09-25  Andreas Kling  <akling@apple.com>
1145
1146         Make EventTarget::hasEventListeners() a const method.
1147
1148         This class needs a lot of love in the const correctness department
1149         but for now let's limit ourselves to fixing the IndexedDB build.
1150
1151         * dom/EventTarget.h:
1152         (WebCore::EventTarget::hasEventListeners):
1153
1154 2013-09-25  Brent Fulgham  <bfulgham@apple.com>
1155
1156         [Windows] Refactor RuntimeEnabledFeatures as a Singleton
1157         https://bugs.webkit.org/show_bug.cgi?id=121883
1158
1159         Windows is experiencing crashes when client programs (such as
1160         DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
1161         object. The inlined static accessor methods are not accessing
1162         memory safely (when compiled by Visual Studio) resulting in
1163         crashes.
1164
1165         Reviewed by Jer Noble.
1166
1167         * WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
1168         * bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
1169         conform to a singleton pattern.
1170         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1171         (WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
1172         (WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
1173         (WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
1174         (WebCore::RuntimeEnabledFeatures::audioEnabled):
1175         (WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
1176         (WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
1177         (WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
1178         (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
1179         (WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
1180         (WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
1181         (WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
1182         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
1183         (WebCore::RuntimeEnabledFeatures::webSocketEnabled):
1184         (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
1185         (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
1186         * bindings/generic/RuntimeEnabledFeatures.h: Ditto.
1187         (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
1188         (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
1189         (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
1190         (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
1191         (WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
1192         (WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
1193         (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
1194         (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
1195         (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
1196         (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
1197         (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
1198         (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
1199         (WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
1200         (WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
1201         (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
1202         (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
1203         (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
1204         (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
1205         (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
1206         (WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
1207         (WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
1208         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
1209         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
1210         (WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
1211         (WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
1212         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
1213         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
1214         (WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
1215         (WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
1216         (WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
1217         (WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
1218         (WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
1219         (WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
1220         (WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
1221         (WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
1222         (WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
1223         (WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
1224         (WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
1225         (WebCore::RuntimeEnabledFeatures::touchEnabled):
1226         (WebCore::RuntimeEnabledFeatures::setTouchEnabled):
1227         (WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
1228         (WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
1229         (WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
1230         (WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
1231         (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
1232         (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
1233         (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
1234         (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
1235         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
1236         (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
1237         (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
1238         (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
1239         (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
1240         (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
1241         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
1242         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
1243         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
1244         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
1245         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
1246         (WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
1247         (WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
1248         (WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
1249         (WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
1250         (WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
1251         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
1252         (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
1253         (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
1254         (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
1255         (WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
1256         (WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
1257         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
1258         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
1259         (WebCore::RuntimeEnabledFeatures::quotaEnabled):
1260         (WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
1261         (WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
1262         (WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
1263         (WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
1264         (WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
1265         (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
1266         (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
1267         (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
1268         (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
1269         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
1270         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
1271         (WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
1272         (WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
1273         (WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
1274         (WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
1275         (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
1276         (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
1277         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
1278         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
1279         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
1280         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
1281         (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
1282         (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
1283         (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
1284         (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
1285         (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
1286         (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
1287         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
1288         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
1289         (WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
1290         (WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
1291         (WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
1292         (WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
1293         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1294         (WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
1295         (WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
1296         * bindings/scripts/CodeGeneratorJS.pm:
1297         (GetRuntimeEnableFunctionName): Generate singleton version of
1298         accessors.
1299         * css/CSSFontFace.cpp:
1300         (WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
1301         (WebCore::CSSFontFace::getFontData): Ditto.
1302         * css/CSSFontSelector.cpp:
1303         (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
1304         * css/CSSParser.cpp:
1305         (WebCore::isSimpleLengthPropertyID): Ditto.
1306         (WebCore::isValidKeywordPropertyAndValue):
1307         (WebCore::CSSParser::parseValue):
1308         (WebCore::CSSParser::rewriteSpecifiers):
1309         * css/CSSSegmentedFontFace.cpp:
1310         (WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
1311         * css/StyleResolver.h:
1312         (WebCore::StyleResolver::ensureScopeResolver): Ditto.
1313         * dom/Document.cpp:
1314         (WebCore::Document::cssRegionsEnabled): Ditto.
1315         (WebCore::Document::cssCompositingEnabled):
1316         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
1317         (WebCore::Document::getCachedLocale):
1318         * dom/Element.cpp:
1319         (WebCore::Element::createShadowRoot): Ditto.
1320         * dom/Position.cpp:
1321         (WebCore::Position::Position): Ditto.
1322         (WebCore::Position::findParent):
1323         * dom/TreeScope.cpp:
1324         (WebCore::TreeScope::getSelection): Ditto.
1325         * dom/make_names.pl:
1326         (printConstructorInterior): Generate singleton version of accessors.
1327         (printWrapperFunctions): Ditto.
1328         * html/HTMLInputElement.cpp:
1329         (WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
1330         (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
1331         * html/HTMLMediaElement.cpp:
1332         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
1333         (WebCore::HTMLMediaElement::scheduleDelayedAction):
1334         (WebCore::HTMLMediaElement::loadTimerFired):
1335         (WebCore::HTMLMediaElement::prepareForLoad):
1336         (WebCore::HTMLMediaElement::loadInternal):
1337         (WebCore::HTMLMediaElement::setReadyState):
1338         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
1339         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
1340         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
1341         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
1342         (WebCore::HTMLMediaElement::addAudioTrack):
1343         (WebCore::HTMLMediaElement::addTextTrack):
1344         (WebCore::HTMLMediaElement::addVideoTrack):
1345         (WebCore::HTMLMediaElement::removeAudioTrack):
1346         (WebCore::HTMLMediaElement::removeTextTrack):
1347         (WebCore::HTMLMediaElement::removeVideoTrack):
1348         (WebCore::HTMLMediaElement::audioTracks):
1349         (WebCore::HTMLMediaElement::textTracks):
1350         (WebCore::HTMLMediaElement::videoTracks):
1351         (WebCore::HTMLMediaElement::didAddTextTrack):
1352         (WebCore::HTMLMediaElement::didRemoveTextTrack):
1353         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1354         (WebCore::HTMLMediaElement::userCancelledLoad):
1355         (WebCore::HTMLMediaElement::hasClosedCaptions):
1356         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
1357         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
1358         * html/HTMLStyleElement.cpp:
1359         (WebCore::HTMLStyleElement::parseAttribute): Ditto.
1360         (WebCore::HTMLStyleElement::scopedAttributeChanged):
1361         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
1362         (WebCore::HTMLStyleElement::scoped):
1363         * html/HTMLTrackElement.cpp:
1364         (WebCore::HTMLTrackElement::parseAttribute): Ditto.
1365         (WebCore::HTMLTrackElement::scheduleLoad):
1366         (WebCore::HTMLTrackElement::canLoadUrl):
1367         * html/InputType.cpp:
1368         (WebCore::createInputTypeFactoryMap): Ditto.
1369         * page/ContentSecurityPolicy.cpp:
1370         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
1371         * page/DOMWindow.cpp:
1372         (WebCore::DOMWindow::addEventListener): Ditto.
1373         * page/FrameView.cpp:
1374         (WebCore::FrameView::performPostLayoutTasks): Ditto.
1375         * testing/InternalSettings.cpp:
1376         (WebCore::InternalSettings::Backup::Backup): Ditto.
1377         (WebCore::InternalSettings::Backup::restoreTo):
1378         (WebCore::InternalSettings::setShadowDOMEnabled):
1379         (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
1380         (WebCore::InternalSettings::setStyleScopedEnabled):
1381         (WebCore::InternalSettings::setCSSExclusionsEnabled):
1382         (WebCore::InternalSettings::setCSSShapesEnabled):
1383         (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
1384
1385 2013-09-25  Andreas Kling  <akling@apple.com>
1386
1387         Unreviewed build fix for IDBDatabase.
1388
1389         Turns out there was a much cleaner way to express this.
1390
1391 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
1392
1393         Tie the life of DocumentStyleSheetCollection and Document together
1394         https://bugs.webkit.org/show_bug.cgi?id=121892
1395
1396         Reviewed by Andreas Kling.
1397
1398         DocumentStyleSheetCollection had an odd destruction pattern for no apparent reason.
1399
1400         The two objects strictly depend on eachother, this patch make that explicit by making
1401         DocumentStyleSheetCollection a plain object in Document's memory space.
1402
1403         * css/CSSStyleSheet.cpp:
1404         (WebCore::CSSStyleSheet::didMutateRules):
1405         * css/DocumentRuleSets.cpp:
1406         (WebCore::DocumentRuleSets::initUserStyle):
1407         * css/DocumentRuleSets.h:
1408         * css/InspectorCSSOMWrappers.cpp:
1409         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
1410         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
1411         * css/InspectorCSSOMWrappers.h:
1412         * css/SelectorChecker.cpp:
1413         (WebCore::SelectorChecker::matchRecursively):
1414         (WebCore::SelectorChecker::checkOne):
1415         * css/StyleResolver.cpp:
1416         (WebCore::StyleResolver::StyleResolver):
1417         * css/StyleSheetList.cpp:
1418         (WebCore::StyleSheetList::styleSheets):
1419         (WebCore::StyleSheetList::detachFromDocument):
1420         * dom/Document.cpp:
1421         (WebCore::Document::Document):
1422         (WebCore::Document::~Document):
1423         (WebCore::Document::setCompatibilityMode):
1424         (WebCore::Document::recalcStyle):
1425         (WebCore::Document::createStyleResolver):
1426         (WebCore::Document::processHttpEquiv):
1427         (WebCore::Document::preferredStylesheetSet):
1428         (WebCore::Document::selectedStylesheetSet):
1429         (WebCore::Document::setSelectedStylesheetSet):
1430         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
1431         (WebCore::Document::styleResolverChanged):
1432         (WebCore::Document::haveStylesheetsLoaded):
1433         * dom/Document.h:
1434         (WebCore::Document::styleSheetCollection):
1435         * dom/DocumentStyleSheetCollection.cpp:
1436         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1437         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
1438         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
1439         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
1440         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
1441         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
1442         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
1443         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
1444         (WebCore::DocumentStyleSheetCollection::addAuthorSheet):
1445         (WebCore::DocumentStyleSheetCollection::addUserSheet):
1446         (WebCore::DocumentStyleSheetCollection::removePendingSheet):
1447         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
1448         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1449         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
1450         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
1451         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1452         * dom/DocumentStyleSheetCollection.h:
1453         * dom/Element.cpp:
1454         (WebCore::Element::createPseudoElementIfNeeded):
1455         * dom/InlineStyleSheetOwner.cpp:
1456         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1457         (WebCore::InlineStyleSheetOwner::removedFromDocument):
1458         (WebCore::InlineStyleSheetOwner::clearDocumentData):
1459         (WebCore::InlineStyleSheetOwner::createSheet):
1460         (WebCore::InlineStyleSheetOwner::sheetLoaded):
1461         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1462         * dom/ProcessingInstruction.cpp:
1463         (WebCore::ProcessingInstruction::~ProcessingInstruction):
1464         (WebCore::ProcessingInstruction::checkStyleSheet):
1465         (WebCore::ProcessingInstruction::sheetLoaded):
1466         (WebCore::ProcessingInstruction::insertedInto):
1467         (WebCore::ProcessingInstruction::removedFrom):
1468         * html/HTMLLinkElement.cpp:
1469         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1470         (WebCore::HTMLLinkElement::insertedInto):
1471         (WebCore::HTMLLinkElement::removedFrom):
1472         (WebCore::HTMLLinkElement::addPendingSheet):
1473         (WebCore::HTMLLinkElement::removePendingSheet):
1474         * html/HTMLQuoteElement.cpp:
1475         (WebCore::HTMLQuoteElement::insertedInto):
1476         * html/HTMLViewSourceDocument.cpp:
1477         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1478         * inspector/InspectorCSSAgent.cpp:
1479         (WebCore::InspectorCSSAgent::willMatchRule):
1480         * inspector/InspectorCSSAgent.h:
1481         * inspector/InspectorInstrumentation.cpp:
1482         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
1483         * inspector/InspectorInstrumentation.h:
1484         (WebCore::InspectorInstrumentation::willMatchRule):
1485         * mathml/MathMLMathElement.cpp:
1486         (WebCore::MathMLMathElement::insertedInto):
1487         * page/Page.cpp:
1488         (WebCore::Page::userStyleSheetLocationChanged):
1489         * page/PageGroup.cpp:
1490         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
1491         * rendering/RenderBlock.cpp:
1492         (WebCore::RenderBlock::lineHeight):
1493         (WebCore::RenderBlock::updateFirstLetter):
1494         * rendering/RenderInline.cpp:
1495         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1496         (WebCore::RenderInline::lineHeight):
1497         * rendering/RenderLineBreak.cpp:
1498         (WebCore::RenderLineBreak::lineHeight):
1499         * rendering/RenderObject.cpp:
1500         (WebCore::RenderObject::uncachedFirstLineStyle):
1501         (WebCore::RenderObject::cachedFirstLineStyle):
1502         * rendering/RenderObject.h:
1503         (WebCore::RenderObject::firstLineStyle):
1504         * rendering/RootInlineBox.cpp:
1505         (WebCore::RootInlineBox::verticalPositionForBox):
1506         * style/StyleResolveTree.cpp:
1507         (WebCore::Style::resolveLocal):
1508         * testing/Internals.cpp:
1509         (WebCore::Internals::insertAuthorCSS):
1510         (WebCore::Internals::insertUserCSS):
1511
1512 2013-09-25  Brady Eidson  <beidson@apple.com>
1513
1514         FeatureDefine.xcconfig cleanup (They should all be identical).
1515         https://bugs.webkit.org/show_bug.cgi?id=121921
1516
1517         Reviewed by Mark Rowe.
1518
1519         * Configurations/FeatureDefines.xcconfig:
1520
1521 2013-09-25  Andreas Kling  <akling@apple.com>
1522
1523         JS wrappers should have strongly typed impl() functions.
1524         <https://webkit.org/b/121919>
1525
1526         Reviewed by Geoffrey Garen.
1527
1528         Generate strongly typed JSFoo::impl() functions for all wrappers,
1529         not just those marked with JSGenerateToNativeObject.
1530
1531         Removed 8.8 million static_casts that are no longer needed.
1532
1533 2013-09-24  Roger Fong  <roger_fong@apple.com>
1534
1535         [Windows] Overpanning occurs even when what is being panned isn't the main document.
1536         https://bugs.webkit.org/show_bug.cgi?id=121885.
1537         <rdar://problem/15072332>.
1538
1539         Reviewed by Brent Fulgham.
1540
1541         No new functionality added.
1542
1543         * rendering/RenderLayer.cpp:
1544         (WebCore::RenderLayer::scrollByRecursively):
1545         * rendering/RenderLayer.h:
1546
1547 2013-09-25  Andreas Kling  <akling@apple.com>
1548
1549         Reduce repetitive EventTarget subclassing.
1550         <https://webkit.org/b/121915>
1551
1552         Reviewed by Antti Koivisto.
1553
1554         Add a EventTargetWithInlineData helper class to EventTarget.h.
1555         It's a simple subclass with an EventTargetData member and FINAL
1556         eventTargetData()/ensureEventTargetData() overrides.
1557
1558         Turns out that this fits almost every use case except Node and
1559         SVGElementInstance.
1560
1561         Inlined most of the FINAL EventTarget overrides since they will
1562         be called on tight pointers by generated bindings code and this
1563         removes the need for virtual dispatch.
1564
1565         Spammed OVERRIDE FINAL as appropriate, we can't make the whole
1566         classes FINAL until bug 121747 is fixed, so added FIXMEs.
1567
1568 2013-09-25  Sam White  <samuel_white@apple.com>
1569
1570         AX: WebKit doesn't map aria-sort=other on OS X
1571         https://bugs.webkit.org/show_bug.cgi?id=118511
1572
1573         Reviewed by Chris Fleizach.
1574
1575         No new tests, updated existing aria-sort test to validate addition of "other"
1576         sort order per http://www.w3.org/TR/wai-aria/complete#aria-sort.
1577
1578         * accessibility/AccessibilityObject.cpp:
1579         (WebCore::AccessibilityObject::sortDirection):
1580         * accessibility/AccessibilityObject.h:
1581
1582 2013-09-24  Sam Weinig  <sam@webkit.org>
1583
1584         CTTE: More Document references please
1585         https://bugs.webkit.org/show_bug.cgi?id=121893
1586
1587         Reviewed by Anders Carlsson.
1588
1589         * Thread even more Document&s around. *
1590
1591 2013-09-25  Anders Carlsson  <andersca@apple.com>
1592
1593         HasMemoryCostMemberFunction should work for final classes
1594         https://bugs.webkit.org/show_bug.cgi?id=121747
1595
1596         Reviewed by Sam Weinig.
1597
1598         Use decltype to check for the memoryCost() member function. This doesn't check that the return type is size_t, but
1599         the build will fail anyway if that's the case (or if the return type is not convertible to size_t).
1600
1601         * bindings/js/JSDOMBinding.h:
1602
1603 2013-09-25  Brady Eidson  <beidson@apple.com>
1604
1605         More refactoring to make the LevelDB dependencies of IDB more obvious.
1606         https://bugs.webkit.org/show_bug.cgi?id=121880
1607
1608         Reviewed by Alexey Proskuryakov.
1609
1610         This patch does three things:
1611         1 - Moves some files to the indexeddb/leveldb subdirectory, renaming them in the process.
1612         2 - Renames some classes.
1613         3 - Adds "USE(LEVELDB)" guards in addition to the ENABLE(INDEXED_DATABASE) guard for those files.
1614
1615         Project file updates:
1616         * GNUmakefile.am:
1617         * GNUmakefile.list.am:
1618         * Target.pri:
1619         * WebCore.xcodeproj/project.pbxproj:
1620         * WebCore.vcxproj/WebCore.vcxproj:
1621
1622         File renames, class renames, and USE(LEVELDB) guards:
1623         * Modules/indexeddb/IDBBackingStore.cpp: Removed.
1624         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
1625         (WebCore::IDBFactoryBackendInterface::create): Add a null return if USE(LEVELDB) is disabled as a stop gap measure until
1626           there is a non-LevelDB impl.
1627         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1628         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.h.
1629         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
1630         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
1631         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
1632         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
1633         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp.
1634         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h.
1635         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1636         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1637         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp.
1638         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h.
1639         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
1640         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
1641         * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
1642         * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
1643
1644
1645 2013-09-25  Antti Koivisto  <antti@apple.com>
1646
1647         REGRESSION (r156355) Links / interactive elements inside nested tables are unclickable
1648         https://bugs.webkit.org/show_bug.cgi?id=121904
1649
1650         Reviewed by Andreas Kling.
1651
1652         Test: fast/table/hittest-self-painting.html
1653         
1654         Original reduction by Philippe Wittenbergh.
1655
1656         * rendering/RenderTableRow.cpp:
1657         (WebCore::RenderTableRow::styleDidChange):
1658         
1659             Tighten a bit.
1660
1661         (WebCore::RenderTableRow::nodeAtPoint):
1662         * rendering/RenderTableSection.cpp:
1663         (WebCore::RenderTableSection::nodeAtPoint):
1664         
1665             These flipped accidentally in r156355.
1666
1667 2013-09-25  Alberto Garcia  <berto@igalia.com>
1668
1669         Fix warning in makeprop.pl
1670         https://bugs.webkit.org/show_bug.cgi?id=121900
1671
1672         Reviewed by Ryosuke Niwa.
1673
1674         %nameIsInherited and %nameToId were incorrectly initialized using
1675         references instead of lists.
1676
1677         Anyway there's no need to initialize those variables explicitly,
1678         they're already empty by default.
1679
1680         * css/makeprop.pl:
1681
1682 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1683
1684         REGRESSION(r156393): Build with !ENABLE(SVG_FONTS) broken
1685
1686         Unreviewed build-fix.
1687
1688         Protect SVG font code with #ifdef ENABLE(SVG_FONTS).
1689
1690         * platform/graphics/WidthIterator.cpp:
1691         (WebCore::applyFontTransforms):
1692
1693 2013-09-25  Commit Queue  <commit-queue@webkit.org>
1694
1695         Unreviewed, rolling out r156272.
1696         http://trac.webkit.org/changeset/156272
1697         https://bugs.webkit.org/show_bug.cgi?id=121909
1698
1699         Has no real effect (Requested by carewolf on #webkit).
1700
1701         * platform/graphics/qt/TileQt.cpp:
1702         (WebCore::TileQt::updateBackBuffer):
1703
1704 2013-09-25  Andreas Kling  <akling@apple.com>
1705
1706         Move wheel event dispatch from Node to Element.
1707         <https://webkit.org/b/121908>
1708
1709         Reviewed by Anders Carlsson.
1710
1711         Wheel events are only ever dispatched on Elements, so move the logic out of Node.
1712
1713         Had to make RenderBox::scroll() and friends return a stopElement instead of a
1714         stopNode (out argument) to make this work, though it was only ever returning
1715         Elements there anyway.
1716
1717 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1718
1719         [Qt] Fix build with !ENABLE(BLOB) after r156330
1720
1721         Unreviewed build-fix.
1722
1723         * platform/network/qt/ResourceRequestQt.cpp:
1724         (WebCore::ResourceRequest::toNetworkRequest):
1725
1726 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1727
1728         Support kerning with SVG web fonts
1729         https://bugs.webkit.org/show_bug.cgi?id=117540
1730
1731         Reviewed by Stephen Chenney.
1732
1733         Adds the glue to WidthIterator to take advantage of kerning in SVG web fonts.
1734         To supply SVG font kerning with its required text input, the signature of
1735         applyFontTransforms has been extended.
1736
1737         Since SVG font kerning was extremely slow, it has been sped up by replacing
1738         the iteration over all possible kerning definitions with a hash-map based
1739         lookup of the leading symbol to be kerned. The new algorithm provides a
1740         roughly 100x speed-up in SVG font kerning.
1741
1742         Test: fast/text/svg-font-face-with-kerning.html
1743
1744         * platform/graphics/TextRun.h:
1745         (WebCore::TextRun::string):
1746         * platform/graphics/WidthIterator.cpp:
1747         (WebCore::applyFontTransforms):
1748         (WebCore::WidthIterator::advanceInternal):
1749         * rendering/svg/SVGTextRunRenderingContext.cpp:
1750         (WebCore::SVGTextRunRenderingContext::applySVGKerning):
1751         * rendering/svg/SVGTextRunRenderingContext.h:
1752         * svg/SVGFontElement.cpp:
1753         (WebCore::SVGFontElement::invalidateGlyphCache):
1754         (WebCore::SVGFontElement::ensureGlyphCache):
1755         (WebCore::SVGKerningMap::clear):
1756         (WebCore::SVGKerningMap::insert):
1757         (WebCore::stringMatchesUnicodeRange):
1758         (WebCore::stringMatchesGlyphName):
1759         (WebCore::stringMatchesUnicodeName):
1760         (WebCore::matches):
1761         (WebCore::kerningForPairOfStringsAndGlyphs):
1762         (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs):
1763         (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs):
1764         * svg/SVGFontElement.h:
1765         (WebCore::SVGKerning::SVGKerning):
1766         (WebCore::SVGKerningMap::isEmpty):
1767         * svg/SVGHKernElement.cpp:
1768         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
1769         * svg/SVGHKernElement.h:
1770         * svg/SVGVKernElement.cpp:
1771         (WebCore::SVGVKernElement::buildVerticalKerningPair):
1772         * svg/SVGVKernElement.h:
1773
1774 2013-09-25  Andrei Parvu  <parvu@adobe.com>
1775
1776         <https://webkit.org/b/120476> [CSS Masking] Implement luminance masking
1777
1778         Added implementation for luminance masking. A luminance mask is applied by transforming its RGB values into
1779         an alpha value, using luminance-to-alpha coefficients. Because this conversion is already implemented in
1780         the ImageBuffer class, we used it in our implementation.
1781
1782         Reviewed by Dirk Schulze.
1783
1784         Tests: css3/masking/mask-luminance-gradient.html
1785                css3/masking/mask-luminance-png.html
1786                css3/masking/mask-luminance-svg.html
1787
1788         * platform/graphics/BitmapImage.cpp: Add a drawPattern method, in which an ImageBuffer is created and converted from alpha to luminance, if there is a luminance mask.
1789         (WebCore::BitmapImage::BitmapImage):
1790         (WebCore::BitmapImage::drawPattern):
1791         * platform/graphics/BitmapImage.h:
1792         * platform/graphics/GeneratorGeneratedImage.cpp: Convert the ImageBuffer to luminance, if necessary.
1793         (WebCore::GeneratorGeneratedImage::drawPattern):
1794         * platform/graphics/GraphicsContext.cpp: Add methods which set and check if a luminance mask is drawn.
1795         (WebCore::GraphicsContext::setDrawLuminanceMask):
1796         (WebCore::GraphicsContext::drawLuminanceMask):
1797         * platform/graphics/GraphicsContext.h: Add property to ContextState for luminance drawing.
1798         (WebCore::GraphicsContextState::GraphicsContextState):
1799         * rendering/RenderBoxModelObject.cpp: Set the luminance property of the mask, if the layer has a mask source type of luminance.
1800         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1801         * svg/graphics/SVGImage.cpp: Convert the ImageBuffer to luminance, if necessary.
1802         (WebCore::SVGImage::drawPatternForContainer):
1803         * svg/graphics/SVGImageForContainer.cpp: Pass the luminance property to the SVG image.
1804         (WebCore::SVGImageForContainer::drawPattern):
1805
1806 2013-09-25  Andreas Kling  <akling@apple.com>
1807
1808         Remove EventPathWalker.
1809         <https://webkit.org/b/121890>
1810
1811         Reviewed by Antti Koivisto.
1812
1813         Purge some more leftover Shadow DOM code.
1814
1815         * dom/EventPathWalker.cpp:
1816         * dom/EventPathWalker.h:
1817
1818             Removed.
1819
1820         * dom/EventRetargeter.cpp:
1821         (WebCore::nodeOrHostIfPseudoElement):
1822         (WebCore::EventRetargeter::calculateEventPath):
1823         (WebCore::EventRetargeter::buildRelatedNodeMap):
1824
1825             If starting at a pseudo element, e.g for events originating from
1826             a transition on :before/:after, retarget to the pseudo element's
1827             host as appropriate. This was the only real "feature" we were
1828             using in EventPathWalker.
1829
1830         * page/EventHandler.cpp:
1831         (WebCore::EventHandler::handleMouseDraggedEvent):
1832         (WebCore::EventHandler::updateDragAndDrop):
1833         (WebCore::EventHandler::updateMouseEventTargetNode):
1834         (WebCore::EventHandler::handleWheelEvent):
1835         (WebCore::EventHandler::handleTouchEvent):
1836
1837             Replace use of EventPathWalker with parentOrShadowHostElement()
1838             parent chain climbing.
1839
1840 2013-09-25  Gurpreet Kaur  <k.gurpreet@samsung.com>
1841
1842         :read-write pseudo-class should not be applied on <input type="text" disabled>
1843         https://bugs.webkit.org/show_bug.cgi?id=118236
1844
1845         Reviewed by Darin Adler.
1846
1847         The :read-write pseudo-class must match any element falling into one
1848         of the following categories i.e
1849         input elements to which the readonly attribute applies, and that are mutable
1850         (i.e. that do not have the readonly attribute specified and that are not disabled)
1851         textarea elements that do not have a readonly attribute, and that are not disabled
1852         elements that are editing hosts or editable and are neither input elements nor
1853         textarea elements.
1854
1855         Test: fast/css/readwrite-pseudoclass-input.html
1856
1857         * html/HTMLInputElement.cpp:
1858         (WebCore::HTMLInputElement::matchesReadWritePseudoClass):
1859         * html/HTMLTextAreaElement.cpp:
1860         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
1861         Checking for both readonly and disabled attribute on input ane textarea element.
1862
1863 2013-09-25  Krzysztof Czech  <k.czech@samsung.com>
1864
1865         [EFL] accessibility/loading-iframe-sends-notification.html is failing
1866         https://bugs.webkit.org/show_bug.cgi?id=112003
1867
1868         Reviewed by Mario Sanchez Prada.
1869
1870         Enabled AXLayoutComplete on EFL platform.
1871
1872         * dom/Document.cpp:
1873         (WebCore::Document::implicitClose):
1874         * page/FrameView.cpp:
1875         (WebCore::FrameView::layout):
1876
1877 2013-09-24  Commit Queue  <commit-queue@webkit.org>
1878
1879         Unreviewed, rolling out r156379.
1880         http://trac.webkit.org/changeset/156379
1881         https://bugs.webkit.org/show_bug.cgi?id=121894
1882
1883         Caused many assertion failures (Requested by ap on #webkit).
1884
1885         * css/CSSValue.cpp:
1886         (WebCore::CSSValue::destroy):
1887         * css/StyleResolver.cpp:
1888         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1889         (WebCore::StyleResolver::createFilterOperations):
1890         * css/TransformFunctions.cpp:
1891         (WebCore::transformsForValue):
1892         * css/WebKitCSSArrayFunctionValue.h:
1893         * css/WebKitCSSFilterValue.h:
1894         * css/WebKitCSSMatFunctionValue.h:
1895         * css/WebKitCSSMixFunctionValue.h:
1896         * css/WebKitCSSSVGDocumentValue.h:
1897         * css/WebKitCSSShaderValue.h:
1898         (WebCore::toWebKitCSSShaderValue):
1899         * css/WebKitCSSTransformValue.h:
1900
1901 2013-09-24  Ryosuke Niwa  <rniwa@webkit.org>
1902
1903         Crash in Document::setFocusedElement
1904         https://bugs.webkit.org/show_bug.cgi?id=121888
1905
1906         Reviewed by Andreas Kling.
1907
1908         Merge https://chromium.googlesource.com/chromium/blink/+/4a594a3de7d9761462b55fb27a6850d767419af2
1909
1910         The crash was caused by attempting to call Chrome:focusedNodeChanged() after m_page had already
1911         been cleared. This could happen when blur's event handler removes the iframe from which
1912         the focus had been moved. Fixed the bug by adding a null pointer check.
1913
1914         Test: fast/events/blur-remove-parent-crash.html
1915
1916         * dom/Document.cpp:
1917         (WebCore::Document::setFocusedElement):
1918
1919 2013-09-24  Antti Koivisto  <antti@apple.com>
1920
1921         Remove HTMLContentElement
1922         https://bugs.webkit.org/show_bug.cgi?id=121891
1923
1924         Reviewed by Andreas Kling.
1925
1926         Remove an unsused Shadow DOM type.
1927
1928         * DerivedSources.make:
1929         * WebCore.exp.in:
1930         * WebCore.xcodeproj/project.pbxproj:
1931         * html/HTMLDetailsElement.cpp:
1932         * html/HTMLSummaryElement.cpp:
1933         * html/HTMLTagNames.in:
1934         * html/shadow/ContentDistributor.cpp:
1935         * html/shadow/HTMLContentElement.cpp: Removed.
1936         * html/shadow/HTMLContentElement.h: Removed.
1937         * html/shadow/HTMLContentElement.idl: Removed.
1938         * html/shadow/InsertionPoint.h:
1939         (WebCore::InsertionPoint::matchTypeFor):
1940         * testing/Internals.cpp:
1941         * testing/Internals.h:
1942         * testing/Internals.idl:
1943
1944 2013-09-24  Benjamin Poulain  <benjamin@webkit.org>
1945
1946         Remove a contradiction from SelectorChecker
1947         https://bugs.webkit.org/show_bug.cgi?id=121881
1948
1949         Reviewed by Andreas Kling.
1950
1951         The matching code for PseudoHover and PseudoActive is done on the current
1952         selector pseudo type. The current selector match type must be CSSSelector::PseudoClass
1953         in order to reach this code. Consequently, selector->m_match == CSSSelector::Tag can
1954         never be true.
1955
1956         * css/SelectorChecker.cpp:
1957         (WebCore::SelectorChecker::checkOne):
1958
1959 2013-09-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1960
1961         Add toWebKitCSS*Value functions to cast from CSSValue
1962         https://bugs.webkit.org/show_bug.cgi?id=121776
1963
1964         Reviewed by Darin Adler.
1965
1966         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
1967
1968         No new tests, no behavior change.
1969
1970         * css/CSSValue.cpp:
1971         (WebCore::CSSValue::destroy):
1972         * css/StyleResolver.cpp:
1973         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1974         (WebCore::StyleResolver::createFilterOperations):
1975         * css/TransformFunctions.cpp:
1976         (WebCore::transformsForValue):
1977         * css/WebKitCSSArrayFunctionValue.h:
1978         (WebCore::toWebKitCSSArrayFunctionValue):
1979         * css/WebKitCSSFilterValue.h:
1980         (WebCore::toWebKitCSSFilterValue):
1981         * css/WebKitCSSMatFunctionValue.h:
1982         (WebCore::toWebKitCSSMatFunctionValue):
1983         * css/WebKitCSSMixFunctionValue.h:
1984         (WebCore::toWebKitCSSMixFunctionValue):
1985         * css/WebKitCSSSVGDocumentValue.h:
1986         (WebCore::toWebKitCSSSVGDocumentValue):
1987         * css/WebKitCSSShaderValue.h:
1988         (WebCore::toWebKitCSSShaderValue):
1989         * css/WebKitCSSTransformValue.h:
1990         (WebCore::toWebKitCSSTransformValue):
1991
1992 2013-09-24  Antti Koivisto  <antti@apple.com>
1993
1994         Clean up some uses of first/lastChildSlow
1995         https://bugs.webkit.org/show_bug.cgi?id=121882
1996
1997         Reviewed by Andreas Kling.
1998
1999         Tighten typing and use first/lastChild instead.
2000
2001         * dom/Position.cpp:
2002         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
2003         (WebCore::Position::isCandidate):
2004         (WebCore::Position::getInlineBoxAndOffset):
2005         * dom/Position.h:
2006         * dom/PositionIterator.cpp:
2007         (WebCore::PositionIterator::isCandidate):
2008         * editing/CompositeEditCommand.cpp:
2009         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2010         * rendering/RenderBlock.cpp:
2011         (WebCore::canMergeAnonymousBlock):
2012         (WebCore::canMergeContiguousAnonymousBlocks):
2013         (WebCore::RenderBlock::firstLineBlock):
2014         (WebCore::RenderBlock::updateFirstLetter):
2015         * rendering/RenderRegion.cpp:
2016         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2017         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2018         * rendering/RenderRegion.h:
2019         * rendering/RenderRuby.cpp:
2020         (WebCore::rubyBeforeBlock):
2021         (WebCore::rubyAfterBlock):
2022         (WebCore::lastRubyRun):
2023         * rendering/RenderTreeAsText.cpp:
2024         (WebCore::write):
2025         (WebCore::writeCounterValuesFromChildren):
2026         * rendering/svg/RenderSVGText.cpp:
2027         (WebCore::findPreviousAndNextAttributes):
2028         * style/StyleResolveTree.cpp:
2029         (WebCore::Style::textRendererIsNeeded):
2030
2031 2013-09-24  Mark Lam  <mark.lam@apple.com>
2032
2033         Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame.
2034         https://bugs.webkit.org/show_bug.cgi?id=121867.
2035
2036         Reviewed by Geoffrey Garen.
2037
2038         No new tests.
2039
2040         * bindings/js/ScriptDebugServer.cpp:
2041         (WebCore::ScriptDebugServer::createCallFrame):
2042         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
2043         (WebCore::ScriptDebugServer::callEvent):
2044         (WebCore::ScriptDebugServer::atStatement):
2045         (WebCore::ScriptDebugServer::returnEvent):
2046         (WebCore::ScriptDebugServer::exception):
2047         (WebCore::ScriptDebugServer::willExecuteProgram):
2048         (WebCore::ScriptDebugServer::didExecuteProgram):
2049         (WebCore::ScriptDebugServer::didReachBreakpoint):
2050         * bindings/js/ScriptDebugServer.h:
2051         * bindings/js/WorkerScriptDebugServer.cpp:
2052         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
2053         * bindings/js/WorkerScriptDebugServer.h:
2054
2055 2013-09-24  Andreas Kling  <akling@apple.com>
2056
2057         Move keyboard event dispatch from Node to Element.
2058         <https://webkit.org/b/121873>
2059
2060         Reviewed by Antti Koivisto.
2061
2062         We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
2063
2064         * dom/Document.cpp:
2065         (WebCore::eventTargetElementForDocument):
2066
2067             Reworked to return Element instead of Node.
2068
2069         * dom/Document.h:
2070         * dom/Element.h:
2071         * dom/Element.cpp:
2072         (WebCore::Element::dispatchKeyEvent):
2073
2074             Moved from Node to Element.
2075
2076         * editing/AlternativeTextController.cpp:
2077         (WebCore::AlternativeTextController::insertDictatedText):
2078         * page/EventHandler.cpp:
2079         (WebCore::EventHandler::keyEvent):
2080         (WebCore::EventHandler::handleTextInputEvent):
2081
2082             Adjusted for above changes.
2083
2084 2013-09-24  Zoltan Horvath  <zoltan@webkit.org>
2085
2086         [CSS Shapes] Modify updateSegmentsForShapes function to use logical coordinates
2087         https://bugs.webkit.org/show_bug.cgi?id=121864
2088
2089         Reviewed by David Hyatt.
2090
2091         When I landed updateSegmentsForShapes in r156022, I didn't use logical coordinates. This change modifies the
2092         code to use coordinates for positioning the float and the content around the float in a shape-inside. Now I
2093         added only one writing mode tests, but I will add more later in bug #121866.
2094
2095         Test: fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html
2096
2097         * rendering/FloatingObjects.h:
2098         (WebCore::FloatingObject::logicalHeight):
2099         * rendering/RenderBlock.cpp:
2100         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2101         * rendering/RenderBlockLineLayout.cpp:
2102         (WebCore::updateSegmentsForShapes):
2103
2104 2013-09-24  Brady Eidson  <beidson@apple.com>
2105
2106         Remove IDBTransactionCallbacks.h from the .xcodeproj, as it's gone from the repository.
2107
2108         Rubberstamped by Anders Carlsson and Alexey Proskuryakov.
2109
2110         * WebCore.xcodeproj/project.pbxproj:
2111
2112 2013-09-24  Antti Koivisto  <antti@apple.com>
2113
2114         Tighten table rendering code
2115         https://bugs.webkit.org/show_bug.cgi?id=121860
2116
2117         Reviewed by Andreas Kling.
2118
2119         Hide firstChild/lastChild/nextSibling/previousSibling in table renderers, 
2120         expose correctly typed firstRow/nextCell etc instead.
2121
2122 2013-09-24  Dean Jackson  <dino@apple.com>
2123
2124         Implement symbol name hashing for WebGL shaders
2125         https://bugs.webkit.org/show_bug.cgi?id=121849
2126
2127         Reviewed by Anders Carlsson.
2128
2129         Turn on ANGLE's symbol name mapping for shader programs.
2130         This avoids compilation failures (or worse, crashers)
2131         on some hardware that doesn't like it when shaders redefine
2132         symbols like "sin", even though that is valid.
2133
2134         The way ANGLE exposes this is via setting a pointer
2135         to a char* -> uint64_t hash function. Since we only have
2136         a 32-bit hash in WebKit, I combine the 32-bit value with
2137         a counter value that exists over the lifetime of a GC3D context.
2138         Before calling ANGLE, I point the global hash map to the local
2139         hash map, and then clean up after we're done. This introduces
2140         a memory hit, in that the symbol table will build up until
2141         the context is released.
2142
2143         Covered by Khronos WebGL tests, including
2144         conformance/glsl/misc/shader-with-non-reserved-words.html
2145
2146         * platform/graphics/GraphicsContext3D.h: Define a ShaderNameHash type,
2147         and add an OwnPtr to one as a member variable.
2148         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2149         (WebCore::nameHashForShader): Global function used for ANGLE hashing.
2150         (WebCore::GraphicsContext3D::compileShader): Set up the ANGLE properties,
2151         point to the local hash map, and call compile/translate.
2152
2153 2013-09-24  Dean Jackson  <dino@apple.com>
2154
2155         Use mapped name in attribute location binding
2156         https://bugs.webkit.org/show_bug.cgi?id=121847
2157         <rdar://problem/15067526>
2158
2159         Reviewed by Eric Carlson.
2160
2161         The shader that we send down to OpenGL to compile
2162         may have been translated by ANGLE, so we keep a
2163         table around that maps input symbols to output symbols.
2164         We used the table when binding to and looking up
2165         uniforms, and when looking up attributes, but not
2166         when actually binding to attribute locations.
2167
2168         Test: fast/canvas/webgl/gl-bind-attrib-mapped-names.html
2169
2170         * platform/graphics/ANGLEWebKitBridge.cpp:
2171         (WebCore::getSymbolInfo): Add logging of symbol mapping.
2172         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2173         (WebCore::GraphicsContext3D::bindAttribLocation): Used the mapped name.
2174         (WebCore::GraphicsContext3D::getAttribLocation): Remove comment since
2175         we do the lookup everywhere.
2176         (WebCore::GraphicsContext3D::getUniformLocation): Ditto.
2177
2178 2013-09-24  Enrica Casucci  <enrica@apple.com>
2179
2180         Upstream changes to Pasteboard implementation for iOS.
2181         https://bugs.webkit.org/show_bug.cgi?id=121818
2182
2183         Reviewed by Darin Adler.
2184
2185         * WebCore.xcodeproj/project.pbxproj:
2186         * editing/Editor.cpp:
2187         (WebCore::Editor::cut):
2188         (WebCore::Editor::copyImage):
2189         * editing/ios/EditorIOS.mm:
2190         (WebCore::attributedStringForRange):
2191         (WebCore::dataInRTFDFormat):
2192         (WebCore::dataInRTFFormat):
2193         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
2194         (WebCore::Editor::selectionInWebArchiveFormat):
2195         (WebCore::Editor::writeSelectionToPasteboard):
2196         (WebCore::getImage):
2197         (WebCore::Editor::writeImageToPasteboard):
2198         * platform/Pasteboard.h:
2199         * platform/PasteboardStrategy.h:
2200         * platform/PlatformPasteboard.h:
2201         * platform/ios/PasteboardIOS.mm:
2202         * platform/ios/PlatformPasteboardIOS.mm: Added.
2203         (WebCore::PlatformPasteboard::PlatformPasteboard):
2204         (WebCore::PlatformPasteboard::getTypes):
2205         (WebCore::PlatformPasteboard::bufferForType):
2206         (WebCore::PlatformPasteboard::getPathnamesForType):
2207         (WebCore::PlatformPasteboard::stringForType):
2208         (WebCore::PlatformPasteboard::color):
2209         (WebCore::PlatformPasteboard::url):
2210         (WebCore::PlatformPasteboard::copy):
2211         (WebCore::PlatformPasteboard::addTypes):
2212         (WebCore::PlatformPasteboard::setTypes):
2213         (WebCore::PlatformPasteboard::setBufferForType):
2214         (WebCore::PlatformPasteboard::setPathnamesForType):
2215         (WebCore::PlatformPasteboard::setStringForType):
2216         (WebCore::PlatformPasteboard::changeCount):
2217         (WebCore::PlatformPasteboard::uniqueName):
2218         (WebCore::PlatformPasteboard::write):
2219
2220 2013-09-24  Mark Rowe  <mrowe@apple.com>
2221
2222         <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
2223
2224         Reviewed by Dan Bernstein.
2225
2226         * Configurations/Base.xcconfig:
2227
2228 2013-09-24  Daniel Bates  <dabates@apple.com>
2229
2230         [iOS] Upstream -webkit-touch-callout
2231         https://bugs.webkit.org/show_bug.cgi?id=121507
2232
2233         Reviewed by Antti Koivisto.
2234
2235         * css/CSSComputedStyleDeclaration.cpp:
2236         (WebCore::ComputedStyleExtractor::propertyValue):
2237         * css/CSSParser.cpp:
2238         (WebCore::CSSParser::parseValue):
2239         * css/CSSPropertyNames.in: Added -webkit-touch-callout.
2240         * css/StyleResolver.cpp:
2241         (WebCore::StyleResolver::applyProperty):
2242         * html/HTMLImageElement.cpp:
2243         (WebCore::HTMLImageElement::willRespondToMouseClickEvents): Added.
2244         * html/HTMLImageElement.h:
2245         * rendering/style/RenderStyle.h:
2246         * rendering/style/StyleRareInheritedData.cpp:
2247         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2248         (WebCore::StyleRareInheritedData::operator==):
2249         * rendering/style/StyleRareInheritedData.h:
2250
2251 2013-09-24  Bem Jones-Bey  <bjonesbe@adobe.com>
2252
2253         Properly handle bottom margin on float with shape-outside
2254         https://bugs.webkit.org/show_bug.cgi?id=121808
2255
2256         Reviewed by David Hyatt.
2257
2258         When a float has a shape-outside, inline content must conform to the
2259         shape, not to the margin box. Thus, if a float with shape-outside has
2260         a bottom margin and the shape does not intrude into that margin, then
2261         the inline content should ignore the margin. Before this patch, inline
2262         content would drop below the margin box instead of obeying the shape.
2263         
2264         Note that content that should clear the float still clears the margin
2265         box, not the shape's contour.
2266
2267         Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html
2268                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html
2269                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html
2270
2271         * rendering/LineWidth.cpp:
2272         (WebCore::LineWidth::fitBelowFloats): Compute the logical bottom based
2273         on the shape.
2274         * rendering/RenderBlock.cpp:
2275         (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Add option to
2276         compute the logical bottom based on the shape instead of on the margin
2277         box.
2278         * rendering/RenderBlock.h:
2279
2280 2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
2281
2282         [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
2283         https://bugs.webkit.org/show_bug.cgi?id=121782
2284
2285         Reviewed by Martin Robinson.
2286
2287         Disabled drag functions.
2288
2289         * page/gtk/EventHandlerGtk.cpp:
2290         * platform/gtk/PasteboardGtk.cpp:
2291
2292 2013-09-24  Samuel White  <samuel_white@apple.com>
2293
2294         AX: Replace AXObjectCache postNotification method boolean arguments with enum values.
2295         https://bugs.webkit.org/show_bug.cgi?id=121504
2296
2297         Reviewed by Chris Fleizach.
2298
2299         No new tests, no functional changes. Changed argument type from bool
2300         to enum per "Names" rule #10 in the WebKit coding style guidelines.
2301
2302         * accessibility/AXObjectCache.cpp:
2303         (WebCore::AXObjectCache::textChanged):
2304         (WebCore::AXObjectCache::postNotification):
2305         (WebCore::AXObjectCache::checkedStateChanged):
2306         (WebCore::AXObjectCache::selectedChildrenChanged):
2307         (WebCore::AXObjectCache::handleAttributeChanged):
2308         * accessibility/AXObjectCache.h:
2309         (WebCore::AXObjectCache::postNotification):
2310         * accessibility/AccessibilityMenuList.cpp:
2311         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
2312         * accessibility/AccessibilityMenuListPopup.cpp:
2313         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
2314         * accessibility/AccessibilityNodeObject.cpp:
2315         (WebCore::AccessibilityNodeObject::childrenChanged):
2316         (WebCore::AccessibilityNodeObject::changeValueByStep):
2317         (WebCore::AccessibilityNodeObject::changeValueByPercent):
2318         * accessibility/AccessibilityRenderObject.cpp:
2319         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
2320         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2321         (WebCore::AccessibilityRenderObject::textChanged):
2322         * dom/Document.cpp:
2323         (WebCore::Document::implicitClose):
2324         * editing/Editor.cpp:
2325         (WebCore::Editor::respondToChangedContents):
2326         (WebCore::Editor::markAndReplaceFor):
2327         * editing/mac/FrameSelectionMac.mm:
2328         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2329         * html/HTMLTextFormControlElement.cpp:
2330         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2331         * html/InputType.cpp:
2332         (WebCore::InputType::applyStep):
2333         * html/RangeInputType.cpp:
2334         (WebCore::RangeInputType::handleKeydownEvent):
2335         * page/FocusController.cpp:
2336         (WebCore::FocusController::setInitialFocus):
2337         * page/FrameView.cpp:
2338         (WebCore::FrameView::layout):
2339
2340 2013-09-24  Andreas Kling  <akling@apple.com>
2341
2342         Make hoverAncestor() a RenderElement concept.
2343         <https://webkit.org/b/121845>
2344
2345         Reviewed by Antti Koivisto.
2346
2347         The hover ancestor renderer is always a RenderElement, we only ever
2348         ask RenderElements for their hover ancestors.
2349
2350         Updated Document::updateHoverActiveState() to take advantage of the
2351         tighter typing, removing a few isElementNode() checks.
2352
2353 2013-09-24  Daniel Bates  <dabates@apple.com>
2354
2355         [iOS] Initialize settings mediaPlayback{AllowsInline, RequiresUserGesture} and
2356         shouldRespectImageOrientation as appropriate
2357         https://bugs.webkit.org/show_bug.cgi?id=121792
2358
2359         Reviewed by Darin Adler.
2360
2361         On iOS we explicitly want to disable mediaPlaybackAllowsInline, and enable
2362         mediaPlaybackRequiresUserGesture and shouldRespectImageOrientation by default.
2363         This differs from other platforms. We need to extract the initialization logic
2364         for these settings into constants whose definition is conditioned on the platform.
2365
2366         * page/Settings.cpp:
2367         * page/Settings.in:
2368
2369 2013-09-24  peavo@outlook.com  <peavo@outlook.com>
2370
2371         [WinCairo] Compile error.
2372         https://bugs.webkit.org/show_bug.cgi?id=121839
2373
2374         Reviewed by Brent Fulgham.
2375
2376         * platform/graphics/GraphicsContext3DPrivate.cpp:
2377         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): Added missing guard.
2378
2379 2013-09-24  Andreas Kling  <akling@apple.com>
2380
2381         Cache continuation() in a local to avoid repeat hash lookups.
2382         <https://webkit.org/b/121840>
2383
2384         Reviewed by Geoffrey Garen.
2385
2386         RenderBoxModelObject::continuation() does a hash lookup every time.
2387         Cache the result in a local instead of calling it repeatedly.
2388
2389         * rendering/RenderBlock.h:
2390         (WebCore::RenderBlock::isAnonymousBlockContinuation):
2391
2392             Reorder to check bitfield before hash map.
2393
2394         * rendering/RenderBlock.cpp:
2395         (WebCore::RenderBlock::updateDragState):
2396         * rendering/RenderInline.cpp:
2397         (WebCore::RenderInline::absoluteRects):
2398         (WebCore::RenderInline::absoluteQuads):
2399         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2400         (WebCore::RenderInline::updateDragState):
2401         (WebCore::RenderInline::addFocusRingRects):
2402
2403             Cache continuation() in locals where it's used more than once.
2404
2405 2013-09-24  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2406
2407         [Qt] Crash when trying to download blob url
2408         https://bugs.webkit.org/show_bug.cgi?id=121681
2409
2410         Reviewed by Simon Hausmann.
2411
2412         Resolve any blob URLs before creating a QUrl.
2413
2414         * platform/network/qt/ResourceRequestQt.cpp:
2415         (WebCore::appendBlobResolved):
2416         (WebCore::resolveBlobUrl):
2417         (WebCore::ResourceRequest::toNetworkRequest):
2418
2419 2013-09-23  Antti Koivisto  <antti@apple.com>
2420
2421         Move more style change code from RenderObject to RenderElement
2422         https://bugs.webkit.org/show_bug.cgi?id=121822
2423
2424         Reviewed by Darin Adler.
2425
2426         * rendering/RenderElement.cpp:
2427         (WebCore::RenderElement::~RenderElement):
2428         
2429             RenderTexts are no longer registered as image clients. They don't need be unregistered either.
2430
2431         (WebCore::RenderElement::adjustStyleDifference):
2432         (WebCore::RenderElement::hasImmediateNonWhitespaceTextChild):
2433         (WebCore::RenderElement::shouldRepaintForStyleDifference):
2434         (WebCore::RenderElement::updateFillImages):
2435         (WebCore::RenderElement::updateImage):
2436         (WebCore::RenderElement::updateShapeImage):
2437         (WebCore::RenderElement::setStyle):
2438         
2439             Move from RenderObject and remove the text specific bits.
2440
2441         * rendering/RenderElement.h:
2442         * rendering/RenderObject.cpp:
2443         (WebCore::RenderObject::setStyle):
2444         (WebCore::RenderObject::arenaDelete):
2445         * rendering/RenderObject.h:
2446         
2447             Remove styleWill/DidChange which move to subclasses.
2448
2449         * rendering/RenderText.cpp:
2450         (WebCore::RenderText::setStyle):
2451         
2452             Add simple text specific setStyle.
2453
2454         * rendering/RenderText.h:
2455
2456 2013-09-24  Andrei Parvu  <parvu@adobe.com>
2457
2458         [CSS Background] repeat: round should round the number of tiles to the nearest natural number
2459         https://bugs.webkit.org/show_bug.cgi?id=120668
2460
2461         Reviewed by Darin Adler.
2462
2463         Tests already available in css3/masking and css3/background
2464
2465         * rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
2466         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2467
2468 2013-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
2469
2470         Remove ScrollView::platformInit() and ScrollView::platformDestroy()
2471         https://bugs.webkit.org/show_bug.cgi?id=121824
2472
2473         Reviewed by Darin Adler.
2474
2475         ScrollView::platformInit() and ScrollView::platformDestroy() are just
2476         empty functions for all ports after removed WX port at r149186.
2477
2478         * PlatformEfl.cmake: Removed ScrollViewEfl.cpp from source list.
2479         * platform/ScrollView.cpp: Removed platformInit and PlatformDestroy.
2480         (WebCore::ScrollView::ScrollView):
2481         (WebCore::ScrollView::~ScrollView):
2482         * platform/ScrollView.h: Ditto.
2483         * platform/efl/ScrollViewEfl.cpp: Removed.
2484
2485 2013-09-23  Darin Adler  <darin@apple.com>
2486
2487         Use unique_ptr instead of deleteAllValues in FloatingObject code
2488         https://bugs.webkit.org/show_bug.cgi?id=121823
2489
2490         Reviewed by Sam Weinig.
2491
2492         * rendering/FloatingObjects.cpp:
2493         (WebCore::FloatingObject::create): Return a unique_ptr instead of PassOwnPtr.
2494         Use auto and a word for the local variable instead of an abbreviation. Also
2495         changed to take a reference instead of a pointer.
2496         (WebCore::FloatingObject::copyToNewContainer): Ditto.
2497         (WebCore::FloatingObject::unsafeClone): Ditto.
2498         (WebCore::FloatingObjects::~FloatingObjects): Removed call to deleteAllValues.
2499         (WebCore::FloatingObjects::clearLineBoxTreePointers): Use auto to make this
2500         read clearly.
2501         (WebCore::FloatingObjects::clear): Removed call to deleteAllValues.
2502         (WebCore::FloatingObjects::moveAllToFloatInfoMap): Use std::move to move values
2503         out of the set, into the map. Removed code to clear the set, since it was a
2504         trick to prevent the values from being deleted when they were not moved.
2505         (WebCore::FloatingObjects::add): Changed to take a unique_ptr and to move the
2506         pointer into the set instead of using leakPtr.
2507         (WebCore::FloatingObjects::remove): Rearranged code so that the remove is at
2508         the end of the function rather than the beginning. Also had to use a hash
2509         translator and a find/remove combo since we don't have hash translator version
2510         of the remove function.
2511         (WebCore::FloatingObjects::computePlacedFloatsTree): Updated for changes to
2512         the types.
2513         (WebCore::FloatingObjects::placedFloatsTree): Moved this function here instead
2514         of having it in the header, since it's only used within the file.
2515
2516         * rendering/FloatingObjects.h: Changed functions to take references instead
2517         of pointers and return unique_ptr instead of PassOwnPtr. Also made
2518         constructors public so we can use them with make_unique. Changed types to
2519         use unique_ptr instead of raw pointers, and made the FloatingObjectHashTranslator
2520         work for both RenderBox& and FloatingObject&.
2521
2522         * rendering/LineWidth.cpp:
2523         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2524         Updated for changes to types.
2525
2526         * rendering/RenderBlock.cpp:
2527         (WebCore::RenderBlock::styleDidChange):
2528         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
2529         (WebCore::RenderBlock::addOverflowFromFloats):
2530         (WebCore::RenderBlock::repaintOverhangingFloats):
2531         (WebCore::RenderBlock::paintFloats):
2532         (WebCore::RenderBlock::selectionGaps):
2533         (WebCore::RenderBlock::insertFloatingObject):
2534         (WebCore::RenderBlock::removeFloatingObject):
2535         (WebCore::RenderBlock::removeFloatingObjectsBelow):
2536         (WebCore::RenderBlock::positionNewFloats):
2537         (WebCore::RenderBlock::nextFloatLogicalBottomBelow):
2538         (WebCore::RenderBlock::lowestFloatLogicalBottom):
2539         (WebCore::RenderBlock::addOverhangingFloats):
2540         (WebCore::RenderBlock::hasOverhangingFloat):
2541         (WebCore::RenderBlock::addIntrudingFloats):
2542         (WebCore::RenderBlock::containsFloat):
2543         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
2544         (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer):
2545         (WebCore::RenderBlock::hitTestFloats):
2546         (WebCore::RenderBlock::adjustForBorderFit):
2547         Updated for changes to types.
2548
2549         * rendering/RenderBlockFlow.cpp:
2550         (WebCore::RenderBlockFlow::clearFloats): Updated to use take instead of
2551         a combination of remove and delete.
2552
2553         * rendering/RenderBlockLineLayout.cpp:
2554         (WebCore::RenderBlock::layoutRunsAndFloats):
2555         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2556         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2557         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
2558         (WebCore::RenderBlock::positionNewFloatOnLine):
2559         Updated for changes to types.
2560
2561 2013-09-23  Gurpreet Kaur  <k.gurpreet@samsung.com>
2562
2563         CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
2564         https://bugs.webkit.org/show_bug.cgi?id=121422
2565
2566         Reviewed by Darin Adler.
2567
2568         Box-shadow properties were not applied incase its values
2569         were given in vh, vw, vmax, vmin unit.
2570
2571         Tests: fast/css/box-shadow-negative-viewportlength.html
2572                fast/css/box-shadow-viewport-height.html
2573                fast/css/box-shadow-viewport-vmax.html
2574                fast/css/box-shadow-viewport-vmin.html
2575                fast/css/box-shadow-viewport-width.html
2576
2577         * css/CSSParser.cpp:
2578         (WebCore::CSSParser::parseShadow):
2579         * css/StyleResolver.cpp:
2580         (WebCore::StyleResolver::applyProperty):
2581         (WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
2582         (WebCore::StyleResolver::viewportPercentageHeight):
2583         (WebCore::StyleResolver::viewportPercentageWidth):
2584         (WebCore::StyleResolver::viewportPercentageMax):
2585         (WebCore::StyleResolver::viewportPercentageMin):
2586         * css/StyleResolver.h:
2587         Parsing and calculating the shadow values which has been specified
2588         in viewport units.The vh/vw units are calcultated as percent of
2589         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
2590         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
2591
2592 2013-09-23  Ryuan Choi  <ryuan.choi@samsung.com>
2593
2594         Unreviewed build fix for CMake ports with INDEXED_DATABASE after r156296
2595
2596         * CMakeLists.txt: Removed IDBBackingStore.cpp from source list.
2597
2598 2013-09-23  Anders Carlsson  <andersca@apple.com>
2599
2600         Remove WTF_USE_SCROLLBAR_PAINTER #define
2601         https://bugs.webkit.org/show_bug.cgi?id=121819
2602
2603         Reviewed by Sam Weinig.
2604
2605         Remove unnecessary if checks and dead code.
2606
2607         * platform/mac/NSScrollerImpDetails.h:
2608         * platform/mac/ScrollAnimatorMac.mm:
2609         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2610         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2611         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
2612         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
2613         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
2614         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
2615         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2616         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2617         (WebCore::ScrollAnimatorMac::willStartLiveResize):
2618         (WebCore::ScrollAnimatorMac::contentsResized):
2619         (WebCore::ScrollAnimatorMac::willEndLiveResize):
2620         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
2621         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
2622         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
2623         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
2624         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
2625         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
2626         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2627         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2628         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2629         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2630         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2631         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2632         (WebCore::ScrollAnimatorMac::cancelAnimations):
2633         (WebCore::ScrollAnimatorMac::setIsActive):
2634         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2635         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2636         * platform/mac/ScrollViewMac.mm:
2637         (WebCore::toNSScrollerKnobStyle):
2638         (WebCore::ScrollView::platformSetScrollbarOverlayStyle):
2639         * platform/mac/ScrollbarThemeMac.mm:
2640         (WebCore::updateArrowPlacement):
2641         (WebCore::ScrollbarThemeMac::registerScrollbar):
2642         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
2643         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2644         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
2645         (WebCore::ScrollbarThemeMac::hasThumb):
2646         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2647         (WebCore::ScrollbarThemeMac::updateEnabledState):
2648         (WebCore::ScrollbarThemeMac::paint):
2649
2650 2013-09-23  Brent Fulgham  <bfulgham@apple.com>
2651
2652         [Windows] Moving back in history from a page with <video>, then moving forward causes crash.
2653         https://bugs.webkit.org/show_bug.cgi?id=120475
2654
2655         Reviewed by Anders Carlsson.
2656
2657         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2658         (WebCore::AVFWrapper::AVFWrapper): Add assertion that creation is on main thread.
2659         (WebCore::AVFWrapper::~AVFWrapper): Add assertion that destruction is on main thread.
2660         (WebCore::destroyAVFWrapper): Helper function to dispatch on main queue.
2661         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Spawn AVFoundationCF destruction to
2662         main queue.
2663
2664 2013-09-23  Andreas Kling  <akling@apple.com>
2665
2666         RenderTextControlSingleLine::updateFromElement() override not needed.
2667         <https://webkit.org/b/121815>
2668
2669         Reviewed by Anders Carlsson.
2670
2671         * rendering/RenderTextControlSingleLine.cpp:
2672         * rendering/RenderTextControlSingleLine.h:
2673
2674 2013-09-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2675
2676         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
2677         https://bugs.webkit.org/show_bug.cgi?id=121462
2678
2679         Reviewed by Darin Adler.
2680
2681         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
2682         by css value type casting as well. This type cast macros will help to detect
2683         bad-cast bugs as well as improve a code readibility.
2684
2685         This patch adds the following methods,
2686
2687         - CSSFooValue* toCSSFooValue(CSSValue*)
2688         - const CSSFooValue* toCSSFooValue(const CSSValue*)
2689
2690         This patch support CSSImageSetValue and CSSReflectValue first. Other CSS*Values
2691         will use this macro step by step.
2692
2693         Besides this patch will remove unnecessary local variables.
2694
2695         No new tests, no behavior change.
2696
2697         * css/CSSCursorImageValue.cpp:
2698         (WebCore::CSSCursorImageValue::cachedImage):
2699         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
2700         * css/CSSImageSetValue.h:
2701         * css/CSSReflectValue.h:
2702         * css/CSSValue.cpp:
2703         (WebCore::CSSValue::destroy):
2704         * css/CSSValue.h:
2705         * css/StyleResolver.cpp:
2706         (WebCore::hasVariableReference):
2707         (WebCore::StyleResolver::applyProperty):
2708         (WebCore::StyleResolver::styleImage):
2709         * rendering/style/StylePendingImage.h:
2710         (WebCore::StylePendingImage::cssImageSetValue):
2711
2712 2013-09-23  Antti Koivisto  <antti@apple.com>
2713
2714         Move style change analysis code to RenderElement
2715         https://bugs.webkit.org/show_bug.cgi?id=121812
2716
2717         Reviewed by Andreas Kling.
2718
2719         Text renderers don't need this. There is no text renderer specific invalidation and text
2720         style never changes independent from the containing RenderElement.
2721
2722 2013-09-23  Commit Queue  <commit-queue@webkit.org>
2723
2724         Unreviewed, rolling out r156307.
2725         http://trac.webkit.org/changeset/156307
2726         https://bugs.webkit.org/show_bug.cgi?id=121817
2727
2728         Broke the build, and crashes the compiler (Requested by ap on
2729         #webkit).
2730
2731         * css/MediaQuery.cpp:
2732         (WebCore::expressionCompare):
2733         (WebCore::MediaQuery::MediaQuery):
2734         * dom/MutationObserver.cpp:
2735         (WebCore::MutationObserver::ObserverLessThan::operator()):
2736         (WebCore::MutationObserver::deliverAllMutations):
2737         * page/CaptionUserPreferences.cpp:
2738         (WebCore::textTrackCompare):
2739         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2740
2741 2013-09-23  Andreas Kling  <akling@apple.com>
2742
2743         Move rendererForRootBackground() to RenderElement.
2744         <http://webkit.org/b/121813>
2745
2746         Reviewed by Antti Koivisto.
2747
2748         Move this to RenderElement (and make it return one, too) since the
2749         document element renderer will always be a RenderElement.
2750
2751 2013-09-23  Brady Eidson  <beidson@apple.com>
2752
2753         Make the Mac build work with IndexedDB enabled.
2754         https://bugs.webkit.org/show_bug.cgi?id=121814
2755
2756         Reviewed by Alexey Proskuryakov.
2757
2758         This patch makes the Mac build work if one were to enable the IndexedDB feature flag.
2759         This patch does not actually enable the flag for everyone.
2760
2761         * DerivedSources.make:
2762         * WebCore.xcodeproj/project.pbxproj:
2763
2764         * Modules/indexeddb/IDBBackingStore.cpp: Added.
2765         (WebCore::IDBBackingStore::open):
2766         (WebCore::IDBBackingStore::openInMemory):
2767         (WebCore::IDBBackingStore::getObjectStores):
2768         (WebCore::IDBBackingStore::Cursor::advance):
2769         (WebCore::IDBBackingStore::Cursor::continueFunction):
2770         (WebCore::IDBBackingStore::Transaction::Transaction):
2771         (WebCore::IDBBackingStore::Transaction::begin):
2772         (WebCore::IDBBackingStore::Transaction::commit):
2773         (WebCore::IDBBackingStore::Transaction::rollback):
2774         * Modules/indexeddb/IDBBackingStore.h:
2775         (WebCore::LevelDBFactory::~LevelDBFactory):
2776         (WebCore::IDBBackingStore::Transaction::reset):
2777         (WebCore::IDBBackingStore::Transaction::levelDBTransactionFrom):
2778
2779         * Modules/indexeddb/IDBKeyPath.cpp:
2780         (WebCore::IDBIsValidKeyPath):
2781
2782         * bindings/js/IDBBindingUtilities.cpp:
2783         (WebCore::createIDBKeyFromValue):
2784
2785         * bindings/js/JSIDBAnyCustom.cpp:
2786         (WebCore::toJS):
2787
2788 2013-09-23  Andreas Kling  <akling@apple.com>
2789
2790         CTTE: RenderObject::container() should return a RenderElement*.
2791         <https://webkit.org/b/121811>
2792
2793         Reviewed by Antti Koivisto.
2794
2795         The containing renderer is always a RenderElement.
2796
2797 2013-09-23  Anders Carlsson  <andersca@apple.com>
2798
2799         Test the waters and begin using lambdas
2800         https://bugs.webkit.org/show_bug.cgi?id=121809
2801
2802         Reviewed by Andreas Kling.
2803
2804         Use lambdas instead of static functions and function objects.
2805         
2806         * css/MediaQuery.cpp:
2807         (WebCore::MediaQuery::MediaQuery):
2808         * dom/MutationObserver.cpp:
2809         (WebCore::MutationObserver::deliverAllMutations):
2810         * page/CaptionUserPreferences.cpp:
2811         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2812
2813 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2814
2815         [WIN] Add implementation for WebCore::readFromFile()
2816         https://bugs.webkit.org/show_bug.cgi?id=119210
2817
2818         Reviewed by Brent Fulgham.
2819
2820         * platform/win/FileSystemWin.cpp:
2821         (WebCore::readFromFile):
2822
2823 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2824
2825         [WIN] Implement WebMutableURLRequest::setHTTPBody()
2826         https://bugs.webkit.org/show_bug.cgi?id=91920
2827
2828         Reviewed by Brent Fulgham.
2829
2830         Add a method to FormData for growing the internal buffer with a given size.
2831
2832         * platform/network/FormData.cpp:
2833         (WebCore::FormData::appendData):
2834         (WebCore::FormData::expandDataStore):
2835         * platform/network/FormData.h:
2836
2837 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2838
2839         use NOMINMAX instead of #define min min
2840         https://bugs.webkit.org/show_bug.cgi?id=73563
2841
2842         Reviewed by Brent Fulgham.
2843
2844         Use NOMINMAX instead of #define min/max as a cleaner
2845         way of ensuring that Windows system header files don't
2846         define min/max as macro in the first place.
2847
2848         * WebCorePrefix.h:
2849         * config.h:
2850
2851 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
2852
2853         REGRESSION (r155998): when zooming in, tiles are too small
2854         https://bugs.webkit.org/show_bug.cgi?id=121765
2855
2856         Reviewed by Dean Jackson.
2857
2858         In r155998 I made GraphicsLayerCA take root-relative transforms
2859         into account when computing contentsScale, and landed a bunch of
2860         new results which should actually have told me that I broke page
2861         scaling.
2862         
2863         We don't want to take page scale into account when computing contentsScale,
2864         because we already do so, so ignore the transform on the layer that
2865         applies page scale (the only transform it should ever has is the page scale).
2866
2867         * platform/graphics/ca/GraphicsLayerCA.cpp:
2868         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
2869
2870 2013-09-23  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2871
2872         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
2873         https://bugs.webkit.org/show_bug.cgi?id=40981
2874
2875         Reviewed by Darin Adler.
2876
2877         RenderBox::calculateAutoscrollDirection does not properly translate
2878         inner frames' coordinates in order to determine its auto-scrollability.
2879         By coincidence, if the inner frame box it placed near to page's 0, 0 position
2880         (upper left corner), it might work.
2881
2882         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
2883         with window coordinates, taking inner frames offset and scroll position into account.
2884         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
2885         as it is used to.
2886
2887         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
2888
2889         * rendering/RenderBox.cpp:
2890         (WebCore::RenderBox::calculateAutoscrollDirection):
2891
2892 2013-09-23  Brady Eidson  <beidson@apple.com>
2893
2894         Move LevelDB specific IDB files into their own subdirectory.
2895         https://bugs.webkit.org/show_bug.cgi?id=121804
2896
2897         Rubberstamped by Alexey Proskuryakov.
2898
2899         * CMakeLists.txt:
2900         * GNUmakefile.list.am:
2901         * WebCore.xcodeproj/project.pbxproj:
2902
2903         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp.
2904         (WebCore::recordInternalError):
2905         (WebCore::putBool):
2906         (WebCore::getInt):
2907         (WebCore::putInt):
2908         (WebCore::getVarInt):
2909         (WebCore::putVarInt):
2910         (WebCore::getString):
2911         (WebCore::putString):
2912         (WebCore::putIDBKeyPath):
2913         (WebCore::compareKeys):
2914         (WebCore::compareIndexKeys):
2915         (WebCore::Comparator::compare):
2916         (WebCore::Comparator::name):
2917         (WebCore::isSchemaKnown):
2918         (WebCore::setUpMetadata):
2919         (WebCore::getMaxObjectStoreId):
2920         (WebCore::DefaultLevelDBFactory::openLevelDB):
2921         (WebCore::DefaultLevelDBFactory::destroyLevelDB):
2922         (WebCore::IDBBackingStore::IDBBackingStore):
2923         (WebCore::IDBBackingStore::~IDBBackingStore):
2924         (WebCore::IDBBackingStore::open):
2925         (WebCore::IDBBackingStore::openInMemory):
2926         (WebCore::IDBBackingStore::create):
2927         (WebCore::IDBBackingStore::getDatabaseNames):
2928         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
2929         (WebCore::getNewDatabaseId):
2930         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
2931         (WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
2932         (WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
2933         (WebCore::deleteRange):
2934         (WebCore::IDBBackingStore::deleteDatabase):
2935         (WebCore::checkObjectStoreAndMetaDataType):
2936         (WebCore::IDBBackingStore::getObjectStores):
2937         (WebCore::setMaxObjectStoreId):
2938         (WebCore::IDBBackingStore::createObjectStore):
2939         (WebCore::IDBBackingStore::deleteObjectStore):
2940         (WebCore::IDBBackingStore::getRecord):
2941         (WebCore::getNewVersionNumber):
2942         (WebCore::IDBBackingStore::putRecord):
2943         (WebCore::IDBBackingStore::clearObjectStore):
2944         (WebCore::IDBBackingStore::deleteRecord):
2945         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2946         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2947         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2948         (WebCore::checkIndexAndMetaDataKey):
2949         (WebCore::IDBBackingStore::getIndexes):
2950         (WebCore::setMaxIndexId):
2951         (WebCore::IDBBackingStore::createIndex):
2952         (WebCore::IDBBackingStore::deleteIndex):
2953         (WebCore::IDBBackingStore::putIndexDataForRecord):
2954         (WebCore::findGreatestKeyLessThanOrEqual):
2955         (WebCore::versionExists):
2956         (WebCore::IDBBackingStore::findKeyInIndex):
2957         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2958         (WebCore::IDBBackingStore::keyExistsInIndex):
2959         (WebCore::IDBBackingStore::Cursor::Cursor):
2960         (WebCore::IDBBackingStore::Cursor::firstSeek):
2961         (WebCore::IDBBackingStore::Cursor::advance):
2962         (WebCore::IDBBackingStore::Cursor::continueFunction):
2963         (WebCore::IDBBackingStore::Cursor::haveEnteredRange):
2964         (WebCore::IDBBackingStore::Cursor::isPastBounds):
2965         (WebCore::ObjectStoreKeyCursorImpl::create):
2966         (WebCore::ObjectStoreKeyCursorImpl::clone):
2967         (WebCore::ObjectStoreKeyCursorImpl::value):
2968         (WebCore::ObjectStoreKeyCursorImpl::encodeKey):
2969         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
2970         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2971         (WebCore::ObjectStoreCursorImpl::create):
2972         (WebCore::ObjectStoreCursorImpl::clone):
2973         (WebCore::ObjectStoreCursorImpl::value):
2974         (WebCore::ObjectStoreCursorImpl::encodeKey):
2975         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
2976         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2977         (WebCore::IndexKeyCursorImpl::create):
2978         (WebCore::IndexKeyCursorImpl::clone):
2979         (WebCore::IndexKeyCursorImpl::value):
2980         (WebCore::IndexKeyCursorImpl::primaryKey):
2981         (WebCore::IndexKeyCursorImpl::recordIdentifier):
2982         (WebCore::IndexKeyCursorImpl::encodeKey):
2983         (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
2984         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
2985         (WebCore::IndexCursorImpl::create):
2986         (WebCore::IndexCursorImpl::clone):
2987         (WebCore::IndexCursorImpl::value):
2988         (WebCore::IndexCursorImpl::primaryKey):
2989         (WebCore::IndexCursorImpl::recordIdentifier):
2990         (WebCore::IndexCursorImpl::encodeKey):
2991         (WebCore::IndexCursorImpl::IndexCursorImpl):
2992         (WebCore::IndexCursorImpl::loadCurrentRow):
2993         (WebCore::objectStoreCursorOptions):
2994         (WebCore::indexCursorOptions):
2995         (WebCore::IDBBackingStore::openObjectStoreCursor):
2996         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
2997         (WebCore::IDBBackingStore::openIndexKeyCursor):
2998         (WebCore::IDBBackingStore::openIndexCursor):
2999         (WebCore::IDBBackingStore::Transaction::Transaction):
3000         (WebCore::IDBBackingStore::Transaction::begin):
3001         (WebCore::IDBBackingStore::Transaction::commit):
3002         (WebCore::IDBBackingStore::Transaction::rollback):
3003         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp.
3004         (WebCore::IDBLevelDBCoding::encodeByte):
3005         (WebCore::IDBLevelDBCoding::decodeByte):
3006         (WebCore::IDBLevelDBCoding::maxIDBKey):
3007         (WebCore::IDBLevelDBCoding::minIDBKey):
3008         (WebCore::IDBLevelDBCoding::encodeBool):
3009         (WebCore::IDBLevelDBCoding::decodeBool):
3010         (WebCore::IDBLevelDBCoding::encodeInt):
3011         (WebCore::IDBLevelDBCoding::decodeInt):
3012         (WebCore::IDBLevelDBCoding::compareInts):
3013         (WebCore::IDBLevelDBCoding::encodeVarInt):
3014         (WebCore::IDBLevelDBCoding::decodeVarInt):
3015         (WebCore::IDBLevelDBCoding::encodeString):
3016         (WebCore::IDBLevelDBCoding::decodeString):
3017         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
3018         (WebCore::IDBLevelDBCoding::decodeStringWithLength):
3019         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength):
3020         (WebCore::IDBLevelDBCoding::encodeDouble):
3021         (WebCore::IDBLevelDBCoding::decodeDouble):
3022         (WebCore::IDBLevelDBCoding::encodeIDBKey):
3023         (WebCore::IDBLevelDBCoding::decodeIDBKey):
3024         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
3025         (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType):
3026         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
3027         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
3028         (WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
3029         (WebCore::IDBLevelDBCoding::compare):
3030         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
3031         (WebCore::IDBLevelDBCoding::KeyPrefix::createWithSpecialIndex):
3032         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidDatabaseId):
3033         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidObjectStoreId):
3034         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidIndexId):
3035         (WebCore::IDBLevelDBCoding::KeyPrefix::decode):
3036         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeEmpty):
3037         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
3038         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeInternal):
3039         (WebCore::IDBLevelDBCoding::KeyPrefix::compare):
3040         (WebCore::IDBLevelDBCoding::KeyPrefix::type):
3041         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
3042         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
3043         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
3044         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::DatabaseFreeListKey):
3045         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode):
3046         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
3047         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
3048         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::databaseId):
3049         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
3050         (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode):
3051         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
3052         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
3053         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
3054         (WebCore::IDBLevelDBCoding::DatabaseNameKey::compare):
3055         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
3056         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
3057         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode):
3058         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
3059         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
3060         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::objectStoreId):
3061         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
3062         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
3063         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::IndexMetaDataKey):
3064         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode):
3065         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
3066         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
3067         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
3068         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::indexId):
3069         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
3070         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode):
3071         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
3072         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
3073         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::objectStoreId):
3074         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
3075         (WebCore::IDBLevelDBCoding::IndexFreeListKey::IndexFreeListKey):
3076         (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode):
3077         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
3078         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
3079         (WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
3080         (WebCore::IDBLevelDBCoding::IndexFreeListKey::objectStoreId):
3081         (WebCore::IDBLevelDBCoding::IndexFreeListKey::indexId):
3082         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode):
3083         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
3084         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::compare):
3085         (WebCore::IDBLevelDBCoding::IndexNamesKey::IndexNamesKey):
3086         (WebCore::IDBLevelDBCoding::IndexNamesKey::decode):
3087         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
3088         (WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
3089         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode):
3090         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
3091         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare):
3092         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::userKey):
3093         (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode):
3094         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
3095         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare):
3096         (WebCore::IDBLevelDBCoding::ExistsEntryKey::userKey):
3097         (WebCore::IDBLevelDBCoding::IndexDataKey::IndexDataKey):
3098         (WebCore::IDBLevelDBCoding::IndexDataKey::decode):
3099         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
3100         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMinKey):
3101         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMaxKey):
3102         (WebCore::IDBLevelDBCoding::IndexDataKey::compare):
3103         (WebCore::IDBLevelDBCoding::IndexDataKey::databaseId):
3104         (WebCore::IDBLevelDBCoding::IndexDataKey::objectStoreId):
3105         (WebCore::IDBLevelDBCoding::IndexDataKey::indexId):
3106         (WebCore::IDBLevelDBCoding::IndexDataKey::userKey):
3107         (WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
3108         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.h.
3109         (WebCore::IDBLevelDBCoding::encodeIntSafely):
3110         (WebCore::IDBLevelDBCoding::KeyPrefix::validIds):
3111         (WebCore::IDBLevelDBCoding::DatabaseNameKey::origin):
3112         (WebCore::IDBLevelDBCoding::DatabaseNameKey::databaseName):
3113         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::metaDataType):
3114         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::objectStoreName):
3115         (WebCore::IDBLevelDBCoding::IndexNamesKey::indexName):
3116
3117 2013-09-23  Antti Koivisto  <antti@apple.com>
3118
3119         Try to fix GTK build.
3120         
3121         Not reviewed.
3122
3123         * accessibility/atk/AccessibilityObjectAtk.cpp:
3124         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3125         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3126         (textForRenderer):
3127
3128 2013-09-23  Alexandru Chiculita  <achicu@adobe.com>
3129
3130         Web Inspector: [CSS Regions] Display CSS Regions flow name in the inspector overlay
3131         https://bugs.webkit.org/show_bug.cgi?id=121794
3132
3133         Reviewed by Joseph Pecoraro.
3134
3135         No new tests, the previous test for CSS Regions highlighting covers the flow name.
3136
3137         This patch adds the "Flow" property in the inspector overlay. The region
3138         chain is already displayed with numbers, so it makes sense to have the flow 
3139         name around when a CSS region is highlighted.
3140
3141         I've consolidated the flow information into "elementInfo.flowInfo". 
3142         Flow info has two properties: "name" and "regions".
3143
3144         * inspector/InspectorOverlay.cpp:
3145         (WebCore::buildObjectForCSSRegionsHighlight):
3146         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
3147         * inspector/InspectorOverlayPage.css:
3148         (.css-property): Added the CSS property font color that the Inspector uses.
3149         * inspector/InspectorOverlayPage.html: Added a new element to be used to display the flow-from property.
3150         * inspector/InspectorOverlayPage.js:
3151         (_drawElementTitle):
3152         (drawNodeHighlight):
3153
3154 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
3155
3156         Rapidly loading pages can result in !needsLayout() assertions in FrameView::paintContents() and RenderView::paint()
3157         https://bugs.webkit.org/show_bug.cgi?id=121725
3158         <rdar://problem/13982161> ASSERT(!needsLayout()) in WebCore::RenderView::paint (121196)
3159
3160         Reviewed by Dean Jackson.
3161         
3162         Layout has to be up-to-date before we paint, and when composited we rely on a
3163         CFRunLoopObserver owned by LayerFlushScheduler to enforce this. The contract is
3164         that changes to GraphicsLayers accumulate in those layers, and are all pushed to
3165         CALayers only inside of flushCompositingState(). CALayers must not be touched
3166         directly outside of flushCompositingState(), since this may trigger a CA commit
3167         and resultant painting without us having updated layout.
3168         
3169         In addition, we rely on the CA commits only happening after our runloop observer
3170         has fired in order for LayerFlushScheduler's suspend/resume to work (these are used
3171         for freezing the layer tree during page transitions).
3172         
3173         However, TileController was violating this contract. It called revalidateTiles()
3174         at random times, and on a timer. This would result in CA commits happening when
3175         layer flushing was suspended at the LayerFlushScheduler level, and thus before
3176         we'd had a chance to do layout.
3177         
3178         Fix by only ever revalidatingTiles inside of flushCompositingState(). Calls
3179         that used to result in revalidateTiles() at other times now just set a bit
3180         on GraphicsLayerCA to indicate that revalidation is required, and this triggers
3181         a later flush like any other GraphicsLayerCA change.
3182         
3183         There is one exception to the revalidate-inside-flush rule: when purging
3184         files for background tabs on a timer, we are only dealing with an unparented
3185         layer tree, so CALayer manipulation is safe at any time.
3186
3187         Very timing dependent, so hard to test.
3188
3189         * platform/graphics/TiledBacking.h: Expose revalidateTiles()
3190         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Remove
3191         platformCALayerDidCreateTiles() override.
3192         * platform/graphics/ca/GraphicsLayerCA.h: Keep track of m_isCommittingChanges
3193         so we can assert. Add TilingAreaChanged flag.
3194         * platform/graphics/ca/GraphicsLayerCA.cpp:
3195         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3196         (WebCore::GraphicsLayerCA::recursiveCommitChanges): noteSublayersChanged() is
3197         used inside of a commit in some cases to trigger a parent layer to update
3198         children after the children have been processed. To avoid trying to pointlessly
3199         schedule the flusher inside a flush, and for strong assertions, use a new flag
3200         that indicates that flushing is not required in this situation.
3201         Set the m_isCommittingChanges flag around committing state.
3202         (WebCore::GraphicsLayerCA::platformCALayerSetNeedsToRevalidateTiles): We used
3203         to use platformCALayerDidCreateTiles() to ensure that we would flush after adding
3204         new tiles to avoid garbage flashes. Now that we only ever create tiles inside
3205         a flush, this is no longer necessary.
3206         The new platformCALayerSetNeedsToRevalidateTiles() function just sets the
3207         TilingAreaChanged flag and triggers a flush.
3208         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
3209         visible rect, we look for the TilingAreaChanged flag to tell us whether to
3210         revalidate TiledBacking tiles.
3211         (WebCore::GraphicsLayerCA::ensureStructuralLayer): Use DontScheduleFlush when 
3212         telling a parent layer that it needs to reconsider sublayers.
3213         (WebCore::GraphicsLayerCA::updateTiles): The caller of revalidateTiles().
3214         (WebCore::GraphicsLayerCA::updateContentsRects): DontScheduleFlush again.
3215         (WebCore::GraphicsLayerCA::noteSublayersChanged): Pass scheduleFlush along.
3216         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): Handle scheduleFlush.
3217         * platform/graphics/ca/PlatformCALayerClient.h:
3218         (WebCore::PlatformCALayerClient::platformCALayerSetNeedsToRevalidateTiles): Added
3219         so that TileController can call back out to GraphicsLayerCA.
3220         (WebCore::PlatformCALayerClient::isCommittingChanges):
3221         * platform/graphics/ca/mac/TileController.h: Need to keep track of secondary
3222         coverage rects in m_secondaryTileCoverageRects.
3223         * platform/graphics/ca/mac/TileController.mm:
3224         (WebCore::TileController::tileCacheLayerBoundsChanged): Just trigger a tile revalidate,
3225         which will happen later in this same commit.
3226         (WebCore::TileController::setScale): This is called inside the commit. Does an extra
3227         revalidate, which is needed to prune tiles. This could be optimized in future.
3228         (WebCore::TileController::setVisibleRect): Assert that we're inside a commit,
3229         and trigger a revalidate.
3230         (WebCore::TileController::setExposedRect): Trigger a revalidate.
3231         (WebCore::TileController::setClipsToExposedRect): Ditto.
3232         (WebCore::TileController::prepopulateRect): Save the rect and trigger a revalidate.
3233         (WebCore::TileController::setIsInWindow): If we're in the window, trigger a revalidate
3234         otherwise schedule the timer.
3235         (WebCore::TileController::revalidateTiles): Wrapper for the real revalidateTiles().
3236         (WebCore::TileController::tileRevalidationTimerFired): If we're in the window,
3237         schedule a revalidate. Otherwise our layer tree is disconnected, and it's OK to call revalidateTiles().
3238         (WebCore::TileController::setNeedsRevalidateTiles): Call through the client to GraphicsLayerCA
3239         which will schedule a layer tree flush.
3240         (WebCore::TileController::revalidateTiles):
3241         (WebCore::TileController::ensureTilesForRect): Move code from prepopulateRect
3242         into here; ensureTilesForRect() for each secondary rect, then clear the rects.
3243         No need to call platformCALayerDidCreateTiles() at the end.
3244         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Remove
3245         platformCALayerDidCreateTiles() override.
3246         * rendering/RenderLayerCompositor.cpp:
3247         (WebCore::RenderLayerCompositor::scheduleLayerFlush): This should only be
3248         called when we're not inside a flush, otherwise it will fail to schedule
3249         another one.
3250
3251 2013-09-23  Sam Weinig  <sam@webkit.org>
3252
3253         CTTE: htmlediting.h Element creation function should take a Document&
3254         https://bugs.webkit.org/show_bug.cgi?id=121800
3255
3256         Reviewed by Antti Koivisto.
3257
3258         Thread the Document&!
3259
3260 2013-09-23  Jacky Jiang  <zhajiang@blackberry.com>
3261
3262         [BlackBerry] Poor rendering opening a Google map short link
3263         https://bugs.webkit.org/show_bug.cgi?id=121687
3264
3265         Reviewed by Yong Li.
3266         Internally reviewed by Liam Quinn and Joe Mason.
3267
3268         Fix a regression. It turns out that LayerCompositingThread already has
3269         an API named isVisible() which by default returns false. So rename the
3270         one in the LayerData to isLayerVisible().
3271
3272         * platform/graphics/blackberry/LayerData.h:
3273         (WebCore::LayerData::isLayerVisible):
3274         * platform/graphics/blackberry/LayerRenderer.cpp:
3275         (WebCore::LayerRenderer::compositeLayersRecursive):
3276
3277 2013-09-23  Antti Koivisto  <antti@apple.com>
3278
3279         Rename RenderObject::first/lastChild to RenderObject::first/lastChildSlow
3280         https://bugs.webkit.org/show_bug.cgi?id=121784
3281
3282         Reviewed by Andreas Kling.
3283
3284         This will make it obvious in code where typing should be tightened.
3285         Handled some simple cases by tightening the code instead of renaming.
3286
3287 2013-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
3288
3289         [Texmap] Reloading a webgl page doesn't work
3290         https://bugs.webkit.org/show_bug.cgi?id=120593
3291
3292         Reviewed by Noam Rosenthal.
3293
3294         Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a GraphicsContext3D is destroyed.
3295
3296         Test: fast/canvas/webgl/webgl-reload-crash.html
3297
3298         * platform/graphics/GraphicsContext3DPrivate.cpp:
3299         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3300         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3301         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
3302
3303 2013-09-23  Antti Koivisto  <antti@apple.com>
3304
3305         Remove RenderObjectChildList
3306         https://bugs.webkit.org/show_bug.cgi?id=121771
3307
3308         Reviewed by Darin Adler.
3309
3310         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
3311         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
3312         
3313         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
3314
3315 2013-09-23  Andreas Kling  <akling@apple.com>
3316
3317         Document::destroyRenderTree() shouldn't do anything but.
3318         <https://webkit.org/b/121786>
3319
3320         Reviewed by Anders Carlsson.
3321
3322         Move everything in destroyRenderTree() that doesn't actually destroy
3323         render trees to prepareForDestruction() instead.
3324
3325         Destroying the render tree is now a reparable operation.
3326
3327 2013-09-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3328
3329         [Qt] Tiled backing-store causes wrong translation
3330         https://bugs.webkit.org/show_bug.cgi?id=121789
3331
3332         Reviewed by Noam Rosenthal.
3333
3334         Move the translation inside save/restore of the GraphicsContext.
3335
3336         * platform/graphics/qt/TileQt.cpp:
3337         (WebCore::TileQt::updateBackBuffer):
3338
3339 2013-09-23  Andreas Kling  <akling@apple.com>
3340
3341         Unify code paths leading to render tree teardown.
3342         <https://webkit.org/b/121785>
3343
3344         Reviewed by Antti Koivisto.
3345
3346         Make Document::prepareForDestruction() fit all the call sites that were
3347         doing destroyRenderTree() + disconnectFromFrame().
3348
3349         - disconnectDescendantFrames() is already a no-op if there are no frames.
3350         - willDetachDocumentFromFrame() will only run if there is a frame.
3351
3352         This is another step towards making tree rebuild possible.
3353
3354         Removed some age-old FIXMEs about why we aren't calling willRemove(),
3355         a long-gone function.
3356
3357 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
3358
3359         Cleanup CMake files in WebCore
3360         https://bugs.webkit.org/show_bug.cgi?id=119262
3361
3362         Reviewed by Gyuyoung Kim.
3363
3364         Sort files and unify style.
3365
3366         * CMakeLists.txt:
3367         * PlatformBlackBerry.cmake:
3368         * PlatformEfl.cmake:
3369         * PlatformGTK.cmake:
3370         * PlatformWin.cmake:
3371         * PlatformWinCE.cmake:
3372
3373 2013-09-22  Commit Queue  <commit-queue@webkit.org>
3374
3375         Unreviewed, rolling out r156254.
3376         http://trac.webkit.org/changeset/156254
3377         https://bugs.webkit.org/show_bug.cgi?id=121779
3378
3379         Caused assertions in fast/regions tests (Requested by ap on
3380         #webkit).
3381
3382         * CMakeLists.txt:
3383         * GNUmakefile.list.am:
3384         * Target.pri:
3385         * WebCore.vcxproj/WebCore.vcxproj:
3386         * WebCore.xcodeproj/project.pbxproj:
3387         * rendering/AutoTableLayout.cpp:
3388         (WebCore::AutoTableLayout::recalcColumn):
3389         * rendering/RenderBlock.cpp:
3390         (WebCore::RenderBlock::willBeDestroyed):
3391         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
3392         (WebCore::RenderBlock::splitBlocks):
3393         (WebCore::RenderBlock::splitFlow):
3394         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks):
3395         (WebCore::RenderBlock::makeChildrenNonInline):
3396         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
3397         (WebCore::RenderBlock::collapseAnonymousBoxChild):
3398         (WebCore::RenderBlock::removeChild):
3399         (WebCore::RenderBlock::updateFirstLetterStyle):
3400         * rendering/RenderBlock.h:
3401         (WebCore::RenderBlock::firstChild):
3402         (WebCore::RenderBlock::lastChild):
3403         * rendering/RenderBox.cpp:
3404         (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
3405         * rendering/RenderBoxModelObject.cpp:
3406         (WebCore::RenderBoxModelObject::moveChildTo):
3407         * rendering/RenderElement.cpp:
3408         (WebCore::RenderElement::RenderElement):
3409         (WebCore::RenderElement::addChild):
3410         (WebCore::RenderElement::removeChild):
3411         * rendering/RenderElement.h:
3412         * rendering/RenderEmbeddedObject.cpp:
3413         (WebCore::RenderEmbeddedObject::layout):
3414         * rendering/RenderEmbeddedObject.h:
3415         * rendering/RenderFrameSet.h:
3416         * rendering/RenderInline.cpp:
3417         (WebCore::RenderInline::willBeDestroyed):
3418         (WebCore::RenderInline::splitInlines):
3419         (WebCore::RenderInline::splitFlow):
3420         (WebCore::RenderInline::childBecameNonInline):
3421         * rendering/RenderInline.h:
3422         (WebCore::RenderInline::firstChild):
3423         (WebCore::RenderInline::lastChild):
3424         * rendering/RenderLayerModelObject.cpp:
3425         (WebCore::RenderLayerModelObject::willBeDestroyed):
3426         * rendering/RenderLineBreak.h:
3427         * rendering/RenderListMarker.h:
3428         * rendering/RenderMedia.cpp:
3429         (WebCore::RenderMedia::layout):
3430         * rendering/RenderMedia.h:
3431         (WebCore::RenderMedia::firstChild):
3432         (WebCore::RenderMedia::lastChild):
3433         * rendering/RenderObject.cpp:
3434         (WebCore::RenderObject::handleDynamicFloatPositionChange):
3435         (WebCore::RenderObject::willBeDestroyed):
3436         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
3437         * rendering/RenderObject.h:
3438         (WebCore::RenderObject::firstChild):
3439         (WebCore::RenderObject::lastChild):
3440         (WebCore::RenderObject::children):
3441         (WebCore::RenderObject::canHaveChildren):
3442         * rendering/RenderObjectChildList.cpp: Added.
3443         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
3444         (WebCore::RenderObjectChildList::removeChildNode):