Remove the clone() method from FilterOperation (and subclasses).
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-31  Stephen White  <senorblanco@chromium.org>
2
3         Remove the clone() method from FilterOperation (and subclasses).
4         https://bugs.webkit.org/show_bug.cgi?id=92757
5
6         Reviewed by Kentaro Hara.
7
8         Since the move to WebFilterOperation in Chromium, this is now dead
9         code.
10
11         Covered by existing tests in css3/filters.
12
13         * platform/graphics/filters/CustomFilterOperation.h:
14         * platform/graphics/filters/FilterOperation.h:
15
16 2012-07-31  Thiago Marcos P. Santos  <thiago.santos@intel.com>
17
18         Regression(r124135): SVG tests crashing on ports using Cairo
19         https://bugs.webkit.org/show_bug.cgi?id=92752
20
21         Reviewed by Martin Robinson.
22
23         * platform/graphics/cairo/PathCairo.cpp:
24         (WebCore::Path::operator=):
25
26 2012-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
27
28         Unreviewed, rolling out r124208.
29         http://trac.webkit.org/changeset/124208
30         https://bugs.webkit.org/show_bug.cgi?id=92765
31
32         it broke compilation on mac (Requested by loislo on #webkit).
33
34         * CMakeLists.txt:
35         * GNUmakefile.list.am:
36         * Target.pri:
37         * WebCore.gypi:
38         * WebCore.vcproj/WebCore.vcproj:
39         * WebCore.xcodeproj/project.pbxproj:
40         * inspector/InspectorAllInOne.cpp:
41         * inspector/InspectorMemoryAgent.cpp:
42         (WebCore):
43         * inspector/MemoryInstrumentationImpl.cpp: Removed.
44         * inspector/MemoryInstrumentationImpl.h: Removed.
45
46 2012-07-31  Stephen Chenney  <schenney@chromium.org>
47
48         xmlserializer strips xlink from xlink:html svg image tag
49         https://bugs.webkit.org/show_bug.cgi?id=79586
50
51         Reviewed by Nikolas Zimmermann.
52
53         Adding code to ensure the correct prefix on attributes in the xml,
54         xmlns and xlink namespaces. We now follow the rules in
55         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments
56         (circa the time of this change).
57
58         Rob Buis wrote the original test for this patch and did the initial work.
59
60         Tests: fast/dom/XMLSerializer-xml-namespace.html
61                svg/custom/xlink-prefix-in-attributes.html
62
63         * editing/MarkupAccumulator.cpp:
64         (WebCore::attributeIsInSerializedNamespace): Test for an attribute in
65         a specially serialized namespace: xml, xmlns, xlink.
66         (WebCore):
67         (WebCore::MarkupAccumulator::appendAttribute): Check the namespace of
68         attributes upon serialization, and add any necessary prefixes.
69         * html/parser/HTMLTreeBuilder.cpp:
70         (WebCore::adjustForeignAttributes): Use WTF::xmlAtom etc for AtomicString arguments.
71
72 2012-07-31  Mike Reed  <reed@google.com>
73
74         skia: switch to conical gradient to match css/svg spec for two-point gradients
75         https://bugs.webkit.org/show_bug.cgi?id=92754
76
77         Reviewed by Stephen White.
78
79         Switching to skia's TwoPointConical gradient, which has been written explicitly to match the css/svg spec.
80         Leaving the existing TwoPointRadial gradient in skia, for other callers that may want the old behavior.
81
82         No new tests. existing layouttests exercise this change (9 pending rebaselines associated with this CL).
83
84         * platform/graphics/skia/GradientSkia.cpp:
85         (WebCore::Gradient::platformGradient):
86
87 2012-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
88
89         Web Inspector: extract MemoryInstrumentationImpl into separate files for future reusing in unit tests
90         https://bugs.webkit.org/show_bug.cgi?id=92751
91
92         Reviewed by Yury Semikhatsky.
93
94         * CMakeLists.txt:
95         * GNUmakefile.list.am:
96         * Target.pri:
97         * WebCore.gypi:
98         * WebCore.vcproj/WebCore.vcproj:
99         * inspector/InspectorAllInOne.cpp:
100         * inspector/InspectorMemoryAgent.cpp:
101         (WebCore):
102         * inspector/MemoryInstrumentationImpl.cpp: Added.
103         (WebCore):
104         (WebCore::MemoryInstrumentationImpl::MemoryInstrumentationImpl):
105         (WebCore::MemoryInstrumentationImpl::processDeferredInstrumentedPointers):
106         (WebCore::MemoryInstrumentationImpl::countObjectSize):
107         (WebCore::MemoryInstrumentationImpl::deferInstrumentedPointer):
108         (WebCore::MemoryInstrumentationImpl::visited):
109         (WebCore::MemoryInstrumentationImpl::selfSize):
110         * inspector/MemoryInstrumentationImpl.h: Added.
111         (WebCore):
112         (MemoryInstrumentationImpl):
113         (WebCore::MemoryInstrumentationImpl::totalTypeSize):
114
115 2012-07-31  Mario Sanchez Prada  <msanchez@igalia.com>
116
117         [GTK] Add a new and reusable enchant-based spellchecker in WebCore
118         https://bugs.webkit.org/show_bug.cgi?id=90269
119
120         Reviewed by Martin Robinson.
121
122         Move enchant specific code down to WebCore, into a new class
123         TextCheckerEnchant, that we can use from WK1 and WK2.
124
125         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
126         * GNUmakefile.list.am: Added new files.
127         * platform/text/gtk/TextCheckerEnchant.cpp: Added.
128         (getAvailableDictionariesCallback):
129         (TextCheckerEnchant::TextCheckerEnchant):
130         (TextCheckerEnchant::~TextCheckerEnchant):
131         (TextCheckerEnchant::ignoreWord):
132         (TextCheckerEnchant::learnWord):
133         (TextCheckerEnchant::checkSpellingOfString):
134         (TextCheckerEnchant::getGuessesForWord):
135         (TextCheckerEnchant::updateSpellCheckingLanguages):
136         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
137         * platform/text/gtk/TextCheckerEnchant.h: Added.
138         (WebCore):
139         (TextCheckerEnchant):
140         (WebCore::TextCheckerEnchant::create):
141
142 2012-07-31  Joe Mason  <jmason@rim.com>
143
144         [BlackBerry] Support Negotiate auth
145         https://bugs.webkit.org/show_bug.cgi?id=91871
146
147         Reviewed by George Staikos.
148
149         Add Negotiate to the list of auth schemes allowed in the platform request.
150
151         Add "success" and "requireCredentials" parameters to notifyAuthReceived (which is now called
152         with success = true on successful authentication, as well as on failures).
153
154         When success is true, update the stored credential to use the auth scheme actually reported
155         rather than that set in the request. (This is used when Negotiate auth can't get a ticket
156         and falls back to a different supported auth type.)
157
158         When requireCredentials is false, just set the auth type and start a new request using empty
159         credentials.
160
161         RIM PR# 166514
162         Internally reviewed by Jonathan Dong
163
164         * platform/network/blackberry/NetworkJob.cpp:
165         (WebCore::NetworkJob::notifyAuthReceived): Add Negotiate to the auth scheme switch. Handle
166         success param by updating auth type in stored credentials; pass requireCredentials param on
167         to sendRequestWithCredentials.
168         (WebCore::NetworkJob::startNewJobWithRequest): Fix typo in increaseRedirectCount parameter
169         name.
170         (WebCore::NetworkJob::sendRequestWithCredentials): Use empty credentials if
171         requireCredentials is false.
172         * platform/network/blackberry/NetworkJob.h:
173         (NetworkJob):
174         * platform/network/blackberry/NetworkManager.cpp:
175         (WebCore::NetworkManager::startJob): Add Negotiate to the auth scheme switch.
176
177 2012-07-31  Alexei Filippov  <alexeif@chromium.org>
178
179         Web Inspector: take into account the whole security origin instead of just host
180         https://bugs.webkit.org/show_bug.cgi?id=92740
181
182         Reviewed by Pavel Feldman.
183
184         Make the DOM Storage Agent take into account all the
185         information relevant to the security origin, i.e. protocol, host, and
186         port. Previously only the host was taken into account. That caused
187         inspector to show the first storage only in the case a page operated
188         over several security origins sharing the same host (but having
189         different protocols e.g. http and https).
190
191         * inspector/InspectorDOMStorageAgent.cpp:
192         (WebCore::InspectorDOMStorageAgent::storageId):
193         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
194         * inspector/InspectorDOMStorageResource.cpp:
195         (WebCore::InspectorDOMStorageResource::isSameOriginAndType):
196         (WebCore::InspectorDOMStorageResource::bind):
197         * inspector/InspectorDOMStorageResource.h:
198         (InspectorDOMStorageResource):
199
200 2012-07-31  Keishi Hattori  <keishi@webkit.org>
201
202         Slider ticks are drawn at wrong positions
203         https://bugs.webkit.org/show_bug.cgi?id=92720
204
205         Reviewed by Kent Tamura.
206
207         Slider tick marks for vertical sliders were drawn reversed. And the tick
208         mark positions were slightly off from the thumb position because of rounding.
209
210         No new tests. Covered in input-appearance-range-with-datalist.html.
211
212         * rendering/RenderTheme.cpp:
213         (WebCore::RenderTheme::paintSliderTicks):
214
215 2012-07-31  Shinya Kawanaka  <shinyak@chromium.org>
216
217         Older ShadowDOM is still rendered when a new ShadowDOM is added when they don't have any InsertionPoints.
218         https://bugs.webkit.org/show_bug.cgi?id=92456
219
220         Reviewed by Hajime Morita.
221
222         When adding a new ShadowRoot to an element having other ShadowRoots, and they don't have any InsretionPoint,
223         the older ShadowDOM is still rendered.
224
225         When ContentDistributor's validity is 'Undetermined', ElementShadow reattaches the host and the whole shadow
226         subtree. Since adding a new ShadowRoot makes the validity 'Undetermined', we have had to make it 'Undetermined'.
227
228         This change enables us to remove a unnecessary InvalidationType flag from the code. We should call
229         setValidityUndetermined() instead of using InvalidateAndForceReattach.
230
231         Test: fast/dom/shadow/invalidate-distribution.html
232
233         * dom/ElementShadow.cpp:
234         (WebCore::ElementShadow::addShadowRoot): Calls setValidityUndetermined().
235         (WebCore::ElementShadow::removeAllShadowRoots):
236         (WebCore::ElementShadow::setValidityUndetermined):
237         (WebCore::ElementShadow::invalidateDistribution): When validity is undetermined, we will reattach the
238         host and the shadow subtree.
239         * dom/ElementShadow.h:
240         (ElementShadow):
241         * html/shadow/ContentDistributor.cpp:
242         * html/shadow/ContentDistributor.h:
243         (WebCore::ContentDistributor::setValidity):
244         (ContentDistributor):
245         * html/shadow/InsertionPoint.cpp:
246         (WebCore::InsertionPoint::insertedInto): Calls setValidityUndetermined().
247
248 2012-07-31  Tommy Widenflycht  <tommyw@google.com>
249
250         Introduce a minimal RTCPeerConnection together with Dictionary changes
251         https://bugs.webkit.org/show_bug.cgi?id=92380
252
253         Reviewed by Kentaro Hara.
254
255         This patch introduces a shell RTCPeerConnection together with neccecary changes to
256         Dictionary.
257
258         The W3C specification can be found here:
259         http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcpeerconnection
260
261         Since Dictionaries can't be fully copied around adding
262         get(const String& name, Vector<Dictionary>& result)
263         isn't feasible so I have added a new ArrayValue class.
264
265         Test: fast/mediastream/RTCPeerConnection.html
266
267         * CMakeLists.txt:
268         * GNUmakefile.list.am:
269         * Modules/mediastream/DOMWindowMediaStream.idl:
270         * Modules/mediastream/RTCPeerConnection.cpp: Added.
271         (WebCore):
272         (RTCIceServer):
273         (WebCore::RTCIceServer::create):
274         (WebCore::RTCIceServer::~RTCIceServer):
275         (WebCore::RTCIceServer::uri):
276         (WebCore::RTCIceServer::credential):
277         (WebCore::RTCIceServer::RTCIceServer):
278         (RTCConfiguration):
279         (WebCore::RTCConfiguration::create):
280         (WebCore::RTCConfiguration::~RTCConfiguration):
281         (WebCore::RTCConfiguration::appendServer):
282         (WebCore::RTCConfiguration::numberOfServers):
283         (WebCore::RTCConfiguration::server):
284         (WebCore::RTCConfiguration::RTCConfiguration):
285         (WebCore::RTCPeerConnection::parseConfiguration):
286         (WebCore::RTCPeerConnection::create):
287         (WebCore::RTCPeerConnection::RTCPeerConnection):
288         (WebCore::RTCPeerConnection::~RTCPeerConnection):
289         (WebCore::RTCPeerConnection::interfaceName):
290         (WebCore::RTCPeerConnection::scriptExecutionContext):
291         (WebCore::RTCPeerConnection::stop):
292         (WebCore::RTCPeerConnection::eventTargetData):
293         (WebCore::RTCPeerConnection::ensureEventTargetData):
294         * Modules/mediastream/RTCPeerConnection.h: Added.
295         (WebCore):
296         (RTCPeerConnection):
297         (WebCore::RTCPeerConnection::refEventTarget):
298         (WebCore::RTCPeerConnection::derefEventTarget):
299         * Modules/mediastream/RTCPeerConnection.idl: Added.
300         * Target.pri:
301         * UseJSC.cmake:
302         * WebCore.gypi:
303         * WebCore.vcproj/WebCore.vcproj:
304         * WebCore.xcodeproj/project.pbxproj:
305         * bindings/generic/RuntimeEnabledFeatures.h:
306         (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
307         * bindings/js/ArrayValue.cpp: Added.
308         (WebCore):
309         (WebCore::ArrayValue::ArrayValue):
310         (WebCore::ArrayValue::operator=):
311         (WebCore::ArrayValue::isUndefinedOrNull):
312         (WebCore::ArrayValue::length):
313         (WebCore::ArrayValue::get):
314         * bindings/js/ArrayValue.h: Added.
315         (WebCore):
316         (ArrayValue):
317         * bindings/js/JSBindingsAllInOne.cpp:
318         * bindings/js/JSDictionary.cpp:
319         (WebCore::JSDictionary::convertValue):
320         (WebCore):
321         * bindings/js/JSDictionary.h:
322         (WebCore):
323         * bindings/v8/ArrayValue.cpp: Added.
324         (WebCore):
325         (WebCore::ArrayValue::operator=):
326         (WebCore::ArrayValue::isUndefinedOrNull):
327         (WebCore::ArrayValue::length):
328         (WebCore::ArrayValue::get):
329         * bindings/v8/ArrayValue.h: Added.
330         (WebCore):
331         (ArrayValue):
332         (WebCore::ArrayValue::ArrayValue):
333         (WebCore::ArrayValue::~ArrayValue):
334         * bindings/v8/Dictionary.cpp:
335         (WebCore::Dictionary::get):
336         (WebCore):
337         * bindings/v8/Dictionary.h:
338         (WebCore):
339         (Dictionary):
340         * dom/EventTargetFactory.in:
341
342 2012-07-31  Raul Hudea  <rhudea@adobe.com>
343
344         Inspector crashes when trying to inspect a page with CSS region styling
345         https://bugs.webkit.org/show_bug.cgi?id=91503
346
347         Reviewed by Alexander Pavlov.
348
349         Fix by making sure a CSSRuleSourceData is always created when parsing @-webkit-region rules.
350
351         Test: inspector/styles/region-style-crash.html
352
353         * css/CSSGrammar.y: Made ruleset called explicitly markRuleBodyStart instead of depending on updateLastSelectorLineAndPosition to call it.
354         * css/CSSParser.cpp:
355         (WebCore::CSSParser::updateLastSelectorLineAndPosition): markRuleBodyStart should be called via at_rule_body_start. 
356         * css/CSSPropertySourceData.h:
357
358 2012-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
359
360         Unreviewed, rolling out r124179.
361         http://trac.webkit.org/changeset/124179
362         https://bugs.webkit.org/show_bug.cgi?id=92730
363
364         Breaks Chromium Linux 32 bots with "error: integer constant is
365         too large for 'long' type" in IDBLevelDBCodingTest.cpp
366         (Requested by apavlov on #webkit).
367
368         * Modules/indexeddb/IDBLevelDBCoding.cpp:
369         (WebCore::IDBLevelDBCoding::encodeByte):
370         (WebCore::IDBLevelDBCoding::encodeBool):
371         (WebCore::IDBLevelDBCoding::encodeInt):
372         (WebCore::IDBLevelDBCoding::encodeVarInt):
373         (WebCore::IDBLevelDBCoding::encodeString):
374         (WebCore::IDBLevelDBCoding::encodeDouble):
375         (WebCore::IDBLevelDBCoding::encodeIDBKey):
376         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
377         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
378         * Modules/indexeddb/IDBLevelDBCoding.h:
379         (IDBLevelDBCoding):
380
381 2012-07-31  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
382
383         add Farstream flags/deps to WebKit, for WebRTC
384         https://bugs.webkit.org/show_bug.cgi?id=87524
385
386         Reviewed by Philippe Normand.
387
388         Since Farstream will be used as the backend for GTK's WebRTC, this
389         patch adds it as a dependency to the build system.
390
391         No new features or code changes were added, so new tests aren't necessary.
392
393         * GNUmakefile.am:
394
395 2012-07-31  Zan Dobersek  <zandobersek@gmail.com>
396
397         Unreviewed crash fix after r124135.
398
399         * platform/graphics/cairo/PathCairo.cpp:
400         (WebCore::Path::Path): Ensure the Cairo path when acquiring its context,
401         crashes ensue otherwise.
402
403 2012-07-31  Yoshifumi Inoue  <yosin@chromium.org>
404
405         Change Element::isReadOnlyFormControl to Element::shouldMatchReadOnlySelector/shouldMatchReadWriteSelector or HTMLFormControlElement::readOnly
406         https://bugs.webkit.org/show_bug.cgi?id=92602
407
408         Reviewed by Kent Tamura.
409
410         This patch replaces Element::isReadOnlyFormControl() by
411         Element::shouldMatchReadOnlySelector/shouldMatchReadOnlySelector or
412         HTMLFormControlElement::readOnly() to make intention of functions
413         self descriptive.
414
415         No new tests. This patch doesn't change behavior.
416
417         * css/SelectorChecker.cpp:
418         (WebCore::SelectorChecker::checkOneSelector): Replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class, and replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class.
419         * dom/Element.cpp:
420         (WebCore::Element::shouldMatchReadOnlySelector): Added for default implementation.
421         (WebCore::Element::shouldMatchReadWriteSelector): for default implementation.
422         * dom/Element.h:
423         (Element): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
424         * html/HTMLFormControlElement.cpp:
425         (WebCore::HTMLFormControlElement::shouldMatchReadOnlySelector): Added.
426         (WebCore::HTMLFormControlElement::shouldMatchReadWriteSelector): Added.
427         * html/HTMLFormControlElement.h:
428         (HTMLFormControlElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
429         * html/shadow/SliderThumbElement.cpp:
430         (WebCore::SliderThumbElement::shouldMatchReadOnlySelector): Added.
431         (WebCore::SliderThumbElement::shouldMatchReadWriteSelector): Added.
432         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
433         (WebCore::SliderThumbElement::willRespondToMouseClickEvents): ditto.
434         (SliderThumbElement):
435         * html/shadow/TextControlInnerElements.cpp:
436         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
437         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents): ditto.
438         (WebCore::SpinButtonElement::willRespondToMouseClickEvents): ditto.
439         (WebCore::SpinButtonElement::shouldMatchReadOnlySelector): Added.
440         (WebCore::SpinButtonElement::shouldMatchReadWriteSelector): Added.
441         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
442         * html/shadow/TextControlInnerElements.h:
443         (SpinButtonElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
444         * rendering/RenderTheme.cpp:
445         (WebCore::RenderTheme::isReadOnlyControl): Replaced isReadOnlyControl() by shouldMatchReadOnlySelector().
446
447 2012-07-31  Xingnan Wang  <xingnan.wang@intel.com>
448
449         IndexedDB: Size the Vector in encodeInt/encodeVarInt/encodeString
450         https://bugs.webkit.org/show_bug.cgi?id=91813
451
452         Reviewed by Kentaro Hara.
453
454         To avoid memory re-allocation in Vector, init the capability or size of Vector in encodeInt(), encodeVarInt(),
455         encodeBool(), encodeIDBKey() etc.
456
457         No new tests - Low level functions covered by existing layout tests and also covered by Chromium
458         webkit_unit_tests IDBLevelIDBCodingTest.* which validates the sizes of buffers returned by encodeVarInt.
459
460         * Modules/indexeddb/IDBLevelDBCoding.cpp:
461         (WebCore::IDBLevelDBCoding::encodeInt):
462         (WebCore::IDBLevelDBCoding::encodeVarInt):
463         (WebCore::IDBLevelDBCoding::encodeString):
464
465 2012-07-30  Huang Dongsung  <luxtella@company100.net>
466
467         [Texmap] Remove the backing store after 'style.visibility' for an element sets 'hidden'.
468         https://bugs.webkit.org/show_bug.cgi?id=92492
469
470         Reviewed by Noam Rosenthal.
471
472         This patch's purpose is to save vram memory.
473         When visibility of the element sets hidden, we do not need to draw the element,
474         so we do not need to keep a texture of the backing store.
475         Currently, Texmap does not draw the element with visibility:hidden because
476         RenderLayerBacking::paintIntoLayer does not draw anything.
477         This patch just removes unused textures.
478
479         No new tests - no new testable functionality.
480
481         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
482         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
483         (WebCore):
484         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
485         (GraphicsLayerTextureMapper):
486         * platform/graphics/texmap/TextureMapperLayer.cpp:
487         (WebCore::TextureMapperLayer::updateBackingStore):
488         (WebCore::TextureMapperLayer::paintSelf):
489         (WebCore::TextureMapperLayer::isVisible):
490         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
491         * platform/graphics/texmap/TextureMapperLayer.h:
492         (State):
493         (WebCore::TextureMapperLayer::State::State):
494
495 2012-07-30  Keishi Hattori  <keishi@webkit.org>
496
497         Implement datalist UI for input type color for Chromium
498         https://bugs.webkit.org/show_bug.cgi?id=92075
499
500         Reviewed by Kent Tamura.
501
502         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
503
504         * rendering/RenderThemeChromiumCommon.cpp:
505         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
506
507 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
508
509         Unreviewed, rolling out r124171.
510         http://trac.webkit.org/changeset/124171
511         https://bugs.webkit.org/show_bug.cgi?id=92712
512
513         Start failing fast/css/square-button-appearance.html
514         (Requested by yosin on #webkit).
515
516         * css/SelectorChecker.cpp:
517         (WebCore::SelectorChecker::checkOneSelector):
518         * dom/Element.cpp:
519         * dom/Element.h:
520         (Element):
521         (WebCore::Element::isReadOnlyFormControl):
522         * html/HTMLFormControlElement.h:
523         (WebCore::HTMLFormControlElement::isReadOnlyFormControl):
524         * html/shadow/SliderThumbElement.cpp:
525         (WebCore::SliderThumbElement::isReadOnlyFormControl):
526         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
527         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
528         * html/shadow/SliderThumbElement.h:
529         (SliderThumbElement):
530         * html/shadow/TextControlInnerElements.cpp:
531         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
532         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
533         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
534         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
535         * html/shadow/TextControlInnerElements.h:
536         (WebCore::SpinButtonElement::isReadOnlyFormControl):
537         * rendering/RenderTheme.cpp:
538         (WebCore::RenderTheme::isReadOnlyControl):
539
540 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
541
542         [CSS] Change Element::isReadOnlyFormControl to shouldMatchReadWriteSelector or HTMLTextFormControlElement::readOnly
543         https://bugs.webkit.org/show_bug.cgi?id=92602
544
545         Reviewed by Kent Tamura.
546
547         This patch renames Element::isReadOnlyFormControl() to Element::shouldMatchReadWriteSelector()
548         or HTMLTextFormControlElement::readOnly() to make intention of
549         shouldMatchReadWriteSelector(was isReadOnlyFormControl) self descriptive.
550
551         No new tests. This patch doesn't change behavior.
552
553         * css/SelectorChecker.cpp:
554         (WebCore::SelectorChecker::checkOneSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
555         * dom/Element.cpp:
556         (WebCore::Element::shouldMatchReadWriteSelector): Added default implementation.
557         * dom/Element.h:
558         (WebCore::Element::shouldMatchReadWriteSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
559         * html/HTMLFormControlElement.h:
560         * html/shadow/SliderThumbElement.cpp:
561         (WebCore::SliderThumbElement::shouldMatchReadWriteSelector): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
562         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
563         (WebCore::SliderThumbElement::willRespondToMouseClickEvents): ditto.
564         * html/shadow/SliderThumbElement.h:
565         (SliderThumbElement): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
566         * html/shadow/TextControlInnerElements.cpp:
567         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
568         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
569         (WebCore::SpinButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
570         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
571         * html/shadow/TextControlInnerElements.h:
572         * rendering/RenderTheme.cpp:
573         (WebCore::RenderTheme::isReadOnlyControl): Replaced isReadOnlyFormControl() by shouldMatchReadWriteSelector().
574
575 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
576
577         Remove overflow: scroll handling in block flow layout methods
578         https://bugs.webkit.org/show_bug.cgi?id=92689
579
580         Reviewed by Simon Fraser.
581
582         The overflow: scroll scrollbars creation was done at layout time for all RenderBlocks and
583         descendants. This was not only wrong ('overflow' only changes at style change time) but it
584         was also introducing some code duplication.
585
586         The gist of this change is to share the code by moving it to RenderLayer::updateScrollbarsAfterStyleChange,
587         this includes the code from bug 69993 to special case list box part.
588
589         Covered by existing tests:
590         - All fast/overflow ones.
591         - For the list box change:
592             fast/forms/select-overflow-scroll-inherited.html
593             fast/forms/select-overflow-scroll.html
594         - For the flexbox:
595             css3/flexbox/preferred-widths-orthogonal.html
596             css3/flexbox/preferred-widths.html
597
598         * rendering/RenderBlock.cpp:
599         (WebCore::RenderBlock::layoutBlock):
600         * rendering/RenderDeprecatedFlexibleBox.cpp:
601         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
602         * rendering/RenderGrid.cpp:
603         (WebCore::RenderGrid::layoutBlock):
604         * rendering/RenderFlexibleBox.cpp:
605         (WebCore::RenderFlexibleBox::layoutBlock):
606         Removed the common code here.
607
608         * rendering/RenderFlexibleBox.cpp:
609         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
610         Changed to an ASSERT now that the right scrollbars are created. This is
611         fine as overflow-x/y are physical coordinates and our access was following that.
612
613         * rendering/RenderLayer.cpp:
614         (WebCore::RenderLayer::invalidateScrollbarRect):
615         Added an early return here if we are not attached yet as RenderLayer::styleChanged
616         is called at attachment time before we are inserted in the tree. This is fine as the
617         scrollbars are part of the object which will be painted after the first layout.
618
619         (WebCore::overflowRequiresAScrollbar):
620         (WebCore::overflowDefinesAutomaticScrollbar):
621         Split the logic in those 2 functions.
622
623         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
624         Updated to use the require / can-have functions. Also added
625         an early return for list box parts as required by bug 69993.
626
627         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
628         Added an early return for list box parts as required by bug 69993,
629         also removed some unneeded NULL-checks that were added for list box parts.
630
631 2012-07-30  Vivek Galatage  <vivekgalatage@gmail.com>
632
633         fillWithEmptyClients method should also initialize chromeClient with EmptyChromeClient
634         https://bugs.webkit.org/show_bug.cgi?id=92703
635
636         Reviewed by Kent Tamura.
637
638         fillWithEmptyClients should also intialize PageClients.chromeClient with EmptyChromeClient 
639         as its required for creating a Empty page and to minimize the exported symbols.
640
641         No new tests as no change in functionality.
642
643         * loader/EmptyClients.cpp:
644         (WebCore::fillWithEmptyClients):
645
646 2012-07-30  Adrienne Walker  <enne@google.com>
647
648         [chromium] Wrap ScrollbarLayerChromium in WebScrollbarLayer
649         https://bugs.webkit.org/show_bug.cgi?id=91032
650
651         Reviewed by James Robinson.
652
653         Modify ScrollingCoordinatorChromium to operate on WebScrollbarLayer
654         instead of ScrollbarLayerChromium. This removes the dependency on
655         ScrollbarLayerChromium.
656
657         No change in functionality, so no new tests.
658
659         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
660         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
661         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
662         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
663         (ScrollingCoordinatorPrivate):
664         (WebCore::createScrollbarLayer):
665
666 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
667
668         Another Qt build fix attempt after r124098.
669         "interface" is a keyword. Don't use it. 
670
671         * dom/GestureEvent.cpp:
672         (WebCore::GestureEvent::interfaceName):
673
674 2012-07-30  Elliott Sprehn  <esprehn@gmail.com>
675
676         Make QuotesData use a Vector of pairs
677         https://bugs.webkit.org/show_bug.cgi?id=92448
678
679         Reviewed by Julien Chaffraix.
680
681         QuotesData::create returned an array of memory that contained in place instantiations
682         of a QuotesData and then String instances. This changes the code to use a Vector of
683         pairs making it safer and ensuring that quotes are always balanced. This also uses a
684         HashMap directly in the QuoteRenderer instead of building it on first access reducing
685         the amount of code needed for picking quotes by language.
686
687         Test: fast/css-generated-content/close-quote-negative-depth.html
688
689         * css/StyleResolver.cpp:
690         (WebCore::StyleResolver::collectMatchingRulesForList): Create pairs and use the new QuotesData API.
691         * rendering/RenderQuote.cpp:
692         (WebCore):
693         (WebCore::quotesDataLanguageMap): New function that returns the HashMap of languages.
694         (WebCore::basicQuotesData): Returns the simple form of quotes, " and '.
695         (WebCore::defaultQuotes): Changed to use the new map.
696         (WebCore::RenderQuote::styleDidChange):
697         (WebCore::RenderQuote::originalText): Changed to use the new getOpenQuote and getCloseQuote which ensure bounds checks.
698         * rendering/style/QuotesData.cpp:
699         (WebCore::QuotesData::create): Now returns a plain instance of QuotesData without the in place allocation.
700         (WebCore):
701         (WebCore::QuotesData::addPair): Adds an std::pair of strings ensuring quotes are always balanced.
702         (WebCore::QuotesData::getOpenQuote):
703         (WebCore::QuotesData::getCloseQuote):
704         (WebCore::QuotesData::equals): Renamed equals (added the s).
705         * rendering/style/QuotesData.h:
706         (WebCore::QuotesData::create):
707         (QuotesData):
708         (WebCore::QuotesData::QuotesData):
709         * rendering/style/RenderStyle.cpp:
710         (WebCore::RenderStyle::setQuotes):
711         * rendering/style/StyleRareInheritedData.cpp:
712         (WebCore::StyleRareInheritedData::operator==):
713
714 2012-07-30  MORITA Hajime  <morrita@google.com>
715
716         Node::replaceChild() can create bad DOM topology with MutationEvent
717         https://bugs.webkit.org/show_bug.cgi?id=92619
718
719         Reviewed by Ryosuke Niwa.
720
721         Node::replaceChild() calls insertBeforeCommon() after dispatching
722         a MutationEvent event for removeChild(). But insertBeforeCommon()
723         expects call sites to check the invariant and doesn't have
724         suffient check. So a MutationEvent handler can let some bad tree
725         topology to slip into insertBeforeCommon().
726
727         This change adds a guard for checking the invariant using
728         checkReplaceChild() between removeChild() and insertBeforeCommon().
729
730         Test: fast/events/mutation-during-replace-child.html
731
732         * dom/ContainerNode.cpp:
733         (WebCore::ContainerNode::replaceChild): Added a guard.
734
735 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
736
737         Qt Windows build fix attempt after r124098.
738
739         * dom/GestureEvent.cpp:
740
741 2012-07-30  Wei James  <james.wei@intel.com>
742
743         [Chromium] Enable web audio IPP for x86 chromium android
744         https://bugs.webkit.org/show_bug.cgi?id=91973
745
746         Reviewed by Tony Chang.
747
748         Include the IPP libraries at link-time for Android builds when
749         compiling the Web Audio API with IPP support.
750
751         * WebCore.gyp/WebCore.gyp:
752
753 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
754
755         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
756         https://bugs.webkit.org/show_bug.cgi?id=92612
757
758         Reviewed by Kent Tamura.
759
760         This patch replaces Element::isReadOnlyFormControl() not related to
761         CSS selector matching to HTMLFormControlElement::readOnly() for
762         preparation of introducing Element::shouldMatchReadWriteSelector(), bug 92602.
763
764         No new tests. This patch doesn't change behavior.
765
766         * html/shadow/SliderThumbElement.cpp:
767         (WebCore::SliderThumbElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
768         * html/shadow/TextControlInnerElements.cpp:
769         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
770         (WebCore::SpinButtonElement::defaultEventHandler): ditto.
771         (WebCore::SpinButtonElement::step): ditto.
772         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): ditto.
773         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto.
774         * rendering/RenderTextControl.cpp:
775         (updateUserModifyProperty): Changed isReadOnlyFormControl() to readOnly().
776         * rendering/RenderThemeMac.mm:
777         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Changed isReadOnlyFormControl() to readOnly().
778
779 2012-07-30  Eric Seidel  <eric@webkit.org>
780
781         Grid Demo spends 1.5% of total time allocating Path objects in RenderBoxModelObject::paintBorderSides
782         https://bugs.webkit.org/show_bug.cgi?id=92252
783
784         Reviewed by Simon Fraser.
785
786         This change introduces the concept of a "null Path" very similar to a null WTF::String.
787         Just like String functions as a RefPtr around a StringImpl, Path (for most ports)
788         functions as an OwnPtr around a PlatformPathPtr.
789
790         In various places in the code, we declare a local Path variable, but don't necessarily
791         use that Path variable in all code paths, or might pass that Path variable along to GraphicsContext
792         functions, without ever actually adding points to that Path.
793         On most platforms, this Path default constructor was causing a malloc!
794         In some of these case, the code-path in question (like paintBorderSides) can be quite hot.
795         Introducing this null-Path and delaying instantiation of the PlatformPath object
796         until it's actually needed, saves a malloc for these hot paths.
797
798         To test this, I loaded a few popular pages, and added printfs to both the Path constructor
799         and destructor, logging during construction and destruction when the path was still null at destruction time.
800
801         This simple testing showed this to be a small win (avoiding mallocs) on many sites and a huge win for Google Spreadsheets:
802         apple.com: 147 Paths created, 9 (6%) destroyed null.
803         google.com: 58 Paths created, 26 (44%) destroyed null (google seems creating 5 paths every second after load?  1 of which is destroyed empty.)
804         amazon.com: 130 Paths created, 130 (100%) destroyed null.
805         Loading an empty spreadsheet from drive.google.com: 5237 created, 4861 destroyed null (92%!) :)
806
807         * platform/graphics/Path.h:
808         (Path):
809         (WebCore::Path::isNull):
810         (WebCore::Path::ensurePlatformPath):
811         * platform/graphics/cairo/CairoUtilities.cpp:
812         (WebCore::appendWebCorePathToCairoContext):
813         * platform/graphics/cairo/GraphicsContextCairo.cpp:
814         (WebCore::GraphicsContext::fillPath):
815         (WebCore::GraphicsContext::strokePath):
816         (WebCore::GraphicsContext::clipPath):
817         (WebCore::GraphicsContext::clip):
818         * platform/graphics/cairo/PathCairo.cpp:
819         (WebCore::Path::Path):
820         (WebCore::Path::~Path):
821         (WebCore::Path::ensurePlatformPath):
822         (WebCore):
823         (WebCore::Path::operator=):
824         (WebCore::Path::clear):
825         (WebCore::Path::isEmpty):
826         (WebCore::Path::currentPoint):
827         (WebCore::Path::translate):
828         (WebCore::Path::moveTo):
829         (WebCore::Path::addLineTo):
830         (WebCore::Path::addRect):
831         (WebCore::Path::addQuadCurveTo):
832         (WebCore::Path::addBezierCurveTo):
833         (WebCore::Path::addArc):
834         (WebCore::Path::addArcTo):
835         (WebCore::Path::addEllipse):
836         (WebCore::Path::closeSubpath):
837         (WebCore::Path::boundingRect):
838         (WebCore::Path::strokeBoundingRect):
839         (WebCore::Path::contains):
840         (WebCore::Path::strokeContains):
841         (WebCore::Path::apply):
842         (WebCore::Path::transform):
843         * platform/graphics/cg/GraphicsContextCG.cpp:
844         (WebCore::GraphicsContext::drawPath):
845         (WebCore::GraphicsContext::fillPath):
846         (WebCore::GraphicsContext::strokePath):
847         (WebCore::GraphicsContext::clipPath):
848         (WebCore::GraphicsContext::clipOut):
849         * platform/graphics/cg/PathCG.cpp:
850         (WebCore::Path::Path):
851         (WebCore::Path::~Path):
852         (WebCore):
853         (WebCore::Path::ensurePlatformPath):
854         (WebCore::Path::operator=):
855         (WebCore::Path::contains):
856         (WebCore::Path::strokeContains):
857         (WebCore::Path::translate):
858         (WebCore::Path::boundingRect):
859         (WebCore::Path::fastBoundingRect):
860         (WebCore::Path::strokeBoundingRect):
861         (WebCore::Path::moveTo):
862         (WebCore::Path::addLineTo):
863         (WebCore::Path::addQuadCurveTo):
864         (WebCore::Path::addBezierCurveTo):
865         (WebCore::Path::addArcTo):
866         (WebCore::Path::platformAddPathForRoundedRect):
867         (WebCore::Path::closeSubpath):
868         (WebCore::Path::addArc):
869         (WebCore::Path::addRect):
870         (WebCore::Path::addEllipse):
871         (WebCore::Path::clear):
872         (WebCore::Path::isEmpty):
873         (WebCore::Path::currentPoint):
874         (WebCore::Path::apply):
875         * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
876         (WebCore):
877         (WebCore::LoopBlinnPathProcessor::buildContours):
878         * platform/graphics/mac/GraphicsContextMac.mm:
879         (WebCore::GraphicsContext::drawFocusRing):
880         * platform/graphics/openvg/PainterOpenVG.cpp:
881         (WebCore::PainterOpenVG::drawPath):
882         * platform/graphics/skia/GraphicsContextSkia.cpp:
883         (WebCore::GraphicsContext::clip):
884         (WebCore::GraphicsContext::canvasClip):
885         (WebCore::GraphicsContext::clipOut):
886         (WebCore::GraphicsContext::clipPath):
887         (WebCore::GraphicsContext::fillPath):
888         (WebCore::GraphicsContext::strokePath):
889         * platform/graphics/skia/PathSkia.cpp:
890         (WebCore::Path::Path):
891         (WebCore::Path::~Path):
892         (WebCore):
893         (WebCore::Path::ensurePlatformPath):
894         (WebCore::Path::operator=):
895         (WebCore::Path::isEmpty):
896         (WebCore::Path::hasCurrentPoint):
897         (WebCore::Path::currentPoint):
898         (WebCore::Path::contains):
899         (WebCore::Path::translate):
900         (WebCore::Path::boundingRect):
901         (WebCore::Path::moveTo):
902         (WebCore::Path::addLineTo):
903         (WebCore::Path::addQuadCurveTo):
904         (WebCore::Path::addBezierCurveTo):
905         (WebCore::Path::addArcTo):
906         (WebCore::Path::closeSubpath):
907         (WebCore::Path::addArc):
908         (WebCore::Path::addRect):
909         (WebCore::Path::addEllipse):
910         (WebCore::Path::clear):
911         (WebCore::Path::apply):
912         (WebCore::Path::transform):
913         (WebCore::Path::strokeBoundingRect):
914         (WebCore::Path::strokeContains):
915         * platform/graphics/wince/GraphicsContextWinCE.cpp:
916         (WebCore::GraphicsContext::fillPath):
917         (WebCore::GraphicsContext::strokePath):
918         * platform/graphics/wx/GraphicsContextWx.cpp:
919         (WebCore::GraphicsContext::clipPath):
920         (WebCore::GraphicsContext::fillPath):
921         (WebCore::GraphicsContext::strokePath):
922         * platform/graphics/wx/PathWx.cpp:
923         (WebCore::Path::Path):
924         (WebCore::Path::~Path):
925         (WebCore::Path::boundingRect):
926         (WebCore::Path::operator=):
927         (WebCore::Path::ensurePlatformPath):
928         (WebCore):
929         (WebCore::Path::clear):
930         (WebCore::Path::moveTo):
931         (WebCore::Path::addLineTo):
932         (WebCore::Path::addQuadCurveTo):
933         (WebCore::Path::addBezierCurveTo):
934         (WebCore::Path::addArcTo):
935         (WebCore::Path::closeSubpath):
936         (WebCore::Path::addArc):
937         (WebCore::Path::addRect):
938         (WebCore::Path::addEllipse):
939         (WebCore::Path::transform):
940         (WebCore::Path::currentPoint):
941
942 2012-07-30  Dominik Röttsches  <dominik.rottsches@intel.com>
943
944         Avoid Assertion Failure in HarfBuzzRun::characterIndexForXPosition
945         https://bugs.webkit.org/show_bug.cgi?id=92376
946
947         Reviewed by Tony Chang.
948
949         Previously, the if condition in offsetForPosition gating the call to
950         characterIndexForXPosition was comparing a different value than what was actually used
951         as the argument to calling it. In some cases, this can lead to a minuscule difference
952         when comparing the two floats - enough to trigger the assertion. To resolve this,
953         the accuracy of the index calculation is improved by changing the types from int
954         to floats and rephrasing the if condition to be exactly the same as what is checked
955         for in the assertion.
956
957         Manual test ManualTests/harfbuzz-mouse-selection-crash.html added
958         which reliably reproduces the assertion failure before this change.
959
960         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
961         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): Types changed to float.
962         (WebCore::HarfBuzzShaper::offsetForPosition): Types changed to float, if condition rephrased.
963         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
964         (HarfBuzzRun):
965
966 2012-06-29  James Robinson  <jamesr@chromium.org>
967
968         [chromium] Remove WebTransformationMatrix::mapPoint overrides
969         https://bugs.webkit.org/show_bug.cgi?id=90329
970
971         Reviewed by Adrienne Walker.
972
973         Add more functionality for mapping points to CCMathUtil and use it in CCLayerSorter / drawTileQuad. These
974         mappings should never clip.
975
976         * platform/chromium/support/WebTransformationMatrix.cpp:
977         * platform/graphics/chromium/LayerRendererChromium.cpp:
978         (WebCore::LayerRendererChromium::drawTileQuad):
979         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
980         (WebCore::CCLayerSorter::LayerShape::LayerShape):
981         * platform/graphics/chromium/cc/CCMathUtil.cpp:
982         (WebCore::mapHomogeneousPoint):
983         (WebCore::CCMathUtil::mapPoint):
984         (WebCore):
985         * platform/graphics/chromium/cc/CCMathUtil.h:
986         (WebCore::HomogeneousCoordinate::cartesianPoint3d):
987         (HomogeneousCoordinate):
988         (CCMathUtil):
989
990 2012-07-30  Anders Carlsson  <andersca@apple.com>
991
992         Crash in logging code if MIME type is null
993         https://bugs.webkit.org/show_bug.cgi?id=92683
994         <rdar://problem/11985295>
995
996         Reviewed by Dan Bernstein.
997
998         If the MIME type is null, try to figure it out from the URL extension. If this fails, return early instead of crashing
999         trying to insert the null string into a hash set.
1000
1001         * loader/SubframeLoader.cpp:
1002         (WebCore::logPluginRequest):
1003
1004 2012-07-30  Alexis Menard  <alexis.menard@openbossa.org>
1005
1006         Build fix with newer bison 2.6.
1007         https://bugs.webkit.org/show_bug.cgi?id=92264
1008
1009         Reviewed by Adam Barth.
1010
1011         As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html
1012         YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS
1013         version I had access to as well as recent Linux runs at least version 2.3 so it's safe
1014         to use the replacement of these deprecated macros in favor of %lex-param and %parse-param.
1015         As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release
1016         of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore.
1017
1018         No new tests : build fix and the patch should not trigger any regressions
1019
1020         * css/CSSGrammar.y:
1021         * css/CSSParser.cpp:
1022         * xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define.
1023         * xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h
1024         therefore including this file within the namespace {} declarations leads to xpathyyparse being
1025         defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp
1026         (generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs 
1027         to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same.
1028
1029 2012-07-30  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1030
1031         Propagate gesture events to plugins.
1032         https://bugs.webkit.org/show_bug.cgi?id=92281
1033
1034         Reviewed by Adam Barth.
1035
1036         Propagate gesture events to plugins. This change does not expose the gesture events
1037         to JavaScript, since there is no spec for that at the moment. Exposing gesture events
1038         to JavaScript will be done separately, once there is a spec for it.
1039
1040         Test: platform/chromium/plugins/gesture-events.html
1041
1042         * CMakeLists.txt:
1043         * GNUmakefile.list.am:
1044         * Target.pri:
1045         * WebCore.gypi:
1046         * WebCore.xcodeproj/project.pbxproj:
1047         * dom/EventNames.h:
1048         (WebCore):
1049         (WebCore::EventNames::isGestureEventType):
1050         (EventNames):
1051         * dom/GestureEvent.cpp: Added.
1052         (WebCore):
1053         (WebCore::GestureEvent::create):
1054         (WebCore::GestureEvent::initGestureEvent):
1055         (WebCore::GestureEvent::interfaceName):
1056         (WebCore::GestureEvent::GestureEvent):
1057         (WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
1058         (WebCore::GestureEventDispatchMediator::event):
1059         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1060         * dom/GestureEvent.h: Added.
1061         (WebCore):
1062         (GestureEvent):
1063         (WebCore::GestureEvent::~GestureEvent):
1064         (WebCore::GestureEvent::deltaX):
1065         (WebCore::GestureEvent::deltaY):
1066         (WebCore::GestureEvent::GestureEvent):
1067         (GestureEventDispatchMediator):
1068         (WebCore::GestureEventDispatchMediator::create):
1069         * dom/Node.cpp:
1070         (WebCore):
1071         (WebCore::Node::dispatchGestureEvent):
1072         * dom/Node.h:
1073         (WebCore):
1074         (Node):
1075         * page/EventHandler.cpp:
1076         (WebCore::EventHandler::clear):
1077         (WebCore::EventHandler::handleGestureEvent):
1078         * page/EventHandler.h:
1079
1080 2012-07-30  John Bates  <jbates@google.com>
1081
1082         Plumb vsync-enabled flag up to compositor thread and support disable-vsync
1083         https://bugs.webkit.org/show_bug.cgi?id=92323
1084
1085         Reviewed by James Robinson.
1086
1087         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
1088         (WebCore::CCFrameRateController::CCFrameRateController):
1089         (WebCore::CCFrameRateController::disableTimeSourceThrottling):
1090         (WebCore):
1091         (WebCore::CCFrameRateController::setActive):
1092         (WebCore::CCFrameRateController::postManualTick):
1093         (WebCore::CCFrameRateController::onTimerFired):
1094         (WebCore::CCFrameRateController::didBeginFrame):
1095         (WebCore::CCFrameRateController::didFinishFrame):
1096         * platform/graphics/chromium/cc/CCFrameRateController.h:
1097         (WebCore):
1098         (CCFrameRateController):
1099         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1100         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
1101         (CCLayerTreeSettings):
1102         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1103         (WebCore::CCThreadProxy::CCThreadProxy):
1104         (WebCore::CCThreadProxy::initializeImplOnImplThread):
1105         * platform/graphics/chromium/cc/CCThreadProxy.h:
1106         (CCThreadProxy):
1107
1108 2012-07-30  James Robinson  <jamesr@chromium.org>
1109
1110         [chromium] Add miscellaneous missing includes and OVERRIDE declarations in compositor code
1111         https://bugs.webkit.org/show_bug.cgi?id=92680
1112
1113         Reviewed by Adrienne Walker.
1114
1115         * platform/graphics/chromium/TextureCopier.h:
1116         (AcceleratedTextureCopier):
1117         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1118         (CCLayerTreeHostImpl):
1119         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
1120         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
1121         * platform/graphics/chromium/cc/CCResourceProvider.h:
1122         (WebCore):
1123
1124 2012-07-30  Adrienne Walker  <enne@google.com>
1125
1126         [chromium] Remove dependency on ScrollbarTheme from the compositor
1127         https://bugs.webkit.org/show_bug.cgi?id=90528
1128
1129         Reviewed by James Robinson.
1130
1131         Tested by existing layout tests.
1132
1133         ScrollbarLayerChromium is modified to use the Platform API for
1134         WebScrollbar, WebScrollbarThemePainter, and WebScrollbarThemeGeometry.
1135         This prevents API dependencies from the compositor code into WebCore
1136         scrollbar and theme code.
1137
1138         CCScrollbarLayerImpl::CCScrollbar now implements the WebScrollbar API
1139         instead of the ScrollbarThemeClient API.
1140
1141         Also, CCScrollbarLayerImpl now no longer gets the theme from a static
1142         accessor. It now gets a "copy" of the theme from the main thread via
1143         WebScrollbarThemeGeometry, which is more correct for render theme
1144         scrollbars which were previously using the native theme to get part
1145         geometry. Using the correct theme unfortunately causes crashes due to
1146         bad casts in RenderScrollbarTheme, so this patch turns back off the
1147         use of ScrollbarLayerChromium for themed scrollbars until that can be
1148         resolved.
1149
1150         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1151         (WebCore::createScrollbarLayer):
1152         * platform/ScrollbarThemeClient.h:
1153         (ScrollbarThemeClient):
1154         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1155         (WebCore::ScrollbarLayerChromium::create):
1156         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
1157         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
1158         (WebCore::ScrollbarBackgroundPainter::create):
1159         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
1160         (ScrollbarBackgroundPainter):
1161         (WebCore::ScrollbarThumbPainter::create):
1162         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
1163         (ScrollbarThumbPainter):
1164         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
1165         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
1166         (WebCore::ScrollbarLayerChromium::update):
1167         * platform/graphics/chromium/ScrollbarLayerChromium.h:
1168         (ScrollbarLayerChromium):
1169         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1170         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
1171         (WebCore::CCScrollbarLayerImpl::setScrollbarData):
1172         (WebCore::toUVRect):
1173         (WebCore::CCScrollbarLayerImpl::appendQuads):
1174         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isOverlay):
1175         (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
1176         (WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
1177         (WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
1178         (WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
1179         (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
1180         (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
1181         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
1182         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
1183         (WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
1184         (WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
1185         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
1186         (WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
1187         (WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
1188         (WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
1189         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
1190         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1191         (CCScrollbarLayerImpl):
1192         (CCScrollbar):
1193
1194 2012-07-30  Andreas Kling  <kling@webkit.org>
1195
1196         REGRESSION(r123636): Heap-use-after-free in StyleResolver::collectMatchingRules.
1197         <http://webkit.org/b/92430>
1198
1199         Reviewed by Antti Koivisto.
1200
1201         Don't hold on to a reference to StyledElement::classNames() as that may become
1202         invalid after mutating the element's attribute data.
1203
1204         In this case it was happening below Element::hasAttributes() which is unfortunately
1205         naive enough to always serialize lazy attributes. That is a minor inefficiency that
1206         can be addressed in a separate patch.
1207
1208         Covered by valgrind on existing tests.
1209
1210         * css/StyleResolver.cpp:
1211         (WebCore::StyleResolver::collectMatchingRules):
1212
1213 2012-07-30  James Robinson  <jamesr@chromium.org>
1214
1215         [chromium] CCThreadTask should not depend on CrossThreadTask and does not need to depend on CrossThreadCopier
1216         https://bugs.webkit.org/show_bug.cgi?id=90132
1217
1218         Reviewed by David Levin.
1219
1220         CrossThreadTask is defined in WebCore/dom/ and depends on concepts like ScriptExecutionConcept. CCThreadTask,
1221         being in WebCore/platform/, should not depend on /dom/ or anything from that layer.
1222
1223         CrossThreadCopier is not a layering violation per se, but it's also not at all helpful for CCThreadTask - we
1224         never use any types for which it would be useful.
1225
1226         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1227         (WebCore::CCThreadProxy::compositeAndReadback):
1228         (WebCore::CCThreadProxy::finishAllRendering):
1229         (WebCore::CCThreadProxy::initializeContext):
1230         (WebCore::CCThreadProxy::setVisible):
1231         (WebCore::CCThreadProxy::initializeLayerRenderer):
1232         (WebCore::CCThreadProxy::recreateContext):
1233         (WebCore::CCThreadProxy::implSideRenderingStats):
1234         (WebCore::CCThreadProxy::start):
1235         (WebCore::CCThreadProxy::stop):
1236         (WebCore::CCThreadProxy::forceSerializeOnSwapBuffers):
1237         (WebCore::CCThreadProxy::beginFrame):
1238         (WebCore::CCThreadProxy::acquireLayerTextures):
1239         * platform/graphics/chromium/cc/CCThreadTask.h:
1240         (CCThreadTask1):
1241         (WebCore::CCThreadTask1::create):
1242         (WebCore::CCThreadTask1::CCThreadTask1):
1243         (CCThreadTask2):
1244         (WebCore::CCThreadTask2::create):
1245         (WebCore::CCThreadTask2::CCThreadTask2):
1246         (CCThreadTask3):
1247         (WebCore::CCThreadTask3::create):
1248         (WebCore::CCThreadTask3::CCThreadTask3):
1249         (CCThreadTask4):
1250         (WebCore::CCThreadTask4::create):
1251         (WebCore::CCThreadTask4::CCThreadTask4):
1252         (CCThreadTask5):
1253         (WebCore::CCThreadTask5::create):
1254         (WebCore::CCThreadTask5::CCThreadTask5):
1255         (WebCore::createCCThreadTask):
1256
1257 2012-07-30  Paul Irish  <paul.irish@gmail.com>
1258
1259         Web Inspector: Rename Databases to Web SQL
1260         https://bugs.webkit.org/show_bug.cgi?id=92646
1261
1262         Reviewed by Pavel Feldman.
1263
1264         Renamed Databases to Web SQL. Drive-by fix for EmptyView
1265         selection.
1266
1267         * English.lproj/localizedStrings.js:
1268         * inspector/front-end/EmptyView.js:
1269         * inspector/front-end/ResourcesPanel.js:
1270
1271 2012-07-30  Tony Chang  <tony@chromium.org>
1272
1273         new flexbox should ignore float set on flexitems
1274         https://bugs.webkit.org/show_bug.cgi?id=70792
1275
1276         Reviewed by Ojan Vafai.
1277
1278         Force flex items to not float.
1279
1280         Test: css3/flexbox/floated-flexitem.html
1281
1282         * css/StyleResolver.cpp:
1283         (WebCore::StyleResolver::adjustRenderStyle): Force NoFloat on flex items.
1284
1285 2012-07-30  Adrienne Walker  <enne@google.com>
1286
1287         [chromium] Turn back on ScrollbarLayerChromium for Windows
1288         https://bugs.webkit.org/show_bug.cgi?id=92409
1289
1290         Reviewed by James Robinson.
1291
1292         This reverts r122791. As GDI issues were addressed in Chromium via
1293         http://src.chromium.org/viewvc/chrome?view=rev&revision=148215,
1294         scrollbar parts can now be composited on the thread.
1295
1296         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1297         (WebCore::createScrollbarLayer):
1298
1299 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1300
1301         Unreviewed, rolling out r124025.
1302         http://trac.webkit.org/changeset/124025
1303         https://bugs.webkit.org/show_bug.cgi?id=92658
1304
1305         Causes color-suggestion-picker-appearance layout test to time
1306         out on all Chromium platforms (Requested by tomhudson_ on
1307         #webkit).
1308
1309         * rendering/RenderThemeChromiumCommon.cpp:
1310         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
1311
1312 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1313
1314         Unreviewed, rolling out r123966 and r123967.
1315         http://trac.webkit.org/changeset/123966
1316         http://trac.webkit.org/changeset/123967
1317         https://bugs.webkit.org/show_bug.cgi?id=92656
1318
1319         This patch is causing assertion failures on the debug bot
1320         (also rolling out a dependent patch) (Requested by mrobinson
1321         on #webkit).
1322
1323         * GNUmakefile.am:
1324         * GNUmakefile.list.am:
1325         * platform/text/gtk/TextCheckerEnchant.cpp: Removed.
1326         * platform/text/gtk/TextCheckerEnchant.h: Removed.
1327
1328 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
1329
1330         ASSERTION FAILED: !rect.isEmpty()  : void WebCore::GraphicsContext::drawRect(const WebCore::IntRect &)
1331         https://bugs.webkit.org/show_bug.cgi?id=92187
1332
1333         Reviewed by Simon Fraser.
1334
1335         The border painting logic (RenderBoxModelObject::paintOneBorderSide) would pass a rect with a 0px length
1336         to RenderObject::drawLineForBoxSide. We do check the width (thickness) but not the length so we would pass
1337         the rect to GraphicsContext and hit the ASSERT. This change adds a check for the length too as it is the safest
1338         way, it means that we may still do unneeded operations before bailing out but that's an existing problem in the code.
1339
1340         Tests: fast/borders/0px-borders-no-line-height.html
1341                fast/borders/double-1px-border-assert.html
1342
1343         * rendering/RenderObject.cpp:
1344         (WebCore::RenderObject::drawLineForBoxSide):
1345         Added a 0px length check. While renaming confusing variables and re-using others,
1346         I also found a potential empty border that I fixed (tested by the 2nd case above).
1347
1348 2012-07-26  Stephen White  <senorblanco@chromium.org>
1349
1350         [chromium] Refactor the computation of resampled bitmap size in
1351         drawImage and drawPattern.
1352         https://bugs.webkit.org/show_bug.cgi?id=92408
1353
1354         Reviewed by Adrienne Walker.
1355
1356         We used to have a special-purpose function called TransformDimensions()
1357         which did pretty much the same thing as SkRect::mapRect() does.  This
1358         change unifies the drawPattern code to use mapRect() in the same way
1359         that drawImage() does.
1360
1361         Covered by existing tests, e.g., fast/backgrounds/size/*.
1362
1363         * platform/graphics/skia/ImageSkia.cpp:
1364         (WebCore):
1365         (WebCore::Image::drawPattern):
1366         Note:  we're now doing using the original (float) source rect, and
1367         converting to int only after applying the matrix transform.  This
1368         might result in different decisions about resampling mode, but it's
1369         more correct anyway.
1370
1371 2012-07-30  Vineet Chaudhary  <rgf748@motorola.com>
1372
1373         https://bugs.webkit.org/show_bug.cgi?id=92642
1374         [Bindings]Remove custom JS/V8 bindings for WebSocket::close() using [Clamp]
1375
1376         Reviewed by Kentaro Hara.
1377
1378         With support of [Clamp] as extended attribute we can replace custom bindings from WebSocket::close().
1379         Spec for WebSocket::close() : http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket
1380
1381         No new tests. There should be no behavioural changes 
1382         Existing tests under http/websocket/tests/hybi/ should cover this.
1383
1384         * Modules/websockets/WebSocket.h:
1385         (WebCore::WebSocket::close):
1386         * Modules/websockets/WebSocket.idl: Used [Clamp].
1387         * bindings/js/JSWebSocketCustom.cpp: Removed custom call close().
1388         (WebCore):
1389         * bindings/scripts/CodeGeneratorJS.pm:
1390         (GenerateParametersCheck):
1391         * bindings/scripts/CodeGeneratorV8.pm:
1392         (GenerateParametersCheck):
1393         * bindings/scripts/test/JS/JSTestObj.cpp:
1394         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1395         * bindings/scripts/test/V8/V8TestObj.cpp:
1396         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1397         * bindings/v8/custom/V8WebSocketCustom.cpp: Removed custom call close().
1398         (WebCore):
1399
1400 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
1401
1402         Web Inspector: Resource agent's reference to cached resources should be weak.
1403         https://bugs.webkit.org/show_bug.cgi?id=92108
1404
1405         Reviewed by Pavel Feldman.
1406
1407         NetworkResourcesData now stores a raw pointer to CachedResource.
1408         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
1409         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
1410         Destroyed resources content is saved to NetworkResourcesData.
1411
1412         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
1413                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
1414
1415         * WebCore.exp.in:
1416         * inspector/InspectorController.cpp:
1417         (WebCore::InspectorController::InspectorController):
1418         (WebCore::InspectorController::inspectedPageDestroyed):
1419         * inspector/InspectorInstrumentation.cpp:
1420         (WebCore):
1421         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
1422         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
1423         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
1424         * inspector/InspectorInstrumentation.h:
1425         (InspectorInstrumentation):
1426         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
1427         (WebCore):
1428         * inspector/InspectorResourceAgent.cpp:
1429         (WebCore::InspectorResourceAgent::didReceiveData):
1430         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
1431         (WebCore):
1432         (WebCore::InspectorResourceAgent::getResponseBody):
1433         * inspector/InspectorResourceAgent.h:
1434         (InspectorResourceAgent):
1435         * inspector/NetworkResourcesData.cpp:
1436         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1437         (WebCore::NetworkResourcesData::ResourceData::setContent):
1438         (WebCore::NetworkResourcesData::setResourceContent):
1439         (WebCore::NetworkResourcesData::removeCachedResource):
1440         (WebCore):
1441         * inspector/NetworkResourcesData.h:
1442         (ResourceData):
1443         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
1444         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1445         (NetworkResourcesData):
1446         * loader/cache/CachedResource.cpp:
1447         (WebCore::CachedResource::~CachedResource):
1448         (WebCore::CachedResource::removeClient):
1449         (WebCore::CachedResource::deleteIfPossible):
1450         (WebCore):
1451         * loader/cache/CachedResource.h:
1452         (CachedResource):
1453         * loader/cache/CachedResourceLoader.cpp:
1454         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1455         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
1456         (WebCore::CachedResourceLoader::clearPreloads):
1457         * loader/cache/CachedResourceLoader.h:
1458         (CachedResourceLoader):
1459         * loader/cache/MemoryCache.cpp:
1460         (WebCore::MemoryCache::evict):
1461         * testing/InternalSettings.cpp:
1462         * testing/Internals.cpp:
1463         (WebCore::Internals::garbageCollectDocumentResources):
1464         (WebCore):
1465         * testing/Internals.h:
1466         (Internals):
1467         * testing/Internals.idl:
1468
1469 2012-07-30  Shinya Kawanaka  <shinyak@chromium.org>
1470
1471         Prohibit having AuthorShadowDOM of input or textarea element for a while and having a flag to enable it in Internals.
1472         https://bugs.webkit.org/show_bug.cgi?id=92611
1473
1474         Reviewed by Hajime Morita.
1475
1476         Prohibit having AuthorShadowDOM of input elemnet unless a flag in RuntimeEnabledFeatures is not enabled.
1477         The flag can be enabled in Internals.
1478
1479         The elements in UserAgentShadowDOM of input element assume that they have a renderer when the input
1480         element has a renderer. However, this does not hold when AuthorShadowDOM is added to input element.
1481         So until we fix the issue, we should disable to have AuthorShadowDOM for input element, because it may
1482         cause crashes and security problems.
1483
1484         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
1485                fast/dom/shadow/input-with-validation.html
1486                fast/dom/shadow/shadow-disable.html
1487
1488         * bindings/generic/RuntimeEnabledFeatures.cpp:
1489         (WebCore):
1490         * bindings/generic/RuntimeEnabledFeatures.h:
1491         (RuntimeEnabledFeatures):
1492         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
1493         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
1494         * dom/ShadowRoot.cpp:
1495         (WebCore::allowsAuthorShadowRoot): The input element or textarea element does not allow to have a ShadowDOM unless
1496         is a flag in RuntimeEnabledFeatures is not enabled.
1497         * html/HTMLInputElement.h:
1498         (WebCore::isHTMLInputElement):
1499         (WebCore):
1500         * html/HTMLTextAreaElement.h:
1501         (WebCore::isHTMLTextAreaElement):
1502         (WebCore):
1503         * testing/Internals.cpp:
1504         (WebCore::Internals::setAuthorShadowDOMForAnyElementEnabled):
1505         (WebCore):
1506         * testing/Internals.h:
1507         (Internals):
1508         * testing/Internals.idl:
1509
1510 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
1511
1512         Web Inspector: support --line-numbers mapping for SASS
1513         https://bugs.webkit.org/show_bug.cgi?id=92400
1514
1515         Reviewed by Vsevolod Vlasov.
1516
1517         There is --debug-info and --line-numbers ways of referencing the source scss file, adding support for --line-numbers here.
1518
1519         * inspector/front-end/SASSSourceMapping.js:
1520         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
1521         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
1522         (_bindUISourceCode):
1523
1524 2012-07-30  Keishi Hattori  <keishi@webkit.org>
1525
1526         Implement datalist UI for input type color for Chromium
1527         https://bugs.webkit.org/show_bug.cgi?id=92075
1528
1529         Reviewed by Kent Tamura.
1530
1531         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
1532
1533         * rendering/RenderThemeChromiumCommon.cpp:
1534         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
1535
1536 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1537
1538         Wheel events on a page with frames are not handled in fixed layout
1539         https://bugs.webkit.org/show_bug.cgi?id=90550
1540
1541         Reviewed by Antonio Gomes.
1542
1543         Based on patch by Andras Becsi.
1544
1545         Frame-rect size is not the right value to check against to see if the document
1546         can be contained within the full visible content rect, since it does not handle
1547         fixedVisibleContentRect. Instead visibleContentRect(true) should be used which
1548         returns the full visible content rect disregarding scrollbars, and which is
1549         the same a frame-rect size when fixedVisibleContentRect is not set.
1550
1551         * platform/ScrollView.cpp:
1552         (WebCore::ScrollView::updateScrollbars):
1553
1554 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1555
1556         There is no way to tell whether an element can be activated or not
1557         https://bugs.webkit.org/show_bug.cgi?id=92093
1558
1559         Reviewed by Antonio Gomes.
1560
1561         This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
1562         functions, named after similar functions in the iOS fork of WebKit.
1563
1564         Touch-adjustment will now use these two functions, which improves accuracy when
1565         targeting shadow-dom elements, and also means touch adjustment will prefer enabled
1566         form-elements over disabled ones.
1567
1568         Test: touchadjustment/disabled-formelements.html
1569
1570         * dom/Node.cpp:
1571         (WebCore::Node::willRespondToMouseMoveEvents):
1572         (WebCore::Node::willRespondToMouseClickEvents):
1573         * dom/Node.h:
1574         (Node):
1575         * editing/DeleteButton.h:
1576         * html/HTMLAnchorElement.cpp:
1577         (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
1578         * html/HTMLAnchorElement.h:
1579         (HTMLAnchorElement):
1580         * html/HTMLButtonElement.cpp:
1581         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
1582         * html/HTMLButtonElement.h:
1583         (HTMLButtonElement):
1584         * html/HTMLInputElement.cpp:
1585         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
1586         * html/HTMLInputElement.h:
1587         (HTMLInputElement):
1588         * html/HTMLLabelElement.cpp:
1589         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
1590         * html/HTMLLabelElement.h:
1591         (HTMLLabelElement):
1592         * html/HTMLMediaElement.cpp:
1593         (WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
1594         * html/HTMLMediaElement.h:
1595         * html/HTMLSummaryElement.cpp:
1596         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
1597         * html/HTMLSummaryElement.h:
1598         (HTMLSummaryElement):
1599         * html/shadow/CalendarPickerElement.cpp:
1600         (WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
1601         * html/shadow/CalendarPickerElement.h:
1602         (CalendarPickerElement):
1603         * html/shadow/MediaControlElements.cpp:
1604         (WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
1605         (WebCore::MediaControlTimelineElement::setPosition):
1606         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
1607         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
1608         * html/shadow/MediaControlElements.h:
1609         (MediaControlTimelineElement):
1610         (MediaControlVolumeSliderElement):
1611         * html/shadow/MediaControlRootElement.h:
1612         * html/shadow/SliderThumbElement.cpp:
1613         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
1614         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
1615         * html/shadow/SliderThumbElement.h:
1616         (SliderThumbElement):
1617         * html/shadow/TextControlInnerElements.cpp:
1618         (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
1619         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1620         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
1621         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
1622         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
1623         * html/shadow/TextControlInnerElements.h:
1624         (SearchFieldResultsButtonElement):
1625         (SearchFieldCancelButtonElement):
1626         (SpinButtonElement):
1627         * html/shadow/TextFieldDecorationElement.cpp:
1628         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
1629         * html/shadow/TextFieldDecorationElement.h:
1630         (TextFieldDecorationElement):
1631         * page/TouchAdjustment.cpp:
1632         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
1633
1634 2012-07-30  Vsevolod Vlasov  <vsevik@chromium.org>
1635
1636         Web Inspector: Content size variables in NetworkResourcesData should have size_t type instead of int.
1637         https://bugs.webkit.org/show_bug.cgi?id=92618
1638
1639         Reviewed by Yury Semikhatsky.
1640
1641         Changed content size variables type in NetworkResourcesData from int to size_t.
1642         Drive-by: Switched String length calculation to recently added StringImpl's sizeInBytes.
1643
1644         * inspector/NetworkResourcesData.cpp:
1645         (WebCore::NetworkResourcesData::ResourceData::removeContent):
1646         (WebCore::NetworkResourcesData::ResourceData::dataLength):
1647         (WebCore::NetworkResourcesData::ResourceData::appendData):
1648         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
1649         (WebCore::NetworkResourcesData::setResourceContent):
1650         (WebCore::NetworkResourcesData::maybeAddResourceData):
1651         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
1652         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
1653         (WebCore::NetworkResourcesData::ensureFreeSpace):
1654         * inspector/NetworkResourcesData.h:
1655         (ResourceData):
1656         (NetworkResourcesData):
1657
1658 2012-07-30  Hayato Ito  <hayato@chromium.org>
1659
1660         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
1661         https://bugs.webkit.org/show_bug.cgi?id=92625
1662
1663         Reviewed by Hajime Morita.
1664
1665         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
1666
1667         No new tests, no behavior change.
1668
1669         * dom/EventDispatcher.cpp:
1670         (WebCore::EventDispatcher::EventDispatcher):
1671         (WebCore::EventDispatcher::dispatchEvent):
1672         * dom/EventDispatcher.h:
1673         (EventDispatcher):
1674
1675 2012-07-30  Hayato Ito  <hayato@chromium.org>
1676
1677         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
1678         https://bugs.webkit.org/show_bug.cgi?id=92625
1679
1680         Reviewed by Hajime Morita.
1681
1682         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
1683
1684         No new tests, no behavior change.
1685
1686         * dom/EventDispatcher.cpp:
1687         (WebCore::EventDispatcher::EventDispatcher):
1688         (WebCore::EventDispatcher::dispatchEvent):
1689         * dom/EventDispatcher.h:
1690         (EventDispatcher):
1691
1692 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1693
1694         Web Inspector: make MemoryInstrumentation methods private
1695         https://bugs.webkit.org/show_bug.cgi?id=92379
1696
1697         Reviewed by Vsevolod Vlasov.
1698
1699         MemoryInstrumentation was refactored.
1700         - All reporting methods on MemoryInstrumentation except add*Object are
1701           private to enforce MemoryClassInfo usage.
1702         - MemoryInstrumentation::Add*Member methods renamed to Add*Object
1703         - String reporting is implemented directly in the MemoryInstrumentation,
1704           not in its descendants.
1705
1706         * CMakeLists.txt:
1707         * GNUmakefile.list.am:
1708         * WebCore.gypi:
1709         * WebCore.vcproj/WebCore.vcproj:
1710         * WebCore.xcodeproj/project.pbxproj:
1711         * bindings/v8/ScriptProfiler.cpp:
1712         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
1713         * dom/MemoryInstrumentation.cpp: Added.
1714         (WebCore):
1715         (WebCore::MemoryInstrumentation::addString):
1716         * dom/MemoryInstrumentation.h:
1717         (WebCore::MemoryInstrumentation::addInstrumentedObject):
1718         (WebCore::MemoryInstrumentation::addObject):
1719         (MemoryInstrumentation):
1720         (InstrumentedPointerBase):
1721         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
1722         (InstrumentedPointer):
1723         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
1724         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
1725         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
1726         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
1727         (WebCore::MemoryClassInfo::addInstrumentedMember):
1728         (WebCore::MemoryClassInfo::addMember):
1729         (WebCore):
1730         (WebCore::MemoryInstrumentation::addObjectImpl):
1731         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
1732         (WebCore::MemoryInstrumentation::calculateContainerSize):
1733         * inspector/InspectorMemoryAgent.cpp:
1734         (WebCore):
1735
1736 2012-07-30  Alexander Pavlov  <apavlov@chromium.org>
1737
1738         Web Inspector: [Styles] No color swatch for the SVG "fill" and "stroke" property values
1739         https://bugs.webkit.org/show_bug.cgi?id=92638
1740
1741         Reviewed by Vsevolod Vlasov.
1742
1743         Added the "fill" and "stroke" properties to the list of color-aware properties.
1744
1745         * inspector/front-end/CSSKeywordCompletions.js:
1746
1747 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1748
1749         Unreviewed, rolling out r124000.
1750         http://trac.webkit.org/changeset/124000
1751         https://bugs.webkit.org/show_bug.cgi?id=92632
1752
1753         seems to have broken chromium Range_InstanceSizeUnknown unit
1754         test across many platforms (Requested by tomhudson on
1755         #webkit).
1756
1757         * WebCore.exp.in:
1758         * inspector/InspectorController.cpp:
1759         (WebCore::InspectorController::InspectorController):
1760         (WebCore::InspectorController::inspectedPageDestroyed):
1761         * inspector/InspectorInstrumentation.cpp:
1762         (WebCore):
1763         * inspector/InspectorInstrumentation.h:
1764         (InspectorInstrumentation):
1765         * inspector/InspectorResourceAgent.cpp:
1766         (WebCore::InspectorResourceAgent::didReceiveData):
1767         (WebCore::InspectorResourceAgent::getResponseBody):
1768         * inspector/InspectorResourceAgent.h:
1769         (InspectorResourceAgent):
1770         * inspector/NetworkResourcesData.cpp:
1771         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1772         (WebCore::NetworkResourcesData::ResourceData::setContent):
1773         (WebCore::NetworkResourcesData::setResourceContent):
1774         * inspector/NetworkResourcesData.h:
1775         (ResourceData):
1776         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1777         (NetworkResourcesData):
1778         * loader/cache/CachedResource.cpp:
1779         (WebCore::CachedResource::~CachedResource):
1780         (WebCore::CachedResource::removeClient):
1781         (WebCore::CachedResource::deleteIfPossible):
1782         (WebCore):
1783         * loader/cache/CachedResource.h:
1784         (CachedResource):
1785         * loader/cache/CachedResourceLoader.cpp:
1786         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1787         (WebCore::CachedResourceLoader::clearPreloads):
1788         * loader/cache/CachedResourceLoader.h:
1789         (CachedResourceLoader):
1790         * loader/cache/MemoryCache.cpp:
1791         (WebCore::MemoryCache::evict):
1792         * testing/InternalSettings.cpp:
1793         * testing/Internals.cpp:
1794         * testing/Internals.h:
1795         (Internals):
1796         * testing/Internals.idl:
1797
1798 2012-07-30  Hayato Ito  <hayato@chromium.org>
1799
1800         Remove an unused member variable, m_originalTarget, from EventDispatcher.
1801         https://bugs.webkit.org/show_bug.cgi?id=92614
1802
1803         Reviewed by Andreas Kling.
1804
1805         No one uses EventDispatcher::m_originalTarget.
1806
1807         No new tests, no behavior change.
1808
1809         * dom/EventDispatcher.h:
1810         (EventDispatcher):
1811
1812 2012-07-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1813
1814         [Qt] Fix issues remaining with fixed positioned layers
1815         https://bugs.webkit.org/show_bug.cgi?id=92528
1816
1817         Reviewed by Noam Rosenthal.
1818
1819         * platform/graphics/texmap/TextureMapperLayer.cpp:
1820         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
1821         Make sure that the delta is used when syncCompositingStateSelf is called afterward.
1822         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
1823         * platform/graphics/texmap/TextureMapperLayer.h:
1824         Use a FloatSize instead of an IntPoint for the delta.
1825         (TextureMapperLayer):
1826         (WebCore::TextureMapperLayer::adjustedPosition):
1827
1828 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
1829
1830         Replace UnicodeWinCE with UnicodeWchar
1831         https://bugs.webkit.org/show_bug.cgi?id=92539
1832
1833         Reviewed by Ryosuke Niwa.
1834
1835         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
1836         is a replacement for it, which is mainly based on the functions
1837         from <wchar.h>. It is ment as a minimal Unicode backend, which
1838         can be used very easy and has no external dependencies.
1839
1840         * platform/text/TextEncoding.cpp:
1841         (WebCore::TextEncoding::encode):
1842         * platform/text/TextEncodingRegistry.cpp:
1843         (WebCore::extendTextCodecMaps):
1844
1845 2012-07-30  Hayato Ito  <hayato@chromium.org>
1846
1847         Remove unnecessary code which set event's target from EventDispatcher::dispatchEvent.
1848         https://bugs.webkit.org/show_bug.cgi?id=92613
1849
1850         Reviewed by Hajime Morita.
1851
1852         EventContext::handleLocalEvents does all required jobs so we don't
1853         need to set target in EventDispacher::dispatchEvent() for TARGET phase.
1854
1855         No new tests, no behavior change.
1856
1857         * dom/EventDispatcher.cpp:
1858         (WebCore::EventDispatcher::dispatchEvent):
1859
1860 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1861
1862         Unreviewed, rolling out r124004.
1863         http://trac.webkit.org/changeset/124004
1864         https://bugs.webkit.org/show_bug.cgi?id=92622
1865
1866         Broke Android build (Requested by keishi on #webkit).
1867
1868         * rendering/RenderThemeChromiumCommon.cpp:
1869         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
1870
1871 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
1872
1873         Web Inspector: element tag disappears after editing
1874         https://bugs.webkit.org/show_bug.cgi?id=92385
1875
1876         Reviewed by Vsevolod Vlasov.
1877
1878         This has regressed when we started hiding elements panel upon
1879         batch updates. Narrowing hiding cases, updating selection
1880         in on-screen mode only.
1881
1882         * inspector/front-end/ElementsTreeOutline.js:
1883         (WebInspector.ElementsTreeElement.prototype.updateSelection):
1884
1885 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1886
1887         Web Inspector: move StringImpl size calculation to StringImpl
1888         https://bugs.webkit.org/show_bug.cgi?id=92359
1889
1890         Reviewed by Pavel Feldman.
1891
1892         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
1893         StringImpl::sizeInBytes();
1894
1895         * inspector/InspectorMemoryAgent.cpp:
1896         (WebCore):
1897
1898 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
1899
1900         Web Inspector: workers inspector is broken in the remote debugging mode
1901         https://bugs.webkit.org/show_bug.cgi?id=92540
1902
1903         Reviewed by Yury Semikhatsky.
1904
1905         The problem was that worker manager re-used complete url with query parameters
1906         for spin-off worker front-ends. As a result, in case of remote debugging, newly
1907         created front-ends were connecting to the same web socket (because of the ws parameter).
1908
1909         * inspector/front-end/WorkerManager.js:
1910         (WebInspector.WorkerManager.isDedicatedWorkerFrontend):
1911         * inspector/front-end/inspector.js:
1912
1913 2012-07-30  Keishi Hattori  <keishi@webkit.org>
1914
1915         Implement datalist UI for input type color for Chromium
1916         https://bugs.webkit.org/show_bug.cgi?id=92075
1917
1918         Reviewed by Kent Tamura.
1919
1920         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
1921
1922         * rendering/RenderThemeChromiumCommon.cpp:
1923         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
1924
1925 2012-07-30  Mario Sanchez Prada  <msanchez@igalia.com>
1926
1927         REGRESSION (r123767): platform/gtk/accessibility/object-with-title.html failing on GTK
1928         https://bugs.webkit.org/show_bug.cgi?id=92477
1929
1930         Reviewed by Chris Fleizach.
1931
1932         Consider title and accessibilityDescription together with helpText to
1933         decide whether an object should be exposed in the accessibility tree.
1934
1935         * accessibility/AccessibilityRenderObject.cpp:
1936         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1937
1938 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
1939
1940         Web Inspector: Resource agent's reference to cached resources should be weak.
1941         https://bugs.webkit.org/show_bug.cgi?id=92108
1942
1943         Reviewed by Pavel Feldman.
1944
1945         NetworkResourcesData now stores a raw pointer to CachedResource.
1946         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
1947         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
1948         Destroyed resources content is saved to NetworkResourcesData.
1949
1950         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
1951                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
1952
1953         * WebCore.exp.in:
1954         * inspector/InspectorController.cpp:
1955         (WebCore::InspectorController::InspectorController):
1956         (WebCore::InspectorController::inspectedPageDestroyed):
1957         * inspector/InspectorInstrumentation.cpp:
1958         (WebCore):
1959         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
1960         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
1961         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
1962         * inspector/InspectorInstrumentation.h:
1963         (InspectorInstrumentation):
1964         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
1965         (WebCore):
1966         * inspector/InspectorResourceAgent.cpp:
1967         (WebCore::InspectorResourceAgent::didReceiveData):
1968         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
1969         (WebCore):
1970         (WebCore::InspectorResourceAgent::getResponseBody):
1971         * inspector/InspectorResourceAgent.h:
1972         (InspectorResourceAgent):
1973         * inspector/NetworkResourcesData.cpp:
1974         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1975         (WebCore::NetworkResourcesData::ResourceData::setContent):
1976         (WebCore::NetworkResourcesData::setResourceContent):
1977         (WebCore::NetworkResourcesData::removeCachedResource):
1978         (WebCore):
1979         * inspector/NetworkResourcesData.h:
1980         (ResourceData):
1981         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
1982         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1983         (NetworkResourcesData):
1984         * loader/cache/CachedResource.cpp:
1985         (WebCore::CachedResource::~CachedResource):
1986         (WebCore::CachedResource::removeClient):
1987         (WebCore::CachedResource::deleteIfPossible):
1988         (WebCore):
1989         * loader/cache/CachedResource.h:
1990         (CachedResource):
1991         * loader/cache/CachedResourceLoader.cpp:
1992         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1993         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
1994         (WebCore::CachedResourceLoader::clearPreloads):
1995         * loader/cache/CachedResourceLoader.h:
1996         (CachedResourceLoader):
1997         * loader/cache/MemoryCache.cpp:
1998         (WebCore::MemoryCache::evict):
1999         * testing/InternalSettings.cpp:
2000         * testing/Internals.cpp:
2001         (WebCore::Internals::garbageCollectDocumentResources):
2002         (WebCore):
2003         * testing/Internals.h:
2004         (Internals):
2005         * testing/Internals.idl:
2006
2007 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
2008
2009         [WK2][EFL] Accelerated compositing support using TextureMapper on Efl WebKit2
2010         https://bugs.webkit.org/show_bug.cgi?id=91583
2011
2012         Reviewed by Noam Rosenthal.
2013
2014         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
2015         This patch adds Texture Mapper related files to PlatformEfl.cmake.
2016         And wrapped TextureMapperLayer and TextureMapperBackingStore with USE(ACCELERATED_COMPOSITING) for fixing building error when disable ACCELERATED_COMPOSITING.
2017
2018         * CMakeLists.txt:
2019         * PlatformEfl.cmake:
2020         * platform/graphics/GraphicsLayer.cpp:
2021         (WebCore):
2022         * platform/graphics/GraphicsLayer.h:
2023         (GraphicsLayer):
2024         * platform/graphics/GraphicsLayerAnimation.cpp:
2025         * platform/graphics/GraphicsLayerAnimation.h:
2026         * platform/graphics/PlatformLayer.h:
2027         (WebCore):
2028         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
2029         * platform/graphics/texmap/TextureMapperBackingStore.h:
2030         * platform/graphics/texmap/TextureMapperLayer.h:
2031
2032 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
2033
2034         [WK2][EFL] TILED_BACKING_STORE support on Efl WebKit2
2035         https://bugs.webkit.org/show_bug.cgi?id=91582
2036
2037         Reviewed by Noam Rosenthal.
2038
2039         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
2040         This patch adds TILED_BACKING_STORE related files to CMakeLists.txt and PlatformEfl.cmake
2041
2042         * CMakeLists.txt:
2043         * PlatformEfl.cmake:
2044
2045 2012-07-29  Keishi Hattori  <keishi@webkit.org>
2046
2047         Fix removing invalid values from color input suggestions
2048         https://bugs.webkit.org/show_bug.cgi?id=92502
2049
2050         Reviewed by Kent Tamura.
2051
2052         Make ColorInputType::typeMismatchFor() return false for invalid color
2053         values so that they don't appear in the list of suggestions that
2054         ColorInputType::suggestions() returns.
2055
2056         No new tests. Tests to be added in Bug 92075.
2057
2058         * html/ColorInputType.cpp:
2059         (WebCore::ColorInputType::typeMismatchFor):
2060         (WebCore):
2061         * html/ColorInputType.h:
2062         (ColorInputType):
2063
2064 2012-07-29  Li Yin  <li.yin@intel.com>
2065
2066         getChannelData should raise exception when index is more than numberOfChannels.
2067         https://bugs.webkit.org/show_bug.cgi?id=92223
2068
2069         Reviewed by Kentaro Hara.
2070
2071         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
2072         In getChannelData function, the index value MUST be less than numberOfChannels
2073         or an exception will be thrown.
2074
2075         Test: webaudio/audiobuffer.html
2076
2077         * Modules/webaudio/AudioBuffer.cpp:
2078         (WebCore::AudioBuffer::getChannelData):
2079         (WebCore):
2080         * Modules/webaudio/AudioBuffer.h:
2081         (WebCore):
2082         (AudioBuffer):
2083         * Modules/webaudio/AudioBuffer.idl: raise exception when index is not less than numberOfChannels.
2084
2085 2012-07-29  Sukolsak Sakshuwong  <sukolsak@google.com>
2086
2087         forward-delete in the last cell of a table moves the caret after the table
2088         https://bugs.webkit.org/show_bug.cgi?id=24250
2089
2090         Reviewed by Ryosuke Niwa.
2091
2092         The ForwardDelete command moved the cursor after the table when it's invoked
2093         in an empty cell that is the last cell of a table. It also removed the break
2094         element when invoked in an empty cell that is not the last cell of a table.
2095         Make it do nothing inside an empty table cell.
2096
2097         Test: editing/deleting/forward-delete-empty-table-cell.html
2098
2099         * editing/TypingCommand.cpp:
2100         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2101
2102 2012-07-29  Kwang Yul Seo  <skyul@company100.net>
2103
2104         Remove unused method HTMLConstructionSiteTask::take(HTMLConstructionSiteTask&)
2105         https://bugs.webkit.org/show_bug.cgi?id=92601
2106
2107         Reviewed by Adam Barth.
2108
2109         This method was introduced in r104000, but has never been used from the beginning.
2110
2111         No functional change.
2112
2113         * html/parser/HTMLConstructionSite.h:
2114
2115 2012-07-29  Kenichi Ishibashi  <bashi@chromium.org>
2116
2117         [Chromium] HarfBuzzShaper can't handle segmented text run
2118         https://bugs.webkit.org/show_bug.cgi?id=92445
2119
2120         Reviewed by Tony Chang.
2121
2122         Pass the range to be displayed to HarfBuzzShaper. The shaper calculates positions and advances of each glyph
2123         regardless of the range, but only add glyphs which are in the range.
2124
2125         No new tests. platform/chromium-linux/fast/text/international/draw-complex-text-from-to.html should
2126         work as expected once we move to use harfbuzz-ng on linux. Note that the current expectation will need to be rebaselined
2127         because the old hb shaper (ComplexTextController) mishandles the range. |to| should be exclusive. I'll rebaseline
2128         the expectation later.
2129
2130         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
2131         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
2132         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
2133         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
2134         (WebCore::HarfBuzzShaper::setDrawRange): Added.
2135         (WebCore):
2136         (WebCore::HarfBuzzShaper::shouldDrawCharacterAt): Added.
2137         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added variables that hold pending advances.
2138         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Add only glyphs which are in the given range to glyphBuffer.
2139         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
2140         (HarfBuzzShaper):
2141         * platform/graphics/mac/FontComplexTextMac.cpp:
2142         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
2143
2144 2012-07-29  Dan Bernstein  <mitz@apple.com>
2145
2146         Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
2147         https://bugs.webkit.org/show_bug.cgi?id=92600
2148
2149         Reviewed by Simon Fraser.
2150
2151         Test: fast/multicol/hit-test-gap-between-pages-flipped.html
2152
2153         * rendering/RenderBlock.h:
2154         (WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
2155         adjustPointToColumnContents() back to private.
2156         * rendering/RenderLayer.cpp:
2157         (WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().
2158         * rendering/RenderView.cpp:
2159         (WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
2160         of r123977, correctly accounts for flippedness.
2161
2162 2012-07-29  Dan Bernstein  <mitz@apple.com>
2163
2164         In flipped blocks, a point on the top edge of a text box is considered outside the box (and vice versa)
2165         https://bugs.webkit.org/show_bug.cgi?id=92597
2166
2167         Reviewed by Ryosuke Niwa.
2168
2169         This is similar to <http://webkit.org/b/92593> except for RenderText. Fixing this required
2170         fixing some code that creates a point inside a box by setting its y coordinate to the
2171         logical top of the box. In a flipped block, this would be just outside the box.
2172
2173         Enhanced fast/writing-mode/flipped-blocks-hit-test-line-edges.html to cover this.
2174
2175         * editing/visible_units.cpp:
2176         (WebCore::absoluteLineDirectionPointToLocalPointInBlock): Changed to use
2177         RootInlineBox::blockDirectionPointInLine in the vertical case as well.
2178         * rendering/RenderBlock.cpp:
2179         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed to use
2180         RootInlineBox::blockDirectionPointInLine.
2181         * rendering/RenderText.cpp:
2182         (WebCore::RenderText::positionForPoint): Changed the strictness of y inequalities based on
2183         the flippedness of the block. This fixes the bug.
2184         * rendering/RootInlineBox.cpp:
2185         (WebCore::RootInlineBox::blockDirectionPointInLine): Moved the implementation here from the
2186         header, and made it return the bottom in the flipped block case, so that the returned point
2187         is inside the line in that case as well.
2188         * rendering/RootInlineBox.h:
2189
2190 2012-07-29  Rik Cabanier  <cabanier@adobe.com>
2191
2192         ENABLE_CSS_COMPOSITING flag
2193         https://bugs.webkit.org/show_bug.cgi?id=92553
2194
2195         Reviewed by Dirk Schulze.
2196
2197         Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html
2198
2199         * GNUmakefile.am:
2200         * Configurations/FeatureDefines.xcconfig:
2201
2202 2012-07-29  Dan Bernstein  <mitz@apple.com>
2203
2204         In flipped blocks, a point on the top edge of a box is considered outside the box (and vice versa)
2205         https://bugs.webkit.org/show_bug.cgi?id=92593
2206
2207         Reviewed by Simon Fraser.
2208
2209         With respect to hit testing, boxes should always behave as half-open intervals which include
2210         the physical top and left edges and not the bottom and right edges.
2211         RenderBlock::positionForPoint was not adhering to this, since it was comparing flipped
2212         coordinates.
2213
2214         Tests: fast/writing-mode/flipped-blocks-hit-test-box-edges.html
2215                fast/writing-mode/flipped-blocks-hit-test-line-edges.html
2216
2217         * rendering/RenderBlock.cpp:
2218         (WebCore::RenderBlock::positionForPointWithInlineChildren): When blocks are flipped, changed
2219         strict inequalities of y coordinates into non-strict ones and non-strict inequalities into
2220         strict ones.
2221         (WebCore::RenderBlock::positionForPoint): Ditto, except for the test for being under the top
2222         of the last candidate box, which was made non-strict in the unflipped case and remained
2223         strict.
2224
2225 2012-07-28  Dan Bernstein  <mitz@apple.com>
2226
2227         RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
2228         https://bugs.webkit.org/show_bug.cgi?id=92588
2229
2230         Reviewed by Sam Weinig.
2231
2232         Tests: fast/multicol/hit-test-block-axis-flipped.html
2233                fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html
2234
2235         * rendering/RenderBlock.cpp:
2236         (WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
2237         coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
2238         (WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
2239         work with an unflipped point.
2240
2241 2012-07-28  Dan Bernstein  <mitz@apple.com>
2242
2243         In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column
2244         https://bugs.webkit.org/show_bug.cgi?id=92566
2245
2246         Reviewed by Simon Fraser.
2247
2248         Enhanced the fix for <http://webkit.org/b/92524> to work with flipped lines.
2249
2250         Extended fast/multicol/hit-test-end-of-column-with-line-height.html.
2251
2252         * rendering/RenderBlock.cpp:
2253         (WebCore::RenderBlock::positionForPointWithInlineChildren): For flipped lines, check if the
2254         hit line is the last one before a page break, and in that case, check if the hit point was
2255         after the break.
2256
2257 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
2258
2259         Size changes on a layer with negative z-index children don't repaint correctly
2260         https://bugs.webkit.org/show_bug.cgi?id=92583
2261
2262         Reviewed by Dean Jackson.
2263
2264         Negative z-index descendants cause a composited layer to have a separate
2265         layer for foreground content. If something caused that foreground layer
2266         to change size (like toggling visibility on a descendant), we failed to
2267         repaint the foreground layer, resulting in stretched content.
2268
2269         Test: compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html
2270
2271         * rendering/RenderLayerBacking.cpp:
2272         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Repaint the foreground
2273         layer if its size changes, like we do for the main layer.
2274
2275 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
2276
2277         Ignore visibility:hidden elements when computing compositing layer bounds
2278         https://bugs.webkit.org/show_bug.cgi?id=92569
2279
2280         Reviewed by Dan Bernstein.
2281
2282         When computing the bounds of compositing layers, we would take into account
2283         layers with no visible content (visibility:hidden, and no non-hidden descendants).
2284         This caused some huge layers in mobile Google maps.
2285
2286         Tests: compositing/geometry/bounds-ignores-hidden-composited-descendant.html
2287                compositing/geometry/bounds-ignores-hidden-dynamic.html
2288                compositing/geometry/bounds-ignores-hidden.html
2289
2290         * rendering/RenderLayer.cpp:
2291         (WebCore::RenderLayer::calculateLayerBounds): If the ExcludeHiddenDescendants flag is set, return
2292         the empty rect for layers with no visible content or descendants, as long as the layer is not
2293         the root of the subtree whose bounds are being computed.
2294         calculateLayerBounds() currently (I think incorrectly) passes the default flags to the recursive calls.
2295         It should probably just pass 'flags', but to make this change safe, OR in the ExcludeHiddenDescendants
2296         flag.
2297         * rendering/RenderLayer.h: Add an ExcludeHiddenDescendants flag to the CalculateLayerBoundsFlags.
2298         * rendering/RenderLayerCompositor.cpp:
2299         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Pass the ExcludeHiddenDescendants
2300         flag.
2301
2302 2012-07-28  Min Qin  <qinmin@chromium.org>
2303
2304         Add an overlay play button to media controls on android
2305         https://bugs.webkit.org/show_bug.cgi?id=92132
2306
2307         Reviewed by Adam Barth.
2308
2309         This change adds an overlay play button to the media controls for android.
2310         No tests for now as this setting is not being used by other port.
2311         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
2312
2313         * WebCore.gypi:
2314         * css/CSSPrimitiveValueMappings.h:
2315         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2316         * css/CSSValueKeywords.in:
2317         * css/mediaControls.css:
2318         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
2319         * css/mediaControlsChromiumAndroid.css:
2320         (audio::-webkit-media-controls-overlay-enclosure):
2321         (video::-webkit-media-controls-overlay-enclosure):
2322         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2323         (video::-webkit-media-controls-overlay-play-button):
2324         * html/shadow/MediaControlElements.cpp:
2325         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
2326         (WebCore):
2327         (WebCore::MediaControlOverlayPlayButtonElement::create):
2328         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
2329         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
2330         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
2331         * html/shadow/MediaControlElements.h:
2332         (MediaControlOverlayPlayButtonElement):
2333         (WebCore):
2334         * html/shadow/MediaControlRootElementChromium.cpp:
2335         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
2336         (WebCore::MediaControlPanelEnclosureElement::create):
2337         (WebCore):
2338         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
2339         (WebCore::MediaControlRootElementChromium::create):
2340         (WebCore::MediaControlRootElementChromium::initializeControls):
2341         * html/shadow/MediaControlRootElementChromium.h:
2342         (MediaControlChromiumEnclosureElement):
2343         (WebCore):
2344         (MediaControlPanelEnclosureElement):
2345         (MediaControlRootElementChromium):
2346         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
2347         (WebCore):
2348         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
2349         (WebCore::MediaControlOverlayEnclosureElement::create):
2350         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
2351         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
2352         (WebCore::MediaControls::create):
2353         (WebCore::MediaControlRootElementChromiumAndroid::create):
2354         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
2355         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
2356         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
2357         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
2358         (WebCore):
2359         (MediaControlOverlayEnclosureElement):
2360         (MediaControlRootElementChromiumAndroid):
2361         * platform/ThemeTypes.h:
2362         * rendering/RenderMediaControlsChromium.cpp:
2363         (WebCore::paintMediaOverlayPlayButton):
2364         (WebCore):
2365         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2366         * rendering/RenderTheme.cpp:
2367         (WebCore::RenderTheme::paint):
2368         * rendering/RenderTheme.h:
2369         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
2370         * rendering/RenderThemeChromiumAndroid.cpp:
2371         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
2372         (WebCore):
2373         * rendering/RenderThemeChromiumAndroid.h:
2374
2375 2012-07-28  Mario Sanchez Prada  <msanchez@igalia.com>
2376
2377         [GTK] Add a new and reusable enchant-based spellchecker in WebCore
2378         https://bugs.webkit.org/show_bug.cgi?id=90269
2379
2380         Reviewed by Martin Robinson.
2381
2382         Move enchant specific code down to WebCore, into a new class
2383         TextCheckerEnchant, that we can use from WK1 and WK2.
2384
2385         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
2386         * GNUmakefile.list.am: Added new files.
2387         * platform/text/gtk/TextCheckerEnchant.cpp: Added.
2388         (getAvailableDictionariesCallback):
2389         (TextCheckerEnchant::TextCheckerEnchant):
2390         (TextCheckerEnchant::~TextCheckerEnchant):
2391         (TextCheckerEnchant::ignoreWord):
2392         (TextCheckerEnchant::learnWord):
2393         (TextCheckerEnchant::checkSpellingOfString):
2394         (TextCheckerEnchant::getGuessesForWord):
2395         (TextCheckerEnchant::updateSpellCheckingLanguages):
2396         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
2397         * platform/text/gtk/TextCheckerEnchant.h: Added.
2398         (WebCore):
2399         (TextCheckerEnchant):
2400         (WebCore::TextCheckerEnchant::create):
2401
2402 2012-07-28  Vineet Chaudhary  <rgf748@motorola.com>
2403
2404         [Clamp] support in binding generator.
2405         https://bugs.webkit.org/show_bug.cgi?id=77605
2406
2407         Reviewed by Kentaro Hara.
2408
2409         Currently [Clamp] extended attribute in IDL files.
2410         Spec: http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Clamp
2411
2412         Tests: TestObj.idl
2413
2414         * bindings/scripts/CodeGeneratorCPP.pm:
2415         (SkipFunction): Skips methods with [Clamp] parameters.
2416         * bindings/scripts/CodeGeneratorGObject.pm:
2417         (SkipFunction): Skips methods with [Clamp] parameters.
2418         * bindings/scripts/CodeGeneratorJS.pm:
2419         (GenerateParametersCheck): Support [Clamp] for JSBindings.
2420         * bindings/scripts/CodeGeneratorObjC.pm:
2421         (SkipFunction): Skips methods with [Clamp] parameters.
2422         * bindings/scripts/CodeGeneratorV8.pm:
2423         (GenerateParametersCheck): Support [Clamp] for V8Bindings.
2424         * bindings/scripts/IDLAttributes.txt: Added [Clamp] to attributes list.
2425         * bindings/scripts/test/JS/JSTestObj.cpp: Test.
2426         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2427         * bindings/scripts/test/JS/JSTestObj.h:
2428         * bindings/scripts/test/TestObj.idl:
2429         * bindings/scripts/test/V8/V8TestObj.cpp:
2430         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2431         (TestObjV8Internal):
2432
2433 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2434
2435         Unreviewed, rolling out r123908.
2436         http://trac.webkit.org/changeset/123908
2437         https://bugs.webkit.org/show_bug.cgi?id=92572
2438
2439         Broke Chromium Linux compile (Requested by pkasting on
2440         #webkit).
2441
2442         * WebCore.gypi:
2443         * css/CSSPrimitiveValueMappings.h:
2444         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2445         * css/CSSValueKeywords.in:
2446         * css/mediaControls.css:
2447         * css/mediaControlsChromiumAndroid.css:
2448         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2449         * html/shadow/MediaControlElements.cpp:
2450         (WebCore):
2451         * html/shadow/MediaControlElements.h:
2452         (WebCore):
2453         * html/shadow/MediaControlRootElementChromium.cpp:
2454         (WebCore::MediaControlChromiumEnclosureElement::create):
2455         (WebCore):
2456         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
2457         (WebCore::MediaControls::create):
2458         (WebCore::MediaControlRootElementChromium::create):
2459         * html/shadow/MediaControlRootElementChromium.h:
2460         (MediaControlChromiumEnclosureElement):
2461         (MediaControlRootElementChromium):
2462         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Removed.
2463         * html/shadow/MediaControlRootElementChromiumAndroid.h: Removed.
2464         * platform/ThemeTypes.h:
2465         * rendering/RenderMediaControlsChromium.cpp:
2466         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2467         * rendering/RenderTheme.cpp:
2468         (WebCore::RenderTheme::paint):
2469         * rendering/RenderTheme.h:
2470         * rendering/RenderThemeChromiumAndroid.cpp:
2471         * rendering/RenderThemeChromiumAndroid.h:
2472
2473 2012-07-27  Eli Fidler  <efidler@rim.com>
2474
2475         [BlackBerry] Use new LocaleHandler.
2476         https://bugs.webkit.org/show_bug.cgi?id=92548
2477
2478         Reviewed by Yong Li.
2479
2480         RIM PR 128381
2481
2482         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2483         (WebCore::platformLanguage):
2484         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2485         (WebCore::ResourceRequest::initializePlatformRequest):
2486         * platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:
2487         (WebCore::currentSearchLocaleID):
2488         (WebCore::currentTextBreakLocaleID):
2489
2490 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2491
2492         Change constructor with explicit constructor in WebCore/Modules
2493         https://bugs.webkit.org/show_bug.cgi?id=92529
2494
2495         Reviewed by Kentaro Hara.
2496
2497         As a step to let *explicit* keyword add to constructors which have a parameter,
2498         *explicit* keyword is added to Source/WebCore/Modules in order to avoid implicit
2499         type conversion.
2500
2501         No new tests. Covered by existing tests.
2502
2503         * Modules/filesystem/LocalFileSystem.h:
2504         (WebCore::LocalFileSystem::LocalFileSystem):
2505         * Modules/filesystem/Metadata.h:
2506         (WebCore::Metadata::Metadata):
2507         * Modules/filesystem/SyncCallbackHelper.h:
2508         (WebCore::SyncCallbackHelper::SuccessCallbackImpl::SuccessCallbackImpl):
2509         (WebCore::SyncCallbackHelper::ErrorCallbackImpl::ErrorCallbackImpl):
2510         * Modules/mediastream/IceCandidate.h:
2511         (IceCandidate):
2512         * Modules/mediastream/NavigatorUserMediaError.h:
2513         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
2514         * Modules/mediastream/SessionDescription.h:
2515         (SessionDescription):
2516         * Modules/mediastream/UserMediaController.h:
2517         (UserMediaController):
2518         * Modules/notifications/NotificationController.h:
2519         (NotificationController):
2520         * Modules/speech/SpeechRecognition.h:
2521         (SpeechRecognition):
2522         * Modules/speech/SpeechRecognitionController.h:
2523         (SpeechRecognitionController):
2524         * Modules/speech/SpeechRecognitionEvent.h:
2525         (SpeechRecognitionEvent):
2526         * Modules/speech/SpeechRecognitionResultList.h:
2527         (SpeechRecognitionResultList):
2528         * Modules/vibration/Vibration.h:
2529         (Vibration):
2530         * Modules/webaudio/AudioBuffer.h:
2531         (AudioBuffer):
2532         * Modules/webaudio/AudioContext.h:
2533         (AudioContext):
2534         * Modules/webaudio/AudioNodeInput.h:
2535         (AudioNodeInput):
2536         * Modules/webaudio/AudioSummingJunction.h:
2537         (AudioSummingJunction):
2538         * Modules/webaudio/BiquadDSPKernel.h:
2539         (WebCore::BiquadDSPKernel::BiquadDSPKernel):
2540         * Modules/webaudio/DefaultAudioDestinationNode.h:
2541         (DefaultAudioDestinationNode):
2542         * Modules/webaudio/DelayDSPKernel.h:
2543         (DelayDSPKernel):
2544         * Modules/webaudio/OfflineAudioCompletionEvent.h:
2545         (OfflineAudioCompletionEvent):
2546         * Modules/webaudio/WaveShaperDSPKernel.h:
2547         (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
2548         * Modules/webaudio/WaveShaperNode.h:
2549         (WaveShaperNode):
2550         * Modules/webaudio/WaveTable.h:
2551         (WaveTable):
2552         * Modules/webdatabase/DatabaseAuthorizer.h:
2553         (DatabaseAuthorizer):
2554         * Modules/webdatabase/DatabaseTask.h:
2555         (Database::DatabaseTransactionTask):
2556         * Modules/webdatabase/DatabaseTracker.h:
2557         (DatabaseTracker):
2558         * Modules/webdatabase/SQLCallbackWrapper.h:
2559         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
2560         * Modules/webdatabase/SQLException.h:
2561         (WebCore::SQLException::SQLException):
2562         * Modules/websockets/WebSocket.h:
2563         * Modules/websockets/WebSocketExtensionProcessor.h:
2564         (WebCore::WebSocketExtensionProcessor::WebSocketExtensionProcessor):
2565
2566 2012-07-27  Kentaro Hara  <haraken@chromium.org>
2567
2568         [V8] Optimize Element::getAttributeNS() by replacing String with AtomicString
2569         https://bugs.webkit.org/show_bug.cgi?id=90276
2570
2571         Reviewed by Adam Barth.
2572
2573         In r121439, we changed the argument type of Element::getAttribute()
2574         from String to AtomicString for optimization. This patch changes the
2575         argument type of Element::getAttributeNS() from String to AtomicString.
2576
2577         Actually this change affects V8 performance only.
2578
2579         [JSC without the patch]
2580         The binding code converts a given JavaScript string to a String
2581         -> the String is passed to getAttributeNS()
2582         -> the String is converted to an AtomicString when it is passed to
2583         QualifiedName() constructor.
2584
2585         [JSC with the patch]
2586         The binding code converts a given JavaScript string to a String
2587         -> the String is converted to an AtomicString when it is passed to
2588         getAttributeNS()
2589         -> the AtomicString is passed to QualifiedName() constructor.
2590
2591         [V8 without the patch]
2592         The binding code retrieves a cached external String for a given
2593         JavaScript string
2594         -> the String is passed to getAttributeNS()
2595         -> the String is converted to AtomicString when it is passed to
2596         QualifiedName() constructor.
2597
2598         [V8 with the patch]
2599         The binding code retrieves a cached external AtomicString for a given
2600         JavaScript string
2601         -> the AtomicString is passed to getAttributeNS()
2602         -> the AtomicString is passed to QualifiedName() constructor.
2603
2604         In this way, in JSC, the change affects where a String is converted to
2605         an AtomicString. On the other hand, in V8, (since the AtomicString is already
2606         cached,) we can skip the conversion step.
2607
2608         Performance test: https://bugs.webkit.org/attachment.cgi?id=150158
2609
2610         getAttributeNS (Chromium/Linux):
2611         577.80ms => 454.60ms
2612
2613         * dom/Element.cpp:
2614         (WebCore::Element::getAttributeNS):
2615         * dom/Element.h:
2616         (Element):
2617
2618 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2619
2620         Unreviewed, rolling out r123679.
2621         http://trac.webkit.org/changeset/123679
2622         https://bugs.webkit.org/show_bug.cgi?id=92565
2623
2624         Slowed down HTML parsing by 3.6% (Requested by abarth on
2625         #webkit).
2626
2627         * html/FTPDirectoryDocument.cpp:
2628         (WebCore::FTPDirectoryDocumentParser::append):
2629         * html/parser/HTMLEntityParser.cpp:
2630         (WebCore::HTMLEntityParser::consumeNamedEntity):
2631         * html/parser/HTMLParserIdioms.cpp:
2632         (WebCore::stripLeadingAndTrailingHTMLSpaces):
2633         * html/parser/HTMLSourceTracker.cpp:
2634         (WebCore::HTMLSourceTracker::sourceForToken):
2635         * loader/cache/CachedScript.cpp:
2636         (WebCore::CachedScript::script):
2637         * platform/text/SegmentedString.cpp:
2638         (WebCore::SegmentedString::SegmentedString):
2639         (WebCore::SegmentedString::operator=):
2640         (WebCore::SegmentedString::clear):
2641         (WebCore::SegmentedString::append):
2642         (WebCore::SegmentedString::prepend):
2643         (WebCore::SegmentedString::advanceSubstring):
2644         (WebCore::SegmentedString::advance):
2645         (WebCore::SegmentedString::advanceSlowCase):
2646         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
2647         * platform/text/SegmentedString.h:
2648         (WebCore::SegmentedSubstring::SegmentedSubstring):
2649         (WebCore::SegmentedSubstring::clear):
2650         (WebCore::SegmentedSubstring::appendTo):
2651         (SegmentedSubstring):
2652         (WebCore::SegmentedString::SegmentedString):
2653         (WebCore::SegmentedString::push):
2654         (WebCore::SegmentedString::isEmpty):
2655         (WebCore::SegmentedString::lookAhead):
2656         (WebCore::SegmentedString::lookAheadIgnoringCase):
2657         (WebCore::SegmentedString::advance):
2658         (WebCore::SegmentedString::advanceAndASSERT):
2659         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
2660         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
2661         (SegmentedString):
2662         (WebCore::SegmentedString::advancePastNonNewline):
2663         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
2664         (WebCore::SegmentedString::operator*):
2665         (WebCore::SegmentedString::operator->):
2666         (WebCore::SegmentedString::current):
2667         (WebCore::SegmentedString::equalsLiterally):
2668         (WebCore::SegmentedString::equalsIgnoringCase):
2669         (WebCore::SegmentedString::lookAheadInline):
2670         (WebCore::SegmentedString::lookAheadSlowCase):
2671         * xml/parser/CharacterReferenceParserInlineMethods.h:
2672         (WebCore::consumeCharacterReference):
2673         * xml/parser/MarkupTokenizerBase.h:
2674         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2675         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
2676         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2677
2678 2012-07-27  Jer Noble  <jer.noble@apple.com>
2679
2680         Reset the set of "seen" plugins when the main frame load is committed.
2681         https://bugs.webkit.org/show_bug.cgi?id=92564
2682
2683         Reviewed by Anders Carlsson.
2684
2685         Because the Page object is re-used across navigation and reload, reset the list
2686         of seen plugins when the main frame load commits. This gives a good baseline to
2687         compare against the number of pages loaded.
2688
2689         No new tests; the "seen" plugin list is for diagnostic purposes only.
2690
2691         * loader/FrameLoader.cpp:
2692         (WebCore::FrameLoader::dispatchDidCommitLoad):
2693         * page/Page.cpp:
2694         (WebCore::Page::resetSeenPlugins):
2695         * page/Page.h:
2696
2697 2012-07-27  Sukolsak Sakshuwong  <sukolsak@google.com>
2698
2699         execCommand copies the backgroung-color of the enclosing element to the element being edited.
2700         https://bugs.webkit.org/show_bug.cgi?id=91783
2701
2702         Reviewed by Ryosuke Niwa.
2703
2704         InsertListCommand and some other edit commands remove redundant
2705         style properties after their DOM modification by using
2706         StylePropertySet::removeEquivalentProperties.  However, this method
2707         does not remove redundant background-color properties such as
2708         "background-color: white" and "background-color: #fff" because
2709         it compares them using cssText and thus treats them as different.
2710         Add code to convert background colors to RGBA and then compare them.
2711
2712         Test: editing/style/redundant-background-color.html
2713
2714         * editing/EditingStyle.cpp:
2715         (WebCore::getRGBABackgroundColor):
2716         (WebCore):
2717         (WebCore::getPropertiesNotIn):
2718
2719 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2720
2721         [EFL] Return 0 when network is offline
2722         https://bugs.webkit.org/show_bug.cgi?id=92454
2723
2724         Reviewed by Kenneth Rohde Christiansen.
2725
2726         Network Info latest spec says 0 is returned when network is offline.
2727         r123769 modified to return infinity value when network is offiline.
2728
2729         * platform/efl/NetworkInfoProviderEfl.cpp:
2730         (WebCore::NetworkInfoProviderEfl::bandwidth):
2731
2732 2012-07-27  Scott Graham  <scottmg@chromium.org>
2733
2734         Change navigator.webkitGamepads[] to navigator.webkitGetGamepads()
2735         https://bugs.webkit.org/show_bug.cgi?id=92533
2736
2737         Reviewed by Adam Barth.
2738
2739         Per discussion on public-webapps. Pages that enumerate navigator were
2740         causing background resources to be created to poll hardware
2741         unintentionally. By changing to an explicit function call, this is
2742         avoided (and the API becomes more clear too). This change updates the
2743         implementation to match the current ED spec.
2744
2745         * Modules/gamepad/NavigatorGamepad.cpp:
2746         (WebCore::NavigatorGamepad::webkitGetGamepads):
2747         * Modules/gamepad/NavigatorGamepad.h:
2748         (NavigatorGamepad):
2749         * Modules/gamepad/NavigatorGamepad.idl:
2750         * bindings/generic/RuntimeEnabledFeatures.h:
2751         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
2752         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
2753
2754 2012-07-27  Brady Eidson  <beidson@apple.com>
2755
2756         Plugins should not be allowed to override standard properties/attributes in non-standard worlds
2757         <rdar://problem/11975252> and https://bugs.webkit.org/show_bug.cgi?id=92519
2758
2759         Reviewed by Anders Carlsson.
2760
2761         Change the 3 plugin-owning element's custom bindings to prefer built-in properties if they exist.
2762         When they do they don't give the plugin a chance to override.
2763
2764         Test: plugins/npruntime/overrides-all-properties.html
2765
2766         Add plugin custom functions to prefer built-in properties over plugin scriptable object properties:
2767         * bindings/js/JSPluginElementFunctions.h:
2768         (WebCore::pluginElementCustomGetOwnPropertySlot):
2769         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
2770
2771         Use those new custom functions for getting properties:
2772         * bindings/js/JSHTMLAppletElementCustom.cpp:
2773         (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
2774         (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
2775         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2776         (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
2777         (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
2778         * bindings/js/JSHTMLObjectElementCustom.cpp:
2779         (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
2780         (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
2781
2782 2012-07-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2783
2784         use createUninitialized when creating TypedArray from another array
2785         https://bugs.webkit.org/show_bug.cgi?id=92518
2786
2787         Reviewed by Kenneth Russell.
2788
2789         When creating a Typed Array from another array, we fill it with values
2790         from the source array. So, we can create it uninitialized. This is
2791         make constructor about 35% faster when constructed with another typed
2792         array.
2793
2794         Test: fast/canvas/webgl/array-constructor.html
2795
2796         * bindings/js/JSArrayBufferViewHelper.h:
2797         (WebCore::constructArrayBufferViewWithTypedArrayArgument):
2798         (WebCore::constructArrayBufferView):
2799
2800 2012-07-27  Eli Fidler  <efidler@rim.com>
2801
2802         [BlackBerry] Adapt to change in the FontInfo platform API.
2803         https://bugs.webkit.org/show_bug.cgi?id=92547
2804
2805         Reviewed by Yong Li
2806
2807         RIM PR 161263
2808
2809         * page/blackberry/SettingsBlackBerry.cpp:
2810         (WebCore::Settings::initializeDefaultFontFamilies):
2811
2812 2012-07-27  Antoine Labour  <piman@chromium.org>
2813
2814         [chromium] Fix color matrix filter computation so that filters that don't need clamping are correctly detected as such
2815         https://bugs.webkit.org/show_bug.cgi?id=92452
2816
2817         Reviewed by Stephen White.
2818
2819         Because of precision issues, some filters were returning true to
2820         matrixNeedsClamping when they can return false. This fixes it.
2821
2822         No new tests in this CL, a follow-up change refactors the code to add
2823         several tests.
2824
2825         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
2826
2827 2012-07-27  Jer Noble  <jer.noble@apple.com>
2828
2829         Add diagnostic logging for plugins-per-page.
2830         https://bugs.webkit.org/show_bug.cgi?id=92538
2831
2832         Reviewed by Anders Carlsson.
2833
2834         Add some diagnostic logging for whether a page has seen a plugin, and 
2835         whether a page has seen a plugin of a specific type.
2836
2837         Move the diagnostic logging out of the elemements themselves:
2838         * html/HTMLEmbedElement.cpp:
2839         (WebCore::HTMLEmbedElement::updateWidget):
2840         * html/HTMLObjectElement.cpp:
2841         (WebCore::HTMLObjectElement::updateWidget):
2842
2843         Instead, log when the plugin is requested, thereby catching plugins which are
2844         rejected because, e.g., Java is disabled or not installed:
2845         * loader/SubframeLoader.cpp:
2846         (WebCore::logPluginRequest):
2847         (WebCore::SubframeLoader::requestObject):
2848         (WebCore::SubframeLoader::createJavaAppletWidget):
2849
2850         Add new diagnostic key values:
2851         * page/DiagnosticLoggingKeys.cpp:
2852         (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
2853         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
2854         * page/DiagnosticLoggingKeys.h:
2855
2856         Add a map of plugin types seen per-page for diagnostic purposes:
2857         * page/Page.cpp:
2858         (WebCore::Page::hasSeenAnyPlugin):
2859         (WebCore::Page::hasSeenPlugin):
2860         (WebCore::Page::sawPlugin):
2861         * page/Page.h:
2862
2863 2012-07-27  Patrick Gansterer  <paroga@webkit.org>
2864
2865         [WINCE] Use macros from ICU instead of defining the same functionality again
2866         https://bugs.webkit.org/show_bug.cgi?id=92530
2867
2868         Reviewed by Ryosuke Niwa.
2869
2870         Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
2871         U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
2872
2873         * html/FTPDirectoryDocument.cpp:
2874         (WebCore::processFileDateString):
2875         * loader/archive/mhtml/MHTMLArchive.cpp:
2876         (WebCore::MHTMLArchive::generateMHTMLData):
2877         * platform/graphics/wince/FontWinCE.cpp:
2878         (WebCore::generateComponents):
2879
2880 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
2881
2882         Build warning in CSSPrimitiveValueMappings.h when CSS_STICKY_POSITION is disabled
2883         https://bugs.webkit.org/show_bug.cgi?id=92523
2884
2885         Reviewed by Simon Fraser.
2886
2887         Move #ifdef in CSSPrimitiveValueMappings.h to silent compilation warning
2888         when CSS_STICKY_POSITION is disabled.
2889
2890         No new tests, no behavior change.
2891
2892         * css/CSSPrimitiveValueMappings.h:
2893         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2894
2895 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
2896
2897         DragController should ascertain dragClient to be non-null
2898         https://bugs.webkit.org/show_bug.cgi?id=92474
2899
2900         Reviewed by Tony Chang.
2901
2902         The DragController must always ensure a valid dragClient object. Hence
2903         adding the ASSERT to assure that.
2904
2905         No new tests. Added assertion for PageClient.dragClient.
2906
2907         * page/DragController.cpp:
2908         (WebCore::DragController::DragController):
2909
2910 2012-07-27  Adrienne Walker  <enne@google.com>
2911
2912         [chromium] Clean up LayerRendererChromium::drawTexturedQuad
2913         https://bugs.webkit.org/show_bug.cgi?id=91823
2914
2915         Reviewed by James Robinson.
2916
2917         LayerRendererChromium::drawTexturedQuad has been around forever and
2918         over time has developed several problems:
2919          - Confusingly named relative to drawTextureQuad
2920          - All but one callers identically manipulate the transform matrix
2921          - Lots of optional parameters that only few functions use
2922
2923         This patch breaks up drawTexturedQuad into setShaderOpacity (for
2924         optional opacity values sent to the shader), setShaderFloatQuad (the
2925         full FloatQuad used by AA shaders), and drawQuadGeometry (actually
2926         draw the geometry, and wrap the transform logic that was duplicated
2927         everywhere).
2928
2929         No new tests; no change in functionality.
2930
2931         * platform/graphics/chromium/LayerRendererChromium.cpp:
2932         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
2933         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2934         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2935         (WebCore::LayerRendererChromium::drawSolidColorQuad):
2936         (WebCore::LayerRendererChromium::drawTileQuad):
2937         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
2938         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
2939         (WebCore::LayerRendererChromium::drawTextureQuad):
2940         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
2941         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
2942         (WebCore::LayerRendererChromium::setShaderFloatQuad):
2943         (WebCore::LayerRendererChromium::setShaderOpacity):
2944         (WebCore::LayerRendererChromium::drawQuadGeometry):
2945         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
2946         * platform/graphics/chromium/LayerRendererChromium.h:
2947         (LayerRendererChromium):
2948
2949 2012-07-27  Shawn Singh  <shawnsingh@chromium.org>
2950
2951         [chromium] CCLayerTreeHost placeholder scissor should be deviceViewportSize instead of viewportSize
2952         https://bugs.webkit.org/show_bug.cgi?id=92469
2953
2954         Reviewed by Adrienne Walker.
2955
2956         We were accidentally using viewportSize instead of
2957         deviceViewportSize in a particular place in code. Recent
2958         refactoring to use tighter scissor rects exposed this problem.
2959
2960         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2961         (WebCore::CCLayerTreeHost::updateLayers):
2962
2963 2012-07-27  Kevin Ellis  <kevers@chromium.org>
2964
2965         Search cancel button is hard to activate with a tap gesture even if touch adjustment is enabled.
2966         https://bugs.webkit.org/show_bug.cgi?id=91894
2967
2968         Reviewed by Antonio Gomes.
2969
2970         Update check for determining if a node responds to tap gestures.
2971         Previously, the cancel button was being discarded as a candidate for
2972         touch adjustment if the touch area clipped the text input region
2973         because the candidate pruning process failed to account for the cancel
2974         button having a default mouse handler.  Possibly an interim fix,
2975         depending on resolution to 92093.
2976
2977         Test: touchadjustment/search-cancel.html
2978
2979         * page/TouchAdjustment.cpp:
2980         (TouchAdjustment):
2981         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2982
2983 2012-07-27  Varun Jain  <varunjain@chromium.org>
2984
2985         Animated SVGs do not clear previous frame completely in hidpi mode.
2986         https://bugs.webkit.org/show_bug.cgi?id=92395
2987
2988         Reviewed by Darin Adler.
2989
2990         The rect thats is cleared in subsequent frames needed to be scaled with device scale.
2991
2992         Test: svg/as-image/animated-svg-repaints-completely-in-hidpi.html
2993
2994         * svg/graphics/SVGImage.cpp:
2995         (WebCore::SVGImage::drawSVGToImageBuffer):
2996
2997 2012-07-27  Scott Graham  <scottmg@chromium.org>
2998
2999         Fix COMPILE_ASSERT for InlineFlowBox growing
3000         https://bugs.webkit.org/show_bug.cgi?id=92541
3001
3002         Reviewed by Dan Bernstein.
3003
3004         Use unsigned instead of bool to keep size small on Windows.
3005
3006         No new tests.
3007
3008         * rendering/InlineFlowBox.h:
3009         (InlineFlowBox):
3010
3011 2012-07-27  Beth Dakin  <bdakin@apple.com>
3012
3013         https://bugs.webkit.org/show_bug.cgi?id=92327
3014         -webkit-background-clip:text is blurry in WebKit 1 apps when
3015         deviceScaleFactor > 1
3016         -and corresponding-
3017         <rdar://problem/11683788>
3018
3019         Reviewed by Simon Fraser.
3020
3021         The bug here is that the code to make createCompatibleBuffer() HiDPI-savvy 
3022         assumed that the deviceScaleFactor would always be baked into the CTM of the
3023         GraphicsContext. But that is NOT the case in WebKit 1.
3024
3025         createCompatibleBuffer() is used for clip text and gradients.
3026
3027         Now getCTM() takes a parameter indicating whether the result should definitely
3028         include the device scale, or if it should possibly included the device scale, 
3029         which is the option that matches old behavior.
3030         * platform/graphics/GraphicsContext.h:
3031         (GraphicsContext):
3032         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3033         (WebCore::GraphicsContext::getCTM):
3034         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3035         (WebCore::GraphicsContext::getCTM):
3036         * platform/graphics/qt/GraphicsContextQt.cpp:
3037         (WebCore::GraphicsContext::getCTM):
3038         * platform/graphics/skia/GraphicsContextSkia.cpp:
3039         (WebCore::GraphicsContext::getCTM):
3040         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3041         (WebCore::GraphicsContext::getCTM):
3042         * platform/graphics/wx/GraphicsContextWx.cpp:
3043         (WebCore::GraphicsContext::getCTM):
3044
3045         Actually use the new parameter in the CG implementation. Use CG API to get a
3046         matrix that definitely includes the device scale when that is required. 
3047         * platform/graphics/cg/GraphicsContextCG.cpp:
3048         (WebCore::GraphicsContext::getCTM):
3049
3050         Remove some symbol cruft that doesn't seem to require a replacement.
3051         * WebCore.exp.in:
3052
3053         Use DefinitelyIncludeDeviceScale when getting the CTM in the buggy spot.
3054         * platform/graphics/GraphicsContext.cpp:
3055         (WebCore::GraphicsContext::createCompatibleBuffer):
3056
3057         The ImageBuffer for gradients is created using createCompatibleBuffer(), and since 
3058         createCompatibleBuffer() now uses getCTM(DefinitelyIncludeDeviceScale) to 
3059         determine appropriate sizing, drawPattern() should use that same matrix to 
3060         determine pattern sizing.
3061         * platform/graphics/GeneratorGeneratedImage.cpp:
3062         (WebCore::GeneratorGeneratedImage::drawPattern):
3063
3064 2012-07-27  Tony Chang  <tony@chromium.org>
3065
3066         flex-wrap: wrap not wrapping for % sized items in column flow
3067         https://bugs.webkit.org/show_bug.cgi?id=92324
3068
3069         Reviewed by Ojan Vafai.
3070
3071         We were using trying to use the value of contentLogicalHeight() before having called computeLogicalHeight()
3072         in a few places. Fix this in mainAxisContentExtent() rather than at the callers.
3073
3074         Test: css3/flexbox/percentage-heights.html
3075
3076         * rendering/RenderFlexibleBox.cpp:
3077         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
3078         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): If we haven't called computeLogicalHeight, we try to compute
3079         the height based on the fixed flexbox value. min/max don't matter here since percent values are only based on height/width.
3080         * rendering/RenderFlexibleBox.h: Drop const because computeContentLogicalHeightUsing is not const. I can
3081         try making computeContentLogicalHeightUsing const in a follow up change (might be non-trivial).
3082
3083 2012-07-27  Min Qin  <qinmin@chromium.org>
3084
3085         Add an overlay play button to media controls on android
3086         https://bugs.webkit.org/show_bug.cgi?id=92132
3087
3088         Reviewed by Adam Barth.
3089
3090         This change adds an overlay play button to the media controls for android.
3091         No tests for now as this setting is not being used by other port.
3092         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
3093
3094         * WebCore.gypi:
3095         * css/CSSPrimitiveValueMappings.h:
3096         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3097         * css/CSSValueKeywords.in:
3098         * css/mediaControls.css:
3099         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
3100         * css/mediaControlsChromiumAndroid.css:
3101         (audio::-webkit-media-controls-overlay-enclosure):
3102         (video::-webkit-media-controls-overlay-enclosure):
3103         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
3104         (video::-webkit-media-controls-overlay-play-button):
3105         * html/shadow/MediaControlElements.cpp:
3106         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
3107         (WebCore):
3108         (WebCore::MediaControlOverlayPlayButtonElement::create):
3109         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
3110         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
3111         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
3112         * html/shadow/MediaControlElements.h:
3113         (MediaControlOverlayPlayButtonElement):
3114         (WebCore):
3115         * html/shadow/MediaControlRootElementChromium.cpp:
3116         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
3117         (WebCore::MediaControlPanelEnclosureElement::create):
3118         (WebCore):
3119         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
3120         (WebCore::MediaControlRootElementChromium::create):
3121         (WebCore::MediaControlRootElementChromium::initializeControls):
3122         * html/shadow/MediaControlRootElementChromium.h:
3123         (MediaControlChromiumEnclosureElement):
3124         (WebCore):
3125         (MediaControlPanelEnclosureElement):
3126         (MediaControlRootElementChromium):
3127         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
3128         (WebCore):
3129         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
3130         (WebCore::MediaControlOverlayEnclosureElement::create):
3131         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
3132         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
3133         (WebCore::MediaControls::create):
3134         (WebCore::MediaControlRootElementChromiumAndroid::create):
3135         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
3136         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
3137         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
3138         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
3139         (WebCore):
3140         (MediaControlOverlayEnclosureElement):
3141         (MediaControlRootElementChromiumAndroid):
3142         * platform/ThemeTypes.h:
3143         * rendering/RenderMediaControlsChromium.cpp:
3144         (WebCore::paintMediaOverlayPlayButton):
3145         (WebCore):
3146         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
3147         * rendering/RenderTheme.cpp:
3148         (WebCore::RenderTheme::paint):
3149         * rendering/RenderTheme.h:
3150         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
3151         * rendering/RenderThemeChromiumAndroid.cpp:
3152         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
3153         (WebCore):
3154         * rendering/RenderThemeChromiumAndroid.h:
3155
3156 2012-07-27  Anders Carlsson  <andersca@apple.com>
3157
3158         Show the unavailable plug-in indicator for Java applets as well
3159         https://bugs.webkit.org/show_bug.cgi?id=92521
3160
3161         Reviewed by Sam Weinig.
3162
3163         Now that <applet> behaves more like <embed> and <object>, make sure that we show the unavailable plug-in indicator
3164         and call the correct error callbacks if we fail to instantiate the plug-in.
3165
3166         * WebCore.exp.in:
3167         Export a symbol needed by WebKit2.
3168
3169         * html/HTMLAppletElement.cpp:
3170         (WebCore::HTMLAppletElement::HTMLAppletElement):
3171         Set the correct service type.
3172
3173         * loader/SubframeLoader.cpp:
3174         (WebCore::SubframeLoader::createJavaAppletWidget):
3175         Enable the unavailable plug-in indicator if we fail to create the java applet widget.
3176
3177 2012-07-27  Dan Bernstein  <mitz@apple.com>
3178
3179         Hit testing near a column break can return a result from an adjacent column when there is leading
3180         https://bugs.webkit.org/show_bug.cgi?id=92524
3181
3182         Reviewed by Anders Carlsson.
3183
3184         The fix for <http://webkit.org/b/92311> relied on the existence of a pagination strut for
3185         detecting that a line was at the beginning of a new column. However, when a line naturally
3186         falls at the beginning of a column, there is no pagination strut, and the check failed.
3187
3188         Test: fast/multicol/hit-test-end-of-column-with-line-height.html
3189
3190         * rendering/InlineFlowBox.h:
3191         (WebCore::InlineFlowBox::InlineFlowBox): Added initializer for new member variable.
3192         (InlineFlowBox): Added m_isFirstAfterPageBreak member variable.
3193         * rendering/RenderBlock.cpp:
3194         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed the test for whether a
3195         line was at the beginning of a column from relying on a pagination strut to checking
3196         isFirstAfterPageBreak(). Also refined the hit test itself to include the leading above such
3197         a line.
3198         (WebCore::RenderBlock::adjustLinePositionForPagination): Added calls to
3199         setIsFirstAfterPageBreak() to first reset this flag, then set it to true if necessary.
3200         * rendering/RootInlineBox.h:
3201         (WebCore::RootInlineBox::isFirstAfterPageBreak): Added this accessor.
3202         (WebCore::RootInlineBox::setIsFirstAfterPageBreak): Ditto.
3203
3204 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
3205
3206         Web Inspector: Allow front_end to be loaded into an iframe
3207         https://bugs.webkit.org/show_bug.cgi?id=92437
3208
3209         Reviewed by Pavel Feldman.
3210
3211         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
3212
3213         * inspector/front-end/ExtensionAPI.js: 
3214         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
3215         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
3216         extensions are iframes in iframes and we need to use a relative address window.parent.
3217         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
3218         (injectedExtensionAPI.ExtensionViewImpl):
3219         (injectedExtensionAPI.ExtensionServerClient):
3220         WebKit/chromium/scripts/generate_devtools_extension_api.py:
3221         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
3222         window.parent.
3223
3224 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
3225
3226         Web Inspector: Allow front_end to be loaded into an iframe
3227         https://bugs.webkit.org/show_bug.cgi?id=92437
3228
3229         Reviewed by Pavel Feldman.
3230
3231         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
3232
3233         * inspector/front-end/ExtensionAPI.js: 
3234         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
3235         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
3236         extensions are iframes in iframes and we need to use a relative address window.parent.
3237         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
3238         (injectedExtensionAPI.ExtensionViewImpl):
3239         (injectedExtensionAPI.ExtensionServerClient):
3240         WebKit/chromium/scripts/generate_devtools_extension_api.py:
3241         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
3242         window.parent.
3243
3244 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
3245
3246         Web Inspector: InspectorPageAgent should ascertain document to be non-null in updateViewMetrics()
3247         https://bugs.webkit.org/show_bug.cgi?id=92476
3248
3249         Reviewed by Pavel Feldman.
3250
3251         InspectorPageAgent should check for document object being null. As pages created with blank URL might
3252         not have the document object, this causes a crash.
3253
3254         No new tests as added null check.
3255
3256         * inspector/InspectorPageAgent.cpp:
3257         (WebCore::InspectorPageAgent::updateViewMetrics):
3258
3259 2012-07-27  Mike West  <mkwst@chromium.org>
3260
3261         CSP directives containing invalid characters should log an error.
3262         https://bugs.webkit.org/show_bug.cgi?id=92487
3263
3264         Reviewed by Adam Barth.
3265
3266         Unknown directive names are currently logged, but we exit the directive
3267         parser early without logging if we hit an invalid character inside a
3268         directive. `script-src: ...`, for example, was ignored without letting
3269         the developer know what happened. This patch changes that behavior,
3270         logging the whole name (in this case `script-src:`) as an unknown
3271         directive.
3272
3273         Test: http/tests/security/contentSecurityPolicy/directive-parsing-04.html
3274
3275         * page/ContentSecurityPolicy.cpp:
3276         (WebCore::CSPDirectiveList::parseDirective):
3277
3278 2012-07-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
3279
3280         [Texmap] Performance regression in texture uploads after r121223
3281         https://bugs.webkit.org/show_bug.cgi?id=91897
3282
3283         Reviewed by Jocelyn Turcotte.
3284
3285         Rolling out r121223, with some conflict fixes.
3286
3287         * platform/graphics/texmap/TextureMapperGL.cpp:
3288         (WebCore::swizzleBGRAToRGBA):
3289         (WebCore):
3290         (WebCore::driverSupportsBGRASwizzling):
3291         (WebCore::BitmapTextureGL::didReset):
3292         (WebCore::BitmapTextureGL::updateContents):
3293
3294 2012-07-27  Joe Mason  <jmason@rim.com>
3295
3296         [BlackBerry] Update NetworkJob::sendRequestWithCredentials to use new getProxyAddress API
3297         https://bugs.webkit.org/show_bug.cgi?id=92457
3298
3299         Reviewed by Yong Li.
3300
3301         getProxyAddress now returns "host:port", and getProxyPort is gone. Update NetworkJob to use
3302         the new interface.
3303
3304         RIM PR: 176166
3305         Internally reviewed by Jonathan Dong <jonathan.dong@torchmobile.com.cn>
3306
3307         * platform/network/blackberry/NetworkJob.cpp:
3308         (WebCore::NetworkJob::sendRequestWithCredentials):
3309
3310 2012-07-27  Kevin Ellis  <kevers@chromium.org>
3311
3312         Improve touch adjustment for targetting small controls.
3313         https://bugs.webkit.org/show_bug.cgi?id=92293
3314
3315         Reviewed by Antonio Gomes.
3316
3317         Modifies the touch adjustment algorithm to better discriminate small targets without introducing
3318         a bias towards shorter links.  The revised scoring algorihtm uses a normalized distance to
3319         center-line score and a normalized overlap score.  The better of the two scores is used for
3320         determining the best candidate for target adjustment.  The center-line score works well
3321         for discriminating elements with partial overlaps, where relying solely on percent overlap
3322         could bias towards the smaller element.  Conversely, a high percentage in overlap provides a 
3323         strong measure of confidence in a candidate target.  An additonal tie-break algorithm is
3324         introduced to minimize the adjustment distance if two equally suitable candidates are found.
3325
3326         Test: touchadjustment/small-target-test.html
3327
3328         * page/TouchAdjustment.cpp:
3329         (TouchAdjustment):
3330         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
3331         (WebCore::TouchAdjustment::hybridDistanceFunction):
3332         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
3333         (WebCore::findBestClickableCandidate):
3334
3335 2012-07-27  Kevin Ellis  <kevers@chromium.org>
3336
3337         [chromium] Calendar for input type=date should be larger on devices that support touch input.
3338         https://bugs.webkit.org/show_bug.cgi?id=92424
3339
3340         Reviewed by Kent Tamura.
3341
3342         Adds touch specific CSS rules to enlarge entries in the calendar on
3343         screens that support touch input.
3344
3345         Manually tested with touch support enabled/disabled.
3346
3347         * Resources/calendarPicker.css:
3348         (@media (pointer:coarse)):
3349         * html/shadow/CalendarPickerElement.cpp:
3350         (WebCore::CalendarPickerElement::contentSize):
3351
3352 2012-07-28  Chris Fleizach  <cfleizach@apple.com>
3353
3354         WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation
3355         https://bugs.webkit.org/show_bug.cgi?id=91911
3356
3357         Reviewed by Darin Adler.
3358
3359         Update comments around code to explain rationale.
3360
3361         * accessibility/AccessibilityRenderObject.cpp:
3362         (WebCore::AccessibilityRenderObject::helpText):
3363         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3364
3365 2012-07-27  Zoltan Horvath  <zoltan@webkit.org>
3366
3367         Add runtime flag to enable/disable JS memory information
3368         https://bugs.webkit.org/show_bug.cgi?id=92479
3369
3370         Reviewed by Simon Hausmann.
3371
3372         We need console.memory JS object to be accessible because of the memory consumption
3373         measurements of the performance tests, so I added a toggle to InternalSettings.
3374
3375         * testing/InternalSettings.cpp:
3376         (WebCore::InternalSettings::setMemoryInfoEnabled):
3377         (WebCore):
3378         * testing/InternalSettings.h:
3379         (InternalSettings):
3380         * testing/InternalSettings.idl:
3381
3382 2012-07-27  Arko Saha  <arko@motorola.com>
3383
3384         Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.
3385         https://bugs.webkit.org/show_bug.cgi?id=92482
3386
3387         Reviewed by Kentaro Hara.
3388
3389         Removed custom methods toJS() and toV8Object(). We should use toJS() method defined in
3390         JSMicroDataItemValueCustom.cpp and toV8() method defined in V8MicroDataItemValueCustom.cpp
3391         in place of custom toJs() and toV8Object().
3392
3393         Existing tests :
3394                 fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element.html
3395                 fast/dom/MicroData/itemvalue-reflects-href-attr.html
3396                 fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element.html
3397                 fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element.html
3398                 fast/dom/MicroData/itemvalue-reflects-the-src-attr.html
3399                 fast/dom/MicroData/itemvalue-returns-element-itself.html
3400                 fast/dom/MicroData/itemvalue-returns-null.html
3401                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html
3402                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002.html
3403
3404         * bindings/js/JSHTMLElementCustom.cpp:
3405         (WebCore):
3406         * bindings/v8/custom/V8HTMLElementCustom.cpp:
3407         (WebCore):
3408         (WebCore::V8HTMLElement::itemValueAccessorGetter):
3409
3410 2012-07-27  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3411
3412         REGRESSION(r123856): Breaks the build when disabling inspector
3413         https://bugs.webkit.org/show_bug.cgi?id=92493
3414
3415         Reviewed by Kentaro Hara.
3416
3417         * bindings/js/ScriptGCEvent.h:
3418         (WebCore):
3419         * bindings/v8/ScriptGCEvent.h:
3420         (WebCore):
3421
3422 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
3423
3424         [EFL][WK2] Add API to Ewk_Cookie_Manager to watch for cookie changes
3425         https://bugs.webkit.org/show_bug.cgi?id=92484
3426
3427         Reviewed by Kenneth Rohde Christiansen.
3428
3429         Make use of soup/CookieStorageSoup.cpp for EFL port instead
3430         of defining empty implementations for cookie storage
3431         functions.
3432
3433         No new tests, no behavior change.
3434
3435         * PlatformEfl.cmake:
3436         * platform/efl/TemporaryLinkStubs.cpp:
3437
3438 2012-07-27  Keishi Hattori  <keishi@webkit.org>
3439
3440         Replace ColorChooserClient::elementRectRelativeToWindow with elementRectRelativeToRootView
3441         https://bugs.webkit.org/show_bug.cgi?id=92488
3442
3443         Reviewed by Kent Tamura.
3444
3445         Changing ColorChooserClient interface to return element rectangle that is relative to root view instead of window.
3446
3447         No new tests. Method is not used yet.
3448
3449         * html/ColorInputType.cpp:
3450         (WebCore::ColorInputType::elementRectRelativeToRootView): Replaced elementRectRelativeToWindow. Returns element rectangle relative to root view.
3451         * html/ColorInputType.h:
3452         (ColorInputType):
3453         * platform/ColorChooserClient.h:
3454         (ColorChooserClient):
3455
3456 2012-07-27  Dominik Röttsches  <dominik.rottsches@intel.com>
3457
3458         [Cairo] Add complex font drawing using HarfbuzzNG
3459         https://bugs.webkit.org/show_bug.cgi?id=91864
3460
3461         Reviewed by Simon Hausmann and Martin Robinson.
3462