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