[Text Autosizing] Provide an API for influencing the font scale factor
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-08-01  Peter Beverloo  <peter@chromium.org>
2
3         [Text Autosizing] Provide an API for influencing the font scale factor
4         https://bugs.webkit.org/show_bug.cgi?id=92882
5
6         Reviewed by Adam Barth.
7
8         Add the font scale factor to settings, and provide an API in
9         window.internal.settings to change it from layout tests.
10
11         The font scale factor applied to Text Autosizing influences the sizing
12         of text, and will influence the scaling of boosted blocks once the
13         implementation progresses. For Android, it will be set to the font size
14         chosen in the user's system-wide preferences.
15
16         Test: fast/text-autosizing/font-scale-factor.html
17
18         * page/Settings.cpp:
19         (WebCore::Settings::Settings):
20         (WebCore):
21         (WebCore::Settings::setTextAutosizingFontScaleFactor):
22         * page/Settings.h:
23         (Settings):
24         (WebCore::Settings::textAutosizingFontScaleFactor):
25         * rendering/TextAutosizer.cpp:
26         (WebCore::TextAutosizer::processBlock):
27         * testing/InternalSettings.cpp:
28         (WebCore::InternalSettings::Backup::Backup):
29         (WebCore::InternalSettings::Backup::restoreTo):
30         (WebCore::InternalSettings::setTextAutosizingFontScaleFactor):
31         (WebCore):
32         * testing/InternalSettings.h:
33         (Backup):
34         (InternalSettings):
35         * testing/InternalSettings.idl:
36
37 2012-08-01  Mike West  <mkwst@chromium.org>
38
39         CSP should correctly block plugin resources rendered in PluginDocuments.
40         https://bugs.webkit.org/show_bug.cgi?id=92675
41
42         Reviewed by Adam Barth.
43
44         In certain cases, plugins aren't loaded directly, but are stuffed into a
45         newly-created PluginDocument before rendering. While we were already
46         correctly populating information that allowed us to make decisions about
47         that document's security origin, and already dealing with sandbox
48         status by creating a 'SinkDocument' that ignored plugin data, we weren't
49         correctly inheriting the parent frame's Content Security Policy. This
50         patch ensures that PluginDocuments correctly inherit their parent's
51         Content Security Policy, meaning that the plugin is blocked or allowed
52         according to the policy of the protected resource in which the
53         PluginDocument is embedded.
54
55         Tests: http/tests/security/contentSecurityPolicy/object-src-url-allowed.html
56                http/tests/security/contentSecurityPolicy/object-src-url-blocked.html
57
58         * dom/Document.cpp:
59         (WebCore::Document::initContentSecurityPolicy):
60             Populate a created PluginDocument with its frame's parent's Content
61             Security Policy.
62
63 2012-08-01  Florin Malita  <fmalita@chromium.org>
64
65         SVG animation not working for elements inserted after parsing is finished
66         https://bugs.webkit.org/show_bug.cgi?id=92025
67
68         Reviewed by Nikolas Zimmermann.
69
70         Time containers for SVG elements inserted after document parsing is finished need to be
71         initialized on insertion (since they've missed the Document::implicitClose() initialization
72         point).
73
74         Test: svg/animations/deferred-insertion.html
75
76         * svg/SVGSVGElement.cpp:
77         (WebCore::SVGSVGElement::insertedInto):
78
79 2012-08-01  Vincent Scheib  <scheib@chromium.org>
80
81         Block pointer lock for sandboxed iframes.
82         https://bugs.webkit.org/show_bug.cgi?id=92796
83
84         Reviewed by Adam Barth.
85
86         Sandboxed iframe documents should be blocked from using the
87         pointer lock API until there is specification agreement
88         on what attribute to use to allow the feature. After
89         specification this restriction can be relaxed, but not
90         restricting it now would require breaking applications
91         later.
92
93         Test: http/tests/pointer-lock/iframe-sandboxed.html
94
95         * dom/SecurityContext.h:
96         * page/PointerLockController.cpp:
97         (WebCore::PointerLockController::requestPointerLock):
98
99 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
100
101         Replace WTF::getCurrentLocalTime() with GregorianDateTime::setToCurrentLocalTime()
102         https://bugs.webkit.org/show_bug.cgi?id=92286
103
104         Reviewed by Geoffrey Garen.
105
106         Add a method to GregorianDateTime to set its values to the current locale time.
107         Replacing all occurrences of getCurrentLocalTime with the new function allows
108         us to remove getCurrentLocalTime in a next step.
109
110         * html/FTPDirectoryDocument.cpp:
111         (WebCore::processFileDateString):
112         * loader/archive/mhtml/MHTMLArchive.cpp:
113         (WebCore::MHTMLArchive::generateMHTMLData):
114
115 2012-08-01  Ojan Vafai  <ojan@chromium.org>
116
117         Remove code duplication in determining if display is inline or replaced
118         https://bugs.webkit.org/show_bug.cgi?id=92880
119
120         Reviewed by Julien Chaffraix.
121
122         Deduplicate lists of display types by using private helpers.
123
124         No new tests. No change in behavior.
125
126         * rendering/style/RenderStyle.h:
127
128 2012-08-01  Tommy Widenflycht  <tommyw@google.com>
129
130         MediaStream API: Add ExtraData capability to MediaStreamSource
131         https://bugs.webkit.org/show_bug.cgi?id=92860
132
133         Reviewed by Adam Barth.
134
135         The Chromium port needs to store some related data in MediaStreamSource objects.
136
137         Not testable from a LayoutTest.
138
139         * platform/chromium/support/WebMediaStreamSource.cpp:
140         (ExtraDataContainer):
141         (WebKit::ExtraDataContainer::ExtraDataContainer):
142         (WebKit::ExtraDataContainer::extraData):
143         (WebKit):
144         (WebKit::WebMediaStreamSource::extraData):
145         (WebKit::WebMediaStreamSource::setExtraData):
146         * platform/mediastream/MediaStreamSource.h:
147         (ExtraData):
148         (WebCore::MediaStreamSource::ExtraData::~ExtraData):
149         (MediaStreamSource):
150         (WebCore::MediaStreamSource::extraData):
151         (WebCore::MediaStreamSource::setExtraData):
152
153 2012-08-01  Joshua Bell  <jsbell@chromium.org>
154
155         IndexedDB: IDBCursor.continue(key) does not throw for key "behind" cursor
156         https://bugs.webkit.org/show_bug.cgi?id=92562
157
158         Reviewed by Ojan Vafai.
159
160         Per spec, IDBCursor.continue(key) should throw for forward cursors
161         if key <= current key, and for reverse cursors if key >= current key.
162         Code was present on the back end but the error code was ignored, possibly
163         broken in a recent refactor, and there were no tests for this case.
164
165         Test: storage/indexeddb/cursor-continue-dir.html
166
167         * Modules/indexeddb/IDBCursor.cpp:
168         (WebCore::IDBCursor::advance): Handle async transaction termination.
169         (WebCore::IDBCursor::continueFunction): Move checks here from backend.
170         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
171         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl): Don't need direction param.
172         (WebCore::IDBCursorBackendImpl::continueFunction): Remove checks.
173         * Modules/indexeddb/IDBCursorBackendImpl.h: Only IDBBackingStore::cursor needs direction now.
174         (WebCore::IDBCursorBackendImpl::create):
175         (IDBCursorBackendImpl):
176         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
177         (WebCore::IDBIndexBackendImpl::openCursorInternal): Drop unused param.
178         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
179         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): Ditto.
180
181 2012-08-01  Rick Byers  <rbyers@chromium.org>
182
183         Don't request a clickCount of 1 on mouseMove event generated by tap gestures
184         https://bugs.webkit.org/show_bug.cgi?id=92779
185
186         Reviewed by Adam Barth.
187
188         mousemove events don't have a click count, so we shouldn't be passing 1
189         here.  Note this makes no real difference in practice since the value is
190         ignored - fixed strictly for pedantics.
191         
192         Test: fast/events/touch/gesture/gesture-click
193
194         * page/EventHandler.cpp:
195         (WebCore::EventHandler::handleGestureTap):
196
197 2012-08-01  Kihong Kwon  <kihong.kwon@samsung.com>
198
199         Dropping webkit prefix from Vibration API
200         https://bugs.webkit.org/show_bug.cgi?id=92840
201
202         Reviewed by Adam Barth.
203
204         Remove webkit prefix from navigator.webkitVibrate().
205         - Vibration API have been entered CR already.
206         - Firefox already implements Vibration API.
207
208         No new tests. Covered by fast/dom/navigator-vibration.html
209
210         * Modules/vibration/NavigatorVibration.cpp:
211         (WebCore::NavigatorVibration::vibrate):
212         * Modules/vibration/NavigatorVibration.h:
213         (NavigatorVibration):
214         * Modules/vibration/NavigatorVibration.idl:
215
216 2012-08-01  Kwang Yul Seo  <skyul@company100.net>
217
218         Read tag names and attributes from the saved tokens in HTMLFormattingElementList::closestElementInScopeWithName(const AtomicString&)
219         https://bugs.webkit.org/show_bug.cgi?id=92841
220
221         Reviewed by Adam Barth.
222
223         This is a follow-up patch for r123577.
224         Replaced entry.element()->hasLocalName(targetName) with entry.stackItem()->hasLocalName(targetName).
225
226         No new tests, covered by existing tests.
227
228         * html/parser/HTMLFormattingElementList.cpp:
229         (WebCore::HTMLFormattingElementList::closestElementInScopeWithName):
230
231 2012-08-01  Kwang Yul Seo  <skyul@company100.net>
232
233         HTMLTreeBuilder passes a wrong token when pushing the head element
234         https://bugs.webkit.org/show_bug.cgi?id=92838
235
236         Reviewed by Adam Barth.
237
238         When the tree builder pushes the head element in the "after head" insertion mode,
239         it creates a HTMLStackItem from a wrong token.
240
241         Added HTMLConstructionSite::headStackItem() to retrieve the stack item for the head
242         element. Modified the tree builder to pass the correct stack item when pushing the head
243         element in the "after head" insertion mode.
244
245         No new tests, covered by existing tests.
246
247         * html/parser/HTMLConstructionSite.cpp:
248         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
249         * html/parser/HTMLConstructionSite.h:
250         (WebCore::HTMLConstructionSite::head):
251         (WebCore::HTMLConstructionSite::headStackItem):
252         (HTMLConstructionSite):
253         * html/parser/HTMLTreeBuilder.cpp:
254         (WebCore::HTMLTreeBuilder::processStartTag):
255
256 2012-08-01  Andrei Bucur  <abucur@adobe.com>
257
258         [CSS Regions] The regionLayoutUpdate event should be dispatched on the NamedFlow object
259         https://bugs.webkit.org/show_bug.cgi?id=88778
260
261         Reviewed by Adam Barth.
262
263         Spec: http://www.w3.org/TR/css3-regions/#region-flow-layout-events
264
265         This patch implements the regionLayoutUpdate event per May 3rd CSS Regions spec recommendation.
266         Before this patch the event was dispatched individually on each region whenever its overflow state changed. The trigger conditions are preserved with the following additions:
267         - the event is dispatched when the last region is removed
268         - the event is not dispatched when the named flow switches to the NULL state
269         Also, the NamedFlow objects are not deleted if they switch to the NULL state and have listeners attached. In that scenario the JS wrapper will not release the reference
270         until the parent Document is destroyed.
271
272         Tests: The old tests have been modified to use the event on the NamedFlow object rather the one on the Region. New tests have been added to verify the
273         correct behavior in the special states of the NamedFlow (no region chain, NULL state).
274
275         * dom/Document.cpp:
276         (WebCore::Document::addListenerTypeIfNeeded): Listeners are not added on Nodes any more so the regionLayoutUpdate type was removed from the list.
277         * dom/Document.h:
278         * dom/EventTarget.h:
279         (WebCore):
280         * dom/EventTargetFactory.in:
281         * dom/Node.cpp:
282         * dom/Node.h:
283         (Node):
284         * dom/WebKitNamedFlow.cpp:
285         (WebCore::WebKitNamedFlow::eventTargetData):
286         (WebCore):
287         (WebCore::WebKitNamedFlow::ensureEventTargetData):
288         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): The 3rd May WD says the event is bubbling. However this doesn't make sense as this object doesn't belong to the DOM tree. This was fixed in the ED.
289         (WebCore::WebKitNamedFlow::interfaceName):
290         (WebCore::WebKitNamedFlow::scriptExecutionContext):
291         (WebCore::WebKitNamedFlow::base): Getter for the owner Document used by the wrapper to determine if the object is reachable.
292         * dom/WebKitNamedFlow.h:
293         (WebCore):
294         (WebKitNamedFlow):
295         (WebCore::WebKitNamedFlow::refEventTarget):
296         (WebCore::WebKitNamedFlow::derefEventTarget):
297         * dom/WebKitNamedFlow.idl:
298         * rendering/RenderFlowThread.cpp:
299         (WebCore::RenderFlowThread::RenderFlowThread):
300         (WebCore::RenderFlowThread::layout): The event dispatching is now handled by the implementation of RenderFlowThread.
301         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
302         * rendering/RenderFlowThread.h:
303         * rendering/RenderNamedFlowThread.cpp:
304         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
305         (WebCore::RenderNamedFlowThread::removeRegionFromThread): The layout doesn't detect changes caused by removing the last region. This case is handled separately.
306         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
307         (WebCore):
308         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
309         * rendering/RenderNamedFlowThread.h:
310         (RenderNamedFlowThread):
311         * rendering/RenderRegion.cpp:
312         (WebCore::RenderRegion::RenderRegion):
313         * rendering/RenderRegion.h:
314         (RenderRegion):
315
316 2012-07-31  Robert Hogan  <robert@webkit.org>
317
318         CSS 2.1 failure: margin-collapse-012 fails
319         https://bugs.webkit.org/show_bug.cgi?id=80219
320
321         Reviewed by Eric Seidel.
322
323         Tests: css2.1/20110323/margin-collapse-012.htm
324                fast/css/margin-collapse-abspos-negmargin.htm
325
326         I also ran this against the full margin-collapse-* CSS 2.1 suite without regressions.
327
328         Per http://www.w3.org/TR/CSS21/box.html#collapsing-margins don't collapse the margins of 
329         positioned blocks. Instead, just use the margin of the sibling/container to offset the 
330         positioned block's logical top - its own margin gets added in later at 
331         RenderBox::computePositionedLogicalHeightUsing().
332
333         * rendering/RenderBlock.cpp:
334         (WebCore::RenderBlock::adjustPositionedBlock):
335
336 2012-08-01  Sheriff Bot  <webkit.review.bot@gmail.com>
337
338         Unreviewed, rolling out r124334.
339         http://trac.webkit.org/changeset/124334
340         https://bugs.webkit.org/show_bug.cgi?id=92879
341
342         Broke MemoryInstrumentationTest.sizeOf from webkit_unit_tests
343         on Chromium canaries (Requested by apavlov1 on #webkit).
344
345         * bindings/v8/ScriptProfiler.cpp:
346         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
347         * dom/MemoryInstrumentation.h:
348         (WebCore::MemoryInstrumentation::addInstrumentedObject):
349         (MemoryInstrumentation):
350         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
351         * inspector/InspectorMemoryAgent.cpp:
352         (WebCore):
353         * inspector/MemoryInstrumentationImpl.h:
354         (MemoryInstrumentationImpl):
355         (WebCore::MemoryInstrumentationImpl::totalTypeSize):
356
357 2012-08-01  Han Shen  <shenhan@google.com>
358
359         Fix gcc 4.7 compile warnings.
360         https://bugs.webkit.org/show_bug.cgi?id=92797
361
362         Reviewed by Kentaro Hara.
363
364         GCC 4.7 gives (more strict) warnings on uninitialized variables,
365         fixed by providing initilization values.
366
367         Tested by gcc 4.7 building. No change in behavior.
368
369         * platform/graphics/filters/arm/NEONHelpers.h:
370         (WebCore::loadRGBA8AsFloat): Add initilizaton value for local variable.
371
372 2012-08-01  Ryosuke Niwa  <rniwa@webkit.org>
373
374         REGRESSION(r122498): Assertion failure: m_nodeListCounts is sometimes not zero in the Document destructor
375         https://bugs.webkit.org/show_bug.cgi?id=92742
376
377         Reviewed by Andreas Kling.
378
379         The bug was caused by adoptTreeScope's not always calling unregisterNodeListCache and registerNodeListCache
380         on node lists that use m_atomicNameCaches and m_nameCaches.
381
382         Tests: fast/dom/NodeList/nodelist-moved-to-fragment-2.html
383                fast/dom/NodeList/nodelist-moved-to-fragment.html
384
385         * dom/NodeRareData.h:
386         (WebCore::NodeListsNodeData::adoptTreeScope):
387
388 2012-08-01  Vsevolod Vlasov  <vsevik@chromium.org>
389
390         Web Inspector: Crashes in NetworkResourcesData.
391         https://bugs.webkit.org/show_bug.cgi?id=92874
392
393         Reviewed by Yury Semikhatsky.
394
395         * inspector/NetworkResourcesData.cpp:
396         (WebCore::contentSizeInBytes):
397         (WebCore):
398         (WebCore::NetworkResourcesData::ResourceData::removeContent):
399         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
400         (WebCore::NetworkResourcesData::setResourceContent):
401         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
402
403 2012-08-01  Ilya Tikhonovsky  <loislo@chromium.org>
404
405         Web Inspector: test native memory instrumentation code with help of unittests
406         https://bugs.webkit.org/show_bug.cgi?id=92743
407
408         Reviewed by Yury Semikhatsky.
409
410         Test a part of existing Native Memory Instrumentation code with help of unit tests.
411         6 tests were added and two bugs were fixed.
412         a drive-by improvement: the method MemoryInstrumentation::addInstrumentedObject
413         was marked as private and addRootObject was introduced instead of it.
414         The new function also calls processDeferedPointers.
415
416         * bindings/v8/ScriptProfiler.cpp:
417         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
418         * dom/MemoryInstrumentation.h:
419         (WebCore::MemoryInstrumentation::addRootObject):
420         (MemoryInstrumentation):
421         (WebCore::MemoryInstrumentation::addInstrumentedObject):
422         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
423         (WebCore):
424         (WebCore::MemoryInstrumentation::addObjectImpl):
425         * inspector/InspectorMemoryAgent.cpp:
426         (WebCore):
427         * inspector/MemoryInstrumentationImpl.h:
428         (MemoryInstrumentationImpl):
429
430 2012-08-01  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
431
432         [GTK] Memory leak found while running webaudio tests
433         https://bugs.webkit.org/show_bug.cgi?id=92861
434
435         Reviewed by Philippe Normand.
436
437         Fix a memory leak in decodeAudioForBusCreation by adopting
438         an allocation of GInputStream.
439
440         No new tests. No change in behavior.
441
442         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
443         (WebCore::AudioFileReader::decodeAudioForBusCreation):
444
445 2012-08-01  Alexei Filippov  <alexeif@chromium.org>
446
447         Web Inspector: count DOM storage cache memory for native snapshot
448         https://bugs.webkit.org/show_bug.cgi?id=91617
449
450         Reviewed by Yury Semikhatsky.
451
452         Add memory size used for DOM storage cache reporting interface.
453         Report it to the native memory snapshot instrumentation framework.
454
455         * inspector/InspectorController.cpp:
456         (WebCore::InspectorController::InspectorController):
457         * inspector/InspectorDOMStorageAgent.cpp:
458         (WebCore::InspectorDOMStorageAgent::memoryBytesUsedByStorageCache):
459         (WebCore):
460         * inspector/InspectorDOMStorageAgent.h:
461         (InspectorDOMStorageAgent):
462         * inspector/InspectorMemoryAgent.cpp:
463         (MemoryBlockName):
464         (WebCore):
465         (WebCore::dumpDOMStorageCache):
466         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
467         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
468         * inspector/InspectorMemoryAgent.h:
469         (WebCore):
470         (WebCore::InspectorMemoryAgent::create):
471         (InspectorMemoryAgent):
472         * inspector/front-end/NativeMemorySnapshotView.js:
473         (WebInspector.MemoryBlockViewProperties._initialize):
474         * storage/StorageArea.h:
475         (StorageArea):
476         * storage/StorageAreaImpl.cpp:
477         (WebCore::StorageAreaImpl::memoryBytesUsedByCache):
478         (WebCore):
479         * storage/StorageAreaImpl.h:
480         (StorageAreaImpl):
481
482 2012-07-31  Yury Semikhatsky  <yurys@chromium.org>
483
484         Web Inspector: add CSSStyleSheet memory instrumentation
485         https://bugs.webkit.org/show_bug.cgi?id=92748
486
487         Reviewed by Antti Koivisto.
488
489         Added MemoryInstrumentation for CSSStyleSheet, StyleSheetContents, StyleRule,
490         CSSSelectorList and StylePropertySet. The coverage is not complete as the
491         patch was growing too big.
492
493         * css/CSSSelectorList.cpp:
494         (WebCore::CSSSelectorList::CSSSelectorList):
495         (WebCore::CSSSelectorList::length):
496         (WebCore):
497         (WebCore::CSSSelectorList::reportMemoryUsage):
498         * css/CSSSelectorList.h:
499         (WebCore):
500         (CSSSelectorList):
501         * css/CSSStyleSheet.cpp:
502         (WebCore::CSSStyleSheet::reportMemoryUsage):
503         (WebCore):
504         * css/CSSStyleSheet.h:
505         (WebCore):
506         (CSSStyleSheet):
507         * css/MediaList.cpp:
508         (WebCore):
509         (WebCore::MediaQuerySet::reportMemoryUsage):
510         (WebCore::MediaList::reportMemoryUsage):
511         * css/MediaList.h:
512         (WebCore):
513         (MediaQuerySet):
514         (MediaList):
515         * css/MediaQuery.cpp:
516         (WebCore::MediaQuery::reportMemoryUsage):
517         (WebCore):
518         * css/MediaQuery.h:
519         (WebCore):
520         (MediaQuery):
521         * css/MediaQueryExp.cpp:
522         (WebCore::MediaQueryExp::reportMemoryUsage):
523         (WebCore):
524         * css/MediaQueryExp.h:
525         (WebCore):
526         (MediaQueryExp):
527         * css/StylePropertySet.cpp:
528         (WebCore::StylePropertySet::reportMemoryUsage):
529         (WebCore):
530         * css/StylePropertySet.h:
531         (WebCore):
532         (StylePropertySet):
533         * css/StyleRule.cpp:
534         (WebCore::StyleRuleBase::reportMemoryUsage): We cannot make
535         reportMemoryUsage virtual as it would add vtable to StyleRuleBase
536         and its descendants and would blow its memory footprint. This
537         is why we have a switch over StyleRule type here.
538         (WebCore):
539         (WebCore::StyleRule::reportMemoryUsage):
540         (WebCore::StyleRulePage::reportMemoryUsage):
541         (WebCore::StyleRuleFontFace::reportMemoryUsage):
542         (WebCore::StyleRuleBlock::reportMemoryUsage):
543         (WebCore::StyleRuleMedia::reportMemoryUsage):
544         (WebCore::StyleRuleRegion::reportMemoryUsage):
545         * css/StyleRule.h:
546         (WebCore):
547         (StyleRuleBase):
548         (StyleRule):
549         (StyleRuleFontFace):
550         (StyleRulePage):
551         (StyleRuleBlock):
552         (StyleRuleMedia):
553         (StyleRuleRegion):
554         * css/StyleSheetContents.cpp:
555         (WebCore::StyleSheetContents::reportMemoryUsage):
556         (WebCore):
557         * css/StyleSheetContents.h:
558         (WebCore):
559         (StyleSheetContents):
560         * dom/Document.cpp:
561         (WebCore::Document::reportMemoryUsage):
562         * dom/MemoryInstrumentation.h:
563         (WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
564         (WebCore::MemoryClassInfo::addVectorPtr):
565
566 2012-08-01  Keishi Hattori  <keishi@webkit.org>
567
568         Attempt to fix flakiness of color-suggestion-picker-appearance.html
569         https://bugs.webkit.org/show_bug.cgi?id=92848
570
571         Reviewed by Kent Tamura.
572
573         * Resources/colorSuggestionPicker.js:
574         (ColorPicker.prototype._layout): We put the width and height into
575         variables so we don't call window.onresize twice.
576
577 2012-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
578
579         Unreviewed. Fix GTK+ build with recent version of GTK+.
580
581         Use g_threads_enter/leave instead of the wrapper macros. This
582         gives a compile warning because they are now deprecated but at
583         least it builds.
584
585         * plugins/gtk/gtk2xtbin.c:
586         (xt_event_prepare):
587         (xt_event_check):
588         (xt_event_dispatch):
589
590 2012-08-01  Alexei Filippov  <alexeif@chromium.org>
591
592         Web Inspector: Add native memory used by GlyphCache to the snapshot
593         https://bugs.webkit.org/show_bug.cgi?id=90615
594
595         Reviewed by Yury Semikhatsky.
596
597         Adds interface for reporting memory usage of platform specific
598         components.
599         Report memory usage of the font cache allocated by skia in chromium.
600
601         * inspector/InspectorMemoryAgent.cpp:
602         (WebCore::addPlatformComponentsInfo):
603         (WebCore):
604         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
605         * inspector/front-end/NativeMemorySnapshotView.js:
606         (WebInspector.MemoryBlockViewProperties._initialize):
607         * platform/MemoryUsageSupport.cpp:
608         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
609         (WebCore):
610         * platform/MemoryUsageSupport.h:
611         (MemoryUsageSupport):
612         (ComponentInfo):
613         (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
614         * platform/chromium/MemoryUsageSupportChromium.cpp:
615         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
616         (WebCore):
617         * platform/qt/MemoryUsageSupportQt.cpp:
618         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
619         (WebCore):
620
621 2012-08-01  Yoshifumi Inoue  <yosin@chromium.org>
622
623         [CSS] Add selectors for multiple fields time input UI.
624         https://bugs.webkit.org/show_bug.cgi?id=92834
625
626         Reviewed by Kent Tamura.
627
628         This patch adds new selectors and "height" property to spin button
629         for multiple fields time input UI.
630
631         RenderTextControlSingleLine::layout() sets height of spin button for
632         input type "number" and other input types using RenderTextControlSingleLine
633         as renderer object. However, multiple fields time input UI doesn't use
634         it and needs to set height of spin button.
635
636         No new tests. This patch doesn't change behavior.
637
638         * css/html.css:
639         (input::-webkit-datetime-edit): Added.
640         (input::-webkit-datetime-edit-ampm-field): Added.
641         (input::-webkit-datetime-edit-hour-field): Added.
642         (input::-webkit-datetime-edit-millisecond-field): Added.
643         (input::-webkit-datetime-edit-minute-field): Added.
644         (input::-webkit-datetime-edit-minute-field[readonly]): Added. This selector
645         is used for step>=3600 second and time format contains minute field.
646         (input::-webkit-datetime-edit-second-field): Added.
647         (input::-webkit-datetime-edit-second-field[readonly]): Added. This selector
648         is used for step>=60 second and time format contains second field.
649         (input::-webkit-inner-spin-button): Add "height" property for using
650         spin button other than RenderTextControlSingleLine.
651
652 2012-08-01  Kwang Yul Seo  <skyul@company100.net>
653
654         Make HTMLConstructionSite::createHTMLElement(AtomicHTMLToken*) private.
655         https://bugs.webkit.org/show_bug.cgi?id=92846
656
657         Reviewed by Eric Seidel.
658
659         This method is internal to HTMLConstructionSite.
660
661         No functional change.
662
663         * html/parser/HTMLConstructionSite.h:
664         (HTMLConstructionSite):
665
666 2012-08-01  Kinuko Yasuda  <kinuko@chromium.org>
667
668         [Filesystem] Assertion on $0.webkitEntries while on the input field.
669         https://bugs.webkit.org/show_bug.cgi?id=91954
670
671         Reviewed by Kent Tamura.
672
673         Accessing .webkitEntries should not crash when input type is not for file.
674
675         Tests: fast/filesystem/input-access-entries.html
676
677         * Modules/filesystem/HTMLInputElementFileSystem.cpp:
678         (WebCore::HTMLInputElementFileSystem::webkitEntries):
679
680 2012-08-01  Eugene Klyuchnikov  <eustas.big@gmail.com>
681
682         Web Inspector: Profiles: cleanup HeapSnapshotReceiver interface
683         https://bugs.webkit.org/show_bug.cgi?id=92390
684
685         Reviewed by Yury Semikhatsky.
686
687         Remove callback parameter and return values from methods startLoading
688         and finishLoading. All implementations of HeapSnapshotReceiver honestly
689         override interface methods now.
690
691         * inspector/front-end/HeapSnapshotLoader.js: Adopted new API.
692         * inspector/front-end/HeapSnapshotProxy.js: Adopted new API. 
693         (WebInspector.HeapSnapshotLoaderProxy.prototype.isStarted): Added.
694         (WebInspector.HeapSnapshotLoaderProxy.prototype.addConsumer): Added.
695         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
696         Explicitly finishes loading and build snapshot.
697         * inspector/front-end/HeapSnapshotView.js:
698         (WebInspector.HeapSnapshotReceiver.prototype.startLoading):
699         Removed callback parameter and return value.
700         (WebInspector.HeapSnapshotReceiver.prototype.finishLoading):
701         Removed callback parameter.
702         (WebInspector.HeapSnapshotSaveToFileReceiver): Adopted new API.
703
704 2012-04-07  Ilya Tikhonovsky  <loislo@chromium.org>
705
706         Web Inspector: extract MemoryInstrumentationImpl into separate files for future reusing in unit tests
707         https://bugs.webkit.org/show_bug.cgi?id=92751
708
709         Reviewed by Yury Semikhatsky.
710
711         * CMakeLists.txt:
712         * GNUmakefile.list.am:
713         * Target.pri:
714         * WebCore.gypi:
715         * WebCore.vcproj/WebCore.vcproj:
716         * inspector/InspectorAllInOne.cpp:
717         * inspector/InspectorMemoryAgent.cpp:
718         (WebCore):
719         * inspector/MemoryInstrumentationImpl.cpp: Added.
720         (WebCore):
721         (WebCore::MemoryInstrumentationImpl::MemoryInstrumentationImpl):
722         (WebCore::MemoryInstrumentationImpl::processDeferredInstrumentedPointers):
723         (WebCore::MemoryInstrumentationImpl::countObjectSize):
724         (WebCore::MemoryInstrumentationImpl::deferInstrumentedPointer):
725         (WebCore::MemoryInstrumentationImpl::visited):
726         (WebCore::MemoryInstrumentationImpl::selfSize):
727         * inspector/MemoryInstrumentationImpl.h: Added.
728         (WebCore):
729         (MemoryInstrumentationImpl):
730         (WebCore::MemoryInstrumentationImpl::totalTypeSize):
731
732 2012-07-31  MORITA Hajime  <morrita@google.com>
733
734         Internals::setAuthorShadowDOMForAnyElementEnabled should be on InternalSettings
735         https://bugs.webkit.org/show_bug.cgi?id=92823
736
737         Reviewed by Kentaro Hara.
738
739         This change moves Internals::setAuthorShadowDOMForAnyElementEnabled() to
740         InternalSettings to support original value recovery.
741
742         * testing/InternalSettings.cpp:
743         (WebCore::InternalSettings::Backup::Backup):
744         (WebCore::InternalSettings::Backup::restoreTo):
745         (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled): Moved from Internals.
746         (WebCore):
747         * testing/InternalSettings.h:
748         (Backup):
749         (InternalSettings):
750         * testing/InternalSettings.idl:
751         * testing/Internals.cpp:
752         * testing/Internals.h:
753         (Internals):
754         * testing/Internals.idl:
755
756 2012-07-31  Vincent Scheib  <scheib@chromium.org>
757
758         webkitRequestPointerLock and webkitExitPointerLock limited to the same document of an active Pointer lock.
759         https://bugs.webkit.org/show_bug.cgi?id=91284
760
761         Reviewed by Adrienne Walker.
762
763         Previously, cross-talk between documents was possible, e.g. allowing one
764         document.webkitExitPointerLock to exit the lock from another document.
765         This change brings Pointer Lock closer to the Fullscreen API behavior,
766         and stops the pointer lock target from being transferable between
767         documents.
768
769         Test: http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html
770
771         * dom/Document.cpp:
772         (WebCore::Document::webkitExitPointerLock):
773         * page/PointerLockController.cpp:
774         (WebCore::PointerLockController::requestPointerLock):
775
776 2012-07-31  Keishi Hattori  <keishi@webkit.org>
777
778         ColorInputType::typeMismatchFor is returning the opposite bool
779         https://bugs.webkit.org/show_bug.cgi?id=92836
780
781         Reviewed by Kent Tamura.
782
783         No new tests. Covered by color-suggestion-picker-appearance.html.
784
785         * html/ColorInputType.cpp:
786         (WebCore::ColorInputType::typeMismatchFor):
787
788 2012-07-31  Douglas Stockwell  <dstockwell@chromium.org>
789
790         -webkit-flex-flow does not work with inherit/initial values
791         https://bugs.webkit.org/show_bug.cgi?id=92709
792
793         Reviewed by Ojan Vafai.
794
795         Add a new handler for flex-flow and move flex to StyleBuilder to mirror the standard pattern for handling initial/inherit in shorthands.
796
797         Test: css3/flexbox/flex-flow-initial.html
798
799         * css/StyleBuilder.cpp:
800         (WebCore::StyleBuilder::StyleBuilder): Added handlers for flex and flex-flow.
801         * css/StyleResolver.cpp:
802         (WebCore::StyleResolver::collectMatchingRulesForList): Removed hand written logic for handling flex.
803
804 2012-07-31  Emil A Eklund  <eae@chromium.org>
805
806         Float imprecision causes incorrect wrapping in LineLayout with subpixel layout
807         https://bugs.webkit.org/show_bug.cgi?id=92778
808
809         Reviewed by Eric Seidel.
810
811         Due to float imprecision an incorrect wrapping decision is made in
812         certain cases where the values being compare are close but not exactly
813         the same. This can happen as the size of blocks is represented in layout
814         units while line layout uses floats.
815
816         Test: fast/sub-pixel/inline-block-should-not-wrap.html
817
818         * rendering/RenderBlockLineLayout.cpp:
819         (WebCore::LineWidth::fitsOnLine):
820         Use LayoutUnit::epsilon when comparing values as that is the maximum
821         precision we support.
822
823 2012-07-31  Hayato Ito  <hayato@chromium.org>
824
825         Refactor EventDispatcher::dispatchEvent() so that we can call each phase (Caputure, Target and Bubbling) of event dispatching separately.
826         https://bugs.webkit.org/show_bug.cgi?id=92621
827
828         Reviewed by Dimitri Glazkov.
829
830         This is one of the required refactorings to support event
831         propagation for seamless iframes.  I've removed 'goto' statements
832         from EventDispatcher::dispatchEvent() as a result.
833
834         I've verified that all separated functions are successfully
835         inlined. I could not see any performance regression.  The
836         benchmark result is:
837
838         Before this patch:
839         % ./Tools/Scripts/run-perf-tests PerformanceTests/DOM/Events.html
840         Running 1 tests
841         Running DOM/Events.html (1 of 1)
842         RESULT DOM: Events= 243.986607143 ms
843         median= 242.297619048 ms, stdev= 5.74748351315 ms, min= 239.80952381 ms, max= 268.0 ms
844
845         After this patch:
846         % ./Tools/Scripts/run-perf-tests PerformanceTests/DOM/Events.html
847         Running 1 tests
848         Running DOM/Events.html (1 of 1)
849         RESULT DOM: Events= 242.291666667 ms
850         median= 240.452380952 ms, stdev= 5.8718643632 ms, min= 238.214285714 ms, max= 266.5 ms
851
852         No new tests, no behavior change.
853
854         * dom/EventDispatcher.cpp:
855         (WebCore::EventDispatcher::dispatchEvent):
856         (WebCore::EventDispatcher::dispatchEventPreProcess):
857         (WebCore):
858         (WebCore::EventDispatcher::dispatchEventAtCapturing):
859         (WebCore::EventDispatcher::dispatchEventAtTarget):
860         (WebCore::EventDispatcher::dispatchEventAtBubbling):
861         (WebCore::EventDispatcher::dispatchEventPostProcess):
862         (WebCore::EventDispatcher::topEventContext):
863         * dom/EventDispatcher.h:
864         (WebCore):
865         (EventDispatcher):
866
867 2012-07-31  Yoshifumi Inoue  <yosin@chromium.org>
868
869         [Chromium] Enable ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS
870         https://bugs.webkit.org/show_bug.cgi?id=92822
871
872         Reviewed by Kent Tamura.
873
874         This patch touches header files for compiling files which contains
875         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
876
877         No new tests. This patch doesn't change behavior.
878
879         * platform/text/DateTimeFormat.h:
880         * platform/text/LocaleICU.h:
881         * platform/text/LocaleWin.h:
882         * platform/text/LocalizedDate.h:
883         * platform/text/LocalizedNumber.h:
884         * platform/text/mac/LocaleMac.h:
885
886 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
887
888         REGRESSION(r120979): Node list returned by getElementsByTagNameNS isn't invalidated when children changes
889         https://bugs.webkit.org/show_bug.cgi?id=92705
890
891         Reviewed by Abhishek Arya.
892
893         The bug was caused by a typo in NodeListsNodeData::invalidateCaches. We need to invalidate
894         tag name node lists when child nodes change and not when attributes change.
895
896         Test: fast/dom/NodeList/nodelist-namespace-invalidation.html
897
898         * dom/Node.cpp:
899         (WebCore::NodeListsNodeData::invalidateCaches):
900
901 2012-07-31  Tony Chang  <tony@chromium.org>
902
903         flexbox should avoid floats
904         https://bugs.webkit.org/show_bug.cgi?id=92661
905
906         Reviewed by Ojan Vafai.
907
908         Block types should avoid floats. Deprecated flexbox and grid already avoid floats.
909
910         Tests: css3/flexbox/floated-flexbox.html - added a test case.
911
912         * rendering/RenderFlexibleBox.h:
913
914 2012-07-31  Tony Chang  <tony@chromium.org>
915
916         REGRESSION: flexbox content-size fails to exclude scrollbar
917         https://bugs.webkit.org/show_bug.cgi?id=92667
918
919         Reviewed by Ojan Vafai.
920
921         In r123909, we switched to computing the height using computeContentLogicalHeightUsing().
922         Unfortunately, this includes the scrollbar when we want the content height. Add a helper
923         method for computing the value needed by flexbox.
924
925         Test: css3/flexbox/content-height-with-scrollbars.html
926
927         * rendering/RenderFlexibleBox.cpp:
928         (WebCore::RenderFlexibleBox::mainAxisContentExtent): Use computeLogicalClientHeight
929         (WebCore::RenderFlexibleBox::computeLogicalClientHeight): Add new method for taking scrollbar into consideration.
930         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Use computeLogicalClientHeight
931         (WebCore::RenderFlexibleBox::lineBreakLength): Use computeLogicalClientHeight
932         * rendering/RenderFlexibleBox.h:
933
934 2012-07-31  Kwang Yul Seo  <skyul@company100.net>
935
936         Remove unused method HTMLElementStack::bottom()
937         https://bugs.webkit.org/show_bug.cgi?id=92807
938
939         Reviewed by Kentaro Hara.
940
941         HTMLElementStack::bottom() was replaced with HTMLElementStack::rootNode()
942         in r80231.
943
944         No functional change, so no new tests.
945
946         * html/parser/HTMLElementStack.cpp:
947         * html/parser/HTMLElementStack.h:
948         (HTMLElementStack):
949
950 2012-07-31  Tony Chang  <tony@chromium.org>
951
952         -webkit-order should take an integer, not a number
953         https://bugs.webkit.org/show_bug.cgi?id=92688
954
955         Reviewed by Ojan Vafai.
956
957         The spec changed back from floats to integers:
958         http://lists.w3.org/Archives/Public/www-style/2012Jul/0607.html
959
960         Tests: css3/flexbox/css-properties.html: Updated.
961                css3/flexbox/flex-order.html: Test cases modified.
962
963
964         * css/CSSComputedStyleDeclaration.cpp:
965         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
966         * css/CSSParser.cpp:
967         (WebCore::CSSParser::parseValue):
968         * css/StyleBuilder.cpp:
969         (WebCore::StyleBuilder::StyleBuilder):
970         * rendering/RenderFlexibleBox.cpp:
971         (WebCore):
972         (RenderFlexibleBox::OrderHashTraits):
973         (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
974         (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
975         (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
976         (RenderFlexibleBox::OrderIterator):
977         * rendering/RenderFlexibleBox.h:
978         * rendering/style/RenderStyle.h:
979         * rendering/style/StyleRareNonInheritedData.h:
980         (StyleRareNonInheritedData):
981
982 2012-07-31  James Robinson  <jamesr@chromium.org>
983
984         [chromium] Use skia directly in CCHeadsUpDisplayLayerImpl
985         https://bugs.webkit.org/show_bug.cgi?id=92810
986
987         Reviewed by Adrienne Walker.
988
989         The chromium compositor HUD doesn't need to use a full GraphicsContext/etc, all it draws are rectangles and a
990         simple stroked path. This draws the HUD with straight skia calls and removes the now unnecessary PlatformCanvas
991         wrapper.
992
993         * WebCore.gypi:
994         * platform/graphics/chromium/PlatformCanvas.cpp: Removed.
995         * platform/graphics/chromium/PlatformCanvas.h: Removed.
996         * platform/graphics/chromium/cc/CCFontAtlas.cpp:
997         (WebCore::CCFontAtlas::drawText):
998         * platform/graphics/chromium/cc/CCFontAtlas.h:
999         (CCFontAtlas):
1000         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
1001         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
1002         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
1003         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
1004         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
1005         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
1006         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h:
1007         (WebCore):
1008
1009 2012-07-31  Dean Jackson  <dino@apple.com>
1010
1011         ImageCG doesn't initialize m_decodedPropertiesSize in BitmapImage constructor
1012         https://bugs.webkit.org/show_bug.cgi?id=92418
1013
1014         Reviewed by Dan Bernstein.
1015
1016         Tested by existing content.
1017
1018         * platform/graphics/cg/ImageCG.cpp:
1019         (WebCore::BitmapImage::BitmapImage): initialize m_decodedPropertiesSize to zero.
1020
1021 2012-07-31  Shawn Singh  <shawnsingh@chromium.org>
1022
1023         [chromium] Hit test points are being clipped by layers that should not clip
1024         https://bugs.webkit.org/show_bug.cgi?id=92786
1025
1026         Reviewed by James Robinson.
1027
1028         On impl-side hit testing for chromium compositor, we are
1029         accidentally checking all ancestor layers for clipping, instead of
1030         only layers that actually clip something. This patch fixes it.
1031
1032         Added new unit test that reproduces the scenario:
1033           CCLayerTreeHostCommonTest.verifyHitTestingForNonClippingIntermediateLayer
1034
1035         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1036         (WebCore::pointIsClippedBySurfaceOrClipRect):
1037
1038 2012-07-31  James Robinson  <jamesr@chromium.org>
1039
1040         [chromium] REGRESSION(r123644) Compositor HUD crashes immediately with --show-paint-rects
1041         https://bugs.webkit.org/show_bug.cgi?id=92775
1042
1043         Reviewed by Adrienne Walker.
1044
1045         In r123644, the compositor HUD was turned into a normal layer. When the HUD is supposed to cover the entire
1046         viewport - for instance if the showPlatformLayerTree or showDebugRects settings are true -
1047         HeadsUpDisplayLayerChromium's constructor tries to size itself to its layerTreeHost()'s device viewport size.
1048         Unfortunately, its layerTreeHost pointer is always nil in the constructor since the layer is not yet in the
1049         tree. Additionally, this doesn't handle resize at all.
1050
1051         To fix this, this grabs the device viewport size and settings in a LayerChromium::update() OVERRIDE. Also
1052         changes CCLayerTreeHost::willCommit to only reparent the HUD layer if needed instead of on every frame.
1053
1054         Tested manually, we don't have any layout tests for the debug HUD.
1055
1056         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp:
1057         (WebCore::HeadsUpDisplayLayerChromium::create):
1058         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
1059         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h:
1060         (HeadsUpDisplayLayerChromium):
1061         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1062         (WebCore::CCLayerTreeHost::willCommit):
1063
1064 2012-07-31  Sam Weinig  <sam@webkit.org>
1065
1066         Stop masking 8 bits off of the visited link hash. We need all the bits!
1067         https://bugs.webkit.org/show_bug.cgi?id=92799
1068
1069         Reviewed by Anders Carlsson.
1070
1071         * loader/appcache/ApplicationCacheStorage.cpp:
1072         (WebCore::urlHostHash):
1073         * platform/network/blackberry/CredentialBackingStore.cpp:
1074         (WebCore::hashCredentialInfo):
1075         * plugins/blackberry/PluginPackageBlackBerry.cpp:
1076         (WebCore::PluginPackage::hash):
1077         Update for new function names.
1078
1079 2012-07-31  Chris Rogers  <crogers@google.com>
1080
1081         Allow AudioDestination to support local/live audio input
1082         https://bugs.webkit.org/show_bug.cgi?id=90318
1083
1084         Reviewed by Kenneth Russell.
1085
1086         * WebCore.gypi:
1087         * WebCore.xcodeproj/project.pbxproj:
1088         * GNUmakefile.list.am:
1089         Add AudioIOCallback.h to make files.
1090
1091         * Modules/webaudio/AudioDestinationNode.h:
1092         * Modules/webaudio/AudioDestinationNode.cpp:
1093         (WebCore::AudioDestinationNode::render):
1094         Change provideInput() method to render() to support optional audio input.
1095
1096         (AudioDestinationNode):
1097         (WebCore::AudioDestinationNode::localAudioInputProvider):
1098         Expose public access to an AudioSourceProvider for local/live audio input.
1099
1100         (LocalAudioInputProvider):
1101         (WebCore::AudioDestinationNode::LocalAudioInputProvider::LocalAudioInputProvider):
1102         (WebCore::AudioDestinationNode::LocalAudioInputProvider::set):
1103         (WebCore::AudioDestinationNode::LocalAudioInputProvider::provideInput):
1104         Add simple AudioSourceProvider implementation which dishes out a single AudioBus each
1105         render quantum for optional local/live audio input.
1106
1107         * Modules/webaudio/OfflineAudioDestinationNode.h:
1108         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1109         (WebCore::OfflineAudioDestinationNode::startRendering):
1110         (WebCore::OfflineAudioDestinationNode::offlineRenderEntry):
1111         (WebCore::OfflineAudioDestinationNode::offlineRender):
1112         Simple name change using "offline" prefix to avoid confusion with AudioDestinationNode::render() method (implementing AudioIOCallback)
1113
1114         * platform/audio/AudioDestination.h:
1115         Switch create() method to take an AudioIOCallback instead of AudioSourceProvider.
1116
1117         * platform/audio/AudioIOCallback.h:
1118         (WebCore::AudioIOCallback::~AudioIOCallback):
1119         Add new AudioIOCallback interface for audio input/output.
1120
1121         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1122         (WebCore::AudioDestination::create):
1123         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
1124         * platform/audio/gstreamer/AudioDestinationGStreamer.h:
1125         (AudioDestinationGStreamer):
1126         (WebCore::AudioDestinationGStreamer::callback):
1127         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1128         (_WebKitWebAudioSourcePrivate):
1129         (webKitWebAudioSrcSetProperty):
1130         (webKitWebAudioSrcLoop):
1131         Small tweaks to AudioDestinationGStreamer implementation to account for switch to AudioIOCallback.
1132
1133         * platform/audio/mac/AudioDestinationMac.cpp:
1134         (WebCore::AudioDestination::create):
1135         (WebCore::AudioDestinationMac::AudioDestinationMac):
1136         (WebCore::AudioDestinationMac::render):
1137         * platform/audio/mac/AudioDestinationMac.h:
1138         (AudioDestinationMac):
1139         Small tweaks to AudioDestinationMac implementation to account for switch to AudioIOCallback.
1140
1141 2012-07-31  Kwang Yul Seo  <skyul@company100.net>
1142
1143         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::processEndTag(AtomicHTMLToken*)
1144         https://bugs.webkit.org/show_bug.cgi?id=92715
1145
1146         Reviewed by Adam Barth.
1147
1148         This is a follow-up patch for r123577. Changed oneBelowTop to return HTMLStackItem*.
1149
1150         No new tests, covered by existing tests.
1151
1152         * html/parser/HTMLConstructionSite.h:
1153         (WebCore::HTMLConstructionSite::oneBelowTop):
1154         * html/parser/HTMLElementStack.cpp:
1155         (WebCore::HTMLElementStack::oneBelowTop):
1156         * html/parser/HTMLElementStack.h:
1157         (HTMLElementStack):
1158
1159 2012-07-31  Eric Seidel  <eric@webkit.org>
1160
1161         StyleResolver::canShareStyleWithElement does not need to use getAttribute for classAttr in the non-SVG case
1162         https://bugs.webkit.org/show_bug.cgi?id=92687
1163
1164         Reviewed by Antti Koivisto.
1165
1166         Previously 10% of samples in canShareStyleWithElement hit this line, after this change < 1% do.
1167         This is a small speedup for the non-SVG case.  Since this call is made for every element
1168         when style is resolved, any small speedup in this function matters on large documents.
1169
1170         * css/StyleResolver.cpp:
1171         (WebCore::StyleResolver::collectMatchingRulesForList):
1172
1173 2012-07-31  Luke Macpherson   <macpherson@chromium.org>
1174
1175         Heap-use-after-free in WebCore::StyleResolver::loadPendingImage
1176         https://bugs.webkit.org/show_bug.cgi?id=92606
1177
1178         Reviewed by Abhishek Arya.
1179
1180         Changes StyleResolver's m_pendingImageProperties set to a map, such that for each property we keep
1181         a RefPtr to the CSSValue used to set that property. This ensures that CSSValues are not freed before
1182         they are needed by loadPendingImage.
1183
1184         Test: fast/css/variables/deferred-image-load-from-variable.html
1185
1186         * css/StyleResolver.cpp:
1187         * css/StyleResolver.h:
1188
1189 2012-07-31  Chris Rogers  <crogers@google.com>
1190
1191         Add stub implementation for MediaStreamAudioSourceNode
1192         https://bugs.webkit.org/show_bug.cgi?id=90110
1193
1194         Reviewed by Kenneth Russell.
1195
1196         Test: webaudio/mediastreamaudiosourcenode.html
1197
1198         * CMakeLists.txt:
1199         * DerivedSources.make:
1200         * GNUmakefile.list.am:
1201         * WebCore.gypi:
1202         * WebCore.xcodeproj/project.pbxproj:
1203         Add MediaStreamAudioSourceNode files to make files.
1204
1205         * Modules/webaudio/AudioContext.cpp:
1206         * Modules/webaudio/AudioContext.h:
1207         * Modules/webaudio/AudioContext.idl:
1208         (WebCore::AudioContext::createMediaStreamSource):
1209         Add new createMediaStreamSource() method.
1210
1211         * Modules/webaudio/AudioNode.h:
1212         Add NodeTypeMediaStreamAudioSource.
1213
1214         * Modules/webaudio/MediaStreamAudioSourceNode.cpp: Added.
1215         * Modules/webaudio/MediaStreamAudioSourceNode.h: Added.
1216         (WebCore::MediaStreamAudioSourceNode::create):
1217         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
1218         (WebCore::MediaStreamAudioSourceNode::~MediaStreamAudioSourceNode):
1219         (WebCore::MediaStreamAudioSourceNode::setFormat):
1220         (WebCore::MediaStreamAudioSourceNode::process):
1221         (WebCore::MediaStreamAudioSourceNode::reset):
1222         (WebCore::MediaStreamAudioSourceNode::mediaStream):
1223         (WebCore::MediaStreamAudioSourceNode::audioSourceProvider):
1224         Basic MediaStreamAudioSourceNode implementation.
1225
1226         * Modules/webaudio/MediaStreamAudioSourceNode.idl: Added.
1227
1228 2012-07-31  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1229
1230         FractionalLayoutUnit minor math bugs
1231         https://bugs.webkit.org/show_bug.cgi?id=86065
1232
1233         Reviewed by Levi Weintraub.
1234
1235         Implement a consistent set of subject modifying operators, to ensure
1236         operations that need to be in float are performed in float.
1237
1238         Scale FractionalLayoutSize in FractionalLayoutUnits instead of intergers.
1239
1240         No new functionality. No new tests.
1241
1242         * platform/FractionalLayoutUnit.h:
1243         (WebCore::operator-=):
1244         (WebCore::operator*=):
1245         (WebCore::operator/=):
1246         * platform/graphics/FractionalLayoutSize.h:
1247         (WebCore::FractionalLayoutSize::scale):
1248
1249 2012-07-31  Joshua Netterfield  <jnetterfield@rim.com>
1250
1251         [BlackBerry] Enable CSS Filter Effects
1252         https://bugs.webkit.org/show_bug.cgi?id=92685
1253
1254         Reviewed by Rob Buis.
1255
1256         Enable CSS filter effects, with the exception of custom effects (CSS shaders) and reference effects (SVG effects)
1257
1258         No new tests, because this is covered by tests from other platforms.
1259
1260         Internally reviewed by Arvid Nilsson <anilsson@rim.com> and Antonio Gomes <agomes@rim.com>.
1261
1262         * CMakeLists.txt:
1263         * PlatformBlackBerry.cmake:
1264         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
1265         (WebCore):
1266         (WebCore::GraphicsLayerBlackBerry::setFilters):
1267         (WebCore::GraphicsLayerBlackBerry::updateFilters):
1268         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
1269         (GraphicsLayerBlackBerry):
1270         (WebCore::GraphicsLayerBlackBerry::filters):
1271         * platform/graphics/blackberry/LayerCompositingThread.h:
1272         (LayerOverride):
1273         (WebCore):
1274         (WebCore::LayerCompositingThread::filterOperationsChanged):
1275         (WebCore::LayerCompositingThread::setFilterOperationsChanged):
1276         (LayerCompositingThread):
1277         (WebCore::LayerCompositingThread::filterActions):
1278         (WebCore::LayerCompositingThread::setFilterActions):
1279         * platform/graphics/blackberry/LayerData.h:
1280         (LayerData):
1281         (WebCore::LayerData::filters):
1282         * platform/graphics/blackberry/LayerFilterRenderer.cpp: Added.
1283         (WebCore):
1284         (WebCore::operationTypeToProgramID):
1285         (WebCore::Uniformf::Uniformf):
1286         (WebCore::Uniform1f::apply):
1287         (WebCore::Uniform1f::create):
1288         (WebCore::Uniform1f::Uniform1f):
1289         (WebCore::Uniform2f::apply):
1290         (WebCore::Uniform2f::create):
1291         (WebCore::Uniform2f::Uniform2f):
1292         (WebCore::Uniform3f::apply):
1293         (WebCore::Uniform3f::create):
1294         (WebCore::Uniform3f::Uniform3f):
1295         (WebCore::LayerFilterRendererAction::create):
1296         (WebCore::LayerFilterRendererAction::LayerFilterRendererAction):
1297         (WebCore::LayerFilterRendererAction::~LayerFilterRendererAction):
1298         (WebCore::LayerFilterRendererAction::useActionOn):
1299         (WebCore::LayerFilterRenderer::create):
1300         (WebCore::LayerFilterRenderer::LayerFilterRenderer):
1301         (WebCore::LayerFilterRenderer::bindCommonAttribLocation):
1302         (WebCore::LayerFilterRenderer::initializeSharedGLObjects):
1303         (WebCore::LayerFilterRenderer::ping):
1304         (WebCore::LayerFilterRenderer::pong):
1305         (WebCore::LayerFilterRenderer::pushSnapshot):
1306         (WebCore::LayerFilterRenderer::popSnapshot):
1307         (WebCore::LayerFilterRenderer::actionsForOperations):
1308         (WebCore::LayerFilterRenderer::applyActions):
1309         * platform/graphics/blackberry/LayerFilterRenderer.h: Added.
1310         (WebCore):
1311         (Uniformf):
1312         (WebCore::Uniformf::location):
1313         (Uniform1f):
1314         (Uniform2f):
1315         (Uniform3f):
1316         (LayerFilterRendererAction):
1317         (WebCore::LayerFilterRendererAction::shouldPushSnapshot):
1318         (WebCore::LayerFilterRendererAction::setPushSnapshot):
1319         (WebCore::LayerFilterRendererAction::shouldPopSnapshot):
1320         (WebCore::LayerFilterRendererAction::setPopSnapshot):
1321         (WebCore::LayerFilterRendererAction::appendUniform):
1322         (LayerFilterRenderer):
1323         (WebCore::LayerFilterRenderer::isEnabled):
1324         (WebCore::LayerFilterRenderer::disable):
1325         * platform/graphics/blackberry/LayerRenderer.cpp:
1326         (WebCore::LayerRenderer::loadShader):
1327         (WebCore::LayerRenderer::loadShaderProgram):
1328         (WebCore::LayerRenderer::drawLayersOnSurfaces):
1329         (WebCore::LayerRenderer::updateLayersRecursive):
1330         (WebCore):
1331         (WebCore::LayerRenderer::initializeSharedGLObjects):
1332         * platform/graphics/blackberry/LayerRenderer.h:
1333         (LayerRenderer):
1334         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1335         (WebCore::LayerWebKitThread::LayerWebKitThread):
1336         (WebCore::LayerWebKitThread::commitOnCompositingThread):
1337         (WebCore):
1338         (WebCore::LayerWebKitThread::filtersCanBeComposited):
1339         * platform/graphics/blackberry/LayerWebKitThread.h:
1340         (LayerWebKitThread):
1341         (WebCore::LayerWebKitThread::setFilters):
1342         * platform/graphics/filters/FECustomFilter.cpp:
1343         (WebCore::FECustomFilter::platformApplySoftware):
1344         (WebCore::FECustomFilter::resizeContext):
1345         (WebCore::FECustomFilter::bindProgramAndBuffers):
1346         * platform/graphics/filters/FilterOperation.h:
1347         (WebCore):
1348         (FilterOperation):
1349
1350 2012-07-31  Alexis Menard  <alexis.menard@openbossa.org>
1351
1352         Get rid of "parser" type casts in CSSGrammar.y
1353         https://bugs.webkit.org/show_bug.cgi?id=92760
1354
1355         Reviewed by Adam Barth.
1356
1357         r124099 now type the parser parameter, it is therefore not needed to
1358         cast to CSSParser* everywhere as we know have a CSSParser* type
1359         already.
1360
1361         No new tests : refactor with no behavior change expected.
1362
1363         * css/CSSGrammar.y:
1364
1365 2012-07-31  Ian Vollick  <vollick@chromium.org>
1366
1367         [chromium] Use WebAnimation and related classes in GraphicsLayerChromium and AnimTranslationUtil
1368         https://bugs.webkit.org/show_bug.cgi?id=90468
1369
1370         Reviewed by James Robinson.
1371
1372         No new tests. No new functionality.
1373
1374         * WebCore.gypi:
1375         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
1376         (WebCore::appendKeyframe):
1377         (WebCore::WebTransformAnimationCurve):
1378         (WebCore::createWebAnimation):
1379         * platform/graphics/chromium/AnimationTranslationUtil.h:
1380         (WebKit):
1381         (WebCore):
1382         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1383         (WebCore::GraphicsLayerChromium::willBeDestroyed):
1384         (WebCore::GraphicsLayerChromium::addAnimation):
1385         (WebCore::GraphicsLayerChromium::pauseAnimation):
1386         (WebCore::GraphicsLayerChromium::removeAnimation):
1387         (WebCore::GraphicsLayerChromium::suspendAnimations):
1388         (WebCore::GraphicsLayerChromium::resumeAnimations):
1389         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1390         * platform/graphics/chromium/GraphicsLayerChromium.h:
1391         (GraphicsLayerChromium):
1392         * platform/graphics/chromium/LayerChromium.cpp:
1393         * platform/graphics/chromium/LayerChromium.h:
1394         (WebKit):
1395         (WebCore):
1396         (WebCore::LayerChromium::setLayerAnimationDelegate):
1397         (LayerChromium):
1398         * platform/graphics/chromium/LinkHighlight.h:
1399         (LinkHighlight):
1400
1401 2012-07-31  Taiju Tsuiki  <tzik@chromium.org>
1402
1403         Fix potential build error on LocalFileSystem::deleteFileSystem.
1404         https://bugs.webkit.org/show_bug.cgi?id=92695
1405
1406         Non-Chrome build of WebKit with FILE_SYSTEM flag will be broken at
1407         LocalFileSystem::deleteFileSystem.
1408         Chrome does not use this source and most of other ports don't turn on
1409         FILE_SYSTEM flag for now. So, we've not seen the breakage explicitly yet.
1410
1411         Reviewed by Adam Barth.
1412
1413         Non-Chrome WebKit build with FILE_SYSTEM should be finished successfully.
1414
1415         * Modules/filesystem/LocalFileSystem.cpp:
1416         (WebCore::LocalFileSystem::deleteFileSystem):
1417
1418 2012-07-31  Li Yin  <li.yin@intel.com>
1419
1420         AudioPannerNode should raise exception when distanceModel is set incorrectly
1421         https://bugs.webkit.org/show_bug.cgi?id=90952
1422
1423         Reviewed by Chris Rogers.
1424
1425         Spec: http://www.w3.org/TR/webaudio/#AudioPannerNode-section
1426         The distance model can be only set to LINEAR_DISTANCE, INVERSE_DISTANCE or EXPONENTIAL_DISTANCE.
1427         If the incorrect value is set, it will raise the exception.
1428         Use the unsigned short to replace unsigned long in AudioPannerNode.idl.
1429
1430         Test: webaudio/audiopannernode-basic.html
1431
1432         * Modules/webaudio/AudioPannerNode.cpp:
1433         (WebCore::AudioPannerNode::setDistanceModel): raise exception
1434         (WebCore):
1435         * Modules/webaudio/AudioPannerNode.h:
1436         (AudioPannerNode):
1437         * Modules/webaudio/AudioPannerNode.idl: using unsigned short to replace unsigned long
1438
1439 2012-07-31  Max Vujovic  <mvujovic@adobe.com>
1440
1441         [CSS Shaders] CSS parser rejects parameter names that are also CSS keywords
1442         https://bugs.webkit.org/show_bug.cgi?id=92537
1443
1444         Reviewed by Dirk Schulze.
1445
1446         Remove the CSS keyword check for CSS Shaders parameter names. Parameters are allowed to be
1447         any valid CSS identifier, including CSS keywords. See the spec:
1448         https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustom
1449
1450         The CSS parser was rejecting input like the following because it uses a CSS keyword
1451         "background" as a parameter name:
1452         -webkit-filter: custom(none url(fragment.shader), background 0 1 0 1);
1453
1454         Test: css3/filters/custom/custom-filter-css-keyword-as-parameter-name.html
1455
1456         * css/CSSParser.cpp:
1457         (WebCore::CSSParser::parseCustomFilter): Do not return early when the parameter name is a
1458         CSS keyword (i.e. when the CSSParserValue has a non-zero id).
1459
1460 2012-07-31  Pravin D  <pravind.2k4@gmail.com>
1461
1462         Caret position is wrong when a editable container has word-wrap:normal set
1463         https://bugs.webkit.org/show_bug.cgi?id=89649
1464
1465         Reviewed by Levi Weintraub.
1466
1467         Correcting the incorrect addumption that the min and max position for the caret rect is constrained to 
1468         the logical containing block width. This assumption is incorrect when the text has word-wrap:normal and 
1469         flows beyound the visible rect of the container.
1470
1471         Test: editing/input/editable-container-with-word-wrap-normal.html
1472
1473         * rendering/RenderText.cpp:
1474         (WebCore::RenderText::localCaretRect):
1475
1476 2012-07-31  Antti Koivisto  <antti@apple.com>
1477
1478         Crash in FrameLoader::checkLoadComplete with non-browser client app
1479         https://bugs.webkit.org/show_bug.cgi?id=92774
1480
1481         Reviewed by Alexey Proskuryakov..
1482
1483         Speculative fix. It is possible that CSSFontSelector could get deleted during the timer callback
1484         and memory reused, making m_document point to some garbage when it is tested at the end.
1485
1486         * css/CSSFontSelector.cpp:
1487         (WebCore::CSSFontSelector::beginLoadTimerFired):
1488
1489 2012-07-31  Hans Wennborg  <hans@chromium.org>
1490
1491         Speech JavaScript API: Throw exception for start() when already started
1492         https://bugs.webkit.org/show_bug.cgi?id=92756
1493
1494         Reviewed by Adam Barth.
1495
1496         Make the start() function throw an exception if the SpeechRecognition
1497         object was already started.
1498
1499         Test: fast/speech/scripted/start-exception.html
1500
1501         * Modules/speech/SpeechRecognition.cpp:
1502         (WebCore::SpeechRecognition::start):
1503         (WebCore::SpeechRecognition::stopFunction):
1504         (WebCore::SpeechRecognition::abort):
1505         (WebCore::SpeechRecognition::didReceiveError):
1506         (WebCore::SpeechRecognition::didEnd):
1507         (WebCore::SpeechRecognition::SpeechRecognition):
1508         * Modules/speech/SpeechRecognition.h:
1509         (SpeechRecognition):
1510         * Modules/speech/SpeechRecognition.idl:
1511
1512 2012-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1513
1514         Unreviewed, rolling out r124207.
1515         http://trac.webkit.org/changeset/124207
1516         https://bugs.webkit.org/show_bug.cgi?id=92773
1517
1518         Patch causes crashes on the 64-bit debug builder (and other
1519         builders likely) (Requested by zdobersek on #webkit).
1520
1521         * GNUmakefile.am:
1522         * GNUmakefile.list.am:
1523         * platform/text/gtk/TextCheckerEnchant.cpp: Removed.
1524         * platform/text/gtk/TextCheckerEnchant.h: Removed.
1525
1526 2012-07-07  Philippe Normand  <pnormand@igalia.com>
1527
1528         [GStreamer] Live stream support is weak
1529         https://bugs.webkit.org/show_bug.cgi?id=90084
1530
1531         Reviewed by Martin Robinson.
1532
1533         Make sure on-disk buffering is disabled for live streams. It is
1534         enabled initially when loading any remote media file if preload is
1535         set to Auto. Later on if the player detects that the media is live
1536         it disables on-disk buffering. This patch also adds support for
1537         caching the total size of the media.
1538
1539         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1540         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1541         (WebCore::MediaPlayerPrivateGStreamer::load): Keep track of the
1542         media url as an instance attribute.
1543         (WebCore::MediaPlayerPrivateGStreamer::duration): Logging improvement.
1544         (WebCore::MediaPlayerPrivateGStreamer::setRate): use the new
1545         isLiveStream() method.
1546         (WebCore::MediaPlayerPrivateGStreamer::buffered): Ditto.
1547         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Indicate
1548         source of duration message.
1549         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Perform an
1550         anonymous duration change emission, mostly to cache its value.
1551         (WebCore::MediaPlayerPrivateGStreamer::totalBytes): Return
1552         cached size when available.
1553         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Use the new
1554         isLiveStream() method and handle state change corner cases for live streams.
1555         (WebCore::MediaPlayerPrivateGStreamer::durationChanged): Cache
1556         media total size and re-enable on-disk buffering if caching succeeds.
1557         (WebCore::MediaPlayerPrivateGStreamer::movieLoadType): New
1558         implementation handling on-disk buffered and live streaming cases.
1559         (WebCore::MediaPlayerPrivateGStreamer::setPreload): Remember the
1560         case where preload is updated from Auto to another value, do
1561         on-disk buffering only for Auto preload attribute.
1562         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1563         (MediaPlayerPrivateGStreamer):
1564         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream): Utility
1565         method, a stream is live if it goes to PAUSE without prerolling.
1566
1567 2012-07-17  Antonio Gomes  <agomes@rim.com>
1568
1569         [Blackberry][FullScreen] HTML5 <video> controls are scaled differently depending on the current webpage scale
1570         https://bugs.webkit.org/show_bug.cgi?id=90884
1571         PR #162839
1572
1573         Reviewed by Rob Buis.
1574
1575         The way the BlackBerry port implements the FULLSCREEN_API for media
1576         elements might result in the controls being oversized, proportionally
1577         to the current page scale. That happens because the fullscreen element
1578         gets sized to be as big as the viewport size, and the viewport size might
1579         get outstretched to fit to the screen dimensions.
1580
1581         In order to fix that, the patch strips out the Page scale factor from
1582         the media controls multiplier.
1583
1584         Patch also changes many integer-based calculations to be float-based, in
1585         order to get the needed precision.
1586
1587         Internally reviewed by Jacky Jiang.
1588
1589         * platform/blackberry/RenderThemeBlackBerry.cpp:
1590         (WebCore):
1591         (WebCore::determineFullScreenMultiplier):
1592         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
1593         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
1594         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
1595         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
1596         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
1597
1598 2012-07-31  Stephen White  <senorblanco@chromium.org>
1599
1600         Remove the clone() method from FilterOperation (and subclasses).
1601         https://bugs.webkit.org/show_bug.cgi?id=92757
1602
1603         Reviewed by Kentaro Hara.
1604
1605         Since the move to WebFilterOperation in Chromium, this is now dead
1606         code.
1607
1608         Covered by existing tests in css3/filters.
1609
1610         * platform/graphics/filters/CustomFilterOperation.h:
1611         * platform/graphics/filters/FilterOperation.h:
1612
1613 2012-07-31  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1614
1615         Regression(r124135): SVG tests crashing on ports using Cairo
1616         https://bugs.webkit.org/show_bug.cgi?id=92752
1617
1618         Reviewed by Martin Robinson.
1619
1620         * platform/graphics/cairo/PathCairo.cpp:
1621         (WebCore::Path::operator=):
1622
1623 2012-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1624
1625         Unreviewed, rolling out r124208.
1626         http://trac.webkit.org/changeset/124208
1627         https://bugs.webkit.org/show_bug.cgi?id=92765
1628
1629         it broke compilation on mac (Requested by loislo on #webkit).
1630
1631         * CMakeLists.txt:
1632         * GNUmakefile.list.am:
1633         * Target.pri:
1634         * WebCore.gypi:
1635         * WebCore.vcproj/WebCore.vcproj:
1636         * WebCore.xcodeproj/project.pbxproj:
1637         * inspector/InspectorAllInOne.cpp:
1638         * inspector/InspectorMemoryAgent.cpp:
1639         (WebCore):
1640         * inspector/MemoryInstrumentationImpl.cpp: Removed.
1641         * inspector/MemoryInstrumentationImpl.h: Removed.
1642
1643 2012-07-31  Stephen Chenney  <schenney@chromium.org>
1644
1645         xmlserializer strips xlink from xlink:html svg image tag
1646         https://bugs.webkit.org/show_bug.cgi?id=79586
1647
1648         Reviewed by Nikolas Zimmermann.
1649
1650         Adding code to ensure the correct prefix on attributes in the xml,
1651         xmlns and xlink namespaces. We now follow the rules in
1652         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments
1653         (circa the time of this change).
1654
1655         Rob Buis wrote the original test for this patch and did the initial work.
1656
1657         Tests: fast/dom/XMLSerializer-xml-namespace.html
1658                svg/custom/xlink-prefix-in-attributes.html
1659
1660         * editing/MarkupAccumulator.cpp:
1661         (WebCore::attributeIsInSerializedNamespace): Test for an attribute in
1662         a specially serialized namespace: xml, xmlns, xlink.
1663         (WebCore):
1664         (WebCore::MarkupAccumulator::appendAttribute): Check the namespace of
1665         attributes upon serialization, and add any necessary prefixes.
1666         * html/parser/HTMLTreeBuilder.cpp:
1667         (WebCore::adjustForeignAttributes): Use WTF::xmlAtom etc for AtomicString arguments.
1668
1669 2012-07-31  Mike Reed  <reed@google.com>
1670
1671         skia: switch to conical gradient to match css/svg spec for two-point gradients
1672         https://bugs.webkit.org/show_bug.cgi?id=92754
1673
1674         Reviewed by Stephen White.
1675
1676         Switching to skia's TwoPointConical gradient, which has been written explicitly to match the css/svg spec.
1677         Leaving the existing TwoPointRadial gradient in skia, for other callers that may want the old behavior.
1678
1679         No new tests. existing layouttests exercise this change (9 pending rebaselines associated with this CL).
1680
1681         * platform/graphics/skia/GradientSkia.cpp:
1682         (WebCore::Gradient::platformGradient):
1683
1684 2012-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
1685
1686         Web Inspector: extract MemoryInstrumentationImpl into separate files for future reusing in unit tests
1687         https://bugs.webkit.org/show_bug.cgi?id=92751
1688
1689         Reviewed by Yury Semikhatsky.
1690
1691         * CMakeLists.txt:
1692         * GNUmakefile.list.am:
1693         * Target.pri:
1694         * WebCore.gypi:
1695         * WebCore.vcproj/WebCore.vcproj:
1696         * inspector/InspectorAllInOne.cpp:
1697         * inspector/InspectorMemoryAgent.cpp:
1698         (WebCore):
1699         * inspector/MemoryInstrumentationImpl.cpp: Added.
1700         (WebCore):
1701         (WebCore::MemoryInstrumentationImpl::MemoryInstrumentationImpl):
1702         (WebCore::MemoryInstrumentationImpl::processDeferredInstrumentedPointers):
1703         (WebCore::MemoryInstrumentationImpl::countObjectSize):
1704         (WebCore::MemoryInstrumentationImpl::deferInstrumentedPointer):
1705         (WebCore::MemoryInstrumentationImpl::visited):
1706         (WebCore::MemoryInstrumentationImpl::selfSize):
1707         * inspector/MemoryInstrumentationImpl.h: Added.
1708         (WebCore):
1709         (MemoryInstrumentationImpl):
1710         (WebCore::MemoryInstrumentationImpl::totalTypeSize):
1711
1712 2012-07-31  Mario Sanchez Prada  <msanchez@igalia.com>
1713
1714         [GTK] Add a new and reusable enchant-based spellchecker in WebCore
1715         https://bugs.webkit.org/show_bug.cgi?id=90269
1716
1717         Reviewed by Martin Robinson.
1718
1719         Move enchant specific code down to WebCore, into a new class
1720         TextCheckerEnchant, that we can use from WK1 and WK2.
1721
1722         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
1723         * GNUmakefile.list.am: Added new files.
1724         * platform/text/gtk/TextCheckerEnchant.cpp: Added.
1725         (getAvailableDictionariesCallback):
1726         (TextCheckerEnchant::TextCheckerEnchant):
1727         (TextCheckerEnchant::~TextCheckerEnchant):
1728         (TextCheckerEnchant::ignoreWord):
1729         (TextCheckerEnchant::learnWord):
1730         (TextCheckerEnchant::checkSpellingOfString):
1731         (TextCheckerEnchant::getGuessesForWord):
1732         (TextCheckerEnchant::updateSpellCheckingLanguages):
1733         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
1734         * platform/text/gtk/TextCheckerEnchant.h: Added.
1735         (WebCore):
1736         (TextCheckerEnchant):
1737         (WebCore::TextCheckerEnchant::create):
1738
1739 2012-07-31  Joe Mason  <jmason@rim.com>
1740
1741         [BlackBerry] Support Negotiate auth
1742         https://bugs.webkit.org/show_bug.cgi?id=91871
1743
1744         Reviewed by George Staikos.
1745
1746         Add Negotiate to the list of auth schemes allowed in the platform request.
1747
1748         Add "success" and "requireCredentials" parameters to notifyAuthReceived (which is now called
1749         with success = true on successful authentication, as well as on failures).
1750
1751         When success is true, update the stored credential to use the auth scheme actually reported
1752         rather than that set in the request. (This is used when Negotiate auth can't get a ticket
1753         and falls back to a different supported auth type.)
1754
1755         When requireCredentials is false, just set the auth type and start a new request using empty
1756         credentials.
1757
1758         RIM PR# 166514
1759         Internally reviewed by Jonathan Dong
1760
1761         * platform/network/blackberry/NetworkJob.cpp:
1762         (WebCore::NetworkJob::notifyAuthReceived): Add Negotiate to the auth scheme switch. Handle
1763         success param by updating auth type in stored credentials; pass requireCredentials param on
1764         to sendRequestWithCredentials.
1765         (WebCore::NetworkJob::startNewJobWithRequest): Fix typo in increaseRedirectCount parameter
1766         name.
1767         (WebCore::NetworkJob::sendRequestWithCredentials): Use empty credentials if
1768         requireCredentials is false.
1769         * platform/network/blackberry/NetworkJob.h:
1770         (NetworkJob):
1771         * platform/network/blackberry/NetworkManager.cpp:
1772         (WebCore::NetworkManager::startJob): Add Negotiate to the auth scheme switch.
1773
1774 2012-07-31  Alexei Filippov  <alexeif@chromium.org>
1775
1776         Web Inspector: take into account the whole security origin instead of just host
1777         https://bugs.webkit.org/show_bug.cgi?id=92740
1778
1779         Reviewed by Pavel Feldman.
1780
1781         Make the DOM Storage Agent take into account all the
1782         information relevant to the security origin, i.e. protocol, host, and
1783         port. Previously only the host was taken into account. That caused
1784         inspector to show the first storage only in the case a page operated
1785         over several security origins sharing the same host (but having
1786         different protocols e.g. http and https).
1787
1788         * inspector/InspectorDOMStorageAgent.cpp:
1789         (WebCore::InspectorDOMStorageAgent::storageId):
1790         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
1791         * inspector/InspectorDOMStorageResource.cpp:
1792         (WebCore::InspectorDOMStorageResource::isSameOriginAndType):
1793         (WebCore::InspectorDOMStorageResource::bind):
1794         * inspector/InspectorDOMStorageResource.h:
1795         (InspectorDOMStorageResource):
1796
1797 2012-07-31  Keishi Hattori  <keishi@webkit.org>
1798
1799         Slider ticks are drawn at wrong positions
1800         https://bugs.webkit.org/show_bug.cgi?id=92720
1801
1802         Reviewed by Kent Tamura.
1803
1804         Slider tick marks for vertical sliders were drawn reversed. And the tick
1805         mark positions were slightly off from the thumb position because of rounding.
1806
1807         No new tests. Covered in input-appearance-range-with-datalist.html.
1808
1809         * rendering/RenderTheme.cpp:
1810         (WebCore::RenderTheme::paintSliderTicks):
1811
1812 2012-07-31  Shinya Kawanaka  <shinyak@chromium.org>
1813
1814         Older ShadowDOM is still rendered when a new ShadowDOM is added when they don't have any InsertionPoints.
1815         https://bugs.webkit.org/show_bug.cgi?id=92456
1816
1817         Reviewed by Hajime Morita.
1818
1819         When adding a new ShadowRoot to an element having other ShadowRoots, and they don't have any InsretionPoint,
1820         the older ShadowDOM is still rendered.
1821
1822         When ContentDistributor's validity is 'Undetermined', ElementShadow reattaches the host and the whole shadow
1823         subtree. Since adding a new ShadowRoot makes the validity 'Undetermined', we have had to make it 'Undetermined'.
1824
1825         This change enables us to remove a unnecessary InvalidationType flag from the code. We should call
1826         setValidityUndetermined() instead of using InvalidateAndForceReattach.
1827
1828         Test: fast/dom/shadow/invalidate-distribution.html
1829
1830         * dom/ElementShadow.cpp:
1831         (WebCore::ElementShadow::addShadowRoot): Calls setValidityUndetermined().
1832         (WebCore::ElementShadow::removeAllShadowRoots):
1833         (WebCore::ElementShadow::setValidityUndetermined):
1834         (WebCore::ElementShadow::invalidateDistribution): When validity is undetermined, we will reattach the
1835         host and the shadow subtree.
1836         * dom/ElementShadow.h:
1837         (ElementShadow):
1838         * html/shadow/ContentDistributor.cpp:
1839         * html/shadow/ContentDistributor.h:
1840         (WebCore::ContentDistributor::setValidity):
1841         (ContentDistributor):
1842         * html/shadow/InsertionPoint.cpp:
1843         (WebCore::InsertionPoint::insertedInto): Calls setValidityUndetermined().
1844
1845 2012-07-31  Tommy Widenflycht  <tommyw@google.com>
1846
1847         Introduce a minimal RTCPeerConnection together with Dictionary changes
1848         https://bugs.webkit.org/show_bug.cgi?id=92380
1849
1850         Reviewed by Kentaro Hara.
1851
1852         This patch introduces a shell RTCPeerConnection together with neccecary changes to
1853         Dictionary.
1854
1855         The W3C specification can be found here:
1856         http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcpeerconnection
1857
1858         Since Dictionaries can't be fully copied around adding
1859         get(const String& name, Vector<Dictionary>& result)
1860         isn't feasible so I have added a new ArrayValue class.
1861
1862         Test: fast/mediastream/RTCPeerConnection.html
1863
1864         * CMakeLists.txt:
1865         * GNUmakefile.list.am:
1866         * Modules/mediastream/DOMWindowMediaStream.idl:
1867         * Modules/mediastream/RTCPeerConnection.cpp: Added.
1868         (WebCore):
1869         (RTCIceServer):
1870         (WebCore::RTCIceServer::create):
1871         (WebCore::RTCIceServer::~RTCIceServer):
1872         (WebCore::RTCIceServer::uri):
1873         (WebCore::RTCIceServer::credential):
1874         (WebCore::RTCIceServer::RTCIceServer):
1875         (RTCConfiguration):
1876         (WebCore::RTCConfiguration::create):
1877         (WebCore::RTCConfiguration::~RTCConfiguration):
1878         (WebCore::RTCConfiguration::appendServer):
1879         (WebCore::RTCConfiguration::numberOfServers):
1880         (WebCore::RTCConfiguration::server):
1881         (WebCore::RTCConfiguration::RTCConfiguration):
1882         (WebCore::RTCPeerConnection::parseConfiguration):
1883         (WebCore::RTCPeerConnection::create):
1884         (WebCore::RTCPeerConnection::RTCPeerConnection):
1885         (WebCore::RTCPeerConnection::~RTCPeerConnection):
1886         (WebCore::RTCPeerConnection::interfaceName):
1887         (WebCore::RTCPeerConnection::scriptExecutionContext):
1888         (WebCore::RTCPeerConnection::stop):
1889         (WebCore::RTCPeerConnection::eventTargetData):
1890         (WebCore::RTCPeerConnection::ensureEventTargetData):
1891         * Modules/mediastream/RTCPeerConnection.h: Added.
1892         (WebCore):
1893         (RTCPeerConnection):
1894         (WebCore::RTCPeerConnection::refEventTarget):
1895         (WebCore::RTCPeerConnection::derefEventTarget):
1896         * Modules/mediastream/RTCPeerConnection.idl: Added.
1897         * Target.pri:
1898         * UseJSC.cmake:
1899         * WebCore.gypi:
1900         * WebCore.vcproj/WebCore.vcproj:
1901         * WebCore.xcodeproj/project.pbxproj:
1902         * bindings/generic/RuntimeEnabledFeatures.h:
1903         (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
1904         * bindings/js/ArrayValue.cpp: Added.
1905         (WebCore):
1906         (WebCore::ArrayValue::ArrayValue):
1907         (WebCore::ArrayValue::operator=):
1908         (WebCore::ArrayValue::isUndefinedOrNull):
1909         (WebCore::ArrayValue::length):
1910         (WebCore::ArrayValue::get):
1911         * bindings/js/ArrayValue.h: Added.
1912         (WebCore):
1913         (ArrayValue):
1914         * bindings/js/JSBindingsAllInOne.cpp:
1915         * bindings/js/JSDictionary.cpp:
1916         (WebCore::JSDictionary::convertValue):
1917         (WebCore):
1918         * bindings/js/JSDictionary.h:
1919         (WebCore):
1920         * bindings/v8/ArrayValue.cpp: Added.
1921         (WebCore):
1922         (WebCore::ArrayValue::operator=):
1923         (WebCore::ArrayValue::isUndefinedOrNull):
1924         (WebCore::ArrayValue::length):
1925         (WebCore::ArrayValue::get):
1926         * bindings/v8/ArrayValue.h: Added.
1927         (WebCore):
1928         (ArrayValue):
1929         (WebCore::ArrayValue::ArrayValue):
1930         (WebCore::ArrayValue::~ArrayValue):
1931         * bindings/v8/Dictionary.cpp:
1932         (WebCore::Dictionary::get):
1933         (WebCore):
1934         * bindings/v8/Dictionary.h:
1935         (WebCore):
1936         (Dictionary):
1937         * dom/EventTargetFactory.in:
1938
1939 2012-07-31  Raul Hudea  <rhudea@adobe.com>
1940
1941         Inspector crashes when trying to inspect a page with CSS region styling
1942         https://bugs.webkit.org/show_bug.cgi?id=91503
1943
1944         Reviewed by Alexander Pavlov.
1945
1946         Fix by making sure a CSSRuleSourceData is always created when parsing @-webkit-region rules.
1947
1948         Test: inspector/styles/region-style-crash.html
1949
1950         * css/CSSGrammar.y: Made ruleset called explicitly markRuleBodyStart instead of depending on updateLastSelectorLineAndPosition to call it.
1951         * css/CSSParser.cpp:
1952         (WebCore::CSSParser::updateLastSelectorLineAndPosition): markRuleBodyStart should be called via at_rule_body_start. 
1953         * css/CSSPropertySourceData.h:
1954
1955 2012-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1956
1957         Unreviewed, rolling out r124179.
1958         http://trac.webkit.org/changeset/124179
1959         https://bugs.webkit.org/show_bug.cgi?id=92730
1960
1961         Breaks Chromium Linux 32 bots with "error: integer constant is
1962         too large for 'long' type" in IDBLevelDBCodingTest.cpp
1963         (Requested by apavlov on #webkit).
1964
1965         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1966         (WebCore::IDBLevelDBCoding::encodeByte):
1967         (WebCore::IDBLevelDBCoding::encodeBool):
1968         (WebCore::IDBLevelDBCoding::encodeInt):
1969         (WebCore::IDBLevelDBCoding::encodeVarInt):
1970         (WebCore::IDBLevelDBCoding::encodeString):
1971         (WebCore::IDBLevelDBCoding::encodeDouble):
1972         (WebCore::IDBLevelDBCoding::encodeIDBKey):
1973         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
1974         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
1975         * Modules/indexeddb/IDBLevelDBCoding.h:
1976         (IDBLevelDBCoding):
1977
1978 2012-07-31  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1979
1980         add Farstream flags/deps to WebKit, for WebRTC
1981         https://bugs.webkit.org/show_bug.cgi?id=87524
1982
1983         Reviewed by Philippe Normand.
1984
1985         Since Farstream will be used as the backend for GTK's WebRTC, this
1986         patch adds it as a dependency to the build system.
1987
1988         No new features or code changes were added, so new tests aren't necessary.
1989
1990         * GNUmakefile.am:
1991
1992 2012-07-31  Zan Dobersek  <zandobersek@gmail.com>
1993
1994         Unreviewed crash fix after r124135.
1995
1996         * platform/graphics/cairo/PathCairo.cpp:
1997         (WebCore::Path::Path): Ensure the Cairo path when acquiring its context,
1998         crashes ensue otherwise.
1999
2000 2012-07-31  Yoshifumi Inoue  <yosin@chromium.org>
2001
2002         Change Element::isReadOnlyFormControl to Element::shouldMatchReadOnlySelector/shouldMatchReadWriteSelector or HTMLFormControlElement::readOnly
2003         https://bugs.webkit.org/show_bug.cgi?id=92602
2004
2005         Reviewed by Kent Tamura.
2006
2007         This patch replaces Element::isReadOnlyFormControl() by
2008         Element::shouldMatchReadOnlySelector/shouldMatchReadOnlySelector or
2009         HTMLFormControlElement::readOnly() to make intention of functions
2010         self descriptive.
2011
2012         No new tests. This patch doesn't change behavior.
2013
2014         * css/SelectorChecker.cpp:
2015         (WebCore::SelectorChecker::checkOneSelector): Replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class, and replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class.
2016         * dom/Element.cpp:
2017         (WebCore::Element::shouldMatchReadOnlySelector): Added for default implementation.
2018         (WebCore::Element::shouldMatchReadWriteSelector): for default implementation.
2019         * dom/Element.h:
2020         (Element): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
2021         * html/HTMLFormControlElement.cpp:
2022         (WebCore::HTMLFormControlElement::shouldMatchReadOnlySelector): Added.
2023         (WebCore::HTMLFormControlElement::shouldMatchReadWriteSelector): Added.
2024         * html/HTMLFormControlElement.h:
2025         (HTMLFormControlElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
2026         * html/shadow/SliderThumbElement.cpp:
2027         (WebCore::SliderThumbElement::shouldMatchReadOnlySelector): Added.
2028         (WebCore::SliderThumbElement::shouldMatchReadWriteSelector): Added.
2029         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
2030         (WebCore::SliderThumbElement::willRespondToMouseClickEvents): ditto.
2031         (SliderThumbElement):
2032         * html/shadow/TextControlInnerElements.cpp:
2033         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
2034         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents): ditto.
2035         (WebCore::SpinButtonElement::willRespondToMouseClickEvents): ditto.
2036         (WebCore::SpinButtonElement::shouldMatchReadOnlySelector): Added.
2037         (WebCore::SpinButtonElement::shouldMatchReadWriteSelector): Added.
2038         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
2039         * html/shadow/TextControlInnerElements.h:
2040         (SpinButtonElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
2041         * rendering/RenderTheme.cpp:
2042         (WebCore::RenderTheme::isReadOnlyControl): Replaced isReadOnlyControl() by shouldMatchReadOnlySelector().
2043
2044 2012-07-31  Xingnan Wang  <xingnan.wang@intel.com>
2045
2046         IndexedDB: Size the Vector in encodeInt/encodeVarInt/encodeString
2047         https://bugs.webkit.org/show_bug.cgi?id=91813
2048
2049         Reviewed by Kentaro Hara.
2050
2051         To avoid memory re-allocation in Vector, init the capability or size of Vector in encodeInt(), encodeVarInt(),
2052         encodeBool(), encodeIDBKey() etc.
2053
2054         No new tests - Low level functions covered by existing layout tests and also covered by Chromium
2055         webkit_unit_tests IDBLevelIDBCodingTest.* which validates the sizes of buffers returned by encodeVarInt.
2056
2057         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2058         (WebCore::IDBLevelDBCoding::encodeInt):
2059         (WebCore::IDBLevelDBCoding::encodeVarInt):
2060         (WebCore::IDBLevelDBCoding::encodeString):
2061
2062 2012-07-30  Huang Dongsung  <luxtella@company100.net>
2063
2064         [Texmap] Remove the backing store after 'style.visibility' for an element sets 'hidden'.
2065         https://bugs.webkit.org/show_bug.cgi?id=92492
2066
2067         Reviewed by Noam Rosenthal.
2068
2069         This patch's purpose is to save vram memory.
2070         When visibility of the element sets hidden, we do not need to draw the element,
2071         so we do not need to keep a texture of the backing store.
2072         Currently, Texmap does not draw the element with visibility:hidden because
2073         RenderLayerBacking::paintIntoLayer does not draw anything.
2074         This patch just removes unused textures.
2075
2076         No new tests - no new testable functionality.
2077
2078         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2079         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
2080         (WebCore):
2081         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2082         (GraphicsLayerTextureMapper):
2083         * platform/graphics/texmap/TextureMapperLayer.cpp:
2084         (WebCore::TextureMapperLayer::updateBackingStore):
2085         (WebCore::TextureMapperLayer::paintSelf):
2086         (WebCore::TextureMapperLayer::isVisible):
2087         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
2088         * platform/graphics/texmap/TextureMapperLayer.h:
2089         (State):
2090         (WebCore::TextureMapperLayer::State::State):
2091
2092 2012-07-30  Keishi Hattori  <keishi@webkit.org>
2093
2094         Implement datalist UI for input type color for Chromium
2095         https://bugs.webkit.org/show_bug.cgi?id=92075
2096
2097         Reviewed by Kent Tamura.
2098
2099         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
2100
2101         * rendering/RenderThemeChromiumCommon.cpp:
2102         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
2103
2104 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2105
2106         Unreviewed, rolling out r124171.
2107         http://trac.webkit.org/changeset/124171
2108         https://bugs.webkit.org/show_bug.cgi?id=92712
2109
2110         Start failing fast/css/square-button-appearance.html
2111         (Requested by yosin on #webkit).
2112
2113         * css/SelectorChecker.cpp:
2114         (WebCore::SelectorChecker::checkOneSelector):
2115         * dom/Element.cpp:
2116         * dom/Element.h:
2117         (Element):
2118         (WebCore::Element::isReadOnlyFormControl):
2119         * html/HTMLFormControlElement.h:
2120         (WebCore::HTMLFormControlElement::isReadOnlyFormControl):
2121         * html/shadow/SliderThumbElement.cpp:
2122         (WebCore::SliderThumbElement::isReadOnlyFormControl):
2123         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
2124         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
2125         * html/shadow/SliderThumbElement.h:
2126         (SliderThumbElement):
2127         * html/shadow/TextControlInnerElements.cpp:
2128         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
2129         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
2130         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
2131         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
2132         * html/shadow/TextControlInnerElements.h:
2133         (WebCore::SpinButtonElement::isReadOnlyFormControl):
2134         * rendering/RenderTheme.cpp:
2135         (WebCore::RenderTheme::isReadOnlyControl):
2136
2137 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
2138
2139         [CSS] Change Element::isReadOnlyFormControl to shouldMatchReadWriteSelector or HTMLTextFormControlElement::readOnly
2140         https://bugs.webkit.org/show_bug.cgi?id=92602
2141
2142         Reviewed by Kent Tamura.
2143
2144         This patch renames Element::isReadOnlyFormControl() to Element::shouldMatchReadWriteSelector()
2145         or HTMLTextFormControlElement::readOnly() to make intention of
2146         shouldMatchReadWriteSelector(was isReadOnlyFormControl) self descriptive.
2147
2148         No new tests. This patch doesn't change behavior.
2149
2150         * css/SelectorChecker.cpp:
2151         (WebCore::SelectorChecker::checkOneSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
2152         * dom/Element.cpp:
2153         (WebCore::Element::shouldMatchReadWriteSelector): Added default implementation.
2154         * dom/Element.h:
2155         (WebCore::Element::shouldMatchReadWriteSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
2156         * html/HTMLFormControlElement.h:
2157         * html/shadow/SliderThumbElement.cpp:
2158         (WebCore::SliderThumbElement::shouldMatchReadWriteSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
2159         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
2160         (WebCore::SliderThumbElement::willRespondToMouseClickEvents): ditto.
2161         * html/shadow/SliderThumbElement.h:
2162         (SliderThumbElement): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
2163         * html/shadow/TextControlInnerElements.cpp:
2164         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
2165         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
2166         (WebCore::SpinButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
2167         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
2168         * html/shadow/TextControlInnerElements.h:
2169         * rendering/RenderTheme.cpp:
2170         (WebCore::RenderTheme::isReadOnlyControl): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
2171
2172 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
2173
2174         Remove overflow: scroll handling in block flow layout methods
2175         https://bugs.webkit.org/show_bug.cgi?id=92689
2176
2177         Reviewed by Simon Fraser.
2178
2179         The overflow: scroll scrollbars creation was done at layout time for all RenderBlocks and
2180         descendants. This was not only wrong ('overflow' only changes at style change time) but it
2181         was also introducing some code duplication.
2182
2183         The gist of this change is to share the code by moving it to RenderLayer::updateScrollbarsAfterStyleChange,
2184         this includes the code from bug 69993 to special case list box part.
2185
2186         Covered by existing tests:
2187         - All fast/overflow ones.
2188         - For the list box change:
2189             fast/forms/select-overflow-scroll-inherited.html
2190             fast/forms/select-overflow-scroll.html
2191         - For the flexbox:
2192             css3/flexbox/preferred-widths-orthogonal.html
2193             css3/flexbox/preferred-widths.html
2194
2195         * rendering/RenderBlock.cpp:
2196         (WebCore::RenderBlock::layoutBlock):
2197         * rendering/RenderDeprecatedFlexibleBox.cpp:
2198         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2199         * rendering/RenderGrid.cpp:
2200         (WebCore::RenderGrid::layoutBlock):
2201         * rendering/RenderFlexibleBox.cpp:
2202         (WebCore::RenderFlexibleBox::layoutBlock):
2203         Removed the common code here.
2204
2205         * rendering/RenderFlexibleBox.cpp:
2206         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
2207         Changed to an ASSERT now that the right scrollbars are created. This is
2208         fine as overflow-x/y are physical coordinates and our access was following that.
2209
2210         * rendering/RenderLayer.cpp:
2211         (WebCore::RenderLayer::invalidateScrollbarRect):
2212         Added an early return here if we are not attached yet as RenderLayer::styleChanged
2213         is called at attachment time before we are inserted in the tree. This is fine as the
2214         scrollbars are part of the object which will be painted after the first layout.
2215
2216         (WebCore::overflowRequiresAScrollbar):
2217         (WebCore::overflowDefinesAutomaticScrollbar):
2218         Split the logic in those 2 functions.
2219
2220         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2221         Updated to use the require / can-have functions. Also added
2222         an early return for list box parts as required by bug 69993.
2223
2224         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
2225         Added an early return for list box parts as required by bug 69993,
2226         also removed some unneeded NULL-checks that were added for list box parts.
2227
2228 2012-07-30  Vivek Galatage  <vivekgalatage@gmail.com>
2229
2230         fillWithEmptyClients method should also initialize chromeClient with EmptyChromeClient
2231         https://bugs.webkit.org/show_bug.cgi?id=92703
2232
2233         Reviewed by Kent Tamura.
2234
2235         fillWithEmptyClients should also intialize PageClients.chromeClient with EmptyChromeClient 
2236         as its required for creating a Empty page and to minimize the exported symbols.
2237
2238         No new tests as no change in functionality.
2239
2240         * loader/EmptyClients.cpp:
2241         (WebCore::fillWithEmptyClients):
2242
2243 2012-07-30  Adrienne Walker  <enne@google.com>
2244
2245         [chromium] Wrap ScrollbarLayerChromium in WebScrollbarLayer
2246         https://bugs.webkit.org/show_bug.cgi?id=91032
2247
2248         Reviewed by James Robinson.
2249
2250         Modify ScrollingCoordinatorChromium to operate on WebScrollbarLayer
2251         instead of ScrollbarLayerChromium. This removes the dependency on
2252         ScrollbarLayerChromium.
2253
2254         No change in functionality, so no new tests.
2255
2256         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2257         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
2258         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
2259         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
2260         (ScrollingCoordinatorPrivate):
2261         (WebCore::createScrollbarLayer):
2262
2263 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
2264
2265         Another Qt build fix attempt after r124098.
2266         "interface" is a keyword. Don't use it. 
2267
2268         * dom/GestureEvent.cpp:
2269         (WebCore::GestureEvent::interfaceName):
2270
2271 2012-07-30  Elliott Sprehn  <esprehn@gmail.com>
2272
2273         Make QuotesData use a Vector of pairs
2274         https://bugs.webkit.org/show_bug.cgi?id=92448
2275
2276         Reviewed by Julien Chaffraix.
2277
2278         QuotesData::create returned an array of memory that contained in place instantiations
2279         of a QuotesData and then String instances. This changes the code to use a Vector of
2280         pairs making it safer and ensuring that quotes are always balanced. This also uses a
2281         HashMap directly in the QuoteRenderer instead of building it on first access reducing
2282         the amount of code needed for picking quotes by language.
2283
2284         Test: fast/css-generated-content/close-quote-negative-depth.html
2285
2286         * css/StyleResolver.cpp:
2287         (WebCore::StyleResolver::collectMatchingRulesForList): Create pairs and use the new QuotesData API.
2288         * rendering/RenderQuote.cpp:
2289         (WebCore):
2290         (WebCore::quotesDataLanguageMap): New function that returns the HashMap of languages.
2291         (WebCore::basicQuotesData): Returns the simple form of quotes, " and '.
2292         (WebCore::defaultQuotes): Changed to use the new map.
2293         (WebCore::RenderQuote::styleDidChange):
2294         (WebCore::RenderQuote::originalText): Changed to use the new getOpenQuote and getCloseQuote which ensure bounds checks.
2295         * rendering/style/QuotesData.cpp:
2296         (WebCore::QuotesData::create): Now returns a plain instance of QuotesData without the in place allocation.
2297         (WebCore):
2298         (WebCore::QuotesData::addPair): Adds an std::pair of strings ensuring quotes are always balanced.
2299         (WebCore::QuotesData::getOpenQuote):
2300         (WebCore::QuotesData::getCloseQuote):
2301         (WebCore::QuotesData::equals): Renamed equals (added the s).
2302         * rendering/style/QuotesData.h:
2303         (WebCore::QuotesData::create):
2304         (QuotesData):
2305         (WebCore::QuotesData::QuotesData):
2306         * rendering/style/RenderStyle.cpp:
2307         (WebCore::RenderStyle::setQuotes):
2308         * rendering/style/StyleRareInheritedData.cpp:
2309         (WebCore::StyleRareInheritedData::operator==):
2310
2311 2012-07-30  MORITA Hajime  <morrita@google.com>
2312
2313         Node::replaceChild() can create bad DOM topology with MutationEvent
2314         https://bugs.webkit.org/show_bug.cgi?id=92619
2315
2316         Reviewed by Ryosuke Niwa.
2317
2318         Node::replaceChild() calls insertBeforeCommon() after dispatching
2319         a MutationEvent event for removeChild(). But insertBeforeCommon()
2320         expects call sites to check the invariant and doesn't have
2321         suffient check. So a MutationEvent handler can let some bad tree
2322         topology to slip into insertBeforeCommon().
2323
2324         This change adds a guard for checking the invariant using
2325         checkReplaceChild() between removeChild() and insertBeforeCommon().
2326
2327         Test: fast/events/mutation-during-replace-child.html
2328
2329         * dom/ContainerNode.cpp:
2330         (WebCore::ContainerNode::replaceChild): Added a guard.
2331
2332 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
2333
2334         Qt Windows build fix attempt after r124098.
2335
2336         * dom/GestureEvent.cpp:
2337
2338 2012-07-30  Wei James  <james.wei@intel.com>
2339
2340         [Chromium] Enable web audio IPP for x86 chromium android
2341         https://bugs.webkit.org/show_bug.cgi?id=91973
2342
2343         Reviewed by Tony Chang.
2344
2345         Include the IPP libraries at link-time for Android builds when
2346         compiling the Web Audio API with IPP support.
2347
2348         * WebCore.gyp/WebCore.gyp:
2349
2350 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
2351
2352         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
2353         https://bugs.webkit.org/show_bug.cgi?id=92612
2354
2355         Reviewed by Kent Tamura.
2356
2357         This patch replaces Element::isReadOnlyFormControl() not related to
2358         CSS selector matching to HTMLFormControlElement::readOnly() for
2359         preparation of introducing Element::shouldMatchReadWriteSelector(), bug 92602.
2360
2361         No new tests. This patch doesn't change behavior.
2362
2363         * html/shadow/SliderThumbElement.cpp:
2364         (WebCore::SliderThumbElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
2365         * html/shadow/TextControlInnerElements.cpp:
2366         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
2367         (WebCore::SpinButtonElement::defaultEventHandler): ditto.
2368         (WebCore::SpinButtonElement::step): ditto.
2369         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): ditto.
2370         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto.
2371         * rendering/RenderTextControl.cpp:
2372         (updateUserModifyProperty): Changed isReadOnlyFormControl() to readOnly().
2373         * rendering/RenderThemeMac.mm:
2374         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Changed isReadOnlyFormControl() to readOnly().
2375
2376 2012-07-30  Eric Seidel  <eric@webkit.org>
2377
2378         Grid Demo spends 1.5% of total time allocating Path objects in RenderBoxModelObject::paintBorderSides
2379         https://bugs.webkit.org/show_bug.cgi?id=92252
2380
2381         Reviewed by Simon Fraser.
2382
2383         This change introduces the concept of a "null Path" very similar to a null WTF::String.
2384         Just like String functions as a RefPtr around a StringImpl, Path (for most ports)
2385         functions as an OwnPtr around a PlatformPathPtr.
2386
2387         In various places in the code, we declare a local Path variable, but don't necessarily
2388         use that Path variable in all code paths, or might pass that Path variable along to GraphicsContext
2389         functions, without ever actually adding points to that Path.
2390         On most platforms, this Path default constructor was causing a malloc!
2391         In some of these case, the code-path in question (like paintBorderSides) can be quite hot.
2392         Introducing this null-Path and delaying instantiation of the PlatformPath object
2393         until it's actually needed, saves a malloc for these hot paths.
2394
2395         To test this, I loaded a few popular pages, and added printfs to both the Path constructor
2396         and destructor, logging during construction and destruction when the path was still null at destruction time.
2397
2398         This simple testing showed this to be a small win (avoiding mallocs) on many sites and a huge win for Google Spreadsheets:
2399         apple.com: 147 Paths created, 9 (6%) destroyed null.
2400         google.com: 58 Paths created, 26 (44%) destroyed null (google seems creating 5 paths every second after load?  1 of which is destroyed empty.)
2401         amazon.com: 130 Paths created, 130 (100%) destroyed null.
2402         Loading an empty spreadsheet from drive.google.com: 5237 created, 4861 destroyed null (92%!) :)
2403
2404         * platform/graphics/Path.h:
2405         (Path):
2406         (WebCore::Path::isNull):
2407         (WebCore::Path::ensurePlatformPath):
2408         * platform/graphics/cairo/CairoUtilities.cpp:
2409         (WebCore::appendWebCorePathToCairoContext):
2410         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2411         (WebCore::GraphicsContext::fillPath):
2412         (WebCore::GraphicsContext::strokePath):
2413         (WebCore::GraphicsContext::clipPath):
2414         (WebCore::GraphicsContext::clip):
2415         * platform/graphics/cairo/PathCairo.cpp:
2416         (WebCore::Path::Path):
2417         (WebCore::Path::~Path):
2418         (WebCore::Path::ensurePlatformPath):
2419         (WebCore):
2420         (WebCore::Path::operator=):
2421         (WebCore::Path::clear):
2422         (WebCore::Path::isEmpty):
2423         (WebCore::Path::currentPoint):
2424         (WebCore::Path::translate):
2425         (WebCore::Path::moveTo):
2426         (WebCore::Path::addLineTo):
2427         (WebCore::Path::addRect):
2428         (WebCore::Path::addQuadCurveTo):
2429         (WebCore::Path::addBezierCurveTo):
2430         (WebCore::Path::addArc):
2431         (WebCore::Path::addArcTo):
2432         (WebCore::Path::addEllipse):
2433         (WebCore::Path::closeSubpath):
2434         (WebCore::Path::boundingRect):
2435         (WebCore::Path::strokeBoundingRect):
2436         (WebCore::Path::contains):
2437         (WebCore::Path::strokeContains):
2438         (WebCore::Path::apply):
2439         (WebCore::Path::transform):
2440         * platform/graphics/cg/GraphicsContextCG.cpp:
2441         (WebCore::GraphicsContext::drawPath):
2442         (WebCore::GraphicsContext::fillPath):
2443         (WebCore::GraphicsContext::strokePath):
2444         (WebCore::GraphicsContext::clipPath):
2445         (WebCore::GraphicsContext::clipOut):
2446         * platform/graphics/cg/PathCG.cpp:
2447         (WebCore::Path::Path):
2448         (WebCore::Path::~Path):
2449         (WebCore):
2450         (WebCore::Path::ensurePlatformPath):
2451         (WebCore::Path::operator=):
2452         (WebCore::Path::contains):
2453         (WebCore::Path::strokeContains):
2454         (WebCore::Path::translate):
2455         (WebCore::Path::boundingRect):
2456         (WebCore::Path::fastBoundingRect):
2457         (WebCore::Path::strokeBoundingRect):
2458         (WebCore::Path::moveTo):
2459         (WebCore::Path::addLineTo):
2460         (WebCore::Path::addQuadCurveTo):
2461         (WebCore::Path::addBezierCurveTo):
2462         (WebCore::Path::addArcTo):
2463         (WebCore::Path::platformAddPathForRoundedRect):
2464         (WebCore::Path::closeSubpath):
2465         (WebCore::Path::addArc):
2466         (WebCore::Path::addRect):
2467         (WebCore::Path::addEllipse):
2468         (WebCore::Path::clear):
2469         (WebCore::Path::isEmpty):
2470         (WebCore::Path::currentPoint):
2471         (WebCore::Path::apply):
2472         * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
2473         (WebCore):
2474         (WebCore::LoopBlinnPathProcessor::buildContours):
2475         * platform/graphics/mac/GraphicsContextMac.mm:
2476         (WebCore::GraphicsContext::drawFocusRing):
2477         * platform/graphics/openvg/PainterOpenVG.cpp:
2478         (WebCore::PainterOpenVG::drawPath):
2479         * platform/graphics/skia/GraphicsContextSkia.cpp:
2480         (WebCore::GraphicsContext::clip):
2481         (WebCore::GraphicsContext::canvasClip):
2482         (WebCore::GraphicsContext::clipOut):
2483         (WebCore::GraphicsContext::clipPath):
2484         (WebCore::GraphicsContext::fillPath):
2485         (WebCore::GraphicsContext::strokePath):
2486         * platform/graphics/skia/PathSkia.cpp:
2487         (WebCore::Path::Path):
2488         (WebCore::Path::~Path):
2489         (WebCore):
2490         (WebCore::Path::ensurePlatformPath):
2491         (WebCore::Path::operator=):
2492         (WebCore::Path::isEmpty):
2493         (WebCore::Path::hasCurrentPoint):
2494         (WebCore::Path::currentPoint):
2495         (WebCore::Path::contains):
2496         (WebCore::Path::translate):
2497         (WebCore::Path::boundingRect):
2498         (WebCore::Path::moveTo):
2499         (WebCore::Path::addLineTo):
2500         (WebCore::Path::addQuadCurveTo):
2501         (WebCore::Path::addBezierCurveTo):
2502         (WebCore::Path::addArcTo):
2503         (WebCore::Path::closeSubpath):
2504         (WebCore::Path::addArc):
2505         (WebCore::Path::addRect):
2506         (WebCore::Path::addEllipse):
2507         (WebCore::Path::clear):
2508         (WebCore::Path::apply):
2509         (WebCore::Path::transform):
2510         (WebCore::Path::strokeBoundingRect):
2511         (WebCore::Path::strokeContains):
2512         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2513         (WebCore::GraphicsContext::fillPath):
2514         (WebCore::GraphicsContext::strokePath):
2515         * platform/graphics/wx/GraphicsContextWx.cpp:
2516         (WebCore::GraphicsContext::clipPath):
2517         (WebCore::GraphicsContext::fillPath):
2518         (WebCore::GraphicsContext::strokePath):
2519         * platform/graphics/wx/PathWx.cpp:
2520         (WebCore::Path::Path):
2521         (WebCore::Path::~Path):
2522         (WebCore::Path::boundingRect):
2523         (WebCore::Path::operator=):
2524         (WebCore::Path::ensurePlatformPath):
2525         (WebCore):
2526         (WebCore::Path::clear):
2527         (WebCore::Path::moveTo):
2528         (WebCore::Path::addLineTo):
2529         (WebCore::Path::addQuadCurveTo):
2530         (WebCore::Path::addBezierCurveTo):
2531         (WebCore::Path::addArcTo):
2532         (WebCore::Path::closeSubpath):
2533         (WebCore::Path::addArc):
2534         (WebCore::Path::addRect):
2535         (WebCore::Path::addEllipse):
2536         (WebCore::Path::transform):
2537         (WebCore::Path::currentPoint):
2538
2539 2012-07-30  Dominik Röttsches  <dominik.rottsches@intel.com>
2540
2541         Avoid Assertion Failure in HarfBuzzRun::characterIndexForXPosition
2542         https://bugs.webkit.org/show_bug.cgi?id=92376
2543
2544         Reviewed by Tony Chang.
2545
2546         Previously, the if condition in offsetForPosition gating the call to
2547         characterIndexForXPosition was comparing a different value than what was actually used
2548         as the argument to calling it. In some cases, this can lead to a minuscule difference
2549         when comparing the two floats - enough to trigger the assertion. To resolve this,
2550         the accuracy of the index calculation is improved by changing the types from int
2551         to floats and rephrasing the if condition to be exactly the same as what is checked
2552         for in the assertion.
2553
2554         Manual test ManualTests/harfbuzz-mouse-selection-crash.html added
2555         which reliably reproduces the assertion failure before this change.
2556
2557         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
2558         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): Types changed to float.
2559         (WebCore::HarfBuzzShaper::offsetForPosition): Types changed to float, if condition rephrased.
2560         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
2561         (HarfBuzzRun):
2562
2563 2012-06-29  James Robinson  <jamesr@chromium.org>
2564
2565         [chromium] Remove WebTransformationMatrix::mapPoint overrides
2566         https://bugs.webkit.org/show_bug.cgi?id=90329
2567
2568         Reviewed by Adrienne Walker.
2569
2570         Add more functionality for mapping points to CCMathUtil and use it in CCLayerSorter / drawTileQuad. These
2571         mappings should never clip.
2572
2573         * platform/chromium/support/WebTransformationMatrix.cpp:
2574         * platform/graphics/chromium/LayerRendererChromium.cpp:
2575         (WebCore::LayerRendererChromium::drawTileQuad):
2576         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
2577         (WebCore::CCLayerSorter::LayerShape::LayerShape):
2578         * platform/graphics/chromium/cc/CCMathUtil.cpp:
2579         (WebCore::mapHomogeneousPoint):
2580         (WebCore::CCMathUtil::mapPoint):
2581         (WebCore):
2582         * platform/graphics/chromium/cc/CCMathUtil.h:
2583         (WebCore::HomogeneousCoordinate::cartesianPoint3d):
2584         (HomogeneousCoordinate):
2585         (CCMathUtil):
2586
2587 2012-07-30  Anders Carlsson  <andersca@apple.com>
2588
2589         Crash in logging code if MIME type is null
2590         https://bugs.webkit.org/show_bug.cgi?id=92683
2591         <rdar://problem/11985295>
2592
2593         Reviewed by Dan Bernstein.
2594
2595         If the MIME type is null, try to figure it out from the URL extension. If this fails, return early instead of crashing
2596         trying to insert the null string into a hash set.
2597
2598         * loader/SubframeLoader.cpp:
2599         (WebCore::logPluginRequest):
2600
2601 2012-07-30  Alexis Menard  <alexis.menard@openbossa.org>
2602
2603         Build fix with newer bison 2.6.
2604         https://bugs.webkit.org/show_bug.cgi?id=92264
2605
2606         Reviewed by Adam Barth.
2607
2608         As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html
2609         YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS
2610         version I had access to as well as recent Linux runs at least version 2.3 so it's safe
2611         to use the replacement of these deprecated macros in favor of %lex-param and %parse-param.
2612         As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release
2613         of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore.
2614
2615         No new tests : build fix and the patch should not trigger any regressions
2616
2617         * css/CSSGrammar.y:
2618         * css/CSSParser.cpp:
2619         * xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define.
2620         * xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h
2621         therefore including this file within the namespace {} declarations leads to xpathyyparse being
2622         defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp
2623         (generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs 
2624         to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same.
2625
2626 2012-07-30  Sadrul Habib Chowdhury  <sadrul@chromium.org>
2627
2628         Propagate gesture events to plugins.
2629         https://bugs.webkit.org/show_bug.cgi?id=92281
2630
2631         Reviewed by Adam Barth.
2632
2633         Propagate gesture events to plugins. This change does not expose the gesture events
2634         to JavaScript, since there is no spec for that at the moment. Exposing gesture events
2635         to JavaScript will be done separately, once there is a spec for it.
2636
2637         Test: platform/chromium/plugins/gesture-events.html
2638
2639         * CMakeLists.txt:
2640         * GNUmakefile.list.am:
2641         * Target.pri:
2642         * WebCore.gypi:
2643         * WebCore.xcodeproj/project.pbxproj:
2644         * dom/EventNames.h:
2645         (WebCore):
2646         (WebCore::EventNames::isGestureEventType):
2647         (EventNames):
2648         * dom/GestureEvent.cpp: Added.
2649         (WebCore):
2650         (WebCore::GestureEvent::create):
2651         (WebCore::GestureEvent::initGestureEvent):
2652         (WebCore::GestureEvent::interfaceName):
2653         (WebCore::GestureEvent::GestureEvent):
2654         (WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
2655         (WebCore::GestureEventDispatchMediator::event):
2656         (WebCore::GestureEventDispatchMediator::dispatchEvent):
2657         * dom/GestureEvent.h: Added.
2658         (WebCore):
2659         (GestureEvent):
2660         (WebCore::GestureEvent::~GestureEvent):
2661         (WebCore::GestureEvent::deltaX):
2662         (WebCore::GestureEvent::deltaY):
2663         (WebCore::GestureEvent::GestureEvent):
2664         (GestureEventDispatchMediator):
2665         (WebCore::GestureEventDispatchMediator::create):
2666         * dom/Node.cpp:
2667         (WebCore):
2668         (WebCore::Node::dispatchGestureEvent):
2669         * dom/Node.h:
2670         (WebCore):
2671         (Node):
2672         * page/EventHandler.cpp:
2673         (WebCore::EventHandler::clear):
2674         (WebCore::EventHandler::handleGestureEvent):
2675         * page/EventHandler.h:
2676
2677 2012-07-30  John Bates  <jbates@google.com>
2678
2679         Plumb vsync-enabled flag up to compositor thread and support disable-vsync
2680         https://bugs.webkit.org/show_bug.cgi?id=92323
2681
2682         Reviewed by James Robinson.
2683
2684         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
2685         (WebCore::CCFrameRateController::CCFrameRateController):
2686         (WebCore::CCFrameRateController::disableTimeSourceThrottling):
2687         (WebCore):
2688         (WebCore::CCFrameRateController::setActive):
2689         (WebCore::CCFrameRateController::postManualTick):
2690         (WebCore::CCFrameRateController::onTimerFired):
2691         (WebCore::CCFrameRateController::didBeginFrame):
2692         (WebCore::CCFrameRateController::didFinishFrame):
2693         * platform/graphics/chromium/cc/CCFrameRateController.h:
2694         (WebCore):
2695         (CCFrameRateController):
2696         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2697         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
2698         (CCLayerTreeSettings):
2699         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2700         (WebCore::CCThreadProxy::CCThreadProxy):
2701         (WebCore::CCThreadProxy::initializeImplOnImplThread):
2702         * platform/graphics/chromium/cc/CCThreadProxy.h:
2703         (CCThreadProxy):
2704
2705 2012-07-30  James Robinson  <jamesr@chromium.org>
2706
2707         [chromium] Add miscellaneous missing includes and OVERRIDE declarations in compositor code
2708         https://bugs.webkit.org/show_bug.cgi?id=92680
2709
2710         Reviewed by Adrienne Walker.
2711
2712         * platform/graphics/chromium/TextureCopier.h:
2713         (AcceleratedTextureCopier):
2714         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2715         (CCLayerTreeHostImpl):
2716         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
2717         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
2718         * platform/graphics/chromium/cc/CCResourceProvider.h:
2719         (WebCore):
2720
2721 2012-07-30  Adrienne Walker  <enne@google.com>
2722
2723         [chromium] Remove dependency on ScrollbarTheme from the compositor
2724         https://bugs.webkit.org/show_bug.cgi?id=90528
2725
2726         Reviewed by James Robinson.
2727
2728         Tested by existing layout tests.
2729
2730         ScrollbarLayerChromium is modified to use the Platform API for
2731         WebScrollbar, WebScrollbarThemePainter, and WebScrollbarThemeGeometry.
2732         This prevents API dependencies from the compositor code into WebCore
2733         scrollbar and theme code.
2734
2735         CCScrollbarLayerImpl::CCScrollbar now implements the WebScrollbar API
2736         instead of the ScrollbarThemeClient API.
2737
2738         Also, CCScrollbarLayerImpl now no longer gets the theme from a static
2739         accessor. It now gets a "copy" of the theme from the main thread via
2740         WebScrollbarThemeGeometry, which is more correct for render theme
2741         scrollbars which were previously using the native theme to get part
2742         geometry. Using the correct theme unfortunately causes crashes due to
2743         bad casts in RenderScrollbarTheme, so this patch turns back off the
2744         use of ScrollbarLayerChromium for themed scrollbars until that can be
2745         resolved.
2746
2747         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2748         (WebCore::createScrollbarLayer):
2749         * platform/ScrollbarThemeClient.h:
2750         (ScrollbarThemeClient):
2751         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2752         (WebCore::ScrollbarLayerChromium::create):
2753         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
2754         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
2755         (WebCore::ScrollbarBackgroundPainter::create):
2756         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
2757         (ScrollbarBackgroundPainter):
2758         (WebCore::ScrollbarThumbPainter::create):
2759         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
2760         (ScrollbarThumbPainter):
2761         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
2762         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
2763         (WebCore::ScrollbarLayerChromium::update):
2764         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2765         (ScrollbarLayerChromium):
2766         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2767         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
2768         (WebCore::CCScrollbarLayerImpl::setScrollbarData):
2769         (WebCore::toUVRect):
2770         (WebCore::CCScrollbarLayerImpl::appendQuads):
2771         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isOverlay):
2772         (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
2773         (WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
2774         (WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
2775         (WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
2776         (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
2777         (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
2778         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
2779         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
2780         (WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
2781         (WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
2782         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
2783         (WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
2784         (WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
2785         (WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
2786         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
2787         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2788         (CCScrollbarLayerImpl):
2789         (CCScrollbar):
2790
2791 2012-07-30  Andreas Kling  <kling@webkit.org>
2792
2793         REGRESSION(r123636): Heap-use-after-free in StyleResolver::collectMatchingRules.
2794         <http://webkit.org/b/92430>
2795
2796         Reviewed by Antti Koivisto.
2797
2798         Don't hold on to a reference to StyledElement::classNames() as that may become
2799         invalid after mutating the element's attribute data.
2800
2801         In this case it was happening below Element::hasAttributes() which is unfortunately
2802         naive enough to always serialize lazy attributes. That is a minor inefficiency that
2803         can be addressed in a separate patch.
2804
2805         Covered by valgrind on existing tests.
2806
2807         * css/StyleResolver.cpp:
2808         (WebCore::StyleResolver::collectMatchingRules):
2809
2810 2012-07-30  James Robinson  <jamesr@chromium.org>
2811
2812         [chromium] CCThreadTask should not depend on CrossThreadTask and does not need to depend on CrossThreadCopier
2813         https://bugs.webkit.org/show_bug.cgi?id=90132
2814
2815         Reviewed by David Levin.
2816
2817         CrossThreadTask is defined in WebCore/dom/ and depends on concepts like ScriptExecutionConcept. CCThreadTask,
2818         being in WebCore/platform/, should not depend on /dom/ or anything from that layer.
2819
2820         CrossThreadCopier is not a layering violation per se, but it's also not at all helpful for CCThreadTask - we
2821         never use any types for which it would be useful.
2822
2823         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2824         (WebCore::CCThreadProxy::compositeAndReadback):
2825         (WebCore::CCThreadProxy::finishAllRendering):
2826         (WebCore::CCThreadProxy::initializeContext):
2827         (WebCore::CCThreadProxy::setVisible):
2828         (WebCore::CCThreadProxy::initializeLayerRenderer):
2829         (WebCore::CCThreadProxy::recreateContext):
2830         (WebCore::CCThreadProxy::implSideRenderingStats):
2831         (WebCore::CCThreadProxy::start):
2832         (WebCore::CCThreadProxy::stop):
2833         (WebCore::CCThreadProxy::forceSerializeOnSwapBuffers):
2834         (WebCore::CCThreadProxy::beginFrame):
2835         (WebCore::CCThreadProxy::acquireLayerTextures):
2836         * platform/graphics/chromium/cc/CCThreadTask.h:
2837         (CCThreadTask1):
2838         (WebCore::CCThreadTask1::create):
2839         (WebCore::CCThreadTask1::CCThreadTask1):
2840         (CCThreadTask2):
2841         (WebCore::CCThreadTask2::create):
2842         (WebCore::CCThreadTask2::CCThreadTask2):
2843         (CCThreadTask3):
2844         (WebCore::CCThreadTask3::create):
2845         (WebCore::CCThreadTask3::CCThreadTask3):
2846         (CCThreadTask4):
2847         (WebCore::CCThreadTask4::create):
2848         (WebCore::CCThreadTask4::CCThreadTask4):
2849         (CCThreadTask5):
2850         (WebCore::CCThreadTask5::create):
2851         (WebCore::CCThreadTask5::CCThreadTask5):
2852         (WebCore::createCCThreadTask):
2853
2854 2012-07-30  Paul Irish  <paul.irish@gmail.com>
2855
2856         Web Inspector: Rename Databases to Web SQL
2857         https://bugs.webkit.org/show_bug.cgi?id=92646
2858
2859         Reviewed by Pavel Feldman.
2860
2861         Renamed Databases to Web SQL. Drive-by fix for EmptyView
2862         selection.
2863
2864         * English.lproj/localizedStrings.js:
2865         * inspector/front-end/EmptyView.js:
2866         * inspector/front-end/ResourcesPanel.js:
2867
2868 2012-07-30  Tony Chang  <tony@chromium.org>
2869
2870         new flexbox should ignore float set on flexitems
2871         https://bugs.webkit.org/show_bug.cgi?id=70792
2872
2873         Reviewed by Ojan Vafai.
2874
2875         Force flex items to not float.
2876
2877         Test: css3/flexbox/floated-flexitem.html
2878
2879         * css/StyleResolver.cpp:
2880         (WebCore::StyleResolver::adjustRenderStyle): Force NoFloat on flex items.
2881
2882 2012-07-30  Adrienne Walker  <enne@google.com>
2883
2884         [chromium] Turn back on ScrollbarLayerChromium for Windows
2885         https://bugs.webkit.org/show_bug.cgi?id=92409
2886
2887         Reviewed by James Robinson.
2888
2889         This reverts r122791. As GDI issues were addressed in Chromium via
2890         http://src.chromium.org/viewvc/chrome?view=rev&revision=148215,
2891         scrollbar parts can now be composited on the thread.
2892
2893         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2894         (WebCore::createScrollbarLayer):
2895
2896 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2897
2898         Unreviewed, rolling out r124025.
2899         http://trac.webkit.org/changeset/124025
2900         https://bugs.webkit.org/show_bug.cgi?id=92658
2901
2902         Causes color-suggestion-picker-appearance layout test to time
2903         out on all Chromium platforms (Requested by tomhudson_ on
2904         #webkit).
2905
2906         * rendering/RenderThemeChromiumCommon.cpp:
2907         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
2908
2909 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2910
2911         Unreviewed, rolling out r123966 and r123967.
2912         http://trac.webkit.org/changeset/123966
2913         http://trac.webkit.org/changeset/123967
2914         https://bugs.webkit.org/show_bug.cgi?id=92656
2915
2916         This patch is causing assertion failures on the debug bot
2917         (also rolling out a dependent patch) (Requested by mrobinson
2918         on #webkit).
2919
2920         * GNUmakefile.am:
2921         * GNUmakefile.list.am:
2922         * platform/text/gtk/TextCheckerEnchant.cpp: Removed.
2923         * platform/text/gtk/TextCheckerEnchant.h: Removed.
2924
2925 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
2926
2927         ASSERTION FAILED: !rect.isEmpty()  : void WebCore::GraphicsContext::drawRect(const WebCore::IntRect &)
2928         https://bugs.webkit.org/show_bug.cgi?id=92187
2929
2930         Reviewed by Simon Fraser.
2931
2932         The border painting logic (RenderBoxModelObject::paintOneBorderSide) would pass a rect with a 0px length
2933         to RenderObject::drawLineForBoxSide. We do check the width (thickness) but not the length so we would pass
2934         the rect to GraphicsContext and hit the ASSERT. This change adds a check for the length too as it is the safest
2935         way, it means that we may still do unneeded operations before bailing out but that's an existing problem in the code.
2936
2937         Tests: fast/borders/0px-borders-no-line-height.html
2938                fast/borders/double-1px-border-assert.html
2939
2940         * rendering/RenderObject.cpp:
2941         (WebCore::RenderObject::drawLineForBoxSide):
2942         Added a 0px length check. While renaming confusing variables and re-using others,
2943         I also found a potential empty border that I fixed (tested by the 2nd case above).
2944
2945 2012-07-26  Stephen White  <senorblanco@chromium.org>
2946
2947         [chromium] Refactor the computation of resampled bitmap size in
2948         drawImage and drawPattern.
2949         https://bugs.webkit.org/show_bug.cgi?id=92408
2950
2951         Reviewed by Adrienne Walker.
2952
2953         We used to have a special-purpose function called TransformDimensions()
2954         which did pretty much the same thing as SkRect::mapRect() does.  This
2955         change unifies the drawPattern code to use mapRect() in the same way
2956         that drawImage() does.
2957
2958         Covered by existing tests, e.g., fast/backgrounds/size/*.
2959
2960         * platform/graphics/skia/ImageSkia.cpp:
2961         (WebCore):
2962         (WebCore::Image::drawPattern):
2963         Note:  we're now doing using the original (float) source rect, and
2964         converting to int only after applying the matrix transform.  This
2965         might result in different decisions about resampling mode, but it's
2966         more correct anyway.
2967
2968 2012-07-30  Vineet Chaudhary  <rgf748@motorola.com>
2969
2970         https://bugs.webkit.org/show_bug.cgi?id=92642
2971         [Bindings]Remove custom JS/V8 bindings for WebSocket::close() using [Clamp]
2972
2973         Reviewed by Kentaro Hara.
2974
2975         With support of [Clamp] as extended attribute we can replace custom bindings from WebSocket::close().
2976         Spec for WebSocket::close() : http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket
2977
2978         No new tests. There should be no behavioural changes 
2979         Existing tests under http/websocket/tests/hybi/ should cover this.
2980
2981         * Modules/websockets/WebSocket.h:
2982         (WebCore::WebSocket::close):
2983         * Modules/websockets/WebSocket.idl: Used [Clamp].
2984         * bindings/js/JSWebSocketCustom.cpp: Removed custom call close().
2985         (WebCore):
2986         * bindings/scripts/CodeGeneratorJS.pm:
2987         (GenerateParametersCheck):
2988         * bindings/scripts/CodeGeneratorV8.pm:
2989         (GenerateParametersCheck):
2990         * bindings/scripts/test/JS/JSTestObj.cpp:
2991         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2992         * bindings/scripts/test/V8/V8TestObj.cpp:
2993         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2994         * bindings/v8/custom/V8WebSocketCustom.cpp: Removed custom call close().
2995         (WebCore):
2996
2997 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
2998
2999         Web Inspector: Resource agent's reference to cached resources should be weak.
3000         https://bugs.webkit.org/show_bug.cgi?id=92108
3001
3002         Reviewed by Pavel Feldman.
3003
3004         NetworkResourcesData now stores a raw pointer to CachedResource.
3005         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
3006         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
3007         Destroyed resources content is saved to NetworkResourcesData.
3008
3009         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
3010                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
3011
3012         * WebCore.exp.in:
3013         * inspector/InspectorController.cpp:
3014         (WebCore::InspectorController::InspectorController):
3015         (WebCore::InspectorController::inspectedPageDestroyed):
3016         * inspector/InspectorInstrumentation.cpp:
3017         (WebCore):
3018         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
3019         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
3020         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
3021         * inspector/InspectorInstrumentation.h:
3022         (InspectorInstrumentation):
3023         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
3024         (WebCore):
3025         * inspector/InspectorResourceAgent.cpp:
3026         (WebCore::InspectorResourceAgent::didReceiveData):
3027         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
3028         (WebCore):
3029         (WebCore::InspectorResourceAgent::getResponseBody):
3030         * inspector/InspectorResourceAgent.h:
3031         (InspectorResourceAgent):
3032         * inspector/NetworkResourcesData.cpp:
3033         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
3034         (WebCore::NetworkResourcesData::ResourceData::setContent):
3035         (WebCore::NetworkResourcesData::setResourceContent):
3036         (WebCore::NetworkResourcesData::removeCachedResource):
3037         (WebCore):
3038         * inspector/NetworkResourcesData.h:
3039         (ResourceData):
3040         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
3041         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
3042         (NetworkResourcesData):
3043         * loader/cache/CachedResource.cpp:
3044         (WebCore::CachedResource::~CachedResource):
3045         (WebCore::CachedResource::removeClient):
3046         (WebCore::CachedResource::deleteIfPossible):
3047         (WebCore):
3048         * loader/cache/CachedResource.h:
3049         (CachedResource):
3050         * loader/cache/CachedResourceLoader.cpp:
3051         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
3052         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
3053         (WebCore::CachedResourceLoader::clearPreloads):
3054         * loader/cache/CachedResourceLoader.h:
3055         (CachedResourceLoader):
3056         * loader/cache/MemoryCache.cpp:
3057         (WebCore::MemoryCache::evict):
3058         * testing/InternalSettings.cpp:
3059         * testing/Internals.cpp:
3060         (WebCore::Internals::garbageCollectDocumentResources):
3061         (WebCore):
3062         * testing/Internals.h:
3063         (Internals):
3064         * testing/Internals.idl:
3065
3066 2012-07-30  Shinya Kawanaka  <shinyak@chromium.org>
3067
3068         Prohibit having AuthorShadowDOM of input or textarea element for a while and having a flag to enable it in Internals.
3069         https://bugs.webkit.org/show_bug.cgi?id=92611
3070
3071         Reviewed by Hajime Morita.
3072
3073         Prohibit having AuthorShadowDOM of input elemnet unless a flag in RuntimeEnabledFeatures is not enabled.
3074         The flag can be enabled in Internals.
3075
3076         The elements in UserAgentShadowDOM of input element assume that they have a renderer when the input
3077         element has a renderer. However, this does not hold when AuthorShadowDOM is added to input element.
3078         So until we fix the issue, we should disable to have AuthorShadowDOM for input element, because it may
3079         cause crashes and security problems.
3080
3081         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
3082                fast/dom/shadow/input-with-validation.html
3083                fast/dom/shadow/shadow-disable.html
3084
3085         * bindings/generic/RuntimeEnabledFeatures.cpp:
3086         (WebCore):
3087         * bindings/generic/RuntimeEnabledFeatures.h:
3088         (RuntimeEnabledFeatures):
3089         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
3090         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
3091         * dom/ShadowRoot.cpp:
3092         (WebCore::allowsAuthorShadowRoot): The input element or textarea element does not allow to have a ShadowDOM unless
3093         is a flag in RuntimeEnabledFeatures is not enabled.
3094         * html/HTMLInputElement.h:
3095         (WebCore::isHTMLInputElement):
3096         (WebCore):
3097         * html/HTMLTextAreaElement.h:
3098         (WebCore::isHTMLTextAreaElement):
3099         (WebCore):
3100         * testing/Internals.cpp:
3101         (WebCore::Internals::setAuthorShadowDOMForAnyElementEnabled):
3102         (WebCore):
3103         * testing/Internals.h:
3104         (Internals):
3105         * testing/Internals.idl:
3106
3107 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
3108
3109         Web Inspector: support --line-numbers mapping for SASS
3110         https://bugs.webkit.org/show_bug.cgi?id=92400
3111
3112         Reviewed by Vsevolod Vlasov.
3113
3114         There is --debug-info and --line-numbers ways of referencing the source scss file, adding support for --line-numbers here.
3115
3116         * inspector/front-end/SASSSourceMapping.js:
3117         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
3118         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
3119         (_bindUISourceCode):
3120
3121 2012-07-30  Keishi Hattori  <keishi@webkit.org>
3122
3123         Implement datalist UI for input type color for Chromium
3124         https://bugs.webkit.org/show_bug.cgi?id=92075
3125
3126         Reviewed by Kent Tamura.
3127
3128         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
3129
3130         * rendering/RenderThemeChromiumCommon.cpp:
3131         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
3132
3133 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3134
3135         Wheel events on a page with frames are not handled in fixed layout
3136         https://bugs.webkit.org/show_bug.cgi?id=90550
3137
3138         Reviewed by Antonio Gomes.
3139
3140         Based on patch by Andras Becsi.
3141
3142         Frame-rect size is not the right value to check against to see if the document
3143         can be contained within the full visible content rect, since it does not handle
3144         fixedVisibleContentRect. Instead visibleContentRect(true) should be used which
3145         returns the full visible content rect disregarding scrollbars, and which is
3146         the same a frame-rect size when fixedVisibleContentRect is not set.
3147
3148         * platform/ScrollView.cpp:
3149         (WebCore::ScrollView::updateScrollbars):
3150
3151 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3152
3153         There is no way to tell whether an element can be activated or not
3154         https://bugs.webkit.org/show_bug.cgi?id=92093
3155
3156         Reviewed by Antonio Gomes.
3157
3158         This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
3159         functions, named after similar functions in the iOS fork of WebKit.
3160
3161         Touch-adjustment will now use these two functions, which improves accuracy when
3162         targeting shadow-dom elements, and also means touch adjustment will prefer enabled
3163         form-elements over disabled ones.
3164
3165         Test: touchadjustment/disabled-formelements.html
3166
3167         * dom/Node.cpp:
3168         (WebCore::Node::willRespondToMouseMoveEvents):
3169         (WebCore::Node::willRespondToMouseClickEvents):
3170         * dom/Node.h:
3171         (Node):
3172         * editing/DeleteButton.h:
3173         * html/HTMLAnchorElement.cpp:
3174         (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
3175         * html/HTMLAnchorElement.h:
3176         (HTMLAnchorElement):
3177         * html/HTMLButtonElement.cpp:
3178         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
3179         * html/HTMLButtonElement.h:
3180         (HTMLButtonElement):
3181         * html/HTMLInputElement.cpp:
3182         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
3183         * html/HTMLInputElement.h:
3184         (HTMLInputElement):
3185         * html/HTMLLabelElement.cpp:
3186         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
3187         * html/HTMLLabelElement.h:
3188         (HTMLLabelElement):
3189         * html/HTMLMediaElement.cpp:
3190         (WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
3191         * html/HTMLMediaElement.h:
3192         * html/HTMLSummaryElement.cpp:
3193         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
3194         * html/HTMLSummaryElement.h:
3195         (HTMLSummaryElement):
3196         * html/shadow/CalendarPickerElement.cpp:
3197         (WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
3198         * html/shadow/CalendarPickerElement.h:
3199         (CalendarPickerElement):
3200         * html/shadow/MediaControlElements.cpp:
3201         (WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
3202         (WebCore::MediaControlTimelineElement::setPosition):
3203         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
3204         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
3205         * html/shadow/MediaControlElements.h:
3206         (MediaControlTimelineElement):
3207         (MediaControlVolumeSliderElement):
3208         * html/shadow/MediaControlRootElement.h:
3209         * html/shadow/SliderThumbElement.cpp:
3210         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
3211         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
3212         * html/shadow/SliderThumbElement.h:
3213         (SliderThumbElement):
3214         * html/shadow/TextControlInnerElements.cpp:
3215         (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
3216         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
3217         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
3218         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
3219         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
3220         * html/shadow/TextControlInnerElements.h:
3221         (SearchFieldResultsButtonElement):
3222         (SearchFieldCancelButtonElement):
3223         (SpinButtonElement):
3224         * html/shadow/TextFieldDecorationElement.cpp:
3225         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
3226         * html/shadow/TextFieldDecorationElement.h:
3227         (TextFieldDecorationElement):
3228         * page/TouchAdjustment.cpp:
3229         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
3230
3231 2012-07-30  Vsevolod Vlasov  <vsevik@chromium.org>
3232
3233         Web Inspector: Content size variables in NetworkResourcesData should have size_t type instead of int.
3234         https://bugs.webkit.org/show_bug.cgi?id=92618
3235
3236         Reviewed by Yury Semikhatsky.
3237
3238         Changed content size variables type in NetworkResourcesData from int to size_t.
3239         Drive-by: Switched String length calculation to recently added StringImpl's sizeInBytes.
3240
3241         * inspector/NetworkResourcesData.cpp:
3242         (WebCore::NetworkResourcesData::ResourceData::removeContent):
3243         (WebCore::NetworkResourcesData::ResourceData::dataLength):
3244         (WebCore::NetworkResourcesData::ResourceData::appendData):
3245         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
3246         (WebCore::NetworkResourcesData::setResourceContent):
3247         (WebCore::NetworkResourcesData::maybeAddResourceData):
3248         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
3249         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
3250         (WebCore::NetworkResourcesData::ensureFreeSpace):
3251         * inspector/NetworkResourcesData.h:
3252         (ResourceData):
3253         (NetworkResourcesData):
3254
3255 2012-07-30  Hayato Ito  <hayato@chromium.org>
3256
3257         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
3258         https://bugs.webkit.org/show_bug.cgi?id=92625
3259
3260         Reviewed by Hajime Morita.
3261
3262         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
3263
3264         No new tests, no behavior change.
3265
3266         * dom/EventDispatcher.cpp:
3267         (WebCore::EventDispatcher::EventDispatcher):
3268         (WebCore::EventDispatcher::dispatchEvent):
3269         * dom/EventDispatcher.h:
3270         (EventDispatcher):
3271
3272 2012-07-30  Hayato Ito  <hayato@chromium.org>
3273
3274         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
3275         https://bugs.webkit.org/show_bug.cgi?id=92625
3276
3277         Reviewed by Hajime Morita.
3278
3279         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
3280
3281         No new tests, no behavior change.
3282
3283         * dom/EventDispatcher.cpp:
3284         (WebCore::EventDispatcher::EventDispatcher):
3285         (WebCore::EventDispatcher::dispatchEvent):
3286         * dom/EventDispatcher.h:
3287         (EventDispatcher):
3288
3289 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
3290
3291         Web Inspector: make MemoryInstrumentation methods private
3292         https://bugs.webkit.org/show_bug.cgi?id=92379
3293
3294         Reviewed by Vsevolod Vlasov.
3295
3296         MemoryInstrumentation was refactored.
3297         - All reporting methods on MemoryInstrumentation except add*Object are
3298           private to enforce MemoryClassInfo usage.
3299         - MemoryInstrumentation::Add*Member methods renamed to Add*Object
3300         - String reporting is implemented directly in the MemoryInstrumentation,
3301           not in its descendants.
3302
3303         * CMakeLists.txt:
3304         * GNUmakefile.list.am:
3305         * WebCore.gypi:
3306         * WebCore.vcproj/WebCore.vcproj:
3307         * WebCore.xcodeproj/project.pbxproj:
3308         * bindings/v8/ScriptProfiler.cpp:
3309         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
3310         * dom/MemoryInstrumentation.cpp: Added.
3311         (WebCore):
3312         (WebCore::MemoryInstrumentation::addString):
3313         * dom/MemoryInstrumentation.h:
3314         (WebCore::MemoryInstrumentation::addInstrumentedObject):
3315         (WebCore::MemoryInstrumentation::addObject):
3316         (MemoryInstrumentation):
3317         (InstrumentedPointerBase):
3318         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
3319         (InstrumentedPointer):
3320         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
3321         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
3322         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
3323         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
3324         (WebCore::MemoryClassInfo::addInstrumentedMember):
3325         (WebCore::MemoryClassInfo::addMember):
3326         (WebCore):
3327         (WebCore::MemoryInstrumentation::addObjectImpl):
3328         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
3329         (WebCore::MemoryInstrumentation::calculateContainerSize):
3330         * inspector/InspectorMemoryAgent.cpp:
3331         (WebCore):
3332
3333 2012-07-30  Alexander Pavlov  <apavlov@chromium.org>
3334
3335         Web Inspector: [Styles] No color swatch for the SVG "fill" and "stroke" property values
3336         https://bugs.webkit.org/show_bug.cgi?id=92638
3337
3338         Reviewed by Vsevolod Vlasov.
3339
3340         Added the "fill" and "stroke" properties to the list of color-aware properties.
3341
3342         * inspector/front-end/CSSKeywordCompletions.js:
3343
3344 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3345
3346         Unreviewed, rolling out r124000.
3347         http://trac.webkit.org/changeset/124000
3348         https://bugs.webkit.org/show_bug.cgi?id=92632
3349
3350         seems to have broken chromium Range_InstanceSizeUnknown unit
3351         test across many platforms (Requested by tomhudson on
3352         #webkit).
3353
3354         * WebCore.exp.in:
3355         * inspector/InspectorController.cpp:
3356         (WebCore::InspectorController::InspectorController):
3357         (WebCore::InspectorController::inspectedPageDestroyed):
3358         * inspector/InspectorInstrumentation.cpp:
3359         (WebCore):
3360         * inspector/InspectorInstrumentation.h:
3361         (InspectorInstrumentation):
3362         * inspector/InspectorResourceAgent.cpp:
3363         (WebCore::InspectorResourceAgent::didReceiveData):
3364         (WebCore::InspectorResourceAgent::getResponseBody):
3365         * inspector/InspectorResourceAgent.h:
3366         (InspectorResourceAgent):
3367         * inspector/NetworkResourcesData.cpp:
3368         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
3369         (WebCore::NetworkResourcesData::ResourceData::setContent):
3370         (WebCore::NetworkResourcesData::setResourceContent):
3371         * inspector/NetworkResourcesData.h:
3372         (ResourceData):
3373         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
3374         (NetworkResourcesData):
3375         * loader/cache/CachedResource.cpp:
3376         (WebCore::CachedResource::~CachedResource):
3377         (WebCore::CachedResource::removeClient):
3378         (WebCore::CachedResource::deleteIfPossible):
3379         (WebCore):
3380         * loader/cache/CachedResource.h:
3381         (CachedResource):
3382         * loader/cache/CachedResourceLoader.cpp:
3383         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
3384         (WebCore::CachedResourceLoader::clearPreloads):
3385         * loader/cache/CachedResourceLoader.h:
3386         (CachedResourceLoader):
3387         * loader/cache/MemoryCache.cpp:
3388         (WebCore::MemoryCache::evict):
3389         * testing/InternalSettings.cpp:
3390         * testing/Internals.cpp:
3391         * testing/Internals.h:
3392         (Internals):
3393         * testing/Internals.idl:
3394
3395 2012-07-30  Hayato Ito  <hayato@chromium.org>
3396
3397         Remove an unused member variable, m_originalTarget, from EventDispatcher.
3398         https://bugs.webkit.org/show_bug.cgi?id=92614
3399
3400         Reviewed by Andreas Kling.
3401
3402         No one uses EventDispatcher::m_originalTarget.
3403
3404         No new tests, no behavior change.
3405
3406         * dom/EventDispatcher.h:
3407         (EventDispatcher):
3408
3409 2012-07-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3410
3411         [Qt] Fix issues remaining with fixed positioned layers
3412         https://bugs.webkit.org/show_bug.cgi?id=92528
3413
3414         Reviewed by Noam Rosenthal.
3415
3416         * platform/graphics/texmap/TextureMapperLayer.cpp:
3417         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
3418         Make sure that the delta is used when syncCompositingStateSelf is called afterward.
3419         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
3420         * platform/graphics/texmap/TextureMapperLayer.h:
3421         Use a FloatSize instead of an IntPoint for the delta.
3422         (TextureMapperLayer):
3423         (WebCore::TextureMapperLayer::adjustedPosition):
3424
3425 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
3426
3427         Replace UnicodeWinCE with UnicodeWchar
3428         https://bugs.webkit.org/show_bug.cgi?id=92539
3429
3430         Reviewed by Ryosuke Niwa.
3431
3432         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
3433         is a replacement for it, which is mainly based on the functions
3434         from <wchar.h>. It is ment as a minimal Unicode backend, which
3435         can be used very easy and has no external dependencies.
3436
3437         * platform/text/TextEncoding.cpp:
3438         (WebCore::TextEncoding::encode):
3439         * platform/text/TextEncodingRegistry.cpp:
3440         (WebCore::extendTextCodecMaps):
3441
3442 2012-07-30  Hayato Ito  <hayato@chromium.org>
3443
3444         Remove unnecessary code which set event's target from EventDispatcher::dispatchEvent.
3445         https://bugs.webkit.org/show_bug.cgi?id=92613
3446
3447         Reviewed by Hajime Morita.
3448
3449         EventContext::handleLocalEvents does all required jobs so we don't
3450         need to set target in EventDispacher::dispatchEvent() for TARGET phase.
3451
3452         No new tests, no behavior change.
3453
3454         * dom/EventDispatcher.cpp:
3455         (WebCore::EventDispatcher::dispatchEvent):
3456
3457 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3458
3459         Unreviewed, rolling out r124004.
3460         http://trac.webkit.org/changeset/124004
3461         https://bugs.webkit.org/show_bug.cgi?id=92622
3462
3463         Broke Android build (Requested by keishi on #webkit).
3464
3465         * rendering/RenderThemeChromiumCommon.cpp:
3466         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
3467
3468 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
3469
3470         Web Inspector: element tag disappears after editing
3471         https://bugs.webkit.org/show_bug.cgi?id=92385
3472
3473         Reviewed by Vsevolod Vlasov.
3474
3475         This has regressed when we started hiding elements panel upon
3476         batch updates. Narrowing hiding cases, updating selection
3477         in on-screen mode only.
3478
3479         * inspector/front-end/ElementsTreeOutline.js:
3480         (WebInspector.ElementsTreeElement.prototype.updateSelection):
3481
3482 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>