85551be56f3a1f02676853ce5c3857de017fbc51
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-30  Yongjun Zhang  <yongjun_zhang@apple.com>
2
3         Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data.
4         https://bugs.webkit.org/show_bug.cgi?id=122115
5
6         Reviewed by Daniel Bates.
7
8         With BitmapImage::create(PassNativeImagePtr, ImageObserver*), a BitmapImage could be created by
9         passing a native image.  If this image is added to memory cache, we shouldn't attempt to destroy
10         its decoded frames since there is no encoded raw data and we won't be able to reconstruct the image again.
11
12         No new tests for now. Currently there isn't a code path to add to the memory cache a BitmapImage
13         that was created by adopting a native image. We'll add such a code path in a subsequent patch.
14
15         * platform/graphics/BitmapImage.cpp:
16         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
17
18 2013-09-30  Brady Eidson  <beidson@apple.com>
19
20         Remove IDBTracing.h.
21         https://bugs.webkit.org/show_bug.cgi?id=122118
22
23         Reviewed by Alexey Proskuryakov.
24
25         Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.
26
27         * GNUmakefile.list.am:
28
29         * Modules/indexeddb/IDBCursor.cpp:
30         * Modules/indexeddb/IDBDatabase.cpp:
31         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
32         * Modules/indexeddb/IDBFactory.cpp:
33         * Modules/indexeddb/IDBIndex.cpp:
34         * Modules/indexeddb/IDBObjectStore.cpp:
35         * Modules/indexeddb/IDBOpenDBRequest.cpp:
36         * Modules/indexeddb/IDBRequest.cpp:
37         * Modules/indexeddb/IDBTracing.h: Removed.
38         * Modules/indexeddb/IDBTransaction.cpp:
39         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
40         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
41         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
42         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
43         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
44         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
45         * WebCore.xcodeproj/project.pbxproj:
46         * bindings/js/IDBBindingUtilities.cpp:
47
48 2013-09-30  Brent Fulgham  <bfulgham@apple.com>
49
50         [Windows] Build fix after r156622. Build RenderLayerModelObject.cpp in a separate compilation unit
51         from the RenderLayerAllnOne file so that the scalar and vector destructors are visible to other
52         elements of WebCore during the build.
53
54         * WebCore.vcxproj/WebCore.vcxproj: Compile RenderLayerModelObject outside of the all-in-one file.
55         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
56         * rendering/RenderingAllInOne.cpp: Remove RenderLayerModelObject.cpp.
57
58 2013-09-30  Mark Rowe  <mrowe@apple.com>
59
60         Fix the build when building against an SDK.
61
62         Xcode helpfully prepends $(SDKROOT) to the paths in FRAMEWORK_SEARCH_PATHS when generating
63         the compiler command lines. It can't know to do this for the system framework search paths
64         we add manually via OTHER_CFLAGS though, so we need to prefix them with $(SDKROOT) ourself.
65
66         * Configurations/WebCore.xcconfig:
67
68 2013-09-30  Brent Fulgham  <bfulgham@apple.com>
69
70         [Windows] Unreviewed build fix.
71
72         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct malformed XML in project files.
73
74 2013-09-30  Jer Noble  <jer.noble@apple.com>
75
76         Unreviewed, roll back in r156546 with rebaselined tests.
77         https://bugs.webkit.org/show_bug.cgi?id=122111
78
79         * Modules/mediacontrols/mediaControlsApple.js:
80         (Controller):
81         (Controller.prototype.addVideoListeners):
82         (Controller.prototype.removeVideoListeners):
83         (Controller.prototype.updateHasAudio):
84
85 2013-09-30  Commit Queue  <commit-queue@webkit.org>
86
87         Unreviewed, rolling out r156656.
88         http://trac.webkit.org/changeset/156656
89         https://bugs.webkit.org/show_bug.cgi?id=122111
90
91         Broke several media tests (Requested by ap on #webkit).
92
93         * Modules/mediacontrols/mediaControlsApple.js:
94         (Controller):
95         (Controller.prototype.addVideoListeners):
96         (Controller.prototype.removeVideoListeners):
97
98 2013-09-29  Sam Weinig  <sam@webkit.org>
99
100         Convert a bunch of OwnPtrs on Page to std::unique_ptrs
101         https://bugs.webkit.org/show_bug.cgi?id=122086
102
103         Reviewed by Darin Adler.
104
105         * loader/ProgressTracker.cpp:
106         * loader/ProgressTracker.h:
107         * page/Page.cpp:
108         (WebCore::Page::Page):
109         (WebCore::Page::setGroupName):
110         (WebCore::Page::initGroup):
111         * page/Page.h:
112         * page/PageGroup.cpp:
113         (WebCore::PageGroup::PageGroup):
114         * page/PageGroup.h:
115
116 2013-09-30  Antti Koivisto  <antti@apple.com>
117
118         Remove FontTranscoder
119         https://bugs.webkit.org/show_bug.cgi?id=122088
120
121         Reviewed by Andreas Kling.
122
123         This overly generic class just implements mapping of backslash to yen symbol for some legacy Japanese fonts.
124
125         * CMakeLists.txt:
126         * GNUmakefile.am:
127         * GNUmakefile.list.am:
128         * Target.pri:
129         * WebCore.pri:
130         * WebCore.vcxproj/WebCore.vcxproj:
131         * WebCore.xcodeproj/project.pbxproj:
132         * platform/graphics/Font.cpp:
133         (WebCore::useBackslashAsYenSignForFamily):
134         
135             Move the family set to Font.cpp.
136
137         (WebCore::Font::Font):
138         (WebCore::Font::operator=):
139         (WebCore::Font::update):
140         
141             Keep the cached boolean up to date.
142
143         * platform/graphics/Font.h:
144         (WebCore::Font::useBackslashAsYenSymbol):
145         
146             Use descriptive name instead of talking about "transcoding".
147
148         * platform/text/transcoder: Removed.
149         * platform/text/transcoder/FontTranscoder.cpp: Removed.
150         * platform/text/transcoder/FontTranscoder.h: Removed.
151         * rendering/RenderText.cpp:
152         (WebCore::RenderText::RenderText):
153         (WebCore::RenderText::computeUseBackslashAsYenSymbol):
154         
155             Rename for clarity. 
156             Avoid unnecessary hash lookup, just check the cached bit in Font.
157
158         (WebCore::RenderText::styleDidChange):
159         (WebCore::RenderText::setTextInternal):
160         
161             "Transcoding" here was just a simple character replacement.
162
163         (WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol):
164         
165             Renamed.
166
167         * rendering/RenderText.h:
168
169 2013-09-27  Jer Noble  <jer.noble@apple.com>
170
171         REGRESSION(r156546): media/video-no-audio.html broken
172         https://bugs.webkit.org/show_bug.cgi?id=122049
173
174         Reviewed by Eric Carlson.
175
176         Now that our video elements have audio tracks, use their presence or
177         absense to show or hide the volume controls.
178
179         * Modules/mediacontrols/mediaControlsApple.js:
180         (Controller):
181         (Controller.prototype.addVideoListeners): Listen for audioTrack changes.
182         (Controller.prototype.removeVideoListeners): Stop listening to same.
183         (Controller.prototype.handleAudioTrackChange): Call this.updateHasAudio()
184         (Controller.prototype.handleAudioTrackAdd): Ditto.
185         (Controller.prototype.handleAudioTrackRemove): Ditto.
186         (Controller.prototype.updateHasAudio): Hide the volume controls if no
187             audioTracks are present, and vice versa.
188
189 2013-09-30  Jer Noble  <jer.noble@apple.com>
190
191         Unreviewed Mac-Lion build fix.
192
193         Use metadataItemsFromArray:withLocale: instead of
194         metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:
195         on Lion and earlier.
196
197         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
198         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
199
200 2013-09-27  Jer Noble  <jer.noble@apple.com>
201
202         [Mac] Add AudioTrack support to MediaPlayerPrivateAVFObC.
203         https://bugs.webkit.org/show_bug.cgi?id=122043
204
205         Reviewed by Eric Carlson.
206
207         Test: media/track/audio-track.html
208
209         Add a new class AudioTrackPrivateAVF and subclass AudioTrackPrivateAVFObjC
210         which are backed by a AVPlayerItemTrack. Create one of these tracks when
211         we are notified that the list of available tracks has changed.
212
213         * WebCore.xcodeproj/project.pbxproj:
214         * html/track/AudioTrack.cpp:
215         (WebCore::AudioTrack::setEnabled): Pass through to the AudioTrackPrivate
216             so that the underlying media track can be (dis|en)abled.
217         * platform/graphics/avfoundation/AudioTrackPrivateAVF.h: Added.
218         (WebCore::AudioTrackPrivateAVF::kind): Simple getter.
219         (WebCore::AudioTrackPrivateAVF::id): Ditto.
220         (WebCore::AudioTrackPrivateAVF::label): Ditto.
221         (WebCore::AudioTrackPrivateAVF::language): Ditto.
222         (WebCore::AudioTrackPrivateAVF::setKind): Simple Setter.
223         (WebCore::AudioTrackPrivateAVF::setId): Ditto.
224         (WebCore::AudioTrackPrivateAVF::setLabel): Ditto.
225         (WebCore::AudioTrackPrivateAVF::setLanguage): Ditto.
226         (WebCore::AudioTrackPrivateAVF::AudioTrackPrivateAVF): Simple constructor.
227         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Added.
228         (WebCore::AudioTrackPrivateAVFObjC::create): Simple factory.
229         (WebCore::AudioTrackPrivateAVFObjC::playerItemTrack): Simple getter.
230         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: Added.
231         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Call resetPropertiesFromTrack.
232         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Fill out the values from 
233             the associated AVPlayerItemTrack and its AVAssetTrack.
234         (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): Call resetPropertiesFromTrack.
235         (WebCore::AudioTrackPrivateAVFObjC::setEnabled): (En|Dis)able the AVPlayerItemTrack.
236         (WebCore::AudioTrackPrivateAVFObjC::languageForAVAssetTrack): Refactored from
237             MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack.
238         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
239         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
240         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Determine which tracks
241             have been added or removed and notify the clients accordingly.
242         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Refactor into
243             AudioTrackPrivateAVFObjC::languageForAVAssetTrack.
244
245 2013-09-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
246
247         Generate toCSSCalcValue instead of using manual cast function
248         https://bugs.webkit.org/show_bug.cgi?id=122055
249
250         Reviewed by Antti Koivisto.
251
252         Generated type cast function supports more plenty functions rather than manual functions.
253         To use CSS_VALUE_TYPE_CAST, isCalculationValue() needs to be changed with isCalcValue().
254
255         No new tests, no behavior changes.
256
257         * css/CSSCalculationValue.h:
258         * css/CSSValue.cpp:
259         (WebCore::CSSValue::destroy):
260         * css/CSSValue.h:
261         (WebCore::CSSValue::isCalcValue):
262         * css/StyleResolver.cpp:
263         (WebCore::hasVariableReference):
264
265 2013-09-30  Antti Koivisto  <antti@apple.com>
266
267         Get rid of static map for marking ancestor line boxes dirty
268         https://bugs.webkit.org/show_bug.cgi?id=122080
269
270         Reviewed by Andreas Kling.
271         
272         This is ugly and shows up in profiles too. Use a bit in RenderElement instead.
273
274         * rendering/RenderBlock.h:
275         * rendering/RenderBlockFlow.h:
276         
277             Move dirtyLinesFromChangedChild down to RenderBlockFlow. It wouldn't do anything on other RenderBlocks.
278
279         * rendering/RenderElement.cpp:
280         (WebCore::RenderElement::RenderElement):
281         * rendering/RenderElement.h:
282         
283             Add m_ancestorLineBoxDirty bit. We have 32 unused bits here on 64bit systems.
284
285         (WebCore::RenderElement::dirtyLinesFromChangedChild):
286         (WebCore::RenderElement::ancestorLineBoxDirty):
287         (WebCore::RenderElement::setAncestorLineBoxDirty):
288         (WebCore::RenderObject::setNeedsLayout):
289         * rendering/RenderInline.h:
290         * rendering/RenderLineBoxList.cpp:
291         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
292             
293             Tighten the interface.
294
295         * rendering/RenderLineBoxList.h:
296         * rendering/RenderObject.cpp:
297         (WebCore::RenderObject::willBeDestroyed):
298         * rendering/RenderObject.h:
299         
300             Remove the static map.
301
302 2013-09-18  Sergio Villar Senin  <svillar@igalia.com>
303
304         [CSS Grid Layout] Implement the grid-area shorthand
305         https://bugs.webkit.org/show_bug.cgi?id=103334
306
307         Reviewed by Andreas Kling.
308
309         Based on Blink r151684 by <jchaffraix@chromium.org>
310
311         Test: fast/css-grid-layout/grid-item-area-get-set.html
312
313         Added support to specify grid positions using the
314         '-webkit-grid-area' shorthand. Named grid areas are still not
315         allowed, to be done in a follow up patch as it likely requires
316         '-webkit-grid-template' support.
317
318         * css/CSSComputedStyleDeclaration.cpp:
319         (WebCore::ComputedStyleExtractor::propertyValue):
320         * css/CSSParser.cpp:
321         (WebCore::CSSParser::parseValue):
322         (WebCore::CSSParser::parseGridItemPositionShorthand):
323         * css/CSSPropertyNames.in:
324         * css/StylePropertySet.cpp:
325         (WebCore::StylePropertySet::getPropertyValue):
326         * css/StylePropertyShorthand.cpp:
327         (WebCore::webkitGridAreaShorthand):
328         (WebCore::shorthandForProperty):
329         * css/StylePropertyShorthand.h:
330         * css/StyleResolver.cpp:
331         (WebCore::StyleResolver::applyProperty):
332
333 2013-09-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
334
335         Generate toCSSFooValue for CSSGradientValue, CSSLinearGradientValue and CSSRadialGradient
336         https://bugs.webkit.org/show_bug.cgi?id=122060
337
338         Reviewed by Antti Koivisto.
339
340         As a step to generate toCSSFooValue, toCSSGradientValuem toCSSLinearGradientValue and
341         toCSSRadialGradient are generated. isLinearGradient() and isRadialGradient() are moved
342         from each class to CSSValue in order to generate toCSSFooValue.
343
344         No new tests, no behavior change.
345
346         * css/CSSGradientValue.cpp:
347         (WebCore::CSSGradientValue::image):
348         (WebCore::CSSGradientValue::gradientWithStylesResolved):
349         * css/CSSGradientValue.h:
350         * css/CSSImageGeneratorValue.cpp:
351         (WebCore::CSSImageGeneratorValue::image):
352         (WebCore::CSSImageGeneratorValue::fixedSize):
353         (WebCore::CSSImageGeneratorValue::loadSubimages):
354         * css/CSSParser.cpp:
355         (WebCore::CSSParser::parseDeprecatedGradient):
356         * css/CSSValue.cpp:
357         (WebCore::CSSValue::destroy):
358         * css/CSSValue.h:
359         (WebCore::CSSValue::isLinearGradient):
360         (WebCore::CSSValue::isRadialGradient):
361         * css/StyleResolver.cpp:
362         (WebCore::StyleResolver::applyProperty):
363         (WebCore::StyleResolver::styleImage):
364
365 2013-09-30  Vani Hegde  <vani.hegde@samsung.com>
366
367         user-select: none cursor turns to I-beam on mouse dragging
368         https://bugs.webkit.org/show_bug.cgi?id=90159
369
370         Reviewed by Ryosuke Niwa.
371
372         When tried to select some text in an area that has style
373         cursor:default set, cursor type changes to text cursor ignoring
374         the cursor style that is explicitly set.
375
376         When the cursor style is explicitly set as default (or something else),
377         we should not change it to text cursor no matter what we are over
378         or what operation we are performing (be it hovering over the text
379         or selecting the text).
380
381         During text selection, changing the cursor type to text only when
382         there is no explicit cursor type set fixes the issue.
383
384         Test: editing/caret/selection-with-caret-type-progress.html
385
386         * page/EventHandler.cpp:
387         (WebCore::EventHandler::selectCursor):
388         During selection, set the cursor style to text only if there is no
389         explicit cursor style set.
390
391 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
392
393         Generate toCSSFooValue() for CSSCanvasValue
394         https://bugs.webkit.org/show_bug.cgi?id=122058
395
396         Reviewed by Antti Koivisto.
397
398         Generate toCSSFooValue() for CSSCanvasValue, and use it.
399         This type cast function will help to detect bad-casts.
400         isCanvasValue() is added in order to generate toCSSCanvasValue.
401
402         No new tests, no behavior change.
403
404         * css/CSSCanvasValue.h:
405         * css/CSSImageGeneratorValue.cpp:
406         (WebCore::CSSImageGeneratorValue::image):
407         (WebCore::CSSImageGeneratorValue::fixedSize):
408         (WebCore::CSSImageGeneratorValue::loadSubimages):
409         * css/CSSValue.cpp:
410         (WebCore::CSSValue::destroy):
411         * css/CSSValue.h:
412         (WebCore::CSSValue::isCanvasValue):
413
414 2013-09-29  Mark Rowe  <mrowe@apple.com>
415
416         Fix the Lion build.
417
418         Ensure that C++ and Objective-C++ files build with the right compiler flags.
419
420         * Configurations/WebCore.xcconfig:
421
422 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
423
424         Generate toCSSFooValue() for CSSLineBoxContainValue
425         https://bugs.webkit.org/show_bug.cgi?id=122054
426
427         Reviewed by Darin Adler.
428
429         As a step to use toCSSFooValue, toCSSLineBoxContainValue is generated by using
430         CSS_VALUE_TYPE_CASTS. To use it, isCSSLineBoxContainValue() is changed to
431         isLineBoxContatinValue(). Unnecessary local variable is removed by this patch.
432
433         No new tests, no behavior changes.
434
435         * css/CSSLineBoxContainValue.h:
436         * css/CSSValue.cpp:
437         (WebCore::CSSValue::destroy):
438         * css/CSSValue.h:
439         (WebCore::CSSValue::isLineBoxContainValue):
440         * css/StyleResolver.cpp:
441         (WebCore::StyleResolver::applyProperty):
442
443 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
444
445         Generate toCSSCrossfadeValue() instead of using manual function
446         https://bugs.webkit.org/show_bug.cgi?id=122057
447
448         Reviewed by Antti Koivisto.
449
450         Generated toCSSFooValue() supports more plenty functions rather than
451         to use manual cast function.
452
453         No new tests, no behavior changes.
454
455         * css/CSSCrossfadeValue.h:
456         * css/CSSImageGeneratorValue.cpp:
457         (WebCore::CSSImageGeneratorValue::image):
458         (WebCore::CSSImageGeneratorValue::fixedSize):
459         (WebCore::CSSImageGeneratorValue::loadSubimages):
460         * css/CSSValue.cpp:
461         (WebCore::CSSValue::destroy):
462
463 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
464
465         Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue
466         https://bugs.webkit.org/show_bug.cgi?id=122056
467
468         Reviewed by Antti Koivisto.
469
470         Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue, and use it.
471         This type cast function will help to detect bad-casts.
472
473         No new tests, no behavior changes.
474
475         * css/CSSFilterImageValue.h:
476         * css/CSSImageGeneratorValue.cpp:
477         (WebCore::CSSImageGeneratorValue::image):
478         (WebCore::CSSImageGeneratorValue::fixedSize):
479         (WebCore::CSSImageGeneratorValue::loadSubimages):
480         * css/CSSInitialValue.h:
481         * css/CSSValue.cpp:
482         (WebCore::CSSValue::destroy):
483         * css/StyleResolver.cpp:
484         (WebCore::StyleResolver::generatedOrPendingFromValue):
485
486 2013-09-29  Darin Adler  <darin@apple.com>
487
488         Fix crashes caused by my recent attempt at a Windows build fix.
489
490         * bindings/js/WebCoreTypedArrayController.cpp:
491         (WebCore::WebCoreTypedArrayController::toJS): Added back the prefix for the call to
492         WebCore::toJS, otherwise this function just calls itself infinitely recursively.
493
494 2013-09-29  Sam Weinig  <sam@webkit.org>
495
496         Cleanup PageThrottler and PageConsole a bit
497         https://bugs.webkit.org/show_bug.cgi?id=122085
498
499         Reviewed by Anders Carlsson.
500
501         * html/HTMLMediaElement.h:
502         * loader/FrameLoader.cpp:
503         (WebCore::FrameLoader::completed):
504         * loader/FrameLoader.h:
505         * loader/SubresourceLoader.cpp:
506         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
507         (WebCore::SubresourceLoader::didFinishLoading):
508         (WebCore::SubresourceLoader::didFail):
509         (WebCore::SubresourceLoader::willCancel):
510         * loader/SubresourceLoader.h:
511         Store the PageActivityAssertionToken as a std::unique_ptr.
512
513         * page/Page.cpp:
514         (WebCore::Page::Page):
515         Use createOwned and pass this by reference for the PageThrottler and PageConsole.
516         (WebCore::Page::~Page):
517         Remove unnecessary clearing of an OwnPtr that is about to be destroyed.
518         * page/Page.h:
519         Make m_pageThrottler const and return it as a reference.
520
521         * page/PageActivityAssertionToken.cpp:
522         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
523         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
524         * page/PageActivityAssertionToken.h:
525         Take the PageThrottler by reference in the constructor. It is never null.
526
527         * page/PageConsole.cpp:
528         (WebCore::PageConsole::PageConsole):
529         (WebCore::PageConsole::~PageConsole):
530         (WebCore::PageConsole::addMessage):
531         * page/PageConsole.h:
532         Pass and store the Page as a reference and remove an extraneous null check. Remove
533         the create function.
534
535         * page/PageThrottler.cpp:
536         (WebCore::PageThrottler::PageThrottler):
537         (WebCore::PageThrottler::~PageThrottler):
538         (WebCore::PageThrottler::createActivityToken):
539         (WebCore::PageThrottler::throttlePage):
540         (WebCore::PageThrottler::unthrottlePage):
541         (WebCore::PageThrottler::addActivityToken):
542         (WebCore::PageThrottler::removeActivityToken):
543         * page/PageThrottler.h:
544         Pass and store the Page as a reference. Move the creation of PageActivityAssertionToken here
545         to aid encapsulation.
546
547 2013-09-29  Darin Adler  <darin@apple.com>
548
549         Try to fix Windows build.
550
551         * bindings/js/WebCoreTypedArrayController.cpp: Windows has a symbol named Handle, so we need
552         to call JSC::Handle out by name. To fix that, I removed "using namespace JSC" entirely. And
553         just for fun, sort of "rewrote" this file.
554         (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController): Removed unneeded explicit
555         initialization of m_owner.
556         (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController): Fixed formatting.
557         (WebCore::WebCoreTypedArrayController::toJS): Added lots of explicit JSC and got rid of local.
558         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Cut
559         down on locals, used auto& for type, and called it "wrapper" since that's what JSArrayBuffer is.
560         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize): More of the same.
561
562 2013-09-29  Darin Adler  <darin@apple.com>
563
564         Use RenderElement instead of RenderObject in many places
565         https://bugs.webkit.org/show_bug.cgi?id=122078
566
567         Reviewed by Andreas Kling.
568
569         * WebCore.exp.in: Updated for name changes.
570
571         * dom/ContainerNode.h: Moved renderer() here from Element.
572         * dom/Element.h: Moved renderer() from here to ContainerNode.
573         * render/RenderElement.h: Moved renderer() from Element to ContainerNode.
574
575         * accessibility/AccessibilityImageMapLink.cpp:
576         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
577         (WebCore::AccessibilityImageMapLink::detachFromParent):
578         (WebCore::AccessibilityImageMapLink::elementPath):
579         (WebCore::AccessibilityImageMapLink::elementRect):
580         * accessibility/AccessibilityImageMapLink.h:
581         * accessibility/AccessibilityRenderObject.cpp:
582         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
583         * bindings/objc/DOM.mm:
584         (-[DOMElement image]):
585         (-[DOMElement _font]):
586         (-[DOMElement _imageTIFFRepresentation]):
587         * css/CSSCanvasValue.cpp:
588         (WebCore::CSSCanvasValue::canvasChanged):
589         (WebCore::CSSCanvasValue::canvasResized):
590         (WebCore::CSSCanvasValue::canvasDestroyed):
591         (WebCore::CSSCanvasValue::fixedSize):
592         (WebCore::CSSCanvasValue::image):
593         * css/CSSCanvasValue.h:
594         * css/CSSComputedStyleDeclaration.cpp:
595         (WebCore::computeRenderStyleForProperty):
596         * css/CSSCrossfadeValue.cpp:
597         (WebCore::subimageKnownToBeOpaque):
598         (WebCore::CSSCrossfadeValue::fixedSize):
599         (WebCore::CSSCrossfadeValue::knownToBeOpaque):
600         (WebCore::CSSCrossfadeValue::image):
601         (WebCore::CSSCrossfadeValue::crossfadeChanged):
602         * css/CSSCrossfadeValue.h:
603         * css/CSSFilterImageValue.cpp:
604         (WebCore::CSSFilterImageValue::fixedSize):
605         (WebCore::CSSFilterImageValue::knownToBeOpaque):
606         (WebCore::CSSFilterImageValue::image):
607         (WebCore::CSSFilterImageValue::filterImageChanged):
608         * css/CSSFilterImageValue.h:
609         * css/CSSFontSelector.cpp:
610         * css/CSSGradientValue.cpp:
611         (WebCore::CSSGradientValue::image):
612         (WebCore::CSSGradientValue::addStops):
613         (WebCore::CSSGradientValue::knownToBeOpaque):
614         (WebCore::CSSLinearGradientValue::createGradient):
615         (WebCore::CSSRadialGradientValue::createGradient):
616         * css/CSSGradientValue.h:
617         (WebCore::CSSGradientValue::fixedSize):
618         * css/CSSImageGeneratorValue.cpp:
619         (WebCore::CSSImageGeneratorValue::addClient):
620         (WebCore::CSSImageGeneratorValue::removeClient):
621         (WebCore::CSSImageGeneratorValue::image):
622         (WebCore::CSSImageGeneratorValue::fixedSize):
623         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
624         * css/CSSImageGeneratorValue.h:
625         (WebCore::CSSImageGeneratorValue::clients):
626         * css/CSSImageValue.cpp:
627         (WebCore::CSSImageValue::knownToBeOpaque):
628         * css/CSSImageValue.h:
629         * css/DeprecatedStyleBuilder.cpp:
630         * dom/DocumentMarkerController.cpp:
631         (WebCore::DocumentMarkerController::removeMarkersFromList):
632         (WebCore::DocumentMarkerController::repaintMarkers):
633         * dom/Element.cpp:
634         (WebCore::localZoomForRenderer):
635         (WebCore::adjustForLocalZoom):
636         (WebCore::Element::offsetParent):
637         (WebCore::Element::updateExistingPseudoElement):
638         * dom/ElementRareData.h:
639         (WebCore::ElementRareData::create):
640         (WebCore::ElementRareData::ElementRareData):
641         * dom/Node.cpp:
642         (WebCore::Node::ensureRareData):
643         * editing/DeleteButtonController.cpp:
644         (WebCore::isDeletableElement):
645         * editing/Editor.cpp:
646         (WebCore::Editor::hasBidiSelection):
647         (WebCore::Editor::baseWritingDirectionForSelectionStart):
648         * editing/EditorCommand.cpp:
649         (WebCore::verticalScrollDistance):
650         * editing/htmlediting.cpp:
651         (WebCore::directionOfEnclosingBlock):
652         * editing/ios/EditorIOS.mm:
653         (WebCore::Editor::fontForSelection):
654         (WebCore::getImage):
655         * editing/mac/EditorMac.mm:
656         (WebCore::Editor::fontForSelection):
657         (WebCore::getImage):
658         * editing/markup.cpp:
659         * html/HTMLAreaElement.cpp:
660         (WebCore::HTMLAreaElement::computePath):
661         (WebCore::HTMLAreaElement::computeRect):
662         (WebCore::HTMLAreaElement::setFocus):
663         * html/HTMLAreaElement.h:
664         * html/HTMLCanvasElement.cpp:
665         (WebCore::HTMLCanvasElement::reset):
666         * html/HTMLElement.cpp:
667         (WebCore::HTMLElement::setInnerText):
668         * html/HTMLFormControlElement.cpp:
669         (WebCore::updateFromElementCallback):
670         * html/HTMLFormElement.cpp:
671         (WebCore::HTMLFormElement::rendererIsNeeded):
672         * html/HTMLFrameOwnerElement.h:
673         * html/HTMLImageElement.cpp:
674         (WebCore::HTMLImageElement::x):
675         (WebCore::HTMLImageElement::y):
676         (WebCore::HTMLImageElement::willRespondToMouseClickEvents):
677         * html/HTMLMapElement.cpp:
678         * html/HTMLMediaElement.cpp:
679         (WebCore::HTMLMediaElement::defaultEventHandler):
680         * html/HTMLMeterElement.cpp:
681         (WebCore::HTMLMeterElement::renderMeter):
682         * html/HTMLOptionElement.cpp:
683         (WebCore::HTMLOptionElement::didRecalcStyle):
684         * html/HTMLPlugInElement.cpp:
685         (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
686         (WebCore::HTMLPlugInElement::defaultEventHandler):
687         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
688         * html/HTMLPlugInImageElement.cpp:
689         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
690         * html/HTMLProgressElement.cpp:
691         (WebCore::HTMLProgressElement::renderProgress):
692         * html/HTMLSelectElement.cpp:
693         (WebCore::HTMLSelectElement::scrollToSelection):
694         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
695         (WebCore::HTMLSelectElement::selectOption):
696         * html/HTMLTableCellElement.cpp:
697         (WebCore::HTMLTableCellElement::cellAbove):
698         * html/HTMLTextFormControlElement.cpp:
699         (WebCore::hasVisibleTextArea):
700         (WebCore::HTMLTextFormControlElement::setSelectionRange):
701         * html/InputType.h:
702         * html/parser/HTMLResourcePreloader.cpp:
703         * html/shadow/MediaControlElementTypes.cpp:
704         (WebCore::MediaControlElement::setDisplayType):
705         * html/shadow/MediaControlElements.cpp:
706         (WebCore::MediaControlPanelElement::startDrag):
707         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
708         * html/shadow/MeterShadowElement.cpp:
709         (WebCore::MeterShadowElement::rendererIsNeeded):
710         (WebCore::MeterInnerElement::rendererIsNeeded):
711         * inspector/InspectorOverlay.cpp:
712         * inspector/InspectorTimelineAgent.cpp:
713         * inspector/InspectorTimelineAgent.h:
714         * loader/ImageLoader.cpp:
715         (WebCore::ImageLoader::renderImageResource):
716         * loader/cache/CachedImage.cpp:
717         (WebCore::CachedImage::currentFrameKnownToBeOpaque):
718         * loader/cache/CachedImage.h:
719         * mathml/MathMLElement.cpp:
720         * page/ContextMenuController.cpp:
721         * page/DragController.cpp:
722         (WebCore::DragController::draggableElement):
723         * page/EventHandler.cpp:
724         (WebCore::EventHandler::EventHandler):
725         (WebCore::EventHandler::clear):
726         (WebCore::EventHandler::startPanScrolling):
727         (WebCore::EventHandler::autoscrollRenderer):
728         (WebCore::EventHandler::scrollOverflow):
729         (WebCore::EventHandler::logicalScrollOverflow):
730         (WebCore::EventHandler::subframeForTargetNode):
731         (WebCore::EventHandler::selectCursor):
732         (WebCore::layerForNode):
733         (WebCore::EventHandler::handleWheelEvent):
734         (WebCore::EventHandler::clearGestureScrollNodes):
735         * page/EventHandler.h:
736         * page/FocusController.cpp:
737         * page/Frame.cpp:
738         (WebCore::Frame::ownerRenderer):
739         (WebCore::Frame::visiblePositionForPoint):
740         (WebCore::Frame::nodeImage):
741         * page/FrameView.cpp:
742         (WebCore::FrameView::applyOverflowToViewport):
743         (WebCore::FrameView::applyPaginationToViewport):
744         (WebCore::FrameView::calculateScrollbarModesForLayout):
745         (WebCore::FrameView::isEnclosedInCompositingLayer):
746         (WebCore::FrameView::embeddedContentBox):
747         (WebCore::FrameView::addSlowRepaintObject):
748         (WebCore::FrameView::removeSlowRepaintObject):
749         (WebCore::FrameView::addViewportConstrainedObject):
750         (WebCore::FrameView::removeViewportConstrainedObject):
751         (WebCore::FrameView::scrollContentsFastPath):
752         (WebCore::FrameView::repaintSlowRepaintObjects):
753         (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
754         (WebCore::FrameView::updateOverflowStatus):
755         (WebCore::FrameView::updateScrollCorner):
756         (WebCore::FrameView::paintContents):
757         (WebCore::FrameView::convertFromRenderer):
758         (WebCore::FrameView::convertToRenderer):
759         * page/FrameView.h:
760         * page/PageSerializer.cpp:
761         (WebCore::PageSerializer::addImageToResources):
762         * page/PageSerializer.h:
763         * page/animation/AnimationBase.cpp:
764         (WebCore::AnimationBase::AnimationBase):
765         (WebCore::AnimationBase::updateStateMachine):
766         * page/animation/AnimationBase.h:
767         (WebCore::AnimationBase::renderer):
768         * page/animation/AnimationController.cpp:
769         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
770         (WebCore::AnimationControllerPrivate::clear):
771         (WebCore::AnimationControllerPrivate::updateAnimations):
772         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
773         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
774         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
775         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
776         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
777         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
778         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
779         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
780         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
781         (WebCore::AnimationController::cancelAnimations):
782         (WebCore::AnimationController::updateAnimations):
783         (WebCore::AnimationController::getAnimatedStyleForRenderer):
784         (WebCore::AnimationController::notifyAnimationStarted):
785         (WebCore::AnimationController::pauseAnimationAtTime):
786         (WebCore::AnimationController::pauseTransitionAtTime):
787         (WebCore::AnimationController::isRunningAnimationOnRenderer):
788         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
789         * page/animation/AnimationController.h:
790         * page/animation/AnimationControllerPrivate.h:
791         * page/animation/CSSPropertyAnimation.cpp:
792         (WebCore::crossfadeBlend):
793         * page/animation/CompositeAnimation.cpp:
794         (WebCore::CompositeAnimation::updateTransitions):
795         (WebCore::CompositeAnimation::updateKeyframeAnimations):
796         (WebCore::CompositeAnimation::animate):
797         * page/animation/CompositeAnimation.h:
798         * page/animation/ImplicitAnimation.cpp:
799         (WebCore::ImplicitAnimation::ImplicitAnimation):
800         (WebCore::ImplicitAnimation::animate):
801         (WebCore::ImplicitAnimation::pauseAnimation):
802         (WebCore::ImplicitAnimation::sendTransitionEvent):
803         * page/animation/ImplicitAnimation.h:
804         (WebCore::ImplicitAnimation::create):
805         * page/animation/KeyframeAnimation.cpp:
806         (WebCore::KeyframeAnimation::KeyframeAnimation):
807         (WebCore::KeyframeAnimation::animate):
808         (WebCore::KeyframeAnimation::pauseAnimation):
809         (WebCore::KeyframeAnimation::endAnimation):
810         (WebCore::KeyframeAnimation::sendAnimationEvent):
811         * page/animation/KeyframeAnimation.h:
812         * page/mac/EventHandlerMac.mm:
813         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
814         (WebCore::EventHandler::passSubframeEventToSubframe):
815         * page/mac/FrameSnapshottingMac.mm:
816         (WebCore::snapshotDragImage):
817         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
818         (WebCore::MediaPlayerPrivateQTKit::paint):
819         * rendering/CounterNode.cpp:
820         (WebCore::CounterNode::CounterNode):
821         (WebCore::CounterNode::create):
822         * rendering/CounterNode.h:
823         (WebCore::CounterNode::owner):
824         * rendering/FilterEffectRenderer.cpp:
825         (WebCore::FilterEffectRenderer::buildReferenceFilter):
826         (WebCore::FilterEffectRenderer::build):
827         * rendering/FilterEffectRenderer.h:
828         * rendering/HitTestResult.cpp:
829         (WebCore::HitTestResult::spellingToolTip):
830         (WebCore::HitTestResult::title):
831         (WebCore::HitTestResult::innerTextIfTruncated):
832         (WebCore::HitTestResult::image):
833         * rendering/LayoutRepainter.cpp:
834         (WebCore::LayoutRepainter::LayoutRepainter):
835         * rendering/LayoutRepainter.h:
836         * rendering/LayoutState.h:
837         (WebCore::LayoutState::LayoutState):
838         * rendering/LineWidth.h:
839         * rendering/LogicalSelectionOffsetCaches.h:
840         (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject):
841         (WebCore::isNonRenderBlockInline):
842         (WebCore::containingBlockForFixedPosition):
843         (WebCore::containingBlockForAbsolutePosition):
844         (WebCore::containingBlockForObjectInFlow):
845         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
846         * rendering/PaintInfo.h:
847         (WebCore::PaintInfo::PaintInfo):
848         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
849         * rendering/RenderBox.cpp:
850         (WebCore::RenderBox::paintFillLayers):
851         (WebCore::RenderBox::paintFillLayer):
852         * rendering/RenderBox.h:
853         * rendering/RenderBoxModelObject.cpp:
854         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
855         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
856         * rendering/RenderBoxModelObject.h:
857         * rendering/RenderCounter.cpp:
858         (WebCore::nextInPreOrder):
859         (WebCore::planCounter):
860         (WebCore::makeCounterNode):
861         (WebCore::RenderCounter::originalText):
862         * rendering/RenderElement.cpp:
863         (WebCore::RenderElement::~RenderElement):
864         (WebCore::RenderElement::insertChildInternal):
865         (WebCore::RenderElement::removeChildInternal):
866         (WebCore::RenderElement::willBeDestroyed):
867         (WebCore::RenderElement::rendererForRootBackground):
868         * rendering/RenderImageResource.cpp:
869         (WebCore::RenderImageResource::initialize):
870         * rendering/RenderImageResource.h:
871         * rendering/RenderImageResourceStyleImage.cpp:
872         (WebCore::RenderImageResourceStyleImage::initialize):
873         * rendering/RenderImageResourceStyleImage.h:
874         (WebCore::RenderImageResourceStyleImage::create):
875         * rendering/RenderLayerCompositor.cpp:
876         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
877         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
878         (WebCore::RenderLayerCompositor::canBeComposited):
879         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
880         (WebCore::RenderLayerCompositor::reasonsForCompositing):
881         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
882         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
883         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
884         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
885         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
886         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
887         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
888         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
889         (WebCore::RenderLayerCompositor::requiresCompositingForBlending):
890         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
891         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
892         * rendering/RenderLayerCompositor.h:
893         * rendering/RenderObject.cpp:
894         (WebCore::RenderObject::containingBlock):
895         (WebCore::mustRepaintFillLayers):
896         (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered):
897         (WebCore::RenderObject::willBeDestroyed):
898         * rendering/RenderScrollbarPart.cpp:
899         (WebCore::RenderScrollbarPart::rendererOwningScrollbar):
900         * rendering/RenderScrollbarPart.h:
901         * rendering/RenderTableCell.cpp:
902         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
903         * rendering/RenderTableCell.h:
904         * rendering/RenderView.cpp:
905         (WebCore::RenderView::RenderView):
906         * rendering/style/FillLayer.cpp:
907         (WebCore::FillLayer::hasOpaqueImage):
908         * rendering/style/FillLayer.h:
909         * rendering/style/KeyframeList.h:
910         (WebCore::KeyframeList::KeyframeList):
911         * rendering/style/StyleCachedImage.cpp:
912         (WebCore::StyleCachedImage::imageSize):
913         (WebCore::StyleCachedImage::computeIntrinsicDimensions):
914         (WebCore::StyleCachedImage::setContainerSizeForRenderer):
915         (WebCore::StyleCachedImage::addClient):
916         (WebCore::StyleCachedImage::removeClient):
917         (WebCore::StyleCachedImage::image):
918         (WebCore::StyleCachedImage::knownToBeOpaque):
919         * rendering/style/StyleCachedImage.h:
920         * rendering/style/StyleCachedImageSet.cpp:
921         (WebCore::StyleCachedImageSet::imageSize):
922         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
923         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
924         (WebCore::StyleCachedImageSet::addClient):
925         (WebCore::StyleCachedImageSet::removeClient):
926         (WebCore::StyleCachedImageSet::image):
927         (WebCore::StyleCachedImageSet::knownToBeOpaque):
928         * rendering/style/StyleCachedImageSet.h:
929         * rendering/style/StyleGeneratedImage.cpp:
930         (WebCore::StyleGeneratedImage::imageSize):
931         (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
932         (WebCore::StyleGeneratedImage::addClient):
933         (WebCore::StyleGeneratedImage::removeClient):
934         (WebCore::StyleGeneratedImage::image):
935         (WebCore::StyleGeneratedImage::knownToBeOpaque):
936         * rendering/style/StyleGeneratedImage.h:
937         * rendering/style/StyleImage.h:
938         (WebCore::StyleImage::imagesEquivalent):
939         * rendering/style/StylePendingImage.h:
940         (WebCore::StylePendingImage::cssImageValue):
941         (WebCore::StylePendingImage::cssImageGeneratorValue):
942         (WebCore::StylePendingImage::cssCursorImageValue):
943         (WebCore::StylePendingImage::cssImageSetValue):
944         (WebCore::StylePendingImage::computeIntrinsicDimensions):
945         * testing/Internals.cpp:
946         (WebCore::Internals::boundingBox):
947         (WebCore::Internals::isSelectPopupVisible):
948         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
949         Use RenderElement instead of RenderObject where it was easy to do so.
950         For local variables holding the return value of renderer() functions,
951         use auto instead, so the most-specific possible type will be used,
952         without having to figure out what that is in each case. Also use some
953         more OVERRIDE and FINAL and use nullptr instead of 0. And replace some
954         cryptic short local variable names with words.
955
956 2013-09-29  Philip Rogers  <pdr@google.com>
957
958         Repaint borders and outlines on pseudo content changes
959         https://bugs.webkit.org/show_bug.cgi?id=122070
960
961         Reviewed by Andreas Kling.
962
963         This patch fixes a regression from wkrev.com/150259 where pseudo content with
964         borders or outlines would fail to repaint if the color property changed.
965         The root bug is that border-color and outline-color properties use 'color' if
966         no explicit border-color or outline-color are given, and changing color should
967         repaint borders and outlines even if the text content is empty.
968
969         Relevant spec sections:
970         border: http://www.w3.org/TR/CSS1/#border-color
971         outline: http://www.w3.org/TR/CSS2/ui.html#propdef-outline-color
972
973         This patch also renames StyleDifferenceRepaintIfText to
974         StyleDifferenceRepaintIfTextOrBorderOrOutline and updates the relevant functions.
975
976         Test: fast/repaint/hover-pseudo-borders.html
977
978         * rendering/RenderElement.cpp:
979         (WebCore::RenderElement::hasImmediateNonWhitespaceTextChildOrBorderOrOutline):
980
981             This function has been renamed to reflect that it returns true for borders
982             or outlines as well.
983
984         (WebCore::RenderElement::shouldRepaintForStyleDifference):
985         * rendering/RenderElement.h:
986         * rendering/style/RenderStyle.cpp:
987         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
988         (WebCore::RenderStyle::diff):
989         * rendering/style/RenderStyle.h:
990         * rendering/style/RenderStyleConstants.h:
991         * rendering/svg/SVGResourcesCache.cpp:
992         (WebCore::SVGResourcesCache::clientStyleChanged):
993             These have also been renamed to reflect the new borders and outlines check.
994
995 2013-09-29  Antti Koivisto  <antti@apple.com>
996
997         Tighten typing in inline rendering
998         https://bugs.webkit.org/show_bug.cgi?id=122076
999
1000         Reviewed by Andreas Kling.
1001         
1002         More RenderElement, const, &, etc.
1003
1004         * dom/Position.cpp:
1005         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1006         * rendering/InlineFlowBox.cpp:
1007         (WebCore::isLastChildForRenderer):
1008         (WebCore::isAncestorAndWithinBlock):
1009         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1010         (WebCore::InlineFlowBox::nodeAtPoint):
1011         * rendering/InlineIterator.h:
1012         (WebCore::InlineIterator::InlineIterator):
1013         (WebCore::InlineIterator::root):
1014         (WebCore::isEmptyInline):
1015         (WebCore::bidiNextShared):
1016         (WebCore::bidiNextSkippingEmptyInlines):
1017         (WebCore::bidiNextIncludingEmptyInlines):
1018         (WebCore::bidiFirstSkippingEmptyInlines):
1019         * rendering/RenderBlockLineLayout.cpp:
1020         (WebCore::inlineLogicalWidth):
1021         (WebCore::alwaysRequiresLineBox):
1022         (WebCore::requiresLineBox):
1023         (WebCore::canBreakAtThisPosition):
1024         (WebCore::LineBreaker::nextSegmentBreak):
1025         * rendering/shapes/ShapeInsideInfo.h:
1026         (WebCore::LineSegmentIterator::LineSegmentIterator):
1027
1028 2013-09-28  Sam Weinig  <sam@webkit.org>
1029
1030         Merge ScriptControllerBase into ScriptController
1031         https://bugs.webkit.org/show_bug.cgi?id=122071
1032
1033         Reviewed by Antti Koivisto.
1034
1035         There is no need for ScriptControllerBase. Remove it.
1036
1037         * CMakeLists.txt:
1038         * GNUmakefile.list.am:
1039         * Target.pri:
1040         * WebCore.vcxproj/WebCore.vcxproj:
1041         * WebCore.vcxproj/WebCore.vcxproj.filters:
1042         * WebCore.xcodeproj/project.pbxproj:
1043         * bindings/ScriptControllerBase.cpp: Removed.
1044         * bindings/ScriptControllerBase.h: Removed.
1045         * bindings/js/ScriptController.cpp:
1046         (WebCore::ScriptController::canExecuteScripts):
1047         (WebCore::ScriptController::executeScript):
1048         (WebCore::ScriptController::executeIfJavaScriptURL):
1049         * bindings/js/ScriptController.h:
1050
1051 2013-09-28  Zan Dobersek  <zdobersek@igalia.com>
1052
1053         Unreviewed build fix after r156613 for ports enabling CSS3_TEXT.
1054
1055         * rendering/RenderBlockLineLayout.cpp:
1056         (WebCore::requiresIndent): Use the RenderStyle reference.
1057
1058 2013-09-28  Antti Koivisto  <antti@apple.com>
1059
1060         Switch inline boxes to use const RenderStyle&
1061         https://bugs.webkit.org/show_bug.cgi?id=122068
1062
1063         Reviewed by Sam Weinig.
1064
1065 2013-09-28  Antti Koivisto  <antti@apple.com>
1066
1067         Add first()/last() to ElementIteratorAdapters
1068         https://bugs.webkit.org/show_bug.cgi?id=122067
1069
1070         Reviewed by Darin Adler.
1071
1072         Add a convenient way for getting the first and last element if it exists.
1073         
1074         Use it in some places.
1075
1076         * accessibility/AccessibilityNodeObject.cpp:
1077         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
1078         * css/CSSFontFaceSource.cpp:
1079         (WebCore::CSSFontFaceSource::getFontData):
1080         * dom/Document.cpp:
1081         (WebCore::Document::childrenChanged):
1082         (WebCore::Document::removeTitle):
1083         * dom/ElementChildIterator.h:
1084         (WebCore::::first):
1085         (WebCore::::last):
1086         * dom/ElementDescendantIterator.h:
1087         (WebCore::::first):
1088         (WebCore::::last):
1089         * html/HTMLFieldSetElement.cpp:
1090         (WebCore::HTMLFieldSetElement::legend):
1091         * html/HTMLLegendElement.cpp:
1092         (WebCore::HTMLLegendElement::associatedControl):
1093         * html/HTMLMediaElement.cpp:
1094         (WebCore::HTMLMediaElement::finishParsingChildren):
1095         (WebCore::HTMLMediaElement::selectMediaResource):
1096         * svg/SVGElement.cpp:
1097         (WebCore::SVGElement::title):
1098         * svg/SVGFontFaceElement.cpp:
1099         (WebCore::SVGFontFaceElement::rebuildFontFace):
1100         * svg/graphics/SVGImage.cpp:
1101         (WebCore::SVGImage::hasSingleSecurityOrigin):
1102
1103 2013-09-28  Mark Rowe  <mrowe@apple.com>
1104
1105         Fix some failures with newer versions of clang.
1106
1107         Some CoreGraphics headers generate warnings under newer versions of clang. Since they're system headers the warnings would
1108         usually be suppressed, but we're adding the frameworks to the non-system framework search path so they're no longer treated
1109         as system headers. We address this by removing the system paths from FRAMEWORK_SEARCH_PATHS and using the -iframework compiler
1110         flag in OTHER_CFLAGS to add the paths to the system framework search path. We have to set OTHER_CFLAGS at the target level
1111         in order for it to coexist with the ASAN-related OTHER_CFLAGS that's set in DebugRelease.xcconfig.
1112
1113         Reviewed by Dan Bernstein.
1114
1115         * Configurations/WebCore.xcconfig:
1116
1117 2013-09-28  Mark Rowe  <mrowe@apple.com>
1118
1119         Take Xcode's advice and enable some extra warnings.
1120
1121         Reviewed by Sam Weinig.
1122
1123         * Configurations/Base.xcconfig:
1124         * WebCore.xcodeproj/project.pbxproj:
1125         * dom/NamedNodeMap.cpp:
1126         (WebCore::NamedNodeMap::removeNamedItemNS): Use the correct constant.
1127
1128 2013-09-28  Sam Weinig  <sam@webkit.org>
1129
1130         CTTE: VisitedLinkState should hold a Document&
1131         https://bugs.webkit.org/show_bug.cgi?id=122066
1132
1133         Reviewed by Antti Koivisto.
1134
1135         The Document can never be null, so use a reference.
1136
1137 2013-09-27  Antti Koivisto  <antti@apple.com>
1138
1139         Clean up code for getting first line style
1140         https://bugs.webkit.org/show_bug.cgi?id=122037
1141
1142         Reviewed by Andreas Kling.
1143
1144         We have confusing RenderObject::style(bool firstLine). Get rid of it in favour of 
1145         just using RenderObject::firstLineStyle() where appropriate.
1146         
1147         Also switch to RenderStyle references in many places and move first line style caching
1148         code down to RenderElement.
1149
1150 2013-09-28  Darin Adler  <darin@apple.com>
1151
1152         Add Frame::mainFrame and Frame::isMainFrame
1153         https://bugs.webkit.org/show_bug.cgi?id=122064
1154
1155         Reviewed by Andreas Kling.
1156
1157         * WebCore.exp.in: Removed exports of FrameView::isMainFrameView and
1158         Page::frameIsMainFrame. Since the new isMainFrame function is inline, it
1159         does not need to be exported.
1160
1161         * history/PageCache.cpp:
1162         (WebCore::PageCache::markPagesForFullStyleRecalc):
1163         (WebCore::PageCache::markPagesForDeviceScaleChanged):
1164         These two were the only functions I found that really wanted the equivalent
1165         of Page::frameIsMainFrame, so wrote it out here instead of using a function
1166         call.
1167
1168         * inspector/InspectorAgent.cpp: Removed the unused isMainResourceLoader function.
1169         * inspector/InspectorAgent.h: Removed declarations of a few nonexistent or
1170         unused private member functions. Also removed the InjectedScriptForOriginMap
1171         typedef: It's mor readable to use the type directly
1172
1173         * loader/FrameLoader.h: Removed isLoadingMainFrame. It's not better than
1174         calling frame().isMainFrame() directly.
1175
1176         * page/Frame.cpp:
1177         (WebCore::Frame::Frame): Initialize m_mainFrame and call selfOnlyRef, keeping
1178         the MainFrame alive as long as any of its subframes is alive.
1179         (WebCore::Frame::~Frame): Call selfOnlyDeref.
1180         (WebCore::Frame::createView): Use isMainFrame.
1181         (WebCore::Frame::setPageAndTextZoomFactors): Ditto.
1182
1183         * page/Frame.h: Added Frame::mainFrame, Frame::isMainFrame, and Frame::m_mainFrame.
1184
1185         * page/FrameView.h: Removed the isMainFrameView function. It's not better than
1186         calling frame().isMainFrame() directly.
1187
1188         * page/MainFrame.cpp:
1189         (WebCore::MainFrame::MainFrame): Initialize m_selfOnlyRefCount to 0.
1190         (WebCore::MainFrame::selfOnlyRef): Added.
1191         (WebCore::MainFrame::selfOnlyDeref): Added.
1192         (WebCore::MainFrame::dropChildren): Added. Called when the self-only reference
1193         count reaches 0 to avoid a reference cycle with subframes.
1194
1195         * page/MainFrame.h: Added new data members as mentioned above. Also, the
1196         definition of the Frame::isMainFrame inline function goes here, since it can't
1197         compile without the MainFrame class definition. This means that callers of
1198         isMainFrame need to include MainFrame.h, which seems reasonable and is easy
1199         to do.
1200
1201         * page/Page.cpp:
1202         * page/Page.h: Added assertion to Page::mainFrame since it returns a reference.
1203         Removed Page::frameIsMainFrame since it's not better than calling isMainFrame
1204         on the frame.
1205
1206         * dom/Document.cpp:
1207         (WebCore::Document::setVisualUpdatesAllowed):
1208         (WebCore::Document::didBecomeCurrentDocumentInFrame):
1209         (WebCore::Document::updateViewportArguments):
1210         (WebCore::Document::setInPageCache):
1211         (WebCore::Document::ensurePlugInsInjectedScript):
1212         * history/CachedFrame.cpp:
1213         (WebCore::CachedFrame::CachedFrame):
1214         * history/CachedPage.cpp:
1215         (WebCore::CachedPage::restore):
1216         * html/HTMLPlugInImageElement.cpp:
1217         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
1218         * html/ImageDocument.cpp:
1219         (WebCore::ImageDocument::shouldShrinkToFit):
1220         * inspector/InspectorController.cpp:
1221         (WebCore::InspectorController::didClearWindowObjectInWorld):
1222         * inspector/InspectorInstrumentation.cpp:
1223         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1224         * inspector/InspectorPageAgent.cpp:
1225         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
1226         (WebCore::InspectorPageAgent::frameNavigated):
1227         * loader/DocumentLoader.cpp:
1228         (WebCore::DocumentLoader::willSendRequest):
1229         * loader/FrameLoader.cpp:
1230         (WebCore::FrameLoader::transitionToCommitted):
1231         (WebCore::FrameLoader::prepareForCachedPageRestore):
1232         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1233         (WebCore::FrameLoader::didLayout):
1234         (WebCore::FrameLoader::checkLoadComplete):
1235         (WebCore::FrameLoader::addExtraFieldsToRequest):
1236         (WebCore::FrameLoader::loadResourceSynchronously):
1237         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1238         (WebCore::FrameLoader::dispatchDidCommitLoad):
1239         (WebCore::FrameLoader::loadProgressingStatusChanged):
1240         * loader/HistoryController.cpp:
1241         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1242         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1243         (WebCore::HistoryController::updateForCommit):
1244         (WebCore::HistoryController::updateForSameDocumentNavigation):
1245         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
1246         (WebCore::HistoryController::pushState):
1247         * loader/icon/IconController.cpp:
1248         (WebCore::IconController::startLoader):
1249         * page/AutoscrollController.cpp:
1250         (WebCore::AutoscrollController::stopAutoscrollTimer):
1251         * page/ContextMenuController.cpp:
1252         (WebCore::ContextMenuController::populate):
1253         * page/DOMWindow.cpp:
1254         (WebCore::allowsBeforeUnloadListeners):
1255         (WebCore::DOMWindow::focus):
1256         (WebCore::DOMWindow::blur):
1257         (WebCore::DOMWindow::close):
1258         (WebCore::DOMWindow::allowedToChangeWindowGeometry):
1259         * page/EventHandler.cpp:
1260         (WebCore::EventHandler::hitTestResultAtPoint):
1261         (WebCore::EventHandler::selectCursor):
1262         (WebCore::EventHandler::handleMousePressEvent):
1263         (WebCore::EventHandler::keyEvent):
1264         * page/FrameTree.cpp:
1265         (WebCore::FrameTree::find):
1266         (WebCore::FrameTree::traverseNextWithWrap):
1267         * page/FrameView.cpp:
1268         (WebCore::FrameView::FrameView):
1269         (WebCore::FrameView::setFrameRect):
1270         (WebCore::FrameView::createScrollbar):
1271         (WebCore::FrameView::applyOverflowToViewport):
1272         (WebCore::FrameView::setHeaderHeight):
1273         (WebCore::FrameView::setFooterHeight):
1274         (WebCore::FrameView::minimumScrollPosition):
1275         (WebCore::FrameView::maximumScrollPosition):
1276         (WebCore::FrameView::shouldUpdateFixedElementsAfterScrolling):
1277         (WebCore::FrameView::beginDeferredRepaints):
1278         (WebCore::FrameView::endDeferredRepaints):
1279         (WebCore::FrameView::performPostLayoutTasks):
1280         (WebCore::FrameView::sendResizeEventIfNeeded):
1281         (WebCore::FrameView::pagination):
1282         (WebCore::FrameView::visibleContentScaleFactor):
1283         (WebCore::FrameView::setVisibleScrollerThumbRect):
1284         (WebCore::FrameView::scrollbarStyleChanged):
1285         (WebCore::FrameView::paintScrollCorner):
1286         (WebCore::FrameView::paintScrollbar):
1287         (WebCore::FrameView::paintOverhangAreas):
1288         * page/scrolling/ScrollingCoordinator.cpp:
1289         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
1290         * rendering/RenderLayerBacking.cpp:
1291         (WebCore::RenderLayerBacking::RenderLayerBacking):
1292         Use the new functions where possible instead of Page::frameIsMainFrame,
1293         Page::mainFrame, FrameLoader::isLoadingMainFrame, and FrameView::isMainFrameView.
1294
1295 2013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
1296
1297         filter: drop-shadow doesnot support viewport units
1298         https://bugs.webkit.org/show_bug.cgi?id=122053
1299
1300         Reviewed by Darin Adler.
1301
1302         drop-shadow properties were not applied incase its values
1303         were given in vh, vw, vmax, vmin units.
1304
1305         Tests: fast/css/drop-shadow-viewport-height.html
1306                fast/css/drop-shadow-viewport-vmax.html
1307                fast/css/drop-shadow-viewport-vmin.html
1308                fast/css/drop-shadow-viewport-width.html
1309
1310         * css/StyleResolver.cpp:
1311         (WebCore::StyleResolver::createFilterOperations):
1312         Calculating the drop-shadow values which has been specified in viewport
1313         units.The vh/vw units are calcultated as percent of viewport height and
1314         viewport width respectively. 1vmax: 1vw or 1vh, whatever is largest.
1315         1vmin: 1vw or 1vh, whatever is smallest.
1316
1317 2013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
1318
1319         REGRESSION (r154614): Setting the document scroll position isn't symmetric; can successfully set document.body.scrollTop, but can only read from document.documentElement.scrollTop
1320         https://bugs.webkit.org/show_bug.cgi?id=121876
1321
1322         Reviewed by Darin Adler.
1323
1324         Non-Quirks mode should set/get scrolltop/scrollleft through
1325         document.documentElement.scrollTop/document.documentElement.scrollLeft
1326         Quirks mode should set/get scrolltop/scrollleft through
1327         document.body.scrollTop/document.body.scrollLeft.
1328
1329         Tests: fast/dom/Element/body-scrollLeft-Quirks.html
1330                fast/dom/Element/body-scrollLeft.html
1331                fast/dom/Element/body-scrollTop-Quirks.html
1332                fast/dom/Element/body-scrollTop.html
1333                fast/dom/Element/documentElement-scrollLeft-Quirks.html
1334                fast/dom/Element/documentElement-scrollLeft.html
1335                fast/dom/Element/documentElement-scrollTop-Quirks.html
1336                fast/dom/Element/documentElement-scrollTop.html
1337
1338         * dom/Element.cpp:
1339         (WebCore::Element::setScrollLeft):
1340         (WebCore::Element::setScrollTop):
1341         * html/HTMLBodyElement.cpp:
1342         (WebCore::HTMLBodyElement::setScrollLeft):
1343         (WebCore::HTMLBodyElement::setScrollTop):
1344         Need to set the scrollTop and scrollLeft after checking if document
1345         is in quirks or non-quirks mode. Incase it is body.scrollLeft/
1346         body.scrollTop set only if document is in quirks mode. If document is
1347         non-quirks mode set documentElement.scrollLeft/documentElement.scrollTop.
1348
1349 2013-09-28  Andreas Kling  <akling@apple.com>
1350
1351         Pass VM instead of ExecState to JSFunction constructors.
1352         <https://webkit.org/b/122014>
1353
1354         Reviewed by Geoffrey Garen.
1355
1356         Updated for new JSFunction::create() signature.
1357
1358 2013-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1359
1360         Generate toCSSFooValue() for CSSImageValue 
1361         https://bugs.webkit.org/show_bug.cgi?id=122051
1362
1363         Reviewed by Andreas Kling.
1364
1365         Clean up static_cast<CSSImageValue*> type casts. It will help to
1366         detect bad cast as well as improve code readability.
1367
1368         Removed unnecessary local variables as well.
1369
1370         No new tests, no behavior changes.
1371
1372         * css/CSSCrossfadeValue.cpp:
1373         (WebCore::subimageKnownToBeOpaque):
1374         * css/CSSCursorImageValue.cpp:
1375         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1376         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1377         (WebCore::CSSCursorImageValue::cachedImage):
1378         (WebCore::CSSCursorImageValue::isSVGCursor):
1379         * css/CSSImageGeneratorValue.cpp:
1380         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1381         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1382         * css/CSSImageSetValue.cpp:
1383         (WebCore::CSSImageSetValue::fillImageSet):
1384         * css/CSSImageValue.h:
1385         * css/CSSValue.cpp:
1386         (WebCore::CSSValue::destroy):
1387         * css/StyleResolver.cpp:
1388         (WebCore::StyleResolver::applyProperty):
1389         (WebCore::StyleResolver::styleImage):
1390         * page/PageSerializer.cpp:
1391         (WebCore::PageSerializer::retrieveResourcesForProperties):
1392         * rendering/style/StylePendingImage.h:
1393         (WebCore::StylePendingImage::data):
1394         (WebCore::StylePendingImage::cssImageValue):
1395
1396 2013-09-28  Mark Rowe  <mrowe@apple.com>
1397
1398         WebCore fails to build with newer versions of clang.
1399
1400         Reviewed by Sam Weinig.
1401
1402         * Modules/indexeddb/IDBIndex.cpp: Remove an unused constant.
1403         * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
1404         * Modules/webaudio/AudioContext.cpp: Ditto.
1405         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
1406         * Modules/webdatabase/SQLResultSet.cpp: Ditto.
1407         * Modules/webdatabase/SQLTransactionBackend.cpp: Ditto.
1408         * Modules/websockets/WebSocketHandshake.cpp: Ditto.
1409         * bindings/objc/DOM.mm: Disable a warning about overriding a protocol method in a cateogry around the one
1410         place we do it. I don't understand why this generates a warning, nor can I see a different approach that
1411         would not result in the warning being emitted.
1412         * css/CSSGrammar.y.in: #if a function that's only used inside an #if.
1413         * html/track/TextTrackCue.cpp: Remove an unused constant.
1414         * loader/TextResourceDecoder.cpp: Remove two unused functions.
1415         * page/ContentSecurityPolicy.cpp: Add #if's around constants and functions that are only used when CSP_NEXT is enabled.
1416         (WebCore::CSPDirectiveList::checkSourceAndReportViolation): Reorder the ifs slightly to make the #if'ing easier.
1417         * page/ContentSecurityPolicy.h: Add #if's around functions that are only used when CSP_NEXT is enabled.
1418         * page/DOMSecurityPolicy.cpp: Ditto.
1419         * page/DOMSecurityPolicy.h: Ditto.
1420         * page/animation/CSSPropertyAnimation.cpp: Remove an unused function.
1421         * platform/mac/DisplaySleepDisabler.cpp: Add an #if around a constant that's only used on iOS.
1422         * platform/mac/WebCoreFullScreenWarningView.mm: Remove three unused constants.
1423         * rendering/RenderLayer.cpp: Remove two unused constants.
1424         * rendering/RenderLayerCompositor.cpp:
1425         (WebCore::compositingLogEnabled): Move the #if around the function definition.
1426         * svg/SVGAnimatedAngle.cpp: Remove an unused function.
1427         * svg/SVGUseElement.cpp: #if a function that's only used inside an ASSERT.
1428         * xml/XPathStep.cpp: Ditto.
1429
1430 2013-09-27  Brady Eidson  <beidson@apple.com>
1431
1432         IndexedDB IDL Refactoring.
1433         https://bugs.webkit.org/show_bug.cgi?id=121996
1434
1435         Reviewed by Alexey Proskuryakov.
1436
1437         This includes:
1438         1 - Leveraging EventTarget.idl inheritance
1439         2 - Removing comments
1440         3 - Reordering to match the spec's IDLs
1441         4 - Removing nonstandard, WebKit-specific methods
1442         5 - Updating interfaces to match the spec (versions are only uint64_t's now...)
1443         6 - Updating implementation code as needed (versions are only uint64_t's now...)
1444
1445         IDL changes:
1446         * Modules/indexeddb/IDBCursor.idl:
1447         * Modules/indexeddb/IDBDatabase.idl:
1448         * Modules/indexeddb/IDBFactory.idl:
1449         * Modules/indexeddb/IDBIndex.idl:
1450         * Modules/indexeddb/IDBKeyRange.idl:
1451         * Modules/indexeddb/IDBObjectStore.idl:
1452         * Modules/indexeddb/IDBRequest.idl:
1453         * Modules/indexeddb/IDBTransaction.idl:
1454         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1455
1456         * Modules/indexeddb/IndexedDB.h: Add new enum to represent version nullness.
1457
1458         Adapt to new IDLs, and also refactor representation of initial, null versioning:
1459         * Modules/indexeddb/IDBCallbacks.h:
1460         (WebCore::IDBCallbacks::onBlocked):
1461         (WebCore::IDBCallbacks::onUpgradeNeeded):
1462
1463         * Modules/indexeddb/IDBDatabase.cpp:
1464         (WebCore::IDBDatabase::version):
1465         (WebCore::IDBDatabase::onVersionChange):
1466         * Modules/indexeddb/IDBDatabase.h:
1467
1468         * Modules/indexeddb/IDBDatabaseCallbacks.h:
1469         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
1470         (WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
1471         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
1472
1473         * Modules/indexeddb/IDBFactory.cpp:
1474         (WebCore::IDBFactory::open):
1475         (WebCore::IDBFactory::openInternal):
1476         (WebCore::IDBFactory::deleteDatabase):
1477         * Modules/indexeddb/IDBFactory.h:
1478
1479         * Modules/indexeddb/IDBMetadata.h:
1480         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1481
1482         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1483         (WebCore::IDBOpenDBRequest::create):
1484         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
1485         (WebCore::IDBOpenDBRequest::onBlocked):
1486         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1487         * Modules/indexeddb/IDBOpenDBRequest.h:
1488
1489         * Modules/indexeddb/IDBRequest.cpp:
1490         * Modules/indexeddb/IDBRequest.h:
1491
1492         * Modules/indexeddb/IDBTransaction.cpp:
1493         * Modules/indexeddb/IDBTransaction.h:
1494
1495         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1496         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
1497         * Modules/indexeddb/IDBVersionChangeEvent.h:
1498         (WebCore::IDBVersionChangeEvent::create):
1499         (WebCore::IDBVersionChangeEvent::oldVersion):
1500         (WebCore::IDBVersionChangeEvent::newVersion):
1501
1502         Keep leveldb building with minimal adaptations to the new IDLs,
1503         but note that the LevelDB implementation is now incompatible with the spec:
1504         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1505         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
1506         (WebCore::objectStoreCursorOptions):
1507         (WebCore::indexCursorOptions):
1508
1509         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
1510         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
1511         (WebCore::IDBDatabaseBackendLevelDB::openInternal):
1512         (WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::perform):
1513         (WebCore::IDBDatabaseBackendLevelDB::processPendingCalls):
1514         (WebCore::IDBDatabaseBackendLevelDB::openConnection):
1515         (WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
1516         (WebCore::IDBDatabaseBackendLevelDB::deleteDatabase):
1517         (WebCore::IDBDatabaseBackendLevelDB::deleteDatabaseFinal):
1518         (WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform):
1519
1520         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1521         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
1522
1523         * inspector/InspectorIndexedDBAgent.cpp: Update for metadata change.
1524
1525 2013-09-27  Enrica Casucci  <enrica@apple.com>
1526
1527         Upstream changes to Pasteboard implementation for iOS.
1528         https://bugs.webkit.org/show_bug.cgi?id=121818
1529
1530         Reviewed by Benjamin Poulain.
1531
1532         * WebCore.exp.in:
1533         * editing/Editor.cpp:
1534         (WebCore::Editor::dispatchCPPEvent):
1535         * editing/ios/EditorIOS.mm:
1536         (WebCore::Editor::WebContentReader::addFragment):
1537         (WebCore::Editor::WebContentReader::readWebArchive):
1538         (WebCore::Editor::WebContentReader::readFilenames):
1539         (WebCore::Editor::WebContentReader::readHTML):
1540         (WebCore::Editor::WebContentReader::readRTFD):
1541         (WebCore::Editor::WebContentReader::readRTF):
1542         (WebCore::uniqueURLWithRelativePart):
1543         (WebCore::Editor::WebContentReader::readImage):
1544         (WebCore::Editor::WebContentReader::readURL):
1545         (WebCore::Editor::WebContentReader::readPlainText):
1546         (WebCore::Editor::webContentFromPasteboard):
1547         (WebCore::Editor::pasteWithPasteboard):
1548         (WebCore::Editor::createFragmentAndAddResources):
1549         (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1550         * platform/Pasteboard.h:
1551         * platform/PasteboardStrategy.h:
1552         * platform/PlatformPasteboard.h:
1553         * platform/ios/PasteboardIOS.mm:
1554         (WebCore::PasteboardWebContent::PasteboardWebContent):
1555         (WebCore::PasteboardWebContent::~PasteboardWebContent):
1556         (WebCore::PasteboardImage::PasteboardImage):
1557         (WebCore::PasteboardImage::~PasteboardImage):
1558         (WebCore::Pasteboard::Pasteboard):
1559         (WebCore::Pasteboard::clear):
1560         (WebCore::Pasteboard::readString):
1561         (WebCore::Pasteboard::writeString):
1562         (WebCore::Pasteboard::types):
1563         * platform/ios/PlatformPasteboardIOS.mm:
1564         (WebCore::PlatformPasteboard::changeCount):
1565         (WebCore::PlatformPasteboard::write):
1566         (WebCore::PlatformPasteboard::count):
1567         (WebCore::PlatformPasteboard::readBuffer):
1568         (WebCore::PlatformPasteboard::readString):
1569         (WebCore::PlatformPasteboard::readURL):
1570         * platform/mac/PasteboardMac.mm:
1571         (WebCore::PasteboardWebContent::PasteboardWebContent):
1572         (WebCore::PasteboardWebContent::~PasteboardWebContent):
1573         (WebCore::PasteboardImage::PasteboardImage):
1574         (WebCore::PasteboardImage::~PasteboardImage):
1575         * platform/mac/PlatformPasteboardMac.mm:
1576
1577 2013-09-27  Hans Muller  <hmuller@adobe.com>
1578
1579         Crash on shape-outside when using calc()
1580         https://bugs.webkit.org/show_bug.cgi?id=121020
1581
1582         Reviewed by Dirk Schulze.
1583
1584         This change prevents a crash caused by specifying a CSS Shape geometry
1585         Length attribute with a calc() expression. It adds support for converting
1586         Lengths to CSSPrimitive Values, in large part by migrating Blink changes
1587         made to the calc classes since the split. Doing so required a few supporting
1588         changes in some related classes, notably CSSPrimitiveValue.
1589
1590         Tests: fast/shapes/shape-inside/shape-inside-calc-crash.html
1591                css3/calc/simplification.html
1592
1593         * css/BasicShapeFunctions.cpp:
1594         (WebCore::convertToCSSPrimitiveValue): Effectively use the new CSSPrimtiveValue(length,style) constructor to convert Lengths to CSSValues.
1595         (WebCore::valueForBasicShape): Use the convertToCSSPrimitiveValue() function.
1596         (WebCore::convertToLength): Added the CalculatedConversion convertToLength() flag to enable support for calc() valued Length Shape attributes.
1597         * css/BasicShapeFunctions.h:
1598         * css/CSSCalculationValue.cpp:
1599         (WebCore::hasDoubleValue):
1600         (WebCore::buildCssText):
1601         (WebCore::CSSCalcValue::clampToPermittedRange):
1602         (WebCore::CSSCalcValue::doubleValue):
1603         (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
1604         (WebCore::CSSCalcPrimitiveValue::create):
1605         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
1606         (WebCore::CSSCalcPrimitiveValue::doubleValue):
1607         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
1608         (WebCore::CSSCalcPrimitiveValue::primitiveType):
1609         (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
1610         (WebCore::determineCategory):
1611         (WebCore::isIntegerResult):
1612         (WebCore::CSSCalcBinaryOperation::create):
1613         (WebCore::CSSCalcBinaryOperation::createSimplified):
1614         (WebCore::CSSCalcBinaryOperation::doubleValue):
1615         (WebCore::CSSCalcBinaryOperation::buildCssText):
1616         (WebCore::CSSCalcBinaryOperation::primitiveType):
1617         (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
1618         (WebCore::CSSCalcBinaryOperation::getNumberSide):
1619         (WebCore::CSSCalcBinaryOperation::evaluate):
1620         (WebCore::CSSCalcBinaryOperation::evaluateOperator):
1621         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1622         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
1623         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
1624         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
1625         (WebCore::CSSCalcValue::createExpressionNode):
1626         (WebCore::CSSCalcValue::create):
1627         * css/CSSCalculationValue.h:
1628         (WebCore::CSSCalcExpressionNode::category):
1629         (WebCore::CSSCalcValue::create):
1630         (WebCore::CSSCalcValue::isInt):
1631         (WebCore::CSSCalcValue::permittedValueRange):
1632         (WebCore::CSSCalcValue::expressionNode):
1633         (WebCore::CSSCalcValue::CSSCalcValue):
1634         (WebCore::toCSSCalcValue):
1635         * css/CSSComputedStyleDeclaration.cpp:
1636         (WebCore::ComputedStyleExtractor::propertyValue): Pass the style along to the new valueForBasicShape() function.
1637         * css/CSSPrimitiveValue.cpp:
1638         (WebCore::CSSPrimitiveValue::unitCategory): Made this function public so that CSSCalculationValue could use it.
1639         (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor): Ditto.
1640         (WebCore::CSSPrimitiveValue::primitiveType): Cleared trailing whitespace.
1641         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
1642         (WebCore::CSSPrimitiveValue::init): The common part of the two Length CSSPrimitiveValue constructors.
1643         (WebCore::CSSPrimitiveValue::computeLengthDouble): Moved the case labels to the left per check-webkit-style.
1644         (WebCore::CSSPrimitiveValue::getStringValue): Ditto.
1645         (WebCore::CSSPrimitiveValue::getDoubleValue): Removed trailing whitespace.
1646         * css/CSSPrimitiveValue.h:
1647         (WebCore::CSSPrimitiveValue::create): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
1648         (WebCore::toCSSPrimitiveValue): Check the CSSValue*'s validity with ASSERT_WITH_SECURITY_IMPLICATION before casting to CSSPrimitiveValue*.
1649         * css/CSSValuePool.h:
1650         (WebCore::CSSValuePool::createValue): A new overload that delegates to the new CSSPrimitiveValue(length,style) constructor.
1651         * platform/CalculationValue.h:
1652         (WebCore::CalculationValue::operator==):
1653         (WebCore::CalculationValue::isNonNegative):
1654         (WebCore::CalculationValue::expression):
1655         (WebCore::CalcExpressionNumber::value):
1656         (WebCore::toCalcExpressionNumber):
1657         (WebCore::CalcExpressionLength::CalcExpressionLength):
1658         (WebCore::CalcExpressionLength::length):
1659         (WebCore::toCalcExpressionLength):
1660         (WebCore::CalcExpressionBinaryOperation::leftSide):
1661         (WebCore::CalcExpressionBinaryOperation::rightSide):
1662         (WebCore::CalcExpressionBinaryOperation::getOperator):
1663         (WebCore::toCalcExpressionBinaryOperation):
1664         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
1665         (WebCore::CalcExpressionBlendLength::from):
1666         (WebCore::CalcExpressionBlendLength::to):
1667         (WebCore::CalcExpressionBlendLength::progress):
1668         (WebCore::toCalcExpressionBlendLength):
1669
1670 2013-09-27  Andreas Kling  <akling@apple.com>
1671
1672         REGRESSION(r154219): 30% more malloc memory used on html5-full-render.
1673         <https://webkit.org/b/122034>
1674
1675         Reviewed by Antti Koivisto.
1676
1677         canExecuteScripts() used to rely on Frame::settings() returning null
1678         when the Frame was disconnected from its Page, and giving Frame its
1679         own handle on the Settings broke this mechanism.
1680
1681         This caused us to hold on for some objects for a bit longer than we
1682         needed to in the run-perf-tests harness, showing up as a massive 30%
1683         regression in malloc memory use.
1684
1685         Fixed it by added an explicit null check of Frame::page().
1686
1687 2013-09-27  Alexey Proskuryakov  <ap@apple.com>
1688
1689         Updating bindings test results after KURL->URL rename.
1690
1691         Includes were now in the wrong order.
1692
1693         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
1694         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
1695         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
1696         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
1697         * bindings/scripts/test/CPP/WebDOMTestException.cpp:
1698         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
1699         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1700         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
1701         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1702         * bindings/scripts/test/JS/JSTestException.cpp:
1703         * bindings/scripts/test/JS/JSTestObj.cpp:
1704         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1705         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
1706         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1707         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
1708         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
1709         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
1710         * bindings/scripts/test/ObjC/DOMTestException.mm:
1711         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1712         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1713         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
1714
1715 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1716
1717         Get MediaStreamCenterGStreamer compiling again
1718         https://bugs.webkit.org/show_bug.cgi?id=122029
1719
1720         After MediaStream cleanup commit, it was not building anymore.
1721
1722         Reviewed by Eric Carlson.
1723
1724         No new tests needed.
1725
1726         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
1727
1728 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1729
1730         Storing a reference to MediaStreamTrack in RTCStatsRequest
1731         https://bugs.webkit.org/show_bug.cgi?id=122030
1732
1733         Reviewed by Eric Carlson.
1734
1735         The spec[1] says that the stats is related to a MediaStreamTrack object.
1736         It also says: "Evaluate the need for other selectors than MediaStreamTrack".
1737         So a MediaStreamTrack object is more suitable in this case.
1738
1739         [1]http://dev.w3.org/2011/webrtc/editor/webrtc.html#stats-selector
1740
1741         No new tests needed.
1742
1743         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1744         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
1745         (WebCore::RTCStatsRequestImpl::hasSelector):
1746         (WebCore::RTCStatsRequestImpl::track):
1747         * Modules/mediastream/RTCStatsRequestImpl.h:
1748         * platform/mediastream/RTCStatsRequest.h:
1749
1750 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1751
1752         [Nix] Updating Nix trunk files
1753         https://bugs.webkit.org/show_bug.cgi?id=121752
1754
1755         Reviewed by Benjamin Poulain.
1756
1757         No new tests needed.
1758
1759         * page/nix/EventHandlerNix.cpp:
1760         (WebCore::EventHandler::focusDocumentView):
1761         (WebCore::EventHandler::passWheelEventToWidget):
1762         (WebCore::EventHandler::passMousePressEventToSubframe):
1763         (WebCore::EventHandler::passMouseMoveEventToSubframe):
1764         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
1765         * platform/DragImage.h:
1766         * platform/graphics/GraphicsContext3D.h:
1767         * platform/nix/DragImageNix.cpp:
1768         (WebCore::createDragImageFromImage):
1769         * platform/nix/GamepadsNix.cpp:
1770         (WebCore::sampleGamepads):
1771         * platform/nix/LanguageNix.cpp:
1772         (WebCore::platformLanguage):
1773         * platform/nix/LocalizedStringsNix.cpp:
1774         (WebCore::unacceptableTLSCertificate):
1775         * platform/nix/PasteboardNix.cpp:
1776         (WebCore::Pasteboard::types):
1777         * platform/nix/RenderThemeNix.cpp:
1778         (WebCore::toColor):
1779         (WebCore::themeEngine):
1780         (WebCore::webCanvas):
1781         (WebCore::getWebThemeState):
1782         (WebCore::RenderThemeNix::paintButton):
1783         (WebCore::RenderThemeNix::paintTextField):
1784         (WebCore::RenderThemeNix::paintCheckbox):
1785         (WebCore::RenderThemeNix::paintRadio):
1786         (WebCore::RenderThemeNix::paintMenuList):
1787         (WebCore::RenderThemeNix::paintProgressBar):
1788         (WebCore::RenderThemeNix::paintInnerSpinButton):
1789         (WebCore::RenderThemeNix::paintMeter):
1790
1791 2013-09-27  Anders Carlsson  <andersca@apple.com>
1792
1793         Use std::unique_ptr for GraphicsLayer creation
1794         https://bugs.webkit.org/show_bug.cgi?id=122020
1795
1796         Reviewed by Antti Koivisto.
1797
1798         * platform/graphics/GraphicsLayer.h:
1799         * platform/graphics/GraphicsLayerFactory.h:
1800         * platform/graphics/ca/GraphicsLayerCA.cpp:
1801         (WebCore::GraphicsLayer::create):
1802         * platform/graphics/ca/GraphicsLayerCA.h:
1803         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1804         (WebCore::CompositingCoordinator::createGraphicsLayer):
1805         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1806         * rendering/RenderLayerBacking.cpp:
1807         (WebCore::RenderLayerBacking::createGraphicsLayer):
1808         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1809         (WebCore::RenderLayerBacking::paintIntoLayer):
1810         * rendering/RenderLayerBacking.h:
1811         (WebCore::RenderLayerBacking::hasScrollingLayer):
1812         * rendering/RenderLayerCompositor.cpp:
1813         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1814         * rendering/RenderLayerCompositor.h:
1815
1816 2013-09-27  Beth Dakin  <bdakin@apple.com>
1817
1818         ScrollbarPainterController should adopt the api to lock overlay scrollbar state
1819         https://bugs.webkit.org/show_bug.cgi?id=121928
1820
1821         Reviewed by Sam Weinig.
1822
1823         ScrollbarPainterController should adopt the api to lock overlay scrollbar state. 
1824         This will allow the ScrollbarPainterController and ScrollAnimatorMac to have 
1825         control over knowing whether or not the scrollbars are currently active, which 
1826         will allow us to remove a bunch of functions previously implemented in 
1827         ScrollableArea subclasses to answer that question.
1828
1829         ScrollableArea::scrollbarsCanBeActive() is not longer virtual. It used to 
1830         implemented on ScrollableArea subclasses, but now ScrollableArea can just get the 
1831         information from the ScrollAnimator.
1832         * WebCore.exp.in:
1833
1834         When ScrollableArea subclasses implemented scrollbarsCanBeActive(), they would 
1835         check to see if the document was in the page cache. Instead of that model, this 
1836         patch adopts a model where ScrollbarPainterController is told directly whether or 
1837         not it is active via shouldLockOverlayScrollbarsToHidden(bool).
1838         * dom/Document.cpp:
1839         (WebCore::Document::setInPageCache):
1840
1841         setAnimatorsAreActive() is no longer necessary. The functionality can be bundled 
1842         into shouldLockOverlayScrollbarsToHidden(bool).
1843         (WebCore::Document::documentDidResumeFromPageCache):
1844
1845         Remove implementations of scrollbarsCanBeActive(), setAnimatorsAreActive(), and 
1846         scrollbarAnimationsAreSuppressed(). 
1847         * page/FrameView.cpp:
1848         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
1849         * page/FrameView.h:
1850
1851         setShouldSuppressScrollbarAnimations(bool) now calls 
1852         setShouldLockOverlayScrollbars(bool). 
1853         * page/Page.cpp:
1854         (WebCore::Page::setShouldSuppressScrollbarAnimations):
1855         (WebCore::Page::setShouldLockOverlayScrollbars):
1856         * page/Page.h:
1857
1858         setIsActive() is now implemented in the ScrollAnimator instead of ScrollableArea 
1859         subclasses. finishCurrentScrollAnimations() is replaced by 
1860         lockOverlayScrollbarStateToHidden(bool).
1861         * platform/ScrollAnimator.h:
1862         (WebCore::ScrollAnimator::lockOverlayScrollbarStateToHidden):
1863         (WebCore::ScrollAnimator::scrollbarsCanBeActive):
1864
1865         New enum ScrollbarOverlayState.
1866         * platform/ScrollTypes.h:
1867
1868         Go to the animator for both of these functions.
1869         * platform/ScrollableArea.cpp:
1870         (WebCore::ScrollableArea::lockOverlayScrollbarStateToHidden):
1871         (WebCore::ScrollableArea::scrollbarsCanBeActive):
1872         * platform/ScrollableArea.h:
1873         (WebCore::ScrollableArea::setVisibleScrollerThumbRect):
1874
1875         Three new pieces of ScrollbarPainterController api.
1876         * platform/mac/NSScrollerImpDetails.h:
1877
1878         Instead of asking the ScrollableArea if scrollbars can be active, just find out if 
1879         the ScrollbarPaintController has been locked.
1880         * platform/mac/ScrollAnimatorMac.h:
1881         * platform/mac/ScrollAnimatorMac.mm:
1882         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1883         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1884         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
1885         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
1886         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
1887         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
1888         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
1889         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
1890         (WebCore::ScrollAnimatorMac::willStartLiveResize):
1891         (WebCore::ScrollAnimatorMac::contentsResized):
1892         (WebCore::ScrollAnimatorMac::willEndLiveResize):
1893         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
1894         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
1895         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
1896         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
1897         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
1898         (WebCore::ScrollAnimatorMac::lockOverlayScrollbarStateToHidden):
1899         (WebCore::ScrollAnimatorMac::scrollbarsCanBeActive):
1900         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
1901         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1902
1903         Remove implementations of scrollbarsCanBeActive() and 
1904         scrollbarAnimationsAreSuppressed().
1905         * rendering/RenderLayer.cpp:
1906         * rendering/RenderLayer.h:
1907         * rendering/RenderListBox.cpp:
1908         * rendering/RenderListBox.h:
1909
1910 2013-09-27  David Hyatt  <hyatt@apple.com>
1911
1912         Move line grid functionality from RenderBlock into RenderBlockFlow.
1913         https://bugs.webkit.org/show_bug.cgi?id=121502
1914
1915         Reviewed by Dean Jackson.
1916
1917         * rendering/LayoutState.cpp:
1918         (WebCore::LayoutState::LayoutState):
1919         (WebCore::LayoutState::establishLineGrid):
1920         * rendering/LayoutState.h:
1921         (WebCore::LayoutState::lineGrid):
1922         * rendering/RenderBlock.cpp:
1923         (WebCore::RenderBlock::willBeDestroyed):
1924         * rendering/RenderBlock.h:
1925         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
1926         * rendering/RenderBlockFlow.cpp:
1927         (WebCore::RenderBlockFlow::willBeDestroyed):
1928         (WebCore::RenderBlockFlow::layoutLineGridBox):
1929         * rendering/RenderBlockFlow.h:
1930         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
1931         (WebCore::RenderBlockFlow::lineGridBox):
1932         (WebCore::RenderBlockFlow::setLineGridBox):
1933         * rendering/RenderBlockLineLayout.cpp:
1934         * rendering/RootInlineBox.cpp:
1935         (WebCore::RootInlineBox::lineSnapAdjustment):
1936
1937 2013-09-27  Andreas Kling  <akling@apple.com>
1938
1939         Re-indent Settings.h
1940
1941         Rubber-stamped by Anders Carlsson.
1942
1943 2013-09-27  Eric Carlson  <eric.carlson@apple.com>
1944
1945         [MediaStream API] update SourceInfo object to match spec
1946         https://bugs.webkit.org/show_bug.cgi?id=121941
1947
1948         Reviewed by Dean Jackson.
1949
1950         No new tests, existing test updated.
1951
1952         * Modules/mediastream/SourceInfo.cpp:
1953         (WebCore::SourceInfo::kind): Get rid of "none".
1954         * Modules/mediastream/SourceInfo.h:
1955         (WebCore::SourceInfo::sourceId): Renamed from "id".
1956         * Modules/mediastream/SourceInfo.idl:
1957
1958         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
1959         (WebCore::TrackSourceInfo::create):
1960         (WebCore::TrackSourceInfo::kind):
1961         (WebCore::TrackSourceInfo::TrackSourceInfo):
1962
1963         * platform/mock/MockMediaStreamCenter.cpp:
1964         (WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): "facing" isn't a part of sourceInfo.
1965             Return a non-NULL ID because a source must always have one.
1966
1967 2013-09-26  Dean Jackson  <dino@apple.com>
1968
1969         Provide 2D Matrix decomposition for animation
1970         https://bugs.webkit.org/show_bug.cgi?id=112824
1971         <rdar://problem/15091882>
1972
1973         Reviewed by Eric Carlson (and Ian Henderson offline).
1974
1975         Implement a new 2d matrix blend, which is triggered
1976         when animating between two affine 3d matrices. This
1977         is intended to be the official algorithm that gets
1978         put into the W3C Transforms specification.
1979
1980         The old code is renamed with a 4 prefix (indicating
1981         it is a blend between 3d matrices using quaternions),
1982         and new methods and structures for 2d blending were added.
1983
1984         I also took the opportunity to clean up a lot of
1985         bad WebKit style.
1986
1987         * platform/graphics/ca/GraphicsLayerCA.cpp:
1988         (WebCore::maxScaleFromTransform): Use 3d decomposition.
1989         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1990         (WebCore::PerspectiveTransformOperation::blend): Ditto.
1991         * platform/graphics/transforms/RotateTransformOperation.cpp:
1992         (WebCore::RotateTransformOperation::blend): Ditto.
1993
1994         * platform/graphics/transforms/TransformationMatrix.cpp:
1995         (WebCore::decompose2): New method to decompose an affine 3d matrix
1996         into X/Y scale + translate, a rotation angle, plus some extracted
1997         a,b,c,d fields from the affine section.
1998         (WebCore::decompose4): New name for the old function.
1999         (WebCore::TransformationMatrix::blend2): Perform linear interpolation
2000         between two 2d decompositions.
2001         (WebCore::TransformationMatrix::blend4): New name for the old function.
2002         (WebCore::TransformationMatrix::blend): Call blend2 or blend4 depending
2003         on the type of matrix.
2004         (WebCore::TransformationMatrix::decompose2): Calls into the decompose2
2005         method above.
2006         (WebCore::TransformationMatrix::decompose4): New name.
2007         (WebCore::TransformationMatrix::recompose2): Recomposes a 3d matrix from
2008         a 2d decomposition.
2009         (WebCore::TransformationMatrix::recompose4): New name.
2010         * platform/graphics/transforms/TransformationMatrix.h: All the changes
2011         for the new methods above.
2012
2013 2013-09-26  Darin Adler  <darin@apple.com>
2014
2015         rename KURL to URL
2016         https://bugs.webkit.org/show_bug.cgi?id=16214
2017
2018         Reviewed by Andreas Kling.
2019
2020         * many files: Renamed, using script.
2021
2022 2013-09-06  Jer Noble  <jer.noble@apple.com>
2023
2024         [Mac] Implement the media controls in JavaScript.
2025         https://bugs.webkit.org/show_bug.cgi?id=120895
2026
2027         Reviewed by Dean Jackson.
2028
2029         Re-implement the existing MediaControls constellation of classes in JavaScript
2030         and CSS. This will allow different ports to configure their controls without
2031         dependencies on the layout requirements of any other port's controls.
2032
2033         Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:
2034         * Configurations/FeatureDefines.xcconfig:
2035
2036         Add new source files to the project:
2037         * DerivedSources.cpp:
2038         * DerivedSources.make:
2039         * WebCore.vcxproj/WebCore.vcxproj:
2040         * WebCore.vcxproj/WebCore.vcxproj.filters:
2041         * WebCore.xcodeproj/project.pbxproj:
2042
2043         Add a new class MediaControlsHost which the script controls can use to
2044         communicate with the HTMLMediaElement without exposing private interfaces
2045         to web facing scripts:
2046         * Modules/mediacontrols/MediaControlsHost.cpp: Added.
2047         (WebCore::MediaControlsHost::automaticKeyword): Static method.
2048         (WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
2049         (WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
2050         (WebCore::MediaControlsHost::create): Simple factory.
2051         (WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
2052         (WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
2053         (WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
2054         (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
2055         (WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
2056         (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
2057         (WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
2058         (WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
2059         (WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
2060         (WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.
2061         * Modules/mediacontrols/MediaControlsHost.h: Added.
2062         * Modules/mediacontrols/MediaControlsHost.idl: Added.
2063         * Modules/mediacontrols/mediaControlsApple.css: Added.
2064
2065         Add convenience methods for adding a MediaControlsHost to a VM.
2066         * bindings/js/ScriptObject.cpp:
2067         (WebCore::ScriptGlobalObject::set):
2068         * bindings/js/ScriptObject.h:
2069
2070         Add the new controller .js implementation:
2071         * Modules/mediacontrols/mediaControlsApple.js: Added.
2072         (createControls): Global method to create a new Controller object.
2073         (Controller): Constructor. Create and configure the default set of controls.
2074         (Controller.prototype.addListeners): Adds event listeners to the this.video object.
2075         (Controller.prototype.removeListeners): Removes listeners from same.
2076         (Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and
2077                 deregistration simpler.
2078         (Controller.prototype.createBase): Creates the base controls object and the text track container.
2079         (Controller.prototype.createControls): Creates the controls panel object and controller UI.
2080         (Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
2081         (Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
2082         (Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
2083         (Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.
2084
2085         Add listeners for HTMLMediaElement events:
2086         (Controller.prototype.onloadstart): Update the status display.
2087         (Controller.prototype.onerror): Ditto.
2088         (Controller.prototype.onabort): Ditto.
2089         (Controller.prototype.onsuspend): Ditto.
2090         (Controller.prototype.onprogress): Ditto.
2091         (Controller.prototype.onstalled): Ditto.
2092         (Controller.prototype.onwaiting): Ditto.
2093         (Controller.prototype.onreadystatechange): Ditto.
2094         (Controller.prototype.ontimeupdate): Update the timeline and time displays.
2095         (Controller.prototype.ondurationchange): Ditto.
2096         (Controller.prototype.onplaying): Update the play button.
2097         (Controller.prototype.onplay): Ditto.
2098         (Controller.prototype.onpause): Ditto.
2099         (Controller.prototype.onratechange): Ditto.
2100         (Controller.prototype.onvolumechange): Update the volume and mute UI.
2101         (Controller.prototype.ontexttrackchange): Update the text track container and captions button.
2102         (Controller.prototype.ontexttrackadd): Ditto.
2103         (Controller.prototype.ontexttrackremove): Ditto.
2104         (Controller.prototype.ontexttrackcuechange): Ditto.
2105         (Controller.prototype.onfullscreenchange): Reconfigure the controls.
2106
2107         Add listeners for UI element events:
2108         (Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
2109         (Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
2110         (Controller.prototype.onrewindbuttonclicked): Rewind.
2111         (Controller.prototype.onplaybuttonclicked): Toggle pause.
2112         (Controller.prototype.ontimelinechange): Update the currentTime.
2113         (Controller.prototype.ontimelinedown):
2114         (Controller.prototype.ontimelineup):
2115         (Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
2116         (Controller.prototype.ontimelinemouseout): Hide same.
2117         (Controller.prototype.ontimelinemousemove): Move the thumbnail view.
2118         (Controller.prototype.onmutebuttonclicked): Mute audio.
2119         (Controller.prototype.onminbuttonclicked): Increase volume to max.
2120         (Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
2121         (Controller.prototype.onvolumesliderchange): Update the current volume.
2122         (Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
2123         (Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
2124         (Controller.prototype.oncontrolschange): Show or hide the controls panel.
2125         (Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
2126         (Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
2127         (Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
2128         (Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.
2129
2130         Add action methods (which are mostly self explanatory):
2131         (Controller.prototype.updateDuration):
2132         (Controller.prototype.updatePlaying):
2133         (Controller.prototype.showControls): 
2134         (Controller.prototype.hideControls):
2135         (Controller.prototype.removeControls):
2136         (Controller.prototype.addControls):
2137         (Controller.prototype.updateTime):
2138         (Controller.prototype.updateReadyState):
2139         (Controller.prototype.setStatusHidden):        
2140         (Controller.prototype.updateThumbnailTrack):
2141         (Controller.prototype.updateCaptionButton):
2142         (Controller.prototype.updateCaptionContainer):
2143         (Controller.prototype.buildCaptionMenu):
2144         (Controller.prototype.captionItemSelected):
2145         (Controller.prototype.destroyCaptionMenu):
2146         (Controller.prototype.updateVolume):
2147
2148         Add utility methods:
2149         (Controller.prototype.isFullScreen):
2150         (Controller.prototype.canPlay):
2151         (Controller.prototype.nextRate):
2152         (Controller.prototype.seekBackFaster):
2153         (Controller.prototype.seekForwardFaster):
2154         (Controller.prototype.formatTime):
2155         (Controller.prototype.trackHasThumbnails):
2156
2157         Add the stylesheet for the javascript controls (which are mostly) copied from
2158         the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:
2159         * Modules/mediacontrols/mediaControlsApple.css: Added.
2160         * css/fullscreenQuickTime.css: Removed.
2161         * css/mediaControlsQuickTime.css: Removed.
2162
2163         Inject new stylesheets into UA sheets:
2164         * css/CSSDefaultStyleSheets.cpp:
2165         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2166
2167         Use the new javascript controls rather than MediaControls:
2168         * html/HTMLMediaElement.cpp:
2169         (WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
2170         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
2171         (WebCore::HTMLMediaElement::mediaControls): Ditto.
2172         (WebCore::HTMLMediaElement::hasMediaControls): Ditto.
2173         (WebCore::HTMLMediaElement::createMediaControls): Ditto.
2174         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
2175         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
2176         (WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
2177         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
2178         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call
2179                 the scripts global factory function.
2180         * html/HTMLMediaElement.h:
2181
2182         Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
2183         add accessors for the new .js and .css file data:
2184         * rendering/RenderTheme.h:
2185         (WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
2186         (WebCore::RenderTheme::mediaControlsScript): Ditto.
2187         * rendering/RenderThemeMac.h:
2188         * rendering/RenderThemeMac.mm:
2189         (WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
2190         (WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
2191         (WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.
2192         * rendering/RenderThemeWin.cpp:
2193         (WebCore::RenderThemeWin::mediaControlsStyleSheet):
2194         (WebCore::RenderThemeWin::mediaControlsScript):
2195         * rendering/RenderThemeWin.h:
2196
2197 2013-09-27  Bem Jones-Bey  <bjonesbe@adobe.com>
2198
2199         [css-shapes] Shapes are not resolved the same way in shape-inside and clip-path
2200         https://bugs.webkit.org/show_bug.cgi?id=121922
2201
2202         Reviewed by Andreas Kling.
2203
2204         Fix computation of a percentage radius for circle shape-outside to
2205         match the CSS Shapes spec.
2206
2207         Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-circle-001.html
2208
2209         * rendering/shapes/Shape.cpp:
2210         (WebCore::Shape::createShape):
2211
2212 2013-09-27  Darin Adler  <darin@apple.com>
2213
2214         Add empty MainFrame class
2215         https://bugs.webkit.org/show_bug.cgi?id=121770
2216
2217         Reviewed by Andreas Kling.
2218
2219         For now, MainFrame simply derives from Frame and adds nothing.
2220         Next, we will make each Frame point back to its MainFrame.
2221
2222         * CMakeLists.txt: Added MainFrame.cpp/h.
2223         * GNUmakefile.list.am: Ditto.
2224         * Target.pri: Ditto.
2225         * WebCore.exp.in: Ditto.
2226         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2227         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2228         * WebCore.xcodeproj/project.pbxproj: Ditto.
2229
2230         * page/Frame.cpp:
2231         (WebCore::Frame::Frame): Use references instead of pointers for constructor.
2232         (WebCore::Frame::create): Pass references instead of pointers to constructor.
2233         * page/Frame.h: Made constructor protected instead of private, and marked
2234         destructor virtual explicitly. Also marked virtual functions OVERRIDE and FINAL.
2235
2236         * page/MainFrame.cpp: Added.
2237         * page/MainFrame.h: Added.
2238
2239         * page/Page.cpp:
2240         (WebCore::Page::Page): Use MainFrame::create instead of Frame::create.
2241         (WebCore::Page::frameIsMainFrame): Moved here, no longer inline.
2242         (WebCore::Page::renderTreeSize): Use const Frame* instead of Frame*.
2243         (WebCore::Page::checkSubframeCountConsistency): Ditto.
2244         * page/Page.h: Changed mainFrame() to return MainFrame& and m_mainFrame to
2245         be a RefPtr<MainFrame>.
2246
2247         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2248         * bindings/js/PageScriptDebugServer.cpp:
2249         * bindings/js/ScriptProfiler.cpp:
2250         * bindings/js/ScriptState.cpp:
2251         * css/MediaQueryEvaluator.cpp:
2252         * dom/Document.cpp:
2253         * history/CachedFrame.cpp:
2254         * history/CachedPage.cpp:
2255         * history/PageCache.cpp:
2256         * html/HTMLPlugInImageElement.cpp:
2257         * inspector/InspectorAgent.cpp:
2258         * inspector/InspectorCanvasAgent.cpp:
2259         * inspector/InspectorClient.cpp:
2260         * inspector/InspectorDOMAgent.cpp:
2261         * inspector/InspectorFrontendClientLocal.cpp:
2262         * inspector/InspectorFrontendHost.cpp:
2263         * inspector/InspectorInputAgent.cpp:
2264         * inspector/InspectorInstrumentation.cpp:
2265         * inspector/InspectorOverlay.cpp:
2266         * inspector/InspectorPageAgent.cpp:
2267         * inspector/PageRuntimeAgent.cpp:
2268         * loader/FrameLoader.cpp:
2269         * loader/HistoryController.cpp:
2270         * loader/archive/mhtml/MHTMLArchive.cpp:
2271         * page/AutoscrollController.cpp:
2272         * page/Chrome.cpp:
2273         * page/ContextMenuController.cpp:
2274         * page/DOMWindow.cpp:
2275         * page/DragController.cpp:
2276         * page/EventHandler.cpp:
2277         * page/FocusController.cpp:
2278         * page/FrameTree.cpp:
2279         * page/FrameView.cpp:
2280         * page/GestureTapHighlighter.cpp:
2281         * page/PageGroup.cpp:
2282         * page/PageGroupLoadDeferrer.cpp:
2283         * page/PageSerializer.cpp:
2284         * page/PageThrottler.cpp:
2285         * page/Settings.cpp:
2286         * page/SpatialNavigation.cpp:
2287         * page/mac/DragControllerMac.mm:
2288         * page/mac/PageMac.cpp:
2289         * page/scrolling/ScrollingCoordinator.cpp:
2290         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2291         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2292         * plugins/DOMMimeType.cpp:
2293         * storage/StorageEventDispatcher.cpp:
2294         * svg/graphics/SVGImage.cpp:
2295         * testing/InternalSettings.cpp:
2296         * testing/Internals.cpp:
2297         Include MainFrame.h instead of Frame.h as needed.
2298
2299 2013-09-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2300
2301         Add toWebKitCSS*Value functions to cast from CSSValue
2302         https://bugs.webkit.org/show_bug.cgi?id=121776
2303
2304         Reviewed by Andreas Kling.
2305
2306         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
2307
2308         No new tests, no behavior change.
2309
2310         * css/CSSValue.cpp:
2311         (WebCore::CSSValue::destroy):
2312         * css/StyleResolver.cpp:
2313         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2314         (WebCore::StyleResolver::createFilterOperations):
2315         * css/TransformFunctions.cpp:
2316         (WebCore::transformsForValue):
2317         * css/WebKitCSSArrayFunctionValue.h:
2318         (WebCore::toWebKitCSSArrayFunctionValue):
2319         * css/WebKitCSSFilterValue.h:
2320         (WebCore::toWebKitCSSFilterValue):
2321         * css/WebKitCSSMatFunctionValue.h:
2322         (WebCore::toWebKitCSSMatFunctionValue):
2323         * css/WebKitCSSMixFunctionValue.h:
2324         (WebCore::toWebKitCSSMixFunctionValue):
2325         * css/WebKitCSSSVGDocumentValue.h:
2326         (WebCore::toWebKitCSSSVGDocumentValue):
2327         * css/WebKitCSSShaderValue.h:
2328         (WebCore::toWebKitCSSShaderValue):
2329         * css/WebKitCSSTransformValue.h:
2330         (WebCore::toWebKitCSSTransformValue):
2331
2332 2013-09-27  Zalan Bujtas  <zalan@apple.com>
2333
2334         Unexpected word wrapping for wrapped content then raw content.
2335         https://bugs.webkit.org/show_bug.cgi?id=121130
2336
2337         Reviewed by Darin Adler.
2338
2339         When deciding whether a line is considered empty, we need to check if the current
2340         object is fully responsible for the currently uncommitted width. It helps differentiating
2341         <span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
2342         case when we hit the second <span> the line is still considered empty, as opposed to the
2343         second example.
2344         This patch introduces a map to keep track of the uncommitted widths.
2345
2346         Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
2347
2348         * rendering/LineWidth.cpp:
2349         (WebCore::LineWidth::uncommittedWidthForObject):
2350         (WebCore::LineWidth::addUncommittedWidth):
2351         * rendering/LineWidth.h:
2352         * rendering/RenderBlockLineLayout.cpp:
2353         (WebCore::LineBreaker::nextSegmentBreak):
2354
2355 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
2356
2357         [ATK] Protect entry points in the ATK wrapper against outdated render trees
2358         https://bugs.webkit.org/show_bug.cgi?id=121558
2359
2360         Reviewed by Chris Fleizach.
2361
2362         Make sure that we protect every entry point in the ATK wrapper
2363         against outdated render trees, before using the WebCore's
2364         accessibility API, since that might lead to problems (and crashes)
2365         if the render and accessibility trees are not stable.
2366
2367         Thus, call AccessibilityObject::updateBackingStore() in those
2368         entry points and check whether the ATK wrapper is detached or not
2369         after that, to decide whether to continue or not.
2370
2371         Besides providing a new test to check that it WebKit does not
2372         crash in a given scenario (which actually triggered the
2373         investigation here), solving this situation also fixes other tests
2374         that were previously failing (aria-used-on-image-maps.html) or
2375         that were printing wrong results, not detected until now due to
2376         wrong platform specific expectations (file-upload-button-stringvalue
2377         and deleting-iframe-destroys-axcache).
2378
2379         Test: accessibility/heading-crash-after-hidden.html
2380
2381         * accessibility/atk/WebKitAccessibleUtil.h: Added two new macros
2382         to inject the needed code at the beginning of each entry point to
2383         allow gracefully exit those functions when the render tree is
2384         unstable. Inspired by g_return_if_fail and g_return_val_if_fail, we
2385         called them returnIfWebKitAccessibleIsInvalid and returnValIfWebKitAccessibleIsInvalid.
2386
2387         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2388         (webkitAccessibleHyperlinkActionDoAction): Protect entry point.
2389         (webkitAccessibleHyperlinkActionGetNActions): Ditto.
2390         (webkitAccessibleHyperlinkActionGetDescription): Ditto.
2391         (webkitAccessibleHyperlinkActionGetKeybinding): Ditto.
2392         (webkitAccessibleHyperlinkActionGetName): Ditto.
2393         (webkitAccessibleHyperlinkGetURI): Ditto.
2394         (webkitAccessibleHyperlinkGetObject): Ditto.
2395         (webkitAccessibleHyperlinkGetStartIndex): Ditto.
2396         (webkitAccessibleHyperlinkGetEndIndex): Ditto.
2397         (webkitAccessibleHyperlinkIsValid): Ditto.
2398         (webkitAccessibleHyperlinkGetNAnchors): Ditto.
2399         (webkitAccessibleHyperlinkIsSelectedLink): Ditto.
2400         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
2401         (webkitAccessibleActionDoAction): Ditto.
2402         (webkitAccessibleActionGetNActions): Ditto.
2403         (webkitAccessibleActionGetDescription): Ditto.
2404         (webkitAccessibleActionGetKeybinding): Ditto.
2405         (webkitAccessibleActionGetName): Ditto.
2406         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2407         (webkitAccessibleComponentRefAccessibleAtPoint): Ditto.
2408         (webkitAccessibleComponentGetExtents): Ditto.
2409         (webkitAccessibleComponentGrabFocus): Ditto.
2410         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2411         (webkitAccessibleDocumentGetAttributeValue): Ditto.
2412         (webkitAccessibleDocumentGetAttributes): Ditto.
2413         (webkitAccessibleDocumentGetLocale): Ditto.
2414         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
2415         (webkitAccessibleEditableTextSetRunAttributes): Ditto.
2416         (webkitAccessibleEditableTextSetTextContents): Ditto.
2417         (webkitAccessibleEditableTextInsertText): Ditto.
2418         (webkitAccessibleEditableTextCopyText): Ditto.
2419         (webkitAccessibleEditableTextCutText): Ditto.
2420         (webkitAccessibleEditableTextDeleteText): Ditto.
2421         (webkitAccessibleEditableTextPasteText): Ditto.
2422         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
2423         (webkitAccessibleHypertextGetLink): Ditto.
2424         (webkitAccessibleHypertextGetNLinks): Ditto.
2425         (webkitAccessibleHypertextGetLinkIndex): Ditto.
2426         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
2427         (webkitAccessibleImageGetImagePosition): Ditto.
2428         (webkitAccessibleImageGetImageDescription): Ditto.
2429         (webkitAccessibleImageGetImageSize): Ditto.
2430         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2431         (webkitAccessibleSelectionAddSelection): Ditto.
2432         (webkitAccessibleSelectionClearSelection): Ditto.
2433         (webkitAccessibleSelectionRefSelection): Ditto.
2434         (webkitAccessibleSelectionGetSelectionCount): Ditto.
2435         (webkitAccessibleSelectionIsChildSelected): Ditto.
2436         (webkitAccessibleSelectionRemoveSelection): Ditto.
2437         (webkitAccessibleSelectionSelectAllSelection): Ditto.
2438         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2439         (webkitAccessibleTableRefAt): Ditto.
2440         (webkitAccessibleTableGetIndexAt): Ditto.
2441         (webkitAccessibleTableGetColumnAtIndex): Ditto.
2442         (webkitAccessibleTableGetRowAtIndex): Ditto.
2443         (webkitAccessibleTableGetNColumns): Ditto.
2444         (webkitAccessibleTableGetNRows): Ditto.
2445         (webkitAccessibleTableGetColumnExtentAt): Ditto.
2446         (webkitAccessibleTableGetRowExtentAt): Ditto.
2447         (webkitAccessibleTableGetColumnHeader): Ditto.
2448         (webkitAccessibleTableGetRowHeader): Ditto.
2449         (webkitAccessibleTableGetCaption): Ditto.
2450         (webkitAccessibleTableGetColumnDescription): Ditto.
2451         (webkitAccessibleTableGetRowDescription): Ditto.
2452         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2453         (webkitAccessibleTextGetText): Ditto.
2454         (webkitAccessibleTextGetTextAfterOffset): Ditto.
2455         (webkitAccessibleTextGetTextAtOffset): Ditto.
2456         (webkitAccessibleTextGetTextBeforeOffset): Ditto.
2457         (webkitAccessibleTextGetCharacterAtOffset): Ditto.
2458         (webkitAccessibleTextGetCaretOffset): Ditto.
2459         (webkitAccessibleTextGetRunAttributes): Ditto.
2460         (webkitAccessibleTextGetDefaultAttributes): Ditto.
2461         (webkitAccessibleTextGetCharacterExtents): Ditto.
2462         (webkitAccessibleTextGetRangeExtents): Ditto.
2463         (webkitAccessibleTextGetCharacterCount): Ditto.
2464         (webkitAccessibleTextGetOffsetAtPoint): Ditto.
2465         (webkitAccessibleTextGetNSelections): Ditto.
2466         (webkitAccessibleTextGetSelection): Ditto.
2467         (webkitAccessibleTextAddSelection): Ditto.
2468         (webkitAccessibleTextSetSelection): Ditto.
2469         (webkitAccessibleTextRemoveSelection): Ditto.
2470         (webkitAccessibleTextSetCaretOffset): Ditto.
2471         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2472         (webkitAccessibleValueGetCurrentValue): Ditto.
2473         (webkitAccessibleValueGetMaximumValue): Ditto.
2474         (webkitAccessibleValueGetMinimumValue): Ditto.
2475         (webkitAccessibleValueSetCurrentValue): Ditto.
2476         (webkitAccessibleValueGetMinimumIncrement): Ditto.
2477         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2478         (core): Removed, as it's not actually needed.
2479         (webkitAccessibleGetName):  Protect entry point.
2480         (webkitAccessibleGetDescription): Ditto.
2481         (webkitAccessibleGetParent): Ditto.
2482         (webkitAccessibleGetNChildren): Ditto.
2483         (webkitAccessibleRefChild): Ditto.
2484         (webkitAccessibleGetIndexInParent): Ditto.
2485         (webkitAccessibleGetAttributes): Ditto.
2486         (webkitAccessibleGetRole): Ditto.
2487         (webkitAccessibleRefStateSet): Ditto.
2488         (webkitAccessibleRefRelationSet): Ditto.
2489         (webkitAccessibleGetObjectLocale): Ditto.
2490         (webkitAccessibleDetach): Ditto.
2491         (webkitAccessibleIsDetached): New helper function, to be used from
2492         the newly added macros. We need to check whether the wrapper is
2493         detached and not just the wrapper AccessibilityObject since once
2494         the detachment happens we can't trust anything but the AtkObject
2495         from the wrapper (the AccessibilityObject might be invalid).
2496         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
2497
2498         Assert that the render tree is neither being updated nor in need
2499         of being updated before trying to compute the text under a given
2500         element, since that might lead to crashes due to the constructor
2501         of TextIterator calling updateLayoutIgnorePendingStylesheets().
2502
2503         * accessibility/AccessibilityNodeObject.cpp:
2504         (WebCore::AccessibilityNodeObject::textUnderElement): Assert that
2505         the render tree is neither being updated nor needing updating.
2506
2507 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
2508
2509         [ATK] accessibility/aria-sort.html is failing after r156409
2510         https://bugs.webkit.org/show_bug.cgi?id=121947
2511
2512         Reviewed by Chris Fleizach.
2513
2514         The WAI-ARIA spec says to translate the value as is from the
2515         attribute, so do just that instead of mapping values from the
2516         AccessibilitySortDirection enumeration into strings.
2517         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
2518
2519         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2520         (webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
2521
2522 2013-09-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2523
2524         Sync toWebKitCSSShaderValue() behavior with other toCSSFooValue()
2525         https://bugs.webkit.org/show_bug.cgi?id=121886
2526
2527         Reviewed by Darin Adler.
2528
2529         toWebKitCSSShaderValue() behavior is different from other to CSSFooValue().
2530         It shouldn't return null. The type checking should be done before doing type cast.
2531
2532         * css/StyleResolver.cpp:
2533         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2534         * css/WebKitCSSShaderValue.h:
2535         (WebCore::toWebKitCSSShaderValue):
2536
2537 2013-09-26  Antti Koivisto  <antti@apple.com>
2538
2539         Move m_style to RenderElement
2540         https://bugs.webkit.org/show_bug.cgi?id=121936
2541
2542         Reviewed by Andreas Kling.
2543
2544         Text renderers always have the same style as their parent. They can get their style via the parent pointer
2545         rather than having a member of their own.
2546         
2547         This shrinks RenderText by a pointer.
2548
2549         * dom/PseudoElement.cpp:
2550         (WebCore::PseudoElement::didRecalcStyle):
2551         
2552             Text renderers have no independent style. No need to set it.
2553
2554         * editing/ApplyBlockElementCommand.cpp:
2555         * rendering/RenderBlock.cpp:
2556         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
2557         
2558             Avoid getting style from text child before it is added to tree.
2559
2560         (WebCore::RenderBlock::updateFirstLetterStyle):
2561         (WebCore::RenderBlock::createFirstLetterRenderer):
2562         * rendering/RenderButton.cpp:
2563         (WebCore::RenderButton::styleDidChange):
2564         (WebCore::RenderButton::setText):
2565         * rendering/RenderCombineText.cpp:
2566         (WebCore::RenderCombineText::styleDidChange):
2567                 
2568             Don't set text style anymore.
2569
2570         * rendering/RenderElement.cpp:
2571         (WebCore::RenderElement::RenderElement):
2572         (WebCore::RenderElement::setStyle):
2573         
2574             Notify child text renderers of style change.
2575
2576         (WebCore::RenderElement::setAnimatableStyle):
2577         (WebCore::RenderElement::setPseudoStyle):
2578         
2579             Push down to RenderElement, remove text branches.
2580
2581         (WebCore::RenderElement::addChild):
2582         
2583             Notify text renderers of style change when added to tree.
2584
2585         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2586         * rendering/RenderElement.h:
2587         (WebCore::RenderElement::style):
2588         (WebCore::RenderElement::setStyleInternal):
2589         
2590             Move m_style from RenderObject.
2591
2592         (WebCore::RenderObject::style):
2593         
2594             Inline this in RenderElement.h instead of making it virtual.
2595
2596         * rendering/RenderInline.cpp:
2597         (WebCore::updateStyleOfAnonymousBlockContinuations):
2598         (WebCore::RenderInline::styleDidChange):
2599         
2600             Tighten typing to call RenderElement::setStyle.
2601
2602         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2603         
2604             Change assert. This can get legitimately called during layout for the first letter renderers.
2605             This was previously avoided by luck.
2606
2607         * rendering/RenderMenuList.cpp:
2608         (WebCore::RenderMenuList::styleDidChange):
2609         (WebCore::RenderMenuList::setText):
2610         
2611             Don't set text style anymore.
2612
2613         * rendering/RenderObject.cpp:
2614         (WebCore::RenderObject::RenderObject):
2615         (WebCore::RenderObject::containingBlock):
2616         (WebCore::RenderObject::drawLineForBoxSide):
2617         (WebCore::RenderObject::hasEntirelyFixedBackground):
2618         (WebCore::RenderObject::container):
2619         (WebCore::RenderObject::cachedFirstLineStyle):
2620
2621             Switch to style(), avoid unnecessary repetition.
2622             Move code out.
2623
2624         * rendering/RenderObject.h:
2625         
2626             Move functions to RenderElement.
2627
2628         (WebCore::RenderObject::isBeforeContent):
2629         (WebCore::RenderObject::isAfterContent):
2630         
2631             Avoid accessing style for text renderers as these are called before the renderer
2632             is added to tree.
2633
2634         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2635         * rendering/RenderRegion.cpp:
2636         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2637         (WebCore::RenderRegion::setObjectStyleInRegion):
2638         * rendering/RenderSearchField.cpp:
2639         (WebCore::RenderSearchField::updateCancelButtonVisibility):
2640         * rendering/RenderText.cpp:
2641         * rendering/RenderText.h:
2642         
2643             Remove setStyle.
2644
2645         (WebCore::RenderText::style):
2646         
2647             Get style from parent.
2648
2649         * rendering/mathml/RenderMathMLOperator.cpp:
2650         (WebCore::RenderMathMLOperator::updateFromElement):
2651         (WebCore::RenderMathMLOperator::createGlyph):
2652         * rendering/style/ContentData.cpp:
2653         (WebCore::TextContentData::createRenderer):
2654         (WebCore::CounterContentData::createRenderer):
2655         (WebCore::QuoteContentData::createRenderer):
2656         
2657             Pseudo style for RenderText subclasses comes from parent without any explicit setting.
2658
2659         * style/StyleResolveTree.cpp:
2660         (WebCore::Style::createTextRendererIfNeeded):
2661         (WebCore::Style::resolveLocal):
2662         (WebCore::Style::updateTextStyle):
2663         (WebCore::Style::resolveShadowTree):
2664         (WebCore::Style::resolveTree):
2665         
2666             No need to set or update text renderer style separately.
2667
2668 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2669
2670         [MediaStream] make MediaStream testable
2671         https://bugs.webkit.org/show_bug.cgi?id=121967
2672
2673         Reviewed by Dean Jackson.
2674
2675         No new tests, existing tests updated.
2676
2677         * CMakeLists.txt: Add MockMediaStreamCenter.
2678         * GNUmakefile.list.am: Ditto.
2679
2680         * Modules/mediastream/MediaStreamTrack.idl: Add SkipVTableValidation.
2681         * Modules/mediastream/NavigatorUserMediaError.idl: Add JSGenerateToJSObject.
2682         * WebCore.exp.in: Export MockMediaStreamCenter::registerMockMediaStreamCenter.
2683
2684         * WebCore.xcodeproj/project.pbxproj: Add MockMediaStreamCenter.
2685         * dom/DOMError.h: Make the destructor virtual because it has a derived class.
2686         * dom/DOMError.idl:
2687
2688         * platform/mock/MockMediaStreamCenter.cpp: Added.
2689         * platform/mock/MockMediaStreamCenter.h: Added.
2690
2691         * testing/Internals.cpp: Register the mock stream center.
2692
2693 2013-09-26  Benjamin Poulain  <benjamin@webkit.org>
2694
2695         Move CSS MatchRequest from StyleResolver to a private definition in ElementRuleCollector
2696         https://bugs.webkit.org/show_bug.cgi?id=121986
2697
2698         Reviewed by Andreas Kling.
2699
2700         MatchRequest is an internal type of ElementRuleCollector now, move the definition
2701         to ElementRuleCollector.
2702
2703         * css/DocumentRuleSets.h:
2704         * css/ElementRuleCollector.h:
2705         (WebCore::ElementRuleCollector::MatchRequest::MatchRequest):
2706         * css/StyleResolver.h:
2707
2708 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
2709
2710         [Windows] Unreviewed build fix after r156487.
2711
2712         Add explicit casting needed by MSVC to compile this code. Much
2713         of this could probably be removed when we move to VS2012 or newer.
2714
2715         * bindings/js/JSEventListener.cpp:
2716         (WebCore::JSEventListener::JSEventListener):
2717         * bindings/js/JSEventListener.h:
2718         (WebCore::JSEventListener::jsFunction):
2719         * bridge/jsc/BridgeJSC.cpp:
2720         (JSC::Bindings::Instance::createRuntimeObject):
2721
2722 2013-09-26  Commit Queue  <commit-queue@webkit.org>
2723
2724         Unreviewed, rolling out r156510.
2725         http://trac.webkit.org/changeset/156510
2726         https://bugs.webkit.org/show_bug.cgi?id=121989
2727
2728         Landed in-progress code along with build fix. (Requested by
2729         bfulgham on #webkit).
2730
2731         * bindings/js/JSEventListener.cpp:
2732         (WebCore::JSEventListener::JSEventListener):
2733         * bindings/js/JSEventListener.h:
2734         (WebCore::JSEventListener::jsFunction):
2735         * bridge/jsc/BridgeJSC.cpp:
2736         (JSC::Bindings::Instance::createRuntimeObject):
2737         * platform/graphics/filters/FEGaussianBlur.cpp:
2738         (WebCore::FEGaussianBlur::platformApplyGeneric):
2739         (WebCore::FEGaussianBlur::platformApply):
2740         * platform/graphics/win/DIBPixelData.cpp:
2741         (WebCore::DIBPixelData::writeToFile):
2742         * platform/graphics/win/DIBPixelData.h:
2743
2744 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
2745
2746         [Windows] Unreviewed build fix after r156487.
2747
2748         Add explicit casting needed by MSVC to compile this code. Much
2749         of this could probably be removed when we move to VS2012 or newer.
2750
2751         * bindings/js/JSEventListener.cpp:
2752         (WebCore::JSEventListener::JSEventListener):
2753         * bindings/js/JSEventListener.h:
2754         (WebCore::JSEventListener::jsFunction):
2755         * bridge/jsc/BridgeJSC.cpp:
2756         (JSC::Bindings::Instance::createRuntimeObject):
2757         * platform/graphics/filters/FEGaussianBlur.cpp:
2758         (WebCore::FEGaussianBlur::platformApplyGeneric):
2759         (WebCore::FEGaussianBlur::platformApply):
2760         * platform/graphics/win/DIBPixelData.cpp:
2761         (WebCore::DIBPixelData::DIBPixelData):
2762         (WebCore::DIBPixelData::writeToFile):
2763         * platform/graphics/win/DIBPixelData.h:
2764
2765 2013-09-26  Dean Jackson  <dino@apple.com>
2766
2767         Expose a setting to disable hardware accelerated animations
2768         https://bugs.webkit.org/show_bug.cgi?id=121978
2769         <rdar://problem/15091284>
2770
2771         Reviewed by Eric Carlson.
2772
2773         Expose acceleratedCompositedAnimationsEnabled
2774         to disable CoreAnimation animations.
2775
2776         Test: LayoutTests/animations/transform-non-accelerated.html
2777
2778         * WebCore.exp.in: Export new method.
2779         * page/Settings.in: Add new setting.
2780         * rendering/RenderLayerBacking.cpp:
2781         (WebCore::RenderLayerBacking::startAnimation): Don't go
2782         to GraphicsLayer if the setting is false.
2783
2784 2013-09-26  Julien Brianceau  <jbriance@cisco.com>
2785
2786         [Qt] Fix build after r156487.
2787         https://bugs.webkit.org/show_bug.cgi?id=121984
2788
2789         Reviewed by Anders Carlsson.
2790
2791         * bridge/qt/qt_runtime.cpp:
2792         (JSC::Bindings::QtRuntimeMethod::jsObjectRef):
2793
2794 2013-09-26  Antti Koivisto  <antti@apple.com>
2795
2796         Don't mutate style in RenderCombineText
2797         https://bugs.webkit.org/show_bug.cgi?id=121979
2798
2799         Reviewed by Andreas Kling.
2800
2801         Text renderers should always have the same style as the parent.
2802
2803         * rendering/InlineTextBox.cpp:
2804         (WebCore::fontToUse):
2805         (WebCore::InlineTextBox::localSelectionRect):
2806         (WebCore::InlineTextBox::paint):
2807         (WebCore::InlineTextBox::offsetForPosition):
2808         (WebCore::InlineTextBox::positionForOffset):
2809         
2810             Select the modified font for text-combine.
2811
2812         * rendering/RenderCombineText.cpp:
2813         (WebCore::RenderCombineText::styleDidChange):
2814         (WebCore::RenderCombineText::combineText):
2815         * rendering/RenderCombineText.h:
2816         
2817             Move the text-combine specific font style to a member of its own.
2818
2819 2013-09-26  Anders Carlsson  <andersca@apple.com>
2820
2821         Remove PassWeak.h
2822         https://bugs.webkit.org/show_bug.cgi?id=121971
2823
2824         Reviewed by Geoffrey Garen.
2825
2826         * ForwardingHeaders/heap/PassWeak.h: Removed.
2827
2828 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2829
2830         [MediaStream API] implement VideoStreamTrack and AudioStreamTrack
2831         https://bugs.webkit.org/show_bug.cgi?id=121950
2832
2833         Reviewed by Dean Jackson.
2834
2835         No new tests, blocked by https://bugs.webkit.org/show_bug.cgi?id=121967
2836
2837         * CMakeLists.txt: Add new files.
2838         * DerivedSources.make: Ditto.
2839         * GNUmakefile.list.am: Ditto.
2840
2841         * Modules/mediastream/AudioStreamTrack.cpp: Added.
2842         * Modules/mediastream/AudioStreamTrack.h: Added.
2843         * Modules/mediastream/AudioStreamTrack.idl: Added.
2844
2845         * Modules/mediastream/MediaStream.cpp:
2846         (WebCore::MediaStream::MediaStream): Create an AudioStreamTrack or a VideoStreamTrack.
2847         (WebCore::MediaStream::addRemoteSource): Ditto.
2848
2849         * Modules/mediastream/MediaStreamTrack.cpp:
2850         (WebCore::MediaStreamTrack::create): Removed.
2851         * Modules/mediastream/MediaStreamTrack.h:
2852
2853         * Modules/mediastream/VideoStreamTrack.cpp: Added.
2854         * Modules/mediastream/VideoStreamTrack.h: Added.
2855         * Modules/mediastream/VideoStreamTrack.idl: Added.
2856
2857         * WebCore.xcodeproj/project.pbxproj: Add new files.
2858
2859 2013-09-26  Anders Carlsson  <andersca@apple.com>
2860
2861         Stop using PassWeak
2862         https://bugs.webkit.org/show_bug.cgi?id=121968
2863
2864         Reviewed by Sam Weinig.
2865
2866         Update for JavaScriptCore changes.
2867
2868         * bindings/js/JSDOMBinding.h:
2869         (WebCore::setInlineCachedWrapper):
2870         (WebCore::cacheWrapper):
2871         * bindings/js/JSEventListener.cpp:
2872         (WebCore::JSEventListener::JSEventListener):
2873         * bindings/js/JSEventListener.h:
2874         (WebCore::JSEventListener::setWrapper):
2875         (WebCore::JSEventListener::jsFunction):
2876         * bindings/js/JSMutationCallback.cpp:
2877         (WebCore::JSMutationCallback::JSMutationCallback):
2878         * bindings/js/JSNodeFilterCondition.cpp:
2879         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2880         * bindings/js/ScriptWrappableInlines.h:
2881         (WebCore::ScriptWrappable::setWrapper):
2882         * bindings/js/WebCoreTypedArrayController.cpp:
2883         * bridge/jsc/BridgeJSC.cpp:
2884         (JSC::Bindings::Instance::createRuntimeObject):
2885         * bridge/runtime_root.cpp:
2886         (JSC::Bindings::RootObject::addRuntimeObject):
2887
2888 2013-09-25  Sam Weinig  <sam@webkit.org>
2889
2890         Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
2891         https://bugs.webkit.org/show_bug.cgi?id=121934
2892
2893         Reviewed by Geoffrey Garen.
2894
2895         Reduce unnecessary loads by passing the JSC::VM to object creation/access functions
2896         that don't need the ExecState.
2897
2898         * WebCore.exp.in:
2899         * bindings/js/JSDOMBinding.h:
2900         (WebCore::getDOMStructure):
2901         (WebCore::deprecatedGetDOMStructure):
2902         (WebCore::getDOMPrototype):
2903         (WebCore::setInlineCachedWrapper):
2904         (WebCore::createWrapper):
2905         * bindings/js/JSDOMGlobalObject.h:
2906         (WebCore::getDOMConstructor):
2907         * bindings/js/JSDOMWindowCustom.cpp:
2908         (WebCore::JSDOMWindow::image):
2909         * bindings/js/JSDocumentCustom.cpp:
2910         (WebCore::JSDocument::location):
2911         * bindings/js/JSImageConstructor.cpp:
2912         (WebCore::JSImageConstructor::finishCreation):
2913         * bindings/js/JSImageConstructor.h:
2914         (WebCore::JSImageConstructor::create):
2915         * bindings/js/ScriptWrappable.h:
2916         * bindings/js/ScriptWrappableInlines.h:
2917         (WebCore::ScriptWrappable::setWrapper):
2918         * bindings/scripts/CodeGeneratorJS.pm:
2919         (GenerateHeader):
2920         (GenerateImplementation):
2921         (GenerateConstructorDeclaration):
2922         (GenerateConstructorHelperMethods):
2923         * bridge/c/CRuntimeObject.cpp:
2924         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
2925         (JSC::Bindings::CRuntimeObject::finishCreation):
2926         * bridge/c/CRuntimeObject.h:
2927         (JSC::Bindings::CRuntimeObject::create):
2928         * bridge/c/c_instance.cpp:
2929         (JSC::Bindings::CInstance::newRuntimeObject):
2930         * bridge/jsc/BridgeJSC.cpp:
2931         (JSC::Bindings::Instance::newRuntimeObject):
2932         * bridge/objc/ObjCRuntimeObject.h:
2933         (JSC::Bindings::ObjCRuntimeObject::create):
2934         * bridge/objc/ObjCRuntimeObject.mm:
2935         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2936         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
2937         * bridge/objc/objc_instance.mm:
2938         (ObjcInstance::newRuntimeObject):
2939         * bridge/objc/objc_runtime.h:
2940         (JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
2941         * bridge/runtime_array.h:
2942         (JSC::RuntimeArray::createPrototype):
2943         * bridge/runtime_method.h:
2944         (JSC::RuntimeMethod::createPrototype):
2945         * bridge/runtime_object.cpp:
2946         (JSC::Bindings::RuntimeObject::RuntimeObject):
2947         (JSC::Bindings::RuntimeObject::finishCreation):
2948         * bridge/runtime_object.h:
2949         (JSC::Bindings::RuntimeObject::create):
2950         (JSC::Bindings::RuntimeObject::createPrototype):
2951
2952 2013-09-26  Commit Queue  <commit-queue@webkit.org>
2953
2954         Unreviewed, rolling out r156451.
2955         http://trac.webkit.org/changeset/156451
2956         https://bugs.webkit.org/show_bug.cgi?id=121965
2957
2958         Broke two fast/multicol tests. (Requested by kling on
2959         #webkit).
2960
2961         * rendering/FlowThreadController.cpp:
2962         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
2963         * rendering/RenderElement.cpp:
2964         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2965         * rendering/RenderFlowThread.cpp:
2966         (WebCore::RenderFlowThread::layout):
2967         (WebCore::RenderFlowThread::regionForCompositedLayer):
2968         (WebCore::RenderFlowThread::updateRegionForRenderLayer):
2969         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
2970         * rendering/RenderFlowThread.h:
2971         * rendering/RenderGeometryMap.cpp:
2972         * rendering/RenderGeometryMap.h:
2973         * rendering/RenderLayer.cpp:
2974         (WebCore::RenderLayer::calculateLayerBounds):
2975         * rendering/RenderLayer.h:
2976         * rendering/RenderLayerBacking.cpp:
2977         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
2978         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2979         * rendering/RenderLayerBacking.h:
2980         * rendering/RenderLayerCompositor.cpp:
2981         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2982         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2983         (WebCore::RenderLayerCompositor::canBeComposited):
2984         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
2985         * rendering/RenderLayerCompositor.h:
2986         * rendering/RenderMultiColumnSet.cpp:
2987         * rendering/RenderMultiColumnSet.h:
2988         * rendering/RenderRegion.cpp:
2989         (WebCore::RenderRegion::setRequiresLayerForCompositing):
2990         * rendering/RenderRegion.h:
2991         * rendering/RenderRegionSet.h:
2992         * rendering/RenderTreeAsText.cpp:
2993         (WebCore::writeLayers):
2994
2995 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2996
2997         [MediaStream] Cleanup platform interface
2998         https://bugs.webkit.org/show_bug.cgi?id=121935
2999
3000         Reviewed by Jer Noble.
3001
3002         No new tests, tests will be updated in the next patch.
3003
3004         * CMakeLists.txt: Remove MediaStreamComponent.cpp.
3005         * GNUmakefile.list.am: Remove MediaStreamComponent.h|cpp and MediaStreamSourcesQueryClient.h. 
3006             Add MediaStreamConstraintsValidationClient.h and MediaStreamCreationClient.h.
3007
3008         * Modules/mediastream/MediaStream.cpp:
3009         (WebCore::processTrack): Duplicate MediaStreamSource when necessary to work around bug 121954.
3010         (WebCore::createFromSourceVectors): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
3011         (WebCore::MediaStream::MediaStream): *Components -> *Streams.
3012         (WebCore::MediaStream::setEnded): New.
3013         (WebCore::MediaStream::stop):  MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
3014         (WebCore::MediaStream::addTrack): Append the track parameter rather than duplicating it, as per spec.
3015         (WebCore::MediaStream::removeTrack): *Components -> *Streams.
3016         (WebCore::MediaStream::trackDidEnd): Renamed from trackEnded.
3017         (WebCore::MediaStream::streamDidEnd): Renamed from streamEnded.
3018         (WebCore::MediaStream::addRemoteSource): Renamed from addRemoteTrack. *Components -> *Streams.
3019         (WebCore::MediaStream::removeRemoteSource): Renamed from removeRemoteTrack. *Components -> *Streams.
3020         * Modules/mediastream/MediaStream.h:
3021
3022         * Modules/mediastream/MediaStreamTrack.cpp:
3023         (WebCore::MediaStreamTrack::create): *Component -> *Stream.
3024         (WebCore::MediaStreamTrack::MediaStreamTrack): Don't assume source is valid.
3025         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
3026         (WebCore::MediaStreamTrack::kind): Ditto. AtomicString -> const AtomicString&.
3027         (WebCore::MediaStreamTrack::setSource): Moved from .h file.
3028         (WebCore::MediaStreamTrack::id): Don't assume source is valid. Create ID when the source doesn't have one.
3029         (WebCore::MediaStreamTrack::label): Don't assume source is valid.
3030         (WebCore::MediaStreamTrack::enabled): 
3031         (WebCore::MediaStreamTrack::setEnabled): *Component -> *Stream. MediaStreamCenter::instance -> MediaStreamCenter::shared.
3032         (WebCore::MediaStreamTrack::readyState): "muted" is not a readyState, but "new" is.
3033         (WebCore::MediaStreamTrack::getSources): MediaStreamCenter::instance -> MediaStreamCenter::shared.
3034         (WebCore::MediaStreamTrack::ended): *Component -> *Stream.
3035         (WebCore::MediaStreamTrack::sourceChangedState): Dispatch "started" and "unmuted" events.
3036         (WebCore::MediaStreamTrack::trackDidEnd): Renamed from didEndTrack. m_component -> m_source.
3037         * Modules/mediastream/MediaStreamTrack.h:
3038
3039         * Modules/mediastream/RTCDTMFSender.cpp:
3040         (WebCore::RTCDTMFSender::create): track->component() -> track->source();
3041
3042         * Modules/mediastream/RTCPeerConnection.cpp:
3043         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Ditto.
3044
3045         * Modules/mediastream/RTCStatsRequestImpl.cpp:
3046         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Ditto.
3047         (WebCore::RTCStatsRequestImpl::component): Removed, it was unused.
3048         * Modules/mediastream/RTCStatsRequestImpl.h:
3049
3050         * Modules/mediastream/UserMediaClient.h:
3051         * Modules/mediastream/UserMediaController.h:
3052         (WebCore::UserMediaController::requestPermission): Renamed from requestUserMedia, get rid of source
3053             vector parameters.
3054         (WebCore::UserMediaController::cancelRequest): Renamed from cancelUserMediaRequest.
3055
3056         * Modules/mediastream/UserMediaRequest.cpp:
3057         (WebCore::parseOptions): MediaConstraintsImpl -> MediaConstraints.
3058         (WebCore::UserMediaRequest::create): Ditto.
3059         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
3060         (WebCore::UserMediaRequest::securityOrigin): New.
3061         (WebCore::UserMediaRequest::start): Request constraint validation.
3062         (WebCore::UserMediaRequest::constraintsValidated): New. Callback from media engine when constraints
3063             can be supported.
3064         (WebCore::UserMediaRequest::requestPermission): New. Ask user media client for permission to access media.
3065         (WebCore::UserMediaRequest::userMediaAccessGranted): New. Access has been granted.
3066         (WebCore::UserMediaRequest::createMediaStream): New. Allowed to access media, ask media engine
3067             to create stream sources.
3068         (WebCore::UserMediaRequest::userMediaAccessDenied): New. User media client has denied access request.
3069         (WebCore::UserMediaRequest::constraintsInvalid): New. Media engine can not support constraints.
3070         (WebCore::UserMediaRequest::didCreateStream): New. Media engine has created stream sources.
3071         (WebCore::UserMediaRequest::callSuccessHandler): New. Create stream from sources and call success handler.
3072         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Renamed from constraintFailure.
3073         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Renamed from permissionFailure.
3074         (WebCore::UserMediaRequest::callErrorHandler): 
3075         (WebCore::UserMediaRequest::contextDestroyed): cancelUserMediaRequest -> cancelRequest.
3076         * Modules/mediastream/UserMediaRequest.h:
3077
3078         * Modules/webaudio/AudioContext.cpp:
3079         (WebCore::AudioContext::createMediaStreamSource): localAudio->component()->source() -> localAudio->source().
3080
3081         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3082         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): MediaStreamSource::TypeAudio ->
3083             MediaStreamSource::Audio, MediaStreamSource::ReadyStateLive -> MediaStreamSource::Live.
3084             MediaStreamCenter::instance -> MediaStreamCenter::shared.
3085
3086         * WebCore.exp.in: Export new symbols.
3087
3088         * WebCore.xcodeproj/project.pbxproj: Add new files and remove deleted files.
3089
3090         * dom/EventNames.h: Define "started" event.
3091
3092         * platform/mediastream/MediaStreamCenter.cpp:
3093         (WebCore::mediaStreamCenterOverride): Make it possible to override the shared stream center. Will
3094             be used for testing in a later patch.
3095         (WebCore::MediaStreamCenter::shared): Renamed from instance. Return current stream center.
3096         (WebCore::MediaStreamCenter::setSharedStreamCenter): Override current stream center.
3097         (WebCore::MediaStreamCenter::endLocalMediaStream): Never call the descriptor client, always call
3098             the descriptor and let it deal with the client.
3099         * platform/mediastream/MediaStreamCenter.h:
3100
3101         * platform/mediastream/MediaStreamComponent.cpp: Removed.
3102         * platform/mediastream/MediaStreamComponent.h: Removed.
3103
3104         * platform/mediastream/MediaStreamConstraintsValidationClient.h: Added.
3105         * platform/mediastream/MediaStreamCreationClient.h: Added.
3106
3107         * platform/mediastream/MediaStreamDescriptor.cpp:
3108         (WebCore::MediaStreamDescriptor::addSource): *Component -> *Source.
3109         (WebCore::MediaStreamDescriptor::removeSource): Ditto.
3110         (WebCore::MediaStreamDescriptor::addRemoteSource): Ditto.
3111         (WebCore::MediaStreamDescriptor::removeRemoteSource): Ditto.
3112         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
3113         (WebCore::MediaStreamDescriptor::setEnded): Ditto. Set source readyStates to Ended.
3114         * platform/mediastream/MediaStreamDescriptor.h:
3115
3116         * platform/mediastream/MediaStreamSource.cpp:
3117         (WebCore::MediaStreamSource::MediaStreamSource): Initialize new member variables.
3118         (WebCore::MediaStreamSource::setReadyState): Early return when the state hasn't changed.
3119         (WebCore::MediaStreamSource::setStream): New.
3120         (WebCore::MediaStreamSource::setMuted): New.
3121         * platform/mediastream/MediaStreamSource.h:
3122
3123         * platform/mediastream/MediaStreamSourcesQueryClient.h: Removed.
3124
3125         * platform/mediastream/RTCPeerConnectionHandler.h:
3126         * platform/mediastream/RTCStatsRequest.h:
3127
3128         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Update for new MediaStreamCenter API.
3129         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
3130
3131         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Ditto.
3132         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
3133
3134         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Ditto.
3135         * platform/mediastream/mac/MediaStreamCenterMac.h:
3136
3137 2013-09-26  Gurpreet Kaur  <k.gurpreet@samsung.com>
3138
3139         Inset box-shadows fail to round around corners when border-radius is set in vh/vw units.
3140         https://bugs.webkit.org/show_bug.cgi?id=119187
3141
3142         Reviewed by Darin Adler.
3143
3144         Border-radius properties were not applied incase its values
3145         were given in vh, vw, vmax, vmin units.
3146
3147         Tests: fast/css/border-radius-inset-box-shadow-viewportlength.html
3148                fast/css/border-radius-viewport-height.html
3149                fast/css/border-radius-viewport-vmax.html
3150                fast/css/border-radius-viewport-vmin.html
3151
3152         * css/DeprecatedStyleBuilder.cpp:
3153         (WebCore::ApplyPropertyBorderRadius::applyValue):
3154         (WebCore::ApplyPropertyComputeLength::applyValue):
3155         * css/StyleResolver.h:
3156         Calculating the border-radius values which has been specified
3157         in viewport units.The vh/vw units are calcultated as percent of
3158         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
3159         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
3160
3161 2013-09-26  Seokju Kwon  <seokju@webkit.org>
3162
3163         Fix ordered comparison warnings in BitmapImage::drawPattern
3164         https://bugs.webkit.org/show_bug.cgi?id=121945
3165
3166         Reviewed by Darin Adler.
3167
3168         No new tests, no behavior change.
3169
3170         * platform/graphics/BitmapImage.cpp:
3171         (WebCore::BitmapImage::drawPattern):
3172
3173 2013-09-26  Andreas Kling  <akling@apple.com>
3174
3175         Remove empty JSFooCustom.cpp files.
3176         <https://webkit.org/b/121955>
3177
3178         Reviewed by Anders Carlsson.
3179
3180         There's no sense in slowing down build times with empty files that
3181         still include a bunch of headers.
3182
3183         * bindings/js/JSAudioBufferCustom.cpp: Removed.
3184         * bindings/js/JSCSSFontFaceRuleCustom.cpp: Removed.
3185         * bindings/js/JSCSSImportRuleCustom.cpp: Removed.
3186         * bindings/js/JSCSSMediaRuleCustom.cpp: Removed.
3187         * bindings/js/JSCSSPageRuleCustom.cpp: Removed.
3188         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed.
3189         * bindings/js/JSDOMImplementationCustom.cpp: Removed.
3190         * bindings/js/JSDOMTokenListCustom.cpp: Removed.
3191         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed.
3192         * bindings/js/JSMediaListCustom.cpp: Removed.
3193         * bindings/js/JSProcessingInstructionCustom.cpp: Removed.
3194         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp: Removed.
3195         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp: Removed.
3196         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: Removed.
3197
3198 2013-09-26  Mihai Maerean  <mmaerean@adobe.com>
3199
3200         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
3201         https://bugs.webkit.org/show_bug.cgi?id=120457
3202
3203         Reviewed by David Hyatt.
3204
3205         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
3206
3207         The composited layers inside the named flow threads are collected as part of the regions.
3208         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
3209         that region too (inside RenderFlowThread::updateAllLayerToRegionMappings).
3210
3211         Tests: fast/regions/layers/accelerated-compositing/crash-transform-inside-region.html
3212                fast/regions/layers/accelerated-compositing/floated-region-with-transformed-child.html
3213                fast/regions/layers/accelerated-compositing/move-layer-from-one-region-to-another.html
3214                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding.html
3215                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding-for-video.html
3216                fast/regions/layers/accelerated-compositing/region-as-layer-in-another-flowthread.html
3217                fast/regions/layers/accelerated-compositing/transform-transparent-positioned-video-inside-region.html
3218                fast/regions/layers/accelerated-compositing/transformed-layer-inside-transformed-layer.html
3219                fast/regions/layers/accelerated-compositing/z-index.html: Added.
3220                fast/regions/layers/accelerated-compositing/z-index-update.html: Added.
3221
3222         * rendering/FlowThreadController.cpp:
3223         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
3224         * rendering/RenderFlowThread.cpp:
3225         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
3226         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
3227         painted.
3228         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
3229         (WebCore::RenderFlowThread::getLayerListForRegion):
3230         (WebCore::RenderFlowThread::regionForCompositedLayer):
3231         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
3232         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
3233         from a region to another since the last update.
3234         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
3235         * rendering/RenderFlowThread.h:
3236         * rendering/RenderGeometryMap.cpp:
3237         (WebCore::RenderGeometryMap::pushRenderFlowThread):
3238         * rendering/RenderGeometryMap.h:
3239         * rendering/RenderLayer.cpp:
3240         (WebCore::RenderLayer::calculateLayerBounds): The RenderNamedFlowThread is ignored when we calculate the bounds
3241         of the RenderView.
3242         * rendering/RenderLayer.h:
3243         * rendering/RenderLayerBacking.cpp:
3244         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's inside an out of flow Flow Thread.
3245         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
3246         (WebCore::enclosingFlowThreadAncestor):
3247         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
3248         its borders, paddings, outlines or box-shadows to layers inside it.
3249         * rendering/RenderLayerBacking.h:
3250         * rendering/RenderLayerCompositor.cpp:
3251         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
3252         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3253         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly. We
3254         are going to collect composited layers as part of regions.
3255         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
3256         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
3257         use composited RenderRegions to render the background of the RenderFlowThread.
3258         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a region.
3259         * rendering/RenderLayerCompositor.h:
3260         * rendering/RenderMultiColumnSet.cpp:
3261         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3262         * rendering/RenderMultiColumnSet.h:
3263         * rendering/RenderElement.cpp:
3264         (WebCore::RenderObject::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
3265         through the RenderView::styleDidChange function.
3266         * rendering/RenderRegion.cpp:
3267         (WebCore::RenderRegion::setRequiresLayerForCompositing):
3268         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
3269         * rendering/RenderRegion.h:
3270         (WebCore::toRenderRegion):
3271         * rendering/RenderRegionSet.h:
3272         (WebCore::RenderRegionSet::requiresLayer): Never.
3273         * rendering/RenderTreeAsText.cpp:
3274         (WebCore::writeLayers):
3275
3276 2013-09-26  Mihnea Ovidenie  <mihnea@adobe.com>
3277
3278         [CSSRegions] Unable to collect html element in a named flow
3279         https://bugs.webkit.org/show_bug.cgi?id=121878
3280
3281         Reviewed by Antti Koivisto.
3282
3283         Tests: fast/regions/collect-html-in-named-flow.html
3284                fast/regions/iframe-html-collected.html
3285
3286         It should be possible to collect the html element in a named flow.
3287         However, before we check whether adding a child is not restricted
3288         by its original parent, we have to make sure that the original parent
3289         is an element to safely perform the check.
3290
3291         * rendering/RenderNamedFlowThread.cpp:
3292         (WebCore::RenderNamedFlowThread::isChildAllowed):
3293
3294 2013-09-25  Brady Eidson  <beidson@apple.com>
3295
3296         Unreviewed, blind attempt at a build fix.
3297
3298         * inspector/InspectorIndexedDBAgent.cpp: Don’t include the keyPathFromIDBKeyPath method for
3299           PLATFORM(MAC) as it is unused.
3300
3301 2013-09-25  Brady Eidson  <beidson@apple.com>
3302
3303         Enable the IndexedDB build on Mac, but leave the feature non-functional
3304         https://bugs.webkit.org/show_bug.cgi?id=121918
3305
3306         Reviewed by Alexey Proskuryakov.
3307
3308         * Configurations/FeatureDefines.xcconfig:
3309
3310         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
3311           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
3312
3313         * inspector/InspectorIndexedDBAgent.cpp: Empty out DatabaseLoader::execute on Mac until the inspector
3314           build gurus can figure out a 32bit-vs-64bit issue that there is no obvious solution for.
3315
3316         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
3317           further use for it.
3318
3319 2013-09-25  Ryuan Choi  <ryuan.choi@samsung.com>
3320
3321         Unreviewed build fix for EFL port.
3322
3323         IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
3324
3325         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3326         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3327         (WebCore::IDBTransactionBackendLevelDB::create):
3328         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
3329         (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
3330         (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
3331         (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
3332         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3333         (WebCore::IDBTransactionBackendLevelDB::database):
3334
3335 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
3336
3337         Do not reenter Document from its destructor
3338         https://bugs.webkit.org/show_bug.cgi?id=121933
3339
3340         Reviewed by Darin Adler.
3341
3342         Following r156422, there are cases where we would reenter Document
3343         during its destruction.
3344
3345         The flow was the following:
3346         -Document's destructor is executed.
3347         -DocumentStyleSheetCollection being part of Document, its destructor
3348          is executed.
3349         -DocumentStyleSheetCollection's destructor detach the owner node of all
3350          its stylesheets avoid keeping stale references to a dead Document.
3351         -CSSStyleSheet::clearOwnerNode() would fetch the dying document
3352          and invoke Document::styleResolverChanged().
3353         This would not fail because the document is detached and Document::styleResolverChanged()
3354         would fail early. This is complicated and error prone so this patch attempt to clear
3355         the process a bit.
3356
3357         With the patch, Document detach all the stylesheets early in the destruction.
3358         Clearing the stylesheet is also changed to avoid re-entering the document.
3359
3360         * css/CSSStyleSheet.h:
3361         * dom/Document.cpp:
3362         (WebCore::Document::~Document):
3363         * dom/DocumentStyleSheetCollection.cpp:
3364         (WebCore::DocumentStyleSheetCollection::detachFromDocument):
3365         * dom/DocumentStyleSheetCollection.h:
3366
3367 2013-09-25  Santosh Mahto  <santosh.ma@samsung.com>
3368
3369         htmlediting.cpp: unnecessary local variable cleanup
3370         https://bugs.webkit.org/show_bug.cgi?id=121903
3371
3372         Reviewed by Darin Adler.
3373
3374         Code cleanup.
3375
3376         * editing/htmlediting.cpp:
3377         (WebCore::lowestEditableAncestor):
3378
3379 2013-09-25  Commit Queue  <commit-queue@webkit.org>
3380
3381         Unreviewed, rolling out r156432.
3382         http://trac.webkit.org/changeset/156432
3383         https://bugs.webkit.org/show_bug.cgi?id=121932
3384
3385         some integer conversion things that need brady to fix
3386         (Requested by thorton on #webkit).
3387
3388         * Configurations/FeatureDefines.xcconfig:
3389         * Modules/indexeddb/IDBFactory.h:
3390         (WebCore::IDBFactory::create):
3391         * WebCore.xcodeproj/project.pbxproj:
3392
3393 2013-09-25  Alex Christensen  <alex.christensen@flexsim.com>
3394
3395         Win64 compile fix after r155226.
3396         https://bugs.webkit.org/show_bug.cgi?id=120969
3397
3398         Reviewed by Brent Fulgham.
3399
3400         * WebCore.vcxproj/WebCore.vcxproj:
3401         Disable building StructuredExceptionHandlerSuppressor.cpp and makesafeseh.asm on Win64.
3402
3403 2013-09-25  Alexey Proskuryakov  <ap@apple.com>
3404
3405         Flaky Test: platform/mac/fonts/han-disunification.html
3406         https://bugs.webkit.org/show_bug.cgi?id=114207
3407
3408         Reviewed by Anders Carlsson.
3409
3410         This test was affected by preceding tests changing font settings.
3411
3412         Save original font if it's changed, and restore it in Backup::restoreTo().
3413
3414         * WebCore.exp.in:
3415         * testing/InternalSettings.cpp:
3416         (WebCore::InternalSettings::Backup::restoreTo):
3417         (WebCore::InternalSettings::setStandardFontFamily):
3418         (WebCore::InternalSettings::setSerifFontFamily):
3419         (WebCore::InternalSettings::setSansSerifFontFamily):
3420         (WebCore::InternalSettings::setFixedFontFamily):
3421         (WebCore::InternalSettings::setCursiveFontFamily):
3422         (WebCore::InternalSettings::setFantasyFontFamily):
3423         (WebCore::InternalSettings::setPictographFontFamily):
3424         * testing/InternalSettings.h:
3425
3426 2013-09-25  Brady Eidson  <beidson@apple.com>
3427
3428         Enable the IndexedDB build on Mac, but leave the feature non-functional
3429         https://bugs.webkit.org/show_bug.cgi?id=121918
3430
3431         Reviewed by Alexey Proskuryakov.
3432
3433         * Configurations/FeatureDefines.xcconfig: Enable the feature.
3434
3435         * Modules/indexeddb/IDBFactory.h: