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