ASSERTION FAILED: !rect.isEmpty() : void WebCore::GraphicsContext::drawRect(const...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
2
3         ASSERTION FAILED: !rect.isEmpty()  : void WebCore::GraphicsContext::drawRect(const WebCore::IntRect &)
4         https://bugs.webkit.org/show_bug.cgi?id=92187
5
6         Reviewed by Simon Fraser.
7
8         The border painting logic (RenderBoxModelObject::paintOneBorderSide) would pass a rect with a 0px length
9         to RenderObject::drawLineForBoxSide. We do check the width (thickness) but not the length so we would pass
10         the rect to GraphicsContext and hit the ASSERT. This change adds a check for the length too as it is the safest
11         way, it means that we may still do unneeded operations before bailing out but that's an existing problem in the code.
12
13         Tests: fast/borders/0px-borders-no-line-height.html
14                fast/borders/double-1px-border-assert.html
15
16         * rendering/RenderObject.cpp:
17         (WebCore::RenderObject::drawLineForBoxSide):
18         Added a 0px length check. While renaming confusing variables and re-using others,
19         I also found a potential empty border that I fixed (tested by the 2nd case above).
20
21 2012-07-26  Stephen White  <senorblanco@chromium.org>
22
23         [chromium] Refactor the computation of resampled bitmap size in
24         drawImage and drawPattern.
25         https://bugs.webkit.org/show_bug.cgi?id=92408
26
27         Reviewed by Adrienne Walker.
28
29         We used to have a special-purpose function called TransformDimensions()
30         which did pretty much the same thing as SkRect::mapRect() does.  This
31         change unifies the drawPattern code to use mapRect() in the same way
32         that drawImage() does.
33
34         Covered by existing tests, e.g., fast/backgrounds/size/*.
35
36         * platform/graphics/skia/ImageSkia.cpp:
37         (WebCore):
38         (WebCore::Image::drawPattern):
39         Note:  we're now doing using the original (float) source rect, and
40         converting to int only after applying the matrix transform.  This
41         might result in different decisions about resampling mode, but it's
42         more correct anyway.
43
44 2012-07-30  Vineet Chaudhary  <rgf748@motorola.com>
45
46         https://bugs.webkit.org/show_bug.cgi?id=92642
47         [Bindings]Remove custom JS/V8 bindings for WebSocket::close() using [Clamp]
48
49         Reviewed by Kentaro Hara.
50
51         With support of [Clamp] as extended attribute we can replace custom bindings from WebSocket::close().
52         Spec for WebSocket::close() : http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket
53
54         No new tests. There should be no behavioural changes 
55         Existing tests under http/websocket/tests/hybi/ should cover this.
56
57         * Modules/websockets/WebSocket.h:
58         (WebCore::WebSocket::close):
59         * Modules/websockets/WebSocket.idl: Used [Clamp].
60         * bindings/js/JSWebSocketCustom.cpp: Removed custom call close().
61         (WebCore):
62         * bindings/scripts/CodeGeneratorJS.pm:
63         (GenerateParametersCheck):
64         * bindings/scripts/CodeGeneratorV8.pm:
65         (GenerateParametersCheck):
66         * bindings/scripts/test/JS/JSTestObj.cpp:
67         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
68         * bindings/scripts/test/V8/V8TestObj.cpp:
69         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
70         * bindings/v8/custom/V8WebSocketCustom.cpp: Removed custom call close().
71         (WebCore):
72
73 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
74
75         Web Inspector: Resource agent's reference to cached resources should be weak.
76         https://bugs.webkit.org/show_bug.cgi?id=92108
77
78         Reviewed by Pavel Feldman.
79
80         NetworkResourcesData now stores a raw pointer to CachedResource.
81         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
82         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
83         Destroyed resources content is saved to NetworkResourcesData.
84
85         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
86                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
87
88         * WebCore.exp.in:
89         * inspector/InspectorController.cpp:
90         (WebCore::InspectorController::InspectorController):
91         (WebCore::InspectorController::inspectedPageDestroyed):
92         * inspector/InspectorInstrumentation.cpp:
93         (WebCore):
94         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
95         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
96         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
97         * inspector/InspectorInstrumentation.h:
98         (InspectorInstrumentation):
99         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
100         (WebCore):
101         * inspector/InspectorResourceAgent.cpp:
102         (WebCore::InspectorResourceAgent::didReceiveData):
103         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
104         (WebCore):
105         (WebCore::InspectorResourceAgent::getResponseBody):
106         * inspector/InspectorResourceAgent.h:
107         (InspectorResourceAgent):
108         * inspector/NetworkResourcesData.cpp:
109         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
110         (WebCore::NetworkResourcesData::ResourceData::setContent):
111         (WebCore::NetworkResourcesData::setResourceContent):
112         (WebCore::NetworkResourcesData::removeCachedResource):
113         (WebCore):
114         * inspector/NetworkResourcesData.h:
115         (ResourceData):
116         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
117         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
118         (NetworkResourcesData):
119         * loader/cache/CachedResource.cpp:
120         (WebCore::CachedResource::~CachedResource):
121         (WebCore::CachedResource::removeClient):
122         (WebCore::CachedResource::deleteIfPossible):
123         (WebCore):
124         * loader/cache/CachedResource.h:
125         (CachedResource):
126         * loader/cache/CachedResourceLoader.cpp:
127         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
128         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
129         (WebCore::CachedResourceLoader::clearPreloads):
130         * loader/cache/CachedResourceLoader.h:
131         (CachedResourceLoader):
132         * loader/cache/MemoryCache.cpp:
133         (WebCore::MemoryCache::evict):
134         * testing/InternalSettings.cpp:
135         * testing/Internals.cpp:
136         (WebCore::Internals::garbageCollectDocumentResources):
137         (WebCore):
138         * testing/Internals.h:
139         (Internals):
140         * testing/Internals.idl:
141
142 2012-07-30  Shinya Kawanaka  <shinyak@chromium.org>
143
144         Prohibit having AuthorShadowDOM of input or textarea element for a while and having a flag to enable it in Internals.
145         https://bugs.webkit.org/show_bug.cgi?id=92611
146
147         Reviewed by Hajime Morita.
148
149         Prohibit having AuthorShadowDOM of input elemnet unless a flag in RuntimeEnabledFeatures is not enabled.
150         The flag can be enabled in Internals.
151
152         The elements in UserAgentShadowDOM of input element assume that they have a renderer when the input
153         element has a renderer. However, this does not hold when AuthorShadowDOM is added to input element.
154         So until we fix the issue, we should disable to have AuthorShadowDOM for input element, because it may
155         cause crashes and security problems.
156
157         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
158                fast/dom/shadow/input-with-validation.html
159                fast/dom/shadow/shadow-disable.html
160
161         * bindings/generic/RuntimeEnabledFeatures.cpp:
162         (WebCore):
163         * bindings/generic/RuntimeEnabledFeatures.h:
164         (RuntimeEnabledFeatures):
165         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
166         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
167         * dom/ShadowRoot.cpp:
168         (WebCore::allowsAuthorShadowRoot): The input element or textarea element does not allow to have a ShadowDOM unless
169         is a flag in RuntimeEnabledFeatures is not enabled.
170         * html/HTMLInputElement.h:
171         (WebCore::isHTMLInputElement):
172         (WebCore):
173         * html/HTMLTextAreaElement.h:
174         (WebCore::isHTMLTextAreaElement):
175         (WebCore):
176         * testing/Internals.cpp:
177         (WebCore::Internals::setAuthorShadowDOMForAnyElementEnabled):
178         (WebCore):
179         * testing/Internals.h:
180         (Internals):
181         * testing/Internals.idl:
182
183 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
184
185         Web Inspector: support --line-numbers mapping for SASS
186         https://bugs.webkit.org/show_bug.cgi?id=92400
187
188         Reviewed by Vsevolod Vlasov.
189
190         There is --debug-info and --line-numbers ways of referencing the source scss file, adding support for --line-numbers here.
191
192         * inspector/front-end/SASSSourceMapping.js:
193         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
194         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
195         (_bindUISourceCode):
196
197 2012-07-30  Keishi Hattori  <keishi@webkit.org>
198
199         Implement datalist UI for input type color for Chromium
200         https://bugs.webkit.org/show_bug.cgi?id=92075
201
202         Reviewed by Kent Tamura.
203
204         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
205
206         * rendering/RenderThemeChromiumCommon.cpp:
207         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
208
209 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
210
211         Wheel events on a page with frames are not handled in fixed layout
212         https://bugs.webkit.org/show_bug.cgi?id=90550
213
214         Reviewed by Antonio Gomes.
215
216         Based on patch by Andras Becsi.
217
218         Frame-rect size is not the right value to check against to see if the document
219         can be contained within the full visible content rect, since it does not handle
220         fixedVisibleContentRect. Instead visibleContentRect(true) should be used which
221         returns the full visible content rect disregarding scrollbars, and which is
222         the same a frame-rect size when fixedVisibleContentRect is not set.
223
224         * platform/ScrollView.cpp:
225         (WebCore::ScrollView::updateScrollbars):
226
227 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
228
229         There is no way to tell whether an element can be activated or not
230         https://bugs.webkit.org/show_bug.cgi?id=92093
231
232         Reviewed by Antonio Gomes.
233
234         This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
235         functions, named after similar functions in the iOS fork of WebKit.
236
237         Touch-adjustment will now use these two functions, which improves accuracy when
238         targeting shadow-dom elements, and also means touch adjustment will prefer enabled
239         form-elements over disabled ones.
240
241         Test: touchadjustment/disabled-formelements.html
242
243         * dom/Node.cpp:
244         (WebCore::Node::willRespondToMouseMoveEvents):
245         (WebCore::Node::willRespondToMouseClickEvents):
246         * dom/Node.h:
247         (Node):
248         * editing/DeleteButton.h:
249         * html/HTMLAnchorElement.cpp:
250         (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
251         * html/HTMLAnchorElement.h:
252         (HTMLAnchorElement):
253         * html/HTMLButtonElement.cpp:
254         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
255         * html/HTMLButtonElement.h:
256         (HTMLButtonElement):
257         * html/HTMLInputElement.cpp:
258         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
259         * html/HTMLInputElement.h:
260         (HTMLInputElement):
261         * html/HTMLLabelElement.cpp:
262         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
263         * html/HTMLLabelElement.h:
264         (HTMLLabelElement):
265         * html/HTMLMediaElement.cpp:
266         (WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
267         * html/HTMLMediaElement.h:
268         * html/HTMLSummaryElement.cpp:
269         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
270         * html/HTMLSummaryElement.h:
271         (HTMLSummaryElement):
272         * html/shadow/CalendarPickerElement.cpp:
273         (WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
274         * html/shadow/CalendarPickerElement.h:
275         (CalendarPickerElement):
276         * html/shadow/MediaControlElements.cpp:
277         (WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
278         (WebCore::MediaControlTimelineElement::setPosition):
279         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
280         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
281         * html/shadow/MediaControlElements.h:
282         (MediaControlTimelineElement):
283         (MediaControlVolumeSliderElement):
284         * html/shadow/MediaControlRootElement.h:
285         * html/shadow/SliderThumbElement.cpp:
286         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
287         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
288         * html/shadow/SliderThumbElement.h:
289         (SliderThumbElement):
290         * html/shadow/TextControlInnerElements.cpp:
291         (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
292         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
293         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
294         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
295         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
296         * html/shadow/TextControlInnerElements.h:
297         (SearchFieldResultsButtonElement):
298         (SearchFieldCancelButtonElement):
299         (SpinButtonElement):
300         * html/shadow/TextFieldDecorationElement.cpp:
301         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
302         * html/shadow/TextFieldDecorationElement.h:
303         (TextFieldDecorationElement):
304         * page/TouchAdjustment.cpp:
305         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
306
307 2012-07-30  Vsevolod Vlasov  <vsevik@chromium.org>
308
309         Web Inspector: Content size variables in NetworkResourcesData should have size_t type instead of int.
310         https://bugs.webkit.org/show_bug.cgi?id=92618
311
312         Reviewed by Yury Semikhatsky.
313
314         Changed content size variables type in NetworkResourcesData from int to size_t.
315         Drive-by: Switched String length calculation to recently added StringImpl's sizeInBytes.
316
317         * inspector/NetworkResourcesData.cpp:
318         (WebCore::NetworkResourcesData::ResourceData::removeContent):
319         (WebCore::NetworkResourcesData::ResourceData::dataLength):
320         (WebCore::NetworkResourcesData::ResourceData::appendData):
321         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
322         (WebCore::NetworkResourcesData::setResourceContent):
323         (WebCore::NetworkResourcesData::maybeAddResourceData):
324         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
325         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
326         (WebCore::NetworkResourcesData::ensureFreeSpace):
327         * inspector/NetworkResourcesData.h:
328         (ResourceData):
329         (NetworkResourcesData):
330
331 2012-07-30  Hayato Ito  <hayato@chromium.org>
332
333         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
334         https://bugs.webkit.org/show_bug.cgi?id=92625
335
336         Reviewed by Hajime Morita.
337
338         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
339
340         No new tests, no behavior change.
341
342         * dom/EventDispatcher.cpp:
343         (WebCore::EventDispatcher::EventDispatcher):
344         (WebCore::EventDispatcher::dispatchEvent):
345         * dom/EventDispatcher.h:
346         (EventDispatcher):
347
348 2012-07-30  Hayato Ito  <hayato@chromium.org>
349
350         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
351         https://bugs.webkit.org/show_bug.cgi?id=92625
352
353         Reviewed by Hajime Morita.
354
355         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
356
357         No new tests, no behavior change.
358
359         * dom/EventDispatcher.cpp:
360         (WebCore::EventDispatcher::EventDispatcher):
361         (WebCore::EventDispatcher::dispatchEvent):
362         * dom/EventDispatcher.h:
363         (EventDispatcher):
364
365 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
366
367         Web Inspector: make MemoryInstrumentation methods private
368         https://bugs.webkit.org/show_bug.cgi?id=92379
369
370         Reviewed by Vsevolod Vlasov.
371
372         MemoryInstrumentation was refactored.
373         - All reporting methods on MemoryInstrumentation except add*Object are
374           private to enforce MemoryClassInfo usage.
375         - MemoryInstrumentation::Add*Member methods renamed to Add*Object
376         - String reporting is implemented directly in the MemoryInstrumentation,
377           not in its descendants.
378
379         * CMakeLists.txt:
380         * GNUmakefile.list.am:
381         * WebCore.gypi:
382         * WebCore.vcproj/WebCore.vcproj:
383         * WebCore.xcodeproj/project.pbxproj:
384         * bindings/v8/ScriptProfiler.cpp:
385         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
386         * dom/MemoryInstrumentation.cpp: Added.
387         (WebCore):
388         (WebCore::MemoryInstrumentation::addString):
389         * dom/MemoryInstrumentation.h:
390         (WebCore::MemoryInstrumentation::addInstrumentedObject):
391         (WebCore::MemoryInstrumentation::addObject):
392         (MemoryInstrumentation):
393         (InstrumentedPointerBase):
394         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
395         (InstrumentedPointer):
396         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
397         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
398         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
399         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
400         (WebCore::MemoryClassInfo::addInstrumentedMember):
401         (WebCore::MemoryClassInfo::addMember):
402         (WebCore):
403         (WebCore::MemoryInstrumentation::addObjectImpl):
404         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
405         (WebCore::MemoryInstrumentation::calculateContainerSize):
406         * inspector/InspectorMemoryAgent.cpp:
407         (WebCore):
408
409 2012-07-30  Alexander Pavlov  <apavlov@chromium.org>
410
411         Web Inspector: [Styles] No color swatch for the SVG "fill" and "stroke" property values
412         https://bugs.webkit.org/show_bug.cgi?id=92638
413
414         Reviewed by Vsevolod Vlasov.
415
416         Added the "fill" and "stroke" properties to the list of color-aware properties.
417
418         * inspector/front-end/CSSKeywordCompletions.js:
419
420 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
421
422         Unreviewed, rolling out r124000.
423         http://trac.webkit.org/changeset/124000
424         https://bugs.webkit.org/show_bug.cgi?id=92632
425
426         seems to have broken chromium Range_InstanceSizeUnknown unit
427         test across many platforms (Requested by tomhudson on
428         #webkit).
429
430         * WebCore.exp.in:
431         * inspector/InspectorController.cpp:
432         (WebCore::InspectorController::InspectorController):
433         (WebCore::InspectorController::inspectedPageDestroyed):
434         * inspector/InspectorInstrumentation.cpp:
435         (WebCore):
436         * inspector/InspectorInstrumentation.h:
437         (InspectorInstrumentation):
438         * inspector/InspectorResourceAgent.cpp:
439         (WebCore::InspectorResourceAgent::didReceiveData):
440         (WebCore::InspectorResourceAgent::getResponseBody):
441         * inspector/InspectorResourceAgent.h:
442         (InspectorResourceAgent):
443         * inspector/NetworkResourcesData.cpp:
444         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
445         (WebCore::NetworkResourcesData::ResourceData::setContent):
446         (WebCore::NetworkResourcesData::setResourceContent):
447         * inspector/NetworkResourcesData.h:
448         (ResourceData):
449         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
450         (NetworkResourcesData):
451         * loader/cache/CachedResource.cpp:
452         (WebCore::CachedResource::~CachedResource):
453         (WebCore::CachedResource::removeClient):
454         (WebCore::CachedResource::deleteIfPossible):
455         (WebCore):
456         * loader/cache/CachedResource.h:
457         (CachedResource):
458         * loader/cache/CachedResourceLoader.cpp:
459         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
460         (WebCore::CachedResourceLoader::clearPreloads):
461         * loader/cache/CachedResourceLoader.h:
462         (CachedResourceLoader):
463         * loader/cache/MemoryCache.cpp:
464         (WebCore::MemoryCache::evict):
465         * testing/InternalSettings.cpp:
466         * testing/Internals.cpp:
467         * testing/Internals.h:
468         (Internals):
469         * testing/Internals.idl:
470
471 2012-07-30  Hayato Ito  <hayato@chromium.org>
472
473         Remove an unused member variable, m_originalTarget, from EventDispatcher.
474         https://bugs.webkit.org/show_bug.cgi?id=92614
475
476         Reviewed by Andreas Kling.
477
478         No one uses EventDispatcher::m_originalTarget.
479
480         No new tests, no behavior change.
481
482         * dom/EventDispatcher.h:
483         (EventDispatcher):
484
485 2012-07-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
486
487         [Qt] Fix issues remaining with fixed positioned layers
488         https://bugs.webkit.org/show_bug.cgi?id=92528
489
490         Reviewed by Noam Rosenthal.
491
492         * platform/graphics/texmap/TextureMapperLayer.cpp:
493         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
494         Make sure that the delta is used when syncCompositingStateSelf is called afterward.
495         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
496         * platform/graphics/texmap/TextureMapperLayer.h:
497         Use a FloatSize instead of an IntPoint for the delta.
498         (TextureMapperLayer):
499         (WebCore::TextureMapperLayer::adjustedPosition):
500
501 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
502
503         Replace UnicodeWinCE with UnicodeWchar
504         https://bugs.webkit.org/show_bug.cgi?id=92539
505
506         Reviewed by Ryosuke Niwa.
507
508         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
509         is a replacement for it, which is mainly based on the functions
510         from <wchar.h>. It is ment as a minimal Unicode backend, which
511         can be used very easy and has no external dependencies.
512
513         * platform/text/TextEncoding.cpp:
514         (WebCore::TextEncoding::encode):
515         * platform/text/TextEncodingRegistry.cpp:
516         (WebCore::extendTextCodecMaps):
517
518 2012-07-30  Hayato Ito  <hayato@chromium.org>
519
520         Remove unnecessary code which set event's target from EventDispatcher::dispatchEvent.
521         https://bugs.webkit.org/show_bug.cgi?id=92613
522
523         Reviewed by Hajime Morita.
524
525         EventContext::handleLocalEvents does all required jobs so we don't
526         need to set target in EventDispacher::dispatchEvent() for TARGET phase.
527
528         No new tests, no behavior change.
529
530         * dom/EventDispatcher.cpp:
531         (WebCore::EventDispatcher::dispatchEvent):
532
533 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
534
535         Unreviewed, rolling out r124004.
536         http://trac.webkit.org/changeset/124004
537         https://bugs.webkit.org/show_bug.cgi?id=92622
538
539         Broke Android build (Requested by keishi on #webkit).
540
541         * rendering/RenderThemeChromiumCommon.cpp:
542         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
543
544 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
545
546         Web Inspector: element tag disappears after editing
547         https://bugs.webkit.org/show_bug.cgi?id=92385
548
549         Reviewed by Vsevolod Vlasov.
550
551         This has regressed when we started hiding elements panel upon
552         batch updates. Narrowing hiding cases, updating selection
553         in on-screen mode only.
554
555         * inspector/front-end/ElementsTreeOutline.js:
556         (WebInspector.ElementsTreeElement.prototype.updateSelection):
557
558 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
559
560         Web Inspector: move StringImpl size calculation to StringImpl
561         https://bugs.webkit.org/show_bug.cgi?id=92359
562
563         Reviewed by Pavel Feldman.
564
565         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
566         StringImpl::sizeInBytes();
567
568         * inspector/InspectorMemoryAgent.cpp:
569         (WebCore):
570
571 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
572
573         Web Inspector: workers inspector is broken in the remote debugging mode
574         https://bugs.webkit.org/show_bug.cgi?id=92540
575
576         Reviewed by Yury Semikhatsky.
577
578         The problem was that worker manager re-used complete url with query parameters
579         for spin-off worker front-ends. As a result, in case of remote debugging, newly
580         created front-ends were connecting to the same web socket (because of the ws parameter).
581
582         * inspector/front-end/WorkerManager.js:
583         (WebInspector.WorkerManager.isDedicatedWorkerFrontend):
584         * inspector/front-end/inspector.js:
585
586 2012-07-30  Keishi Hattori  <keishi@webkit.org>
587
588         Implement datalist UI for input type color for Chromium
589         https://bugs.webkit.org/show_bug.cgi?id=92075
590
591         Reviewed by Kent Tamura.
592
593         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
594
595         * rendering/RenderThemeChromiumCommon.cpp:
596         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
597
598 2012-07-30  Mario Sanchez Prada  <msanchez@igalia.com>
599
600         REGRESSION (r123767): platform/gtk/accessibility/object-with-title.html failing on GTK
601         https://bugs.webkit.org/show_bug.cgi?id=92477
602
603         Reviewed by Chris Fleizach.
604
605         Consider title and accessibilityDescription together with helpText to
606         decide whether an object should be exposed in the accessibility tree.
607
608         * accessibility/AccessibilityRenderObject.cpp:
609         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
610
611 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
612
613         Web Inspector: Resource agent's reference to cached resources should be weak.
614         https://bugs.webkit.org/show_bug.cgi?id=92108
615
616         Reviewed by Pavel Feldman.
617
618         NetworkResourcesData now stores a raw pointer to CachedResource.
619         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
620         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
621         Destroyed resources content is saved to NetworkResourcesData.
622
623         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
624                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
625
626         * WebCore.exp.in:
627         * inspector/InspectorController.cpp:
628         (WebCore::InspectorController::InspectorController):
629         (WebCore::InspectorController::inspectedPageDestroyed):
630         * inspector/InspectorInstrumentation.cpp:
631         (WebCore):
632         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
633         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
634         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
635         * inspector/InspectorInstrumentation.h:
636         (InspectorInstrumentation):
637         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
638         (WebCore):
639         * inspector/InspectorResourceAgent.cpp:
640         (WebCore::InspectorResourceAgent::didReceiveData):
641         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
642         (WebCore):
643         (WebCore::InspectorResourceAgent::getResponseBody):
644         * inspector/InspectorResourceAgent.h:
645         (InspectorResourceAgent):
646         * inspector/NetworkResourcesData.cpp:
647         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
648         (WebCore::NetworkResourcesData::ResourceData::setContent):
649         (WebCore::NetworkResourcesData::setResourceContent):
650         (WebCore::NetworkResourcesData::removeCachedResource):
651         (WebCore):
652         * inspector/NetworkResourcesData.h:
653         (ResourceData):
654         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
655         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
656         (NetworkResourcesData):
657         * loader/cache/CachedResource.cpp:
658         (WebCore::CachedResource::~CachedResource):
659         (WebCore::CachedResource::removeClient):
660         (WebCore::CachedResource::deleteIfPossible):
661         (WebCore):
662         * loader/cache/CachedResource.h:
663         (CachedResource):
664         * loader/cache/CachedResourceLoader.cpp:
665         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
666         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
667         (WebCore::CachedResourceLoader::clearPreloads):
668         * loader/cache/CachedResourceLoader.h:
669         (CachedResourceLoader):
670         * loader/cache/MemoryCache.cpp:
671         (WebCore::MemoryCache::evict):
672         * testing/InternalSettings.cpp:
673         * testing/Internals.cpp:
674         (WebCore::Internals::garbageCollectDocumentResources):
675         (WebCore):
676         * testing/Internals.h:
677         (Internals):
678         * testing/Internals.idl:
679
680 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
681
682         [WK2][EFL] Accelerated compositing support using TextureMapper on Efl WebKit2
683         https://bugs.webkit.org/show_bug.cgi?id=91583
684
685         Reviewed by Noam Rosenthal.
686
687         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
688         This patch adds Texture Mapper related files to PlatformEfl.cmake.
689         And wrapped TextureMapperLayer and TextureMapperBackingStore with USE(ACCELERATED_COMPOSITING) for fixing building error when disable ACCELERATED_COMPOSITING.
690
691         * CMakeLists.txt:
692         * PlatformEfl.cmake:
693         * platform/graphics/GraphicsLayer.cpp:
694         (WebCore):
695         * platform/graphics/GraphicsLayer.h:
696         (GraphicsLayer):
697         * platform/graphics/GraphicsLayerAnimation.cpp:
698         * platform/graphics/GraphicsLayerAnimation.h:
699         * platform/graphics/PlatformLayer.h:
700         (WebCore):
701         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
702         * platform/graphics/texmap/TextureMapperBackingStore.h:
703         * platform/graphics/texmap/TextureMapperLayer.h:
704
705 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
706
707         [WK2][EFL] TILED_BACKING_STORE support on Efl WebKit2
708         https://bugs.webkit.org/show_bug.cgi?id=91582
709
710         Reviewed by Noam Rosenthal.
711
712         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
713         This patch adds TILED_BACKING_STORE related files to CMakeLists.txt and PlatformEfl.cmake
714
715         * CMakeLists.txt:
716         * PlatformEfl.cmake:
717
718 2012-07-29  Keishi Hattori  <keishi@webkit.org>
719
720         Fix removing invalid values from color input suggestions
721         https://bugs.webkit.org/show_bug.cgi?id=92502
722
723         Reviewed by Kent Tamura.
724
725         Make ColorInputType::typeMismatchFor() return false for invalid color
726         values so that they don't appear in the list of suggestions that
727         ColorInputType::suggestions() returns.
728
729         No new tests. Tests to be added in Bug 92075.
730
731         * html/ColorInputType.cpp:
732         (WebCore::ColorInputType::typeMismatchFor):
733         (WebCore):
734         * html/ColorInputType.h:
735         (ColorInputType):
736
737 2012-07-29  Li Yin  <li.yin@intel.com>
738
739         getChannelData should raise exception when index is more than numberOfChannels.
740         https://bugs.webkit.org/show_bug.cgi?id=92223
741
742         Reviewed by Kentaro Hara.
743
744         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
745         In getChannelData function, the index value MUST be less than numberOfChannels
746         or an exception will be thrown.
747
748         Test: webaudio/audiobuffer.html
749
750         * Modules/webaudio/AudioBuffer.cpp:
751         (WebCore::AudioBuffer::getChannelData):
752         (WebCore):
753         * Modules/webaudio/AudioBuffer.h:
754         (WebCore):
755         (AudioBuffer):
756         * Modules/webaudio/AudioBuffer.idl: raise exception when index is not less than numberOfChannels.
757
758 2012-07-29  Sukolsak Sakshuwong  <sukolsak@google.com>
759
760         forward-delete in the last cell of a table moves the caret after the table
761         https://bugs.webkit.org/show_bug.cgi?id=24250
762
763         Reviewed by Ryosuke Niwa.
764
765         The ForwardDelete command moved the cursor after the table when it's invoked
766         in an empty cell that is the last cell of a table. It also removed the break
767         element when invoked in an empty cell that is not the last cell of a table.
768         Make it do nothing inside an empty table cell.
769
770         Test: editing/deleting/forward-delete-empty-table-cell.html
771
772         * editing/TypingCommand.cpp:
773         (WebCore::TypingCommand::forwardDeleteKeyPressed):
774
775 2012-07-29  Kwang Yul Seo  <skyul@company100.net>
776
777         Remove unused method HTMLConstructionSiteTask::take(HTMLConstructionSiteTask&)
778         https://bugs.webkit.org/show_bug.cgi?id=92601
779
780         Reviewed by Adam Barth.
781
782         This method was introduced in r104000, but has never been used from the beginning.
783
784         No functional change.
785
786         * html/parser/HTMLConstructionSite.h:
787
788 2012-07-29  Kenichi Ishibashi  <bashi@chromium.org>
789
790         [Chromium] HarfBuzzShaper can't handle segmented text run
791         https://bugs.webkit.org/show_bug.cgi?id=92445
792
793         Reviewed by Tony Chang.
794
795         Pass the range to be displayed to HarfBuzzShaper. The shaper calculates positions and advances of each glyph
796         regardless of the range, but only add glyphs which are in the range.
797
798         No new tests. platform/chromium-linux/fast/text/international/draw-complex-text-from-to.html should
799         work as expected once we move to use harfbuzz-ng on linux. Note that the current expectation will need to be rebaselined
800         because the old hb shaper (ComplexTextController) mishandles the range. |to| should be exclusive. I'll rebaseline
801         the expectation later.
802
803         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
804         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
805         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
806         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
807         (WebCore::HarfBuzzShaper::setDrawRange): Added.
808         (WebCore):
809         (WebCore::HarfBuzzShaper::shouldDrawCharacterAt): Added.
810         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added variables that hold pending advances.
811         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Add only glyphs which are in the given range to glyphBuffer.
812         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
813         (HarfBuzzShaper):
814         * platform/graphics/mac/FontComplexTextMac.cpp:
815         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
816
817 2012-07-29  Dan Bernstein  <mitz@apple.com>
818
819         Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
820         https://bugs.webkit.org/show_bug.cgi?id=92600
821
822         Reviewed by Simon Fraser.
823
824         Test: fast/multicol/hit-test-gap-between-pages-flipped.html
825
826         * rendering/RenderBlock.h:
827         (WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
828         adjustPointToColumnContents() back to private.
829         * rendering/RenderLayer.cpp:
830         (WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().
831         * rendering/RenderView.cpp:
832         (WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
833         of r123977, correctly accounts for flippedness.
834
835 2012-07-29  Dan Bernstein  <mitz@apple.com>
836
837         In flipped blocks, a point on the top edge of a text box is considered outside the box (and vice versa)
838         https://bugs.webkit.org/show_bug.cgi?id=92597
839
840         Reviewed by Ryosuke Niwa.
841
842         This is similar to <http://webkit.org/b/92593> except for RenderText. Fixing this required
843         fixing some code that creates a point inside a box by setting its y coordinate to the
844         logical top of the box. In a flipped block, this would be just outside the box.
845
846         Enhanced fast/writing-mode/flipped-blocks-hit-test-line-edges.html to cover this.
847
848         * editing/visible_units.cpp:
849         (WebCore::absoluteLineDirectionPointToLocalPointInBlock): Changed to use
850         RootInlineBox::blockDirectionPointInLine in the vertical case as well.
851         * rendering/RenderBlock.cpp:
852         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed to use
853         RootInlineBox::blockDirectionPointInLine.
854         * rendering/RenderText.cpp:
855         (WebCore::RenderText::positionForPoint): Changed the strictness of y inequalities based on
856         the flippedness of the block. This fixes the bug.
857         * rendering/RootInlineBox.cpp:
858         (WebCore::RootInlineBox::blockDirectionPointInLine): Moved the implementation here from the
859         header, and made it return the bottom in the flipped block case, so that the returned point
860         is inside the line in that case as well.
861         * rendering/RootInlineBox.h:
862
863 2012-07-29  Rik Cabanier  <cabanier@adobe.com>
864
865         ENABLE_CSS_COMPOSITING flag
866         https://bugs.webkit.org/show_bug.cgi?id=92553
867
868         Reviewed by Dirk Schulze.
869
870         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
871
872         * GNUmakefile.am:
873         * Configurations/FeatureDefines.xcconfig:
874
875 2012-07-29  Dan Bernstein  <mitz@apple.com>
876
877         In flipped blocks, a point on the top edge of a box is considered outside the box (and vice versa)
878         https://bugs.webkit.org/show_bug.cgi?id=92593
879
880         Reviewed by Simon Fraser.
881
882         With respect to hit testing, boxes should always behave as half-open intervals which include
883         the physical top and left edges and not the bottom and right edges.
884         RenderBlock::positionForPoint was not adhering to this, since it was comparing flipped
885         coordinates.
886
887         Tests: fast/writing-mode/flipped-blocks-hit-test-box-edges.html
888                fast/writing-mode/flipped-blocks-hit-test-line-edges.html
889
890         * rendering/RenderBlock.cpp:
891         (WebCore::RenderBlock::positionForPointWithInlineChildren): When blocks are flipped, changed
892         strict inequalities of y coordinates into non-strict ones and non-strict inequalities into
893         strict ones.
894         (WebCore::RenderBlock::positionForPoint): Ditto, except for the test for being under the top
895         of the last candidate box, which was made non-strict in the unflipped case and remained
896         strict.
897
898 2012-07-28  Dan Bernstein  <mitz@apple.com>
899
900         RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
901         https://bugs.webkit.org/show_bug.cgi?id=92588
902
903         Reviewed by Sam Weinig.
904
905         Tests: fast/multicol/hit-test-block-axis-flipped.html
906                fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html
907
908         * rendering/RenderBlock.cpp:
909         (WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
910         coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
911         (WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
912         work with an unflipped point.
913
914 2012-07-28  Dan Bernstein  <mitz@apple.com>
915
916         In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column
917         https://bugs.webkit.org/show_bug.cgi?id=92566
918
919         Reviewed by Simon Fraser.
920
921         Enhanced the fix for <http://webkit.org/b/92524> to work with flipped lines.
922
923         Extended fast/multicol/hit-test-end-of-column-with-line-height.html.
924
925         * rendering/RenderBlock.cpp:
926         (WebCore::RenderBlock::positionForPointWithInlineChildren): For flipped lines, check if the
927         hit line is the last one before a page break, and in that case, check if the hit point was
928         after the break.
929
930 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
931
932         Size changes on a layer with negative z-index children don't repaint correctly
933         https://bugs.webkit.org/show_bug.cgi?id=92583
934
935         Reviewed by Dean Jackson.
936
937         Negative z-index descendants cause a composited layer to have a separate
938         layer for foreground content. If something caused that foreground layer
939         to change size (like toggling visibility on a descendant), we failed to
940         repaint the foreground layer, resulting in stretched content.
941
942         Test: compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html
943
944         * rendering/RenderLayerBacking.cpp:
945         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Repaint the foreground
946         layer if its size changes, like we do for the main layer.
947
948 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
949
950         Ignore visibility:hidden elements when computing compositing layer bounds
951         https://bugs.webkit.org/show_bug.cgi?id=92569
952
953         Reviewed by Dan Bernstein.
954
955         When computing the bounds of compositing layers, we would take into account
956         layers with no visible content (visibility:hidden, and no non-hidden descendants).
957         This caused some huge layers in mobile Google maps.
958
959         Tests: compositing/geometry/bounds-ignores-hidden-composited-descendant.html
960                compositing/geometry/bounds-ignores-hidden-dynamic.html
961                compositing/geometry/bounds-ignores-hidden.html
962
963         * rendering/RenderLayer.cpp:
964         (WebCore::RenderLayer::calculateLayerBounds): If the ExcludeHiddenDescendants flag is set, return
965         the empty rect for layers with no visible content or descendants, as long as the layer is not
966         the root of the subtree whose bounds are being computed.
967         calculateLayerBounds() currently (I think incorrectly) passes the default flags to the recursive calls.
968         It should probably just pass 'flags', but to make this change safe, OR in the ExcludeHiddenDescendants
969         flag.
970         * rendering/RenderLayer.h: Add an ExcludeHiddenDescendants flag to the CalculateLayerBoundsFlags.
971         * rendering/RenderLayerCompositor.cpp:
972         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Pass the ExcludeHiddenDescendants
973         flag.
974
975 2012-07-28  Min Qin  <qinmin@chromium.org>
976
977         Add an overlay play button to media controls on android
978         https://bugs.webkit.org/show_bug.cgi?id=92132
979
980         Reviewed by Adam Barth.
981
982         This change adds an overlay play button to the media controls for android.
983         No tests for now as this setting is not being used by other port.
984         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
985
986         * WebCore.gypi:
987         * css/CSSPrimitiveValueMappings.h:
988         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
989         * css/CSSValueKeywords.in:
990         * css/mediaControls.css:
991         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
992         * css/mediaControlsChromiumAndroid.css:
993         (audio::-webkit-media-controls-overlay-enclosure):
994         (video::-webkit-media-controls-overlay-enclosure):
995         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
996         (video::-webkit-media-controls-overlay-play-button):
997         * html/shadow/MediaControlElements.cpp:
998         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
999         (WebCore):
1000         (WebCore::MediaControlOverlayPlayButtonElement::create):
1001         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
1002         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
1003         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
1004         * html/shadow/MediaControlElements.h:
1005         (MediaControlOverlayPlayButtonElement):
1006         (WebCore):
1007         * html/shadow/MediaControlRootElementChromium.cpp:
1008         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
1009         (WebCore::MediaControlPanelEnclosureElement::create):
1010         (WebCore):
1011         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
1012         (WebCore::MediaControlRootElementChromium::create):
1013         (WebCore::MediaControlRootElementChromium::initializeControls):
1014         * html/shadow/MediaControlRootElementChromium.h:
1015         (MediaControlChromiumEnclosureElement):
1016         (WebCore):
1017         (MediaControlPanelEnclosureElement):
1018         (MediaControlRootElementChromium):
1019         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
1020         (WebCore):
1021         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
1022         (WebCore::MediaControlOverlayEnclosureElement::create):
1023         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
1024         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
1025         (WebCore::MediaControls::create):
1026         (WebCore::MediaControlRootElementChromiumAndroid::create):
1027         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
1028         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
1029         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
1030         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
1031         (WebCore):
1032         (MediaControlOverlayEnclosureElement):
1033         (MediaControlRootElementChromiumAndroid):
1034         * platform/ThemeTypes.h:
1035         * rendering/RenderMediaControlsChromium.cpp:
1036         (WebCore::paintMediaOverlayPlayButton):
1037         (WebCore):
1038         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1039         * rendering/RenderTheme.cpp:
1040         (WebCore::RenderTheme::paint):
1041         * rendering/RenderTheme.h:
1042         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
1043         * rendering/RenderThemeChromiumAndroid.cpp:
1044         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
1045         (WebCore):
1046         * rendering/RenderThemeChromiumAndroid.h:
1047
1048 2012-07-28  Mario Sanchez Prada  <msanchez@igalia.com>
1049
1050         [GTK] Add a new and reusable enchant-based spellchecker in WebCore
1051         https://bugs.webkit.org/show_bug.cgi?id=90269
1052
1053         Reviewed by Martin Robinson.
1054
1055         Move enchant specific code down to WebCore, into a new class
1056         TextCheckerEnchant, that we can use from WK1 and WK2.
1057
1058         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
1059         * GNUmakefile.list.am: Added new files.
1060         * platform/text/gtk/TextCheckerEnchant.cpp: Added.
1061         (getAvailableDictionariesCallback):
1062         (TextCheckerEnchant::TextCheckerEnchant):
1063         (TextCheckerEnchant::~TextCheckerEnchant):
1064         (TextCheckerEnchant::ignoreWord):
1065         (TextCheckerEnchant::learnWord):
1066         (TextCheckerEnchant::checkSpellingOfString):
1067         (TextCheckerEnchant::getGuessesForWord):
1068         (TextCheckerEnchant::updateSpellCheckingLanguages):
1069         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
1070         * platform/text/gtk/TextCheckerEnchant.h: Added.
1071         (WebCore):
1072         (TextCheckerEnchant):
1073         (WebCore::TextCheckerEnchant::create):
1074
1075 2012-07-28  Vineet Chaudhary  <rgf748@motorola.com>
1076
1077         [Clamp] support in binding generator.
1078         https://bugs.webkit.org/show_bug.cgi?id=77605
1079
1080         Reviewed by Kentaro Hara.
1081
1082         Currently [Clamp] extended attribute in IDL files.
1083         Spec: http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Clamp
1084
1085         Tests: TestObj.idl
1086
1087         * bindings/scripts/CodeGeneratorCPP.pm:
1088         (SkipFunction): Skips methods with [Clamp] parameters.
1089         * bindings/scripts/CodeGeneratorGObject.pm:
1090         (SkipFunction): Skips methods with [Clamp] parameters.
1091         * bindings/scripts/CodeGeneratorJS.pm:
1092         (GenerateParametersCheck): Support [Clamp] for JSBindings.
1093         * bindings/scripts/CodeGeneratorObjC.pm:
1094         (SkipFunction): Skips methods with [Clamp] parameters.
1095         * bindings/scripts/CodeGeneratorV8.pm:
1096         (GenerateParametersCheck): Support [Clamp] for V8Bindings.
1097         * bindings/scripts/IDLAttributes.txt: Added [Clamp] to attributes list.
1098         * bindings/scripts/test/JS/JSTestObj.cpp: Test.
1099         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1100         * bindings/scripts/test/JS/JSTestObj.h:
1101         * bindings/scripts/test/TestObj.idl:
1102         * bindings/scripts/test/V8/V8TestObj.cpp:
1103         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1104         (TestObjV8Internal):
1105
1106 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1107
1108         Unreviewed, rolling out r123908.
1109         http://trac.webkit.org/changeset/123908
1110         https://bugs.webkit.org/show_bug.cgi?id=92572
1111
1112         Broke Chromium Linux compile (Requested by pkasting on
1113         #webkit).
1114
1115         * WebCore.gypi:
1116         * css/CSSPrimitiveValueMappings.h:
1117         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1118         * css/CSSValueKeywords.in:
1119         * css/mediaControls.css:
1120         * css/mediaControlsChromiumAndroid.css:
1121         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1122         * html/shadow/MediaControlElements.cpp:
1123         (WebCore):
1124         * html/shadow/MediaControlElements.h:
1125         (WebCore):
1126         * html/shadow/MediaControlRootElementChromium.cpp:
1127         (WebCore::MediaControlChromiumEnclosureElement::create):
1128         (WebCore):
1129         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
1130         (WebCore::MediaControls::create):
1131         (WebCore::MediaControlRootElementChromium::create):
1132         * html/shadow/MediaControlRootElementChromium.h:
1133         (MediaControlChromiumEnclosureElement):
1134         (MediaControlRootElementChromium):
1135         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Removed.
1136         * html/shadow/MediaControlRootElementChromiumAndroid.h: Removed.
1137         * platform/ThemeTypes.h:
1138         * rendering/RenderMediaControlsChromium.cpp:
1139         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1140         * rendering/RenderTheme.cpp:
1141         (WebCore::RenderTheme::paint):
1142         * rendering/RenderTheme.h:
1143         * rendering/RenderThemeChromiumAndroid.cpp:
1144         * rendering/RenderThemeChromiumAndroid.h:
1145
1146 2012-07-27  Eli Fidler  <efidler@rim.com>
1147
1148         [BlackBerry] Use new LocaleHandler.
1149         https://bugs.webkit.org/show_bug.cgi?id=92548
1150
1151         Reviewed by Yong Li.
1152
1153         RIM PR 128381
1154
1155         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1156         (WebCore::platformLanguage):
1157         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1158         (WebCore::ResourceRequest::initializePlatformRequest):
1159         * platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:
1160         (WebCore::currentSearchLocaleID):
1161         (WebCore::currentTextBreakLocaleID):
1162
1163 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1164
1165         Change constructor with explicit constructor in WebCore/Modules
1166         https://bugs.webkit.org/show_bug.cgi?id=92529
1167
1168         Reviewed by Kentaro Hara.
1169
1170         As a step to let *explicit* keyword add to constructors which have a parameter,
1171         *explicit* keyword is added to Source/WebCore/Modules in order to avoid implicit
1172         type conversion.
1173
1174         No new tests. Covered by existing tests.
1175
1176         * Modules/filesystem/LocalFileSystem.h:
1177         (WebCore::LocalFileSystem::LocalFileSystem):
1178         * Modules/filesystem/Metadata.h:
1179         (WebCore::Metadata::Metadata):
1180         * Modules/filesystem/SyncCallbackHelper.h:
1181         (WebCore::SyncCallbackHelper::SuccessCallbackImpl::SuccessCallbackImpl):
1182         (WebCore::SyncCallbackHelper::ErrorCallbackImpl::ErrorCallbackImpl):
1183         * Modules/mediastream/IceCandidate.h:
1184         (IceCandidate):
1185         * Modules/mediastream/NavigatorUserMediaError.h:
1186         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
1187         * Modules/mediastream/SessionDescription.h:
1188         (SessionDescription):
1189         * Modules/mediastream/UserMediaController.h:
1190         (UserMediaController):
1191         * Modules/notifications/NotificationController.h:
1192         (NotificationController):
1193         * Modules/speech/SpeechRecognition.h:
1194         (SpeechRecognition):
1195         * Modules/speech/SpeechRecognitionController.h:
1196         (SpeechRecognitionController):
1197         * Modules/speech/SpeechRecognitionEvent.h:
1198         (SpeechRecognitionEvent):
1199         * Modules/speech/SpeechRecognitionResultList.h:
1200         (SpeechRecognitionResultList):
1201         * Modules/vibration/Vibration.h:
1202         (Vibration):
1203         * Modules/webaudio/AudioBuffer.h:
1204         (AudioBuffer):
1205         * Modules/webaudio/AudioContext.h:
1206         (AudioContext):
1207         * Modules/webaudio/AudioNodeInput.h:
1208         (AudioNodeInput):
1209         * Modules/webaudio/AudioSummingJunction.h:
1210         (AudioSummingJunction):
1211         * Modules/webaudio/BiquadDSPKernel.h:
1212         (WebCore::BiquadDSPKernel::BiquadDSPKernel):
1213         * Modules/webaudio/DefaultAudioDestinationNode.h:
1214         (DefaultAudioDestinationNode):
1215         * Modules/webaudio/DelayDSPKernel.h:
1216         (DelayDSPKernel):
1217         * Modules/webaudio/OfflineAudioCompletionEvent.h:
1218         (OfflineAudioCompletionEvent):
1219         * Modules/webaudio/WaveShaperDSPKernel.h:
1220         (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
1221         * Modules/webaudio/WaveShaperNode.h:
1222         (WaveShaperNode):
1223         * Modules/webaudio/WaveTable.h:
1224         (WaveTable):
1225         * Modules/webdatabase/DatabaseAuthorizer.h:
1226         (DatabaseAuthorizer):
1227         * Modules/webdatabase/DatabaseTask.h:
1228         (Database::DatabaseTransactionTask):
1229         * Modules/webdatabase/DatabaseTracker.h:
1230         (DatabaseTracker):
1231         * Modules/webdatabase/SQLCallbackWrapper.h:
1232         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
1233         * Modules/webdatabase/SQLException.h:
1234         (WebCore::SQLException::SQLException):
1235         * Modules/websockets/WebSocket.h:
1236         * Modules/websockets/WebSocketExtensionProcessor.h:
1237         (WebCore::WebSocketExtensionProcessor::WebSocketExtensionProcessor):
1238
1239 2012-07-27  Kentaro Hara  <haraken@chromium.org>
1240
1241         [V8] Optimize Element::getAttributeNS() by replacing String with AtomicString
1242         https://bugs.webkit.org/show_bug.cgi?id=90276
1243
1244         Reviewed by Adam Barth.
1245
1246         In r121439, we changed the argument type of Element::getAttribute()
1247         from String to AtomicString for optimization. This patch changes the
1248         argument type of Element::getAttributeNS() from String to AtomicString.
1249
1250         Actually this change affects V8 performance only.
1251
1252         [JSC without the patch]
1253         The binding code converts a given JavaScript string to a String
1254         -> the String is passed to getAttributeNS()
1255         -> the String is converted to an AtomicString when it is passed to
1256         QualifiedName() constructor.
1257
1258         [JSC with the patch]
1259         The binding code converts a given JavaScript string to a String
1260         -> the String is converted to an AtomicString when it is passed to
1261         getAttributeNS()
1262         -> the AtomicString is passed to QualifiedName() constructor.
1263
1264         [V8 without the patch]
1265         The binding code retrieves a cached external String for a given
1266         JavaScript string
1267         -> the String is passed to getAttributeNS()
1268         -> the String is converted to AtomicString when it is passed to
1269         QualifiedName() constructor.
1270
1271         [V8 with the patch]
1272         The binding code retrieves a cached external AtomicString for a given
1273         JavaScript string
1274         -> the AtomicString is passed to getAttributeNS()
1275         -> the AtomicString is passed to QualifiedName() constructor.
1276
1277         In this way, in JSC, the change affects where a String is converted to
1278         an AtomicString. On the other hand, in V8, (since the AtomicString is already
1279         cached,) we can skip the conversion step.
1280
1281         Performance test: https://bugs.webkit.org/attachment.cgi?id=150158
1282
1283         getAttributeNS (Chromium/Linux):
1284         577.80ms => 454.60ms
1285
1286         * dom/Element.cpp:
1287         (WebCore::Element::getAttributeNS):
1288         * dom/Element.h:
1289         (Element):
1290
1291 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1292
1293         Unreviewed, rolling out r123679.
1294         http://trac.webkit.org/changeset/123679
1295         https://bugs.webkit.org/show_bug.cgi?id=92565
1296
1297         Slowed down HTML parsing by 3.6% (Requested by abarth on
1298         #webkit).
1299
1300         * html/FTPDirectoryDocument.cpp:
1301         (WebCore::FTPDirectoryDocumentParser::append):
1302         * html/parser/HTMLEntityParser.cpp:
1303         (WebCore::HTMLEntityParser::consumeNamedEntity):
1304         * html/parser/HTMLParserIdioms.cpp:
1305         (WebCore::stripLeadingAndTrailingHTMLSpaces):
1306         * html/parser/HTMLSourceTracker.cpp:
1307         (WebCore::HTMLSourceTracker::sourceForToken):
1308         * loader/cache/CachedScript.cpp:
1309         (WebCore::CachedScript::script):
1310         * platform/text/SegmentedString.cpp:
1311         (WebCore::SegmentedString::SegmentedString):
1312         (WebCore::SegmentedString::operator=):
1313         (WebCore::SegmentedString::clear):
1314         (WebCore::SegmentedString::append):
1315         (WebCore::SegmentedString::prepend):
1316         (WebCore::SegmentedString::advanceSubstring):
1317         (WebCore::SegmentedString::advance):
1318         (WebCore::SegmentedString::advanceSlowCase):
1319         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
1320         * platform/text/SegmentedString.h:
1321         (WebCore::SegmentedSubstring::SegmentedSubstring):
1322         (WebCore::SegmentedSubstring::clear):
1323         (WebCore::SegmentedSubstring::appendTo):
1324         (SegmentedSubstring):
1325         (WebCore::SegmentedString::SegmentedString):
1326         (WebCore::SegmentedString::push):
1327         (WebCore::SegmentedString::isEmpty):
1328         (WebCore::SegmentedString::lookAhead):
1329         (WebCore::SegmentedString::lookAheadIgnoringCase):
1330         (WebCore::SegmentedString::advance):
1331         (WebCore::SegmentedString::advanceAndASSERT):
1332         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1333         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1334         (SegmentedString):
1335         (WebCore::SegmentedString::advancePastNonNewline):
1336         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1337         (WebCore::SegmentedString::operator*):
1338         (WebCore::SegmentedString::operator->):
1339         (WebCore::SegmentedString::current):
1340         (WebCore::SegmentedString::equalsLiterally):
1341         (WebCore::SegmentedString::equalsIgnoringCase):
1342         (WebCore::SegmentedString::lookAheadInline):
1343         (WebCore::SegmentedString::lookAheadSlowCase):
1344         * xml/parser/CharacterReferenceParserInlineMethods.h:
1345         (WebCore::consumeCharacterReference):
1346         * xml/parser/MarkupTokenizerBase.h:
1347         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1348         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
1349         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1350
1351 2012-07-27  Jer Noble  <jer.noble@apple.com>
1352
1353         Reset the set of "seen" plugins when the main frame load is committed.
1354         https://bugs.webkit.org/show_bug.cgi?id=92564
1355
1356         Reviewed by Anders Carlsson.
1357
1358         Because the Page object is re-used across navigation and reload, reset the list
1359         of seen plugins when the main frame load commits. This gives a good baseline to
1360         compare against the number of pages loaded.
1361
1362         No new tests; the "seen" plugin list is for diagnostic purposes only.
1363
1364         * loader/FrameLoader.cpp:
1365         (WebCore::FrameLoader::dispatchDidCommitLoad):
1366         * page/Page.cpp:
1367         (WebCore::Page::resetSeenPlugins):
1368         * page/Page.h:
1369
1370 2012-07-27  Sukolsak Sakshuwong  <sukolsak@google.com>
1371
1372         execCommand copies the backgroung-color of the enclosing element to the element being edited.
1373         https://bugs.webkit.org/show_bug.cgi?id=91783
1374
1375         Reviewed by Ryosuke Niwa.
1376
1377         InsertListCommand and some other edit commands remove redundant
1378         style properties after their DOM modification by using
1379         StylePropertySet::removeEquivalentProperties.  However, this method
1380         does not remove redundant background-color properties such as
1381         "background-color: white" and "background-color: #fff" because
1382         it compares them using cssText and thus treats them as different.
1383         Add code to convert background colors to RGBA and then compare them.
1384
1385         Test: editing/style/redundant-background-color.html
1386
1387         * editing/EditingStyle.cpp:
1388         (WebCore::getRGBABackgroundColor):
1389         (WebCore):
1390         (WebCore::getPropertiesNotIn):
1391
1392 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1393
1394         [EFL] Return 0 when network is offline
1395         https://bugs.webkit.org/show_bug.cgi?id=92454
1396
1397         Reviewed by Kenneth Rohde Christiansen.
1398
1399         Network Info latest spec says 0 is returned when network is offline.
1400         r123769 modified to return infinity value when network is offiline.
1401
1402         * platform/efl/NetworkInfoProviderEfl.cpp:
1403         (WebCore::NetworkInfoProviderEfl::bandwidth):
1404
1405 2012-07-27  Scott Graham  <scottmg@chromium.org>
1406
1407         Change navigator.webkitGamepads[] to navigator.webkitGetGamepads()
1408         https://bugs.webkit.org/show_bug.cgi?id=92533
1409
1410         Reviewed by Adam Barth.
1411
1412         Per discussion on public-webapps. Pages that enumerate navigator were
1413         causing background resources to be created to poll hardware
1414         unintentionally. By changing to an explicit function call, this is
1415         avoided (and the API becomes more clear too). This change updates the
1416         implementation to match the current ED spec.
1417
1418         * Modules/gamepad/NavigatorGamepad.cpp:
1419         (WebCore::NavigatorGamepad::webkitGetGamepads):
1420         * Modules/gamepad/NavigatorGamepad.h:
1421         (NavigatorGamepad):
1422         * Modules/gamepad/NavigatorGamepad.idl:
1423         * bindings/generic/RuntimeEnabledFeatures.h:
1424         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
1425         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
1426
1427 2012-07-27  Brady Eidson  <beidson@apple.com>
1428
1429         Plugins should not be allowed to override standard properties/attributes in non-standard worlds
1430         <rdar://problem/11975252> and https://bugs.webkit.org/show_bug.cgi?id=92519
1431
1432         Reviewed by Anders Carlsson.
1433
1434         Change the 3 plugin-owning element's custom bindings to prefer built-in properties if they exist.
1435         When they do they don't give the plugin a chance to override.
1436
1437         Test: plugins/npruntime/overrides-all-properties.html
1438
1439         Add plugin custom functions to prefer built-in properties over plugin scriptable object properties:
1440         * bindings/js/JSPluginElementFunctions.h:
1441         (WebCore::pluginElementCustomGetOwnPropertySlot):
1442         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
1443
1444         Use those new custom functions for getting properties:
1445         * bindings/js/JSHTMLAppletElementCustom.cpp:
1446         (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
1447         (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
1448         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1449         (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
1450         (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
1451         * bindings/js/JSHTMLObjectElementCustom.cpp:
1452         (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
1453         (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
1454
1455 2012-07-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1456
1457         use createUninitialized when creating TypedArray from another array
1458         https://bugs.webkit.org/show_bug.cgi?id=92518
1459
1460         Reviewed by Kenneth Russell.
1461
1462         When creating a Typed Array from another array, we fill it with values
1463         from the source array. So, we can create it uninitialized. This is
1464         make constructor about 35% faster when constructed with another typed
1465         array.
1466
1467         Test: fast/canvas/webgl/array-constructor.html
1468
1469         * bindings/js/JSArrayBufferViewHelper.h:
1470         (WebCore::constructArrayBufferViewWithTypedArrayArgument):
1471         (WebCore::constructArrayBufferView):
1472
1473 2012-07-27  Eli Fidler  <efidler@rim.com>
1474
1475         [BlackBerry] Adapt to change in the FontInfo platform API.
1476         https://bugs.webkit.org/show_bug.cgi?id=92547
1477
1478         Reviewed by Yong Li
1479
1480         RIM PR 161263
1481
1482         * page/blackberry/SettingsBlackBerry.cpp:
1483         (WebCore::Settings::initializeDefaultFontFamilies):
1484
1485 2012-07-27  Antoine Labour  <piman@chromium.org>
1486
1487         [chromium] Fix color matrix filter computation so that filters that don't need clamping are correctly detected as such
1488         https://bugs.webkit.org/show_bug.cgi?id=92452
1489
1490         Reviewed by Stephen White.
1491
1492         Because of precision issues, some filters were returning true to
1493         matrixNeedsClamping when they can return false. This fixes it.
1494
1495         No new tests in this CL, a follow-up change refactors the code to add
1496         several tests.
1497
1498         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1499
1500 2012-07-27  Jer Noble  <jer.noble@apple.com>
1501
1502         Add diagnostic logging for plugins-per-page.
1503         https://bugs.webkit.org/show_bug.cgi?id=92538
1504
1505         Reviewed by Anders Carlsson.
1506
1507         Add some diagnostic logging for whether a page has seen a plugin, and 
1508         whether a page has seen a plugin of a specific type.
1509
1510         Move the diagnostic logging out of the elemements themselves:
1511         * html/HTMLEmbedElement.cpp:
1512         (WebCore::HTMLEmbedElement::updateWidget):
1513         * html/HTMLObjectElement.cpp:
1514         (WebCore::HTMLObjectElement::updateWidget):
1515
1516         Instead, log when the plugin is requested, thereby catching plugins which are
1517         rejected because, e.g., Java is disabled or not installed:
1518         * loader/SubframeLoader.cpp:
1519         (WebCore::logPluginRequest):
1520         (WebCore::SubframeLoader::requestObject):
1521         (WebCore::SubframeLoader::createJavaAppletWidget):
1522
1523         Add new diagnostic key values:
1524         * page/DiagnosticLoggingKeys.cpp:
1525         (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
1526         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
1527         * page/DiagnosticLoggingKeys.h:
1528
1529         Add a map of plugin types seen per-page for diagnostic purposes:
1530         * page/Page.cpp:
1531         (WebCore::Page::hasSeenAnyPlugin):
1532         (WebCore::Page::hasSeenPlugin):
1533         (WebCore::Page::sawPlugin):
1534         * page/Page.h:
1535
1536 2012-07-27  Patrick Gansterer  <paroga@webkit.org>
1537
1538         [WINCE] Use macros from ICU instead of defining the same functionality again
1539         https://bugs.webkit.org/show_bug.cgi?id=92530
1540
1541         Reviewed by Ryosuke Niwa.
1542
1543         Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
1544         U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
1545
1546         * html/FTPDirectoryDocument.cpp:
1547         (WebCore::processFileDateString):
1548         * loader/archive/mhtml/MHTMLArchive.cpp:
1549         (WebCore::MHTMLArchive::generateMHTMLData):
1550         * platform/graphics/wince/FontWinCE.cpp:
1551         (WebCore::generateComponents):
1552
1553 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
1554
1555         Build warning in CSSPrimitiveValueMappings.h when CSS_STICKY_POSITION is disabled
1556         https://bugs.webkit.org/show_bug.cgi?id=92523
1557
1558         Reviewed by Simon Fraser.
1559
1560         Move #ifdef in CSSPrimitiveValueMappings.h to silent compilation warning
1561         when CSS_STICKY_POSITION is disabled.
1562
1563         No new tests, no behavior change.
1564
1565         * css/CSSPrimitiveValueMappings.h:
1566         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1567
1568 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
1569
1570         DragController should ascertain dragClient to be non-null
1571         https://bugs.webkit.org/show_bug.cgi?id=92474
1572
1573         Reviewed by Tony Chang.
1574
1575         The DragController must always ensure a valid dragClient object. Hence
1576         adding the ASSERT to assure that.
1577
1578         No new tests. Added assertion for PageClient.dragClient.
1579
1580         * page/DragController.cpp:
1581         (WebCore::DragController::DragController):
1582
1583 2012-07-27  Adrienne Walker  <enne@google.com>
1584
1585         [chromium] Clean up LayerRendererChromium::drawTexturedQuad
1586         https://bugs.webkit.org/show_bug.cgi?id=91823
1587
1588         Reviewed by James Robinson.
1589
1590         LayerRendererChromium::drawTexturedQuad has been around forever and
1591         over time has developed several problems:
1592          - Confusingly named relative to drawTextureQuad
1593          - All but one callers identically manipulate the transform matrix
1594          - Lots of optional parameters that only few functions use
1595
1596         This patch breaks up drawTexturedQuad into setShaderOpacity (for
1597         optional opacity values sent to the shader), setShaderFloatQuad (the
1598         full FloatQuad used by AA shaders), and drawQuadGeometry (actually
1599         draw the geometry, and wrap the transform logic that was duplicated
1600         everywhere).
1601
1602         No new tests; no change in functionality.
1603
1604         * platform/graphics/chromium/LayerRendererChromium.cpp:
1605         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
1606         (WebCore::LayerRendererChromium::drawBackgroundFilters):
1607         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1608         (WebCore::LayerRendererChromium::drawSolidColorQuad):
1609         (WebCore::LayerRendererChromium::drawTileQuad):
1610         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
1611         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
1612         (WebCore::LayerRendererChromium::drawTextureQuad):
1613         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
1614         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
1615         (WebCore::LayerRendererChromium::setShaderFloatQuad):
1616         (WebCore::LayerRendererChromium::setShaderOpacity):
1617         (WebCore::LayerRendererChromium::drawQuadGeometry):
1618         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
1619         * platform/graphics/chromium/LayerRendererChromium.h:
1620         (LayerRendererChromium):
1621
1622 2012-07-27  Shawn Singh  <shawnsingh@chromium.org>
1623
1624         [chromium] CCLayerTreeHost placeholder scissor should be deviceViewportSize instead of viewportSize
1625         https://bugs.webkit.org/show_bug.cgi?id=92469
1626
1627         Reviewed by Adrienne Walker.
1628
1629         We were accidentally using viewportSize instead of
1630         deviceViewportSize in a particular place in code. Recent
1631         refactoring to use tighter scissor rects exposed this problem.
1632
1633         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1634         (WebCore::CCLayerTreeHost::updateLayers):
1635
1636 2012-07-27  Kevin Ellis  <kevers@chromium.org>
1637
1638         Search cancel button is hard to activate with a tap gesture even if touch adjustment is enabled.
1639         https://bugs.webkit.org/show_bug.cgi?id=91894
1640
1641         Reviewed by Antonio Gomes.
1642
1643         Update check for determining if a node responds to tap gestures.
1644         Previously, the cancel button was being discarded as a candidate for
1645         touch adjustment if the touch area clipped the text input region
1646         because the candidate pruning process failed to account for the cancel
1647         button having a default mouse handler.  Possibly an interim fix,
1648         depending on resolution to 92093.
1649
1650         Test: touchadjustment/search-cancel.html
1651
1652         * page/TouchAdjustment.cpp:
1653         (TouchAdjustment):
1654         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
1655
1656 2012-07-27  Varun Jain  <varunjain@chromium.org>
1657
1658         Animated SVGs do not clear previous frame completely in hidpi mode.
1659         https://bugs.webkit.org/show_bug.cgi?id=92395
1660
1661         Reviewed by Darin Adler.
1662
1663         The rect thats is cleared in subsequent frames needed to be scaled with device scale.
1664
1665         Test: svg/as-image/animated-svg-repaints-completely-in-hidpi.html
1666
1667         * svg/graphics/SVGImage.cpp:
1668         (WebCore::SVGImage::drawSVGToImageBuffer):
1669
1670 2012-07-27  Scott Graham  <scottmg@chromium.org>
1671
1672         Fix COMPILE_ASSERT for InlineFlowBox growing
1673         https://bugs.webkit.org/show_bug.cgi?id=92541
1674
1675         Reviewed by Dan Bernstein.
1676
1677         Use unsigned instead of bool to keep size small on Windows.
1678
1679         No new tests.
1680
1681         * rendering/InlineFlowBox.h:
1682         (InlineFlowBox):
1683
1684 2012-07-27  Beth Dakin  <bdakin@apple.com>
1685
1686         https://bugs.webkit.org/show_bug.cgi?id=92327
1687         -webkit-background-clip:text is blurry in WebKit 1 apps when
1688         deviceScaleFactor > 1
1689         -and corresponding-
1690         <rdar://problem/11683788>
1691
1692         Reviewed by Simon Fraser.
1693
1694         The bug here is that the code to make createCompatibleBuffer() HiDPI-savvy 
1695         assumed that the deviceScaleFactor would always be baked into the CTM of the
1696         GraphicsContext. But that is NOT the case in WebKit 1.
1697
1698         createCompatibleBuffer() is used for clip text and gradients.
1699
1700         Now getCTM() takes a parameter indicating whether the result should definitely
1701         include the device scale, or if it should possibly included the device scale, 
1702         which is the option that matches old behavior.
1703         * platform/graphics/GraphicsContext.h:
1704         (GraphicsContext):
1705         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1706         (WebCore::GraphicsContext::getCTM):
1707         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1708         (WebCore::GraphicsContext::getCTM):
1709         * platform/graphics/qt/GraphicsContextQt.cpp:
1710         (WebCore::GraphicsContext::getCTM):
1711         * platform/graphics/skia/GraphicsContextSkia.cpp:
1712         (WebCore::GraphicsContext::getCTM):
1713         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1714         (WebCore::GraphicsContext::getCTM):
1715         * platform/graphics/wx/GraphicsContextWx.cpp:
1716         (WebCore::GraphicsContext::getCTM):
1717
1718         Actually use the new parameter in the CG implementation. Use CG API to get a
1719         matrix that definitely includes the device scale when that is required. 
1720         * platform/graphics/cg/GraphicsContextCG.cpp:
1721         (WebCore::GraphicsContext::getCTM):
1722
1723         Remove some symbol cruft that doesn't seem to require a replacement.
1724         * WebCore.exp.in:
1725
1726         Use DefinitelyIncludeDeviceScale when getting the CTM in the buggy spot.
1727         * platform/graphics/GraphicsContext.cpp:
1728         (WebCore::GraphicsContext::createCompatibleBuffer):
1729
1730         The ImageBuffer for gradients is created using createCompatibleBuffer(), and since 
1731         createCompatibleBuffer() now uses getCTM(DefinitelyIncludeDeviceScale) to 
1732         determine appropriate sizing, drawPattern() should use that same matrix to 
1733         determine pattern sizing.
1734         * platform/graphics/GeneratorGeneratedImage.cpp:
1735         (WebCore::GeneratorGeneratedImage::drawPattern):
1736
1737 2012-07-27  Tony Chang  <tony@chromium.org>
1738
1739         flex-wrap: wrap not wrapping for % sized items in column flow
1740         https://bugs.webkit.org/show_bug.cgi?id=92324
1741
1742         Reviewed by Ojan Vafai.
1743
1744         We were using trying to use the value of contentLogicalHeight() before having called computeLogicalHeight()
1745         in a few places. Fix this in mainAxisContentExtent() rather than at the callers.
1746
1747         Test: css3/flexbox/percentage-heights.html
1748
1749         * rendering/RenderFlexibleBox.cpp:
1750         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
1751         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): If we haven't called computeLogicalHeight, we try to compute
1752         the height based on the fixed flexbox value. min/max don't matter here since percent values are only based on height/width.
1753         * rendering/RenderFlexibleBox.h: Drop const because computeContentLogicalHeightUsing is not const. I can
1754         try making computeContentLogicalHeightUsing const in a follow up change (might be non-trivial).
1755
1756 2012-07-27  Min Qin  <qinmin@chromium.org>
1757
1758         Add an overlay play button to media controls on android
1759         https://bugs.webkit.org/show_bug.cgi?id=92132
1760
1761         Reviewed by Adam Barth.
1762
1763         This change adds an overlay play button to the media controls for android.
1764         No tests for now as this setting is not being used by other port.
1765         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
1766
1767         * WebCore.gypi:
1768         * css/CSSPrimitiveValueMappings.h:
1769         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1770         * css/CSSValueKeywords.in:
1771         * css/mediaControls.css:
1772         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
1773         * css/mediaControlsChromiumAndroid.css:
1774         (audio::-webkit-media-controls-overlay-enclosure):
1775         (video::-webkit-media-controls-overlay-enclosure):
1776         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1777         (video::-webkit-media-controls-overlay-play-button):
1778         * html/shadow/MediaControlElements.cpp:
1779         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
1780         (WebCore):
1781         (WebCore::MediaControlOverlayPlayButtonElement::create):
1782         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
1783         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
1784         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
1785         * html/shadow/MediaControlElements.h:
1786         (MediaControlOverlayPlayButtonElement):
1787         (WebCore):
1788         * html/shadow/MediaControlRootElementChromium.cpp:
1789         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
1790         (WebCore::MediaControlPanelEnclosureElement::create):
1791         (WebCore):
1792         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
1793         (WebCore::MediaControlRootElementChromium::create):
1794         (WebCore::MediaControlRootElementChromium::initializeControls):
1795         * html/shadow/MediaControlRootElementChromium.h:
1796         (MediaControlChromiumEnclosureElement):
1797         (WebCore):
1798         (MediaControlPanelEnclosureElement):
1799         (MediaControlRootElementChromium):
1800         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
1801         (WebCore):
1802         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
1803         (WebCore::MediaControlOverlayEnclosureElement::create):
1804         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
1805         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
1806         (WebCore::MediaControls::create):
1807         (WebCore::MediaControlRootElementChromiumAndroid::create):
1808         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
1809         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
1810         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
1811         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
1812         (WebCore):
1813         (MediaControlOverlayEnclosureElement):
1814         (MediaControlRootElementChromiumAndroid):
1815         * platform/ThemeTypes.h:
1816         * rendering/RenderMediaControlsChromium.cpp:
1817         (WebCore::paintMediaOverlayPlayButton):
1818         (WebCore):
1819         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1820         * rendering/RenderTheme.cpp:
1821         (WebCore::RenderTheme::paint):
1822         * rendering/RenderTheme.h:
1823         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
1824         * rendering/RenderThemeChromiumAndroid.cpp:
1825         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
1826         (WebCore):
1827         * rendering/RenderThemeChromiumAndroid.h:
1828
1829 2012-07-27  Anders Carlsson  <andersca@apple.com>
1830
1831         Show the unavailable plug-in indicator for Java applets as well
1832         https://bugs.webkit.org/show_bug.cgi?id=92521
1833
1834         Reviewed by Sam Weinig.
1835
1836         Now that <applet> behaves more like <embed> and <object>, make sure that we show the unavailable plug-in indicator
1837         and call the correct error callbacks if we fail to instantiate the plug-in.
1838
1839         * WebCore.exp.in:
1840         Export a symbol needed by WebKit2.
1841
1842         * html/HTMLAppletElement.cpp:
1843         (WebCore::HTMLAppletElement::HTMLAppletElement):
1844         Set the correct service type.
1845
1846         * loader/SubframeLoader.cpp:
1847         (WebCore::SubframeLoader::createJavaAppletWidget):
1848         Enable the unavailable plug-in indicator if we fail to create the java applet widget.
1849
1850 2012-07-27  Dan Bernstein  <mitz@apple.com>
1851
1852         Hit testing near a column break can return a result from an adjacent column when there is leading
1853         https://bugs.webkit.org/show_bug.cgi?id=92524
1854
1855         Reviewed by Anders Carlsson.
1856
1857         The fix for <http://webkit.org/b/92311> relied on the existence of a pagination strut for
1858         detecting that a line was at the beginning of a new column. However, when a line naturally
1859         falls at the beginning of a column, there is no pagination strut, and the check failed.
1860
1861         Test: fast/multicol/hit-test-end-of-column-with-line-height.html
1862
1863         * rendering/InlineFlowBox.h:
1864         (WebCore::InlineFlowBox::InlineFlowBox): Added initializer for new member variable.
1865         (InlineFlowBox): Added m_isFirstAfterPageBreak member variable.
1866         * rendering/RenderBlock.cpp:
1867         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed the test for whether a
1868         line was at the beginning of a column from relying on a pagination strut to checking
1869         isFirstAfterPageBreak(). Also refined the hit test itself to include the leading above such
1870         a line.
1871         (WebCore::RenderBlock::adjustLinePositionForPagination): Added calls to
1872         setIsFirstAfterPageBreak() to first reset this flag, then set it to true if necessary.
1873         * rendering/RootInlineBox.h:
1874         (WebCore::RootInlineBox::isFirstAfterPageBreak): Added this accessor.
1875         (WebCore::RootInlineBox::setIsFirstAfterPageBreak): Ditto.
1876
1877 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
1878
1879         Web Inspector: Allow front_end to be loaded into an iframe
1880         https://bugs.webkit.org/show_bug.cgi?id=92437
1881
1882         Reviewed by Pavel Feldman.
1883
1884         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
1885
1886         * inspector/front-end/ExtensionAPI.js: 
1887         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
1888         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
1889         extensions are iframes in iframes and we need to use a relative address window.parent.
1890         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
1891         (injectedExtensionAPI.ExtensionViewImpl):
1892         (injectedExtensionAPI.ExtensionServerClient):
1893         WebKit/chromium/scripts/generate_devtools_extension_api.py:
1894         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
1895         window.parent.
1896
1897 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
1898
1899         Web Inspector: Allow front_end to be loaded into an iframe
1900         https://bugs.webkit.org/show_bug.cgi?id=92437
1901
1902         Reviewed by Pavel Feldman.
1903
1904         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
1905
1906         * inspector/front-end/ExtensionAPI.js: 
1907         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
1908         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
1909         extensions are iframes in iframes and we need to use a relative address window.parent.
1910         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
1911         (injectedExtensionAPI.ExtensionViewImpl):
1912         (injectedExtensionAPI.ExtensionServerClient):
1913         WebKit/chromium/scripts/generate_devtools_extension_api.py:
1914         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
1915         window.parent.
1916
1917 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
1918
1919         Web Inspector: InspectorPageAgent should ascertain document to be non-null in updateViewMetrics()
1920         https://bugs.webkit.org/show_bug.cgi?id=92476
1921
1922         Reviewed by Pavel Feldman.
1923
1924         InspectorPageAgent should check for document object being null. As pages created with blank URL might
1925         not have the document object, this causes a crash.
1926
1927         No new tests as added null check.
1928
1929         * inspector/InspectorPageAgent.cpp:
1930         (WebCore::InspectorPageAgent::updateViewMetrics):
1931
1932 2012-07-27  Mike West  <mkwst@chromium.org>
1933
1934         CSP directives containing invalid characters should log an error.
1935         https://bugs.webkit.org/show_bug.cgi?id=92487
1936
1937         Reviewed by Adam Barth.
1938
1939         Unknown directive names are currently logged, but we exit the directive
1940         parser early without logging if we hit an invalid character inside a
1941         directive. `script-src: ...`, for example, was ignored without letting
1942         the developer know what happened. This patch changes that behavior,
1943         logging the whole name (in this case `script-src:`) as an unknown
1944         directive.
1945
1946         Test: http/tests/security/contentSecurityPolicy/directive-parsing-04.html
1947
1948         * page/ContentSecurityPolicy.cpp:
1949         (WebCore::CSPDirectiveList::parseDirective):
1950
1951 2012-07-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
1952
1953         [Texmap] Performance regression in texture uploads after r121223
1954         https://bugs.webkit.org/show_bug.cgi?id=91897
1955
1956         Reviewed by Jocelyn Turcotte.
1957
1958         Rolling out r121223, with some conflict fixes.
1959
1960         * platform/graphics/texmap/TextureMapperGL.cpp:
1961         (WebCore::swizzleBGRAToRGBA):
1962         (WebCore):
1963         (WebCore::driverSupportsBGRASwizzling):
1964         (WebCore::BitmapTextureGL::didReset):
1965         (WebCore::BitmapTextureGL::updateContents):
1966
1967 2012-07-27  Joe Mason  <jmason@rim.com>
1968
1969         [BlackBerry] Update NetworkJob::sendRequestWithCredentials to use new getProxyAddress API
1970         https://bugs.webkit.org/show_bug.cgi?id=92457
1971
1972         Reviewed by Yong Li.
1973
1974         getProxyAddress now returns "host:port", and getProxyPort is gone. Update NetworkJob to use
1975         the new interface.
1976
1977         RIM PR: 176166
1978         Internally reviewed by Jonathan Dong <jonathan.dong@torchmobile.com.cn>
1979
1980         * platform/network/blackberry/NetworkJob.cpp:
1981         (WebCore::NetworkJob::sendRequestWithCredentials):
1982
1983 2012-07-27  Kevin Ellis  <kevers@chromium.org>
1984
1985         Improve touch adjustment for targetting small controls.
1986         https://bugs.webkit.org/show_bug.cgi?id=92293
1987
1988         Reviewed by Antonio Gomes.
1989
1990         Modifies the touch adjustment algorithm to better discriminate small targets without introducing
1991         a bias towards shorter links.  The revised scoring algorihtm uses a normalized distance to
1992         center-line score and a normalized overlap score.  The better of the two scores is used for
1993         determining the best candidate for target adjustment.  The center-line score works well
1994         for discriminating elements with partial overlaps, where relying solely on percent overlap
1995         could bias towards the smaller element.  Conversely, a high percentage in overlap provides a 
1996         strong measure of confidence in a candidate target.  An additonal tie-break algorithm is
1997         introduced to minimize the adjustment distance if two equally suitable candidates are found.
1998
1999         Test: touchadjustment/small-target-test.html
2000
2001         * page/TouchAdjustment.cpp:
2002         (TouchAdjustment):
2003         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2004         (WebCore::TouchAdjustment::hybridDistanceFunction):
2005         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2006         (WebCore::findBestClickableCandidate):
2007
2008 2012-07-27  Kevin Ellis  <kevers@chromium.org>
2009
2010         [chromium] Calendar for input type=date should be larger on devices that support touch input.
2011         https://bugs.webkit.org/show_bug.cgi?id=92424
2012
2013         Reviewed by Kent Tamura.
2014
2015         Adds touch specific CSS rules to enlarge entries in the calendar on
2016         screens that support touch input.
2017
2018         Manually tested with touch support enabled/disabled.
2019
2020         * Resources/calendarPicker.css:
2021         (@media (pointer:coarse)):
2022         * html/shadow/CalendarPickerElement.cpp:
2023         (WebCore::CalendarPickerElement::contentSize):
2024
2025 2012-07-28  Chris Fleizach  <cfleizach@apple.com>
2026
2027         WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation
2028         https://bugs.webkit.org/show_bug.cgi?id=91911
2029
2030         Reviewed by Darin Adler.
2031
2032         Update comments around code to explain rationale.
2033
2034         * accessibility/AccessibilityRenderObject.cpp:
2035         (WebCore::AccessibilityRenderObject::helpText):
2036         (WebCore::AccessibilityRenderObject::accessibilityDescription):
2037
2038 2012-07-27  Zoltan Horvath  <zoltan@webkit.org>
2039
2040         Add runtime flag to enable/disable JS memory information
2041         https://bugs.webkit.org/show_bug.cgi?id=92479
2042
2043         Reviewed by Simon Hausmann.
2044
2045         We need console.memory JS object to be accessible because of the memory consumption
2046         measurements of the performance tests, so I added a toggle to InternalSettings.
2047
2048         * testing/InternalSettings.cpp:
2049         (WebCore::InternalSettings::setMemoryInfoEnabled):
2050         (WebCore):
2051         * testing/InternalSettings.h:
2052         (InternalSettings):
2053         * testing/InternalSettings.idl:
2054
2055 2012-07-27  Arko Saha  <arko@motorola.com>
2056
2057         Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.
2058         https://bugs.webkit.org/show_bug.cgi?id=92482
2059
2060         Reviewed by Kentaro Hara.
2061
2062         Removed custom methods toJS() and toV8Object(). We should use toJS() method defined in
2063         JSMicroDataItemValueCustom.cpp and toV8() method defined in V8MicroDataItemValueCustom.cpp
2064         in place of custom toJs() and toV8Object().
2065
2066         Existing tests :
2067                 fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element.html
2068                 fast/dom/MicroData/itemvalue-reflects-href-attr.html
2069                 fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element.html
2070                 fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element.html
2071                 fast/dom/MicroData/itemvalue-reflects-the-src-attr.html
2072                 fast/dom/MicroData/itemvalue-returns-element-itself.html
2073                 fast/dom/MicroData/itemvalue-returns-null.html
2074                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html
2075                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002.html
2076
2077         * bindings/js/JSHTMLElementCustom.cpp:
2078         (WebCore):
2079         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2080         (WebCore):
2081         (WebCore::V8HTMLElement::itemValueAccessorGetter):
2082
2083 2012-07-27  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2084
2085         REGRESSION(r123856): Breaks the build when disabling inspector
2086         https://bugs.webkit.org/show_bug.cgi?id=92493
2087
2088         Reviewed by Kentaro Hara.
2089
2090         * bindings/js/ScriptGCEvent.h:
2091         (WebCore):
2092         * bindings/v8/ScriptGCEvent.h:
2093         (WebCore):
2094
2095 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
2096
2097         [EFL][WK2] Add API to Ewk_Cookie_Manager to watch for cookie changes
2098         https://bugs.webkit.org/show_bug.cgi?id=92484
2099
2100         Reviewed by Kenneth Rohde Christiansen.
2101
2102         Make use of soup/CookieStorageSoup.cpp for EFL port instead
2103         of defining empty implementations for cookie storage
2104         functions.
2105
2106         No new tests, no behavior change.
2107
2108         * PlatformEfl.cmake:
2109         * platform/efl/TemporaryLinkStubs.cpp:
2110
2111 2012-07-27  Keishi Hattori  <keishi@webkit.org>
2112
2113         Replace ColorChooserClient::elementRectRelativeToWindow with elementRectRelativeToRootView
2114         https://bugs.webkit.org/show_bug.cgi?id=92488
2115
2116         Reviewed by Kent Tamura.
2117
2118         Changing ColorChooserClient interface to return element rectangle that is relative to root view instead of window.
2119
2120         No new tests. Method is not used yet.
2121
2122         * html/ColorInputType.cpp:
2123         (WebCore::ColorInputType::elementRectRelativeToRootView): Replaced elementRectRelativeToWindow. Returns element rectangle relative to root view.
2124         * html/ColorInputType.h:
2125         (ColorInputType):
2126         * platform/ColorChooserClient.h:
2127         (ColorChooserClient):
2128
2129 2012-07-27  Dominik Röttsches  <dominik.rottsches@intel.com>
2130
2131         [Cairo] Add complex font drawing using HarfbuzzNG
2132         https://bugs.webkit.org/show_bug.cgi?id=91864
2133
2134         Reviewed by Simon Hausmann and Martin Robinson.
2135
2136         Adding Harfbuzz support to EFL by implementing it with the help of cairo and cairo-ft.
2137         Reusing Chromium's Harfbuzz-NG support.
2138
2139         No new tests, complex font support is covered by existing tests.
2140
2141         * CMakeLists.txt: Adding new cairo based implementations, removing emtpy FontEfl.cpp
2142         * WebCore.gypi: Removing FontEfl.cpp
2143         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: Added. New implementation that implements cairo & harfbuzz-ng based complex font drawing.
2144         (WebCore):
2145         (WebCore::Font::drawComplexText):
2146         (WebCore::Font::drawEmphasisMarksForComplexText):
2147         (WebCore::Font::canReturnFallbackFontsForComplexText):
2148         (WebCore::Font::canExpandAroundIdeographsInComplexText):
2149         (WebCore::Font::floatWidthForComplexText):
2150         (WebCore::Font::offsetForPositionForComplexText):
2151         (WebCore::Font::selectionRectForComplexText):
2152         * platform/graphics/efl/FontEfl.cpp: Removed.
2153         * platform/graphics/freetype/FontPlatformData.h: Adding a getter that retrieves a harfbuzz face.
2154         (FontPlatformData):
2155         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Adding a getter that retrieves a harfbuzz face.
2156         (WebCore::FontPlatformData::operator=):
2157         (WebCore::FontPlatformData::FontPlatformData):
2158         (WebCore):
2159         (WebCore::FontPlatformData::harfbuzzFace):
2160         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp: Added. Cairo-freetype based approach to get complex font metrics.
2161         (WebCore):
2162         (CairoFtFaceLocker):
2163         (WebCore::CairoFtFaceLocker::CairoFtFaceLocker):
2164         (WebCore::CairoFtFaceLocker::lock):
2165         (WebCore::CairoFtFaceLocker::~CairoFtFaceLocker):
2166         (WebCore::floatToHarfBuzzPosition):
2167         (WebCore::doubleToHarfBuzzPosition):
2168         (WebCore::CairoGetGlyphWidthAndExtents):
2169         (WebCore::harfbuzzGetGlyph):
2170         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
2171         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
2172         (WebCore::harfbuzzGetGlyphExtents):
2173         (WebCore::harfbuzzCairoTextGetFontFuncs):
2174         (WebCore::harfbuzzCairoGetTable):
2175         (WebCore::HarfBuzzNGFace::createFace):
2176         (WebCore::HarfBuzzNGFace::createFont):
2177         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
2178
2179 2012-07-27  Adam Barth  <abarth@webkit.org>
2180
2181         Add a Setting to expose quantized, rate-limited MemoryInfo values
2182         https://bugs.webkit.org/show_bug.cgi?id=80444
2183
2184         Reviewed by Eric Seidel.
2185
2186         We do not currently expose real MemoryInfo objects to the web unless
2187         the user opts in because we're worried that this memory information
2188         could be used in side-channel attacks.
2189
2190         We've gotten feedback from a number of web app developers that this
2191         information is very useful in tracking the performance of their
2192         applications.  These developers use the setting in their testing labs
2193         and regression harnesses to catch memory leaks and regressiosn early in
2194         their development cycle.
2195
2196         Some of these developers have experimented with enabling this feature
2197         within their enterprise and have found the memory data from the field
2198         extremely useful in tracking down memory issues that slip through their
2199         testing.
2200
2201         Based on this experience, they've asked whether we can enable this
2202         functionality on a wider scale so they catch even more problems
2203         including problems that don't manifest within their enterprise.
2204         Because we're still worried about side-channel attacks, we don't want
2205         to expose the raw data, so we've talked with these folks in more detail
2206         to understand what information they find most valuable.
2207
2208         This patch is the result of those discussions.  In particular, this
2209         patch adds an option to expose quantized and rate-limited memory
2210         information to web pages.  Web pages can only learn new data every 20
2211         minutes, which helps mitigate attacks where the attacker compares two
2212         or readings to extract side-channel information.  The patch also only
2213         reports 100 distinct memory values, which (combined with the rate
2214         limts) makes it difficult for attackers to learn about small changes in
2215         memory use.
2216
2217         * page/MemoryInfo.cpp:
2218         (WebCore):
2219         (HeapSizeCache):
2220         (WebCore::HeapSizeCache::HeapSizeCache):
2221         (WebCore::HeapSizeCache::getCachedHeapSize):
2222         (WebCore::HeapSizeCache::maybeUpdate):
2223         (WebCore::HeapSizeCache::update):
2224         (WebCore::HeapSizeCache::quantize):
2225         (WebCore::MemoryInfo::MemoryInfo):
2226         * page/Settings.cpp:
2227         (WebCore::Settings::Settings):
2228         * page/Settings.h:
2229         (WebCore::Settings::setQuantizedMemoryInfoEnabled):
2230         (WebCore::Settings::quantizedMemoryInfoEnabled):
2231         (Settings):
2232
2233 2012-07-27  Vsevolod Vlasov  <vsevik@chromium.org>
2234
2235         Web Inspector: Move formatting support from JavaScriptSource to UISourceCode.
2236         https://bugs.webkit.org/show_bug.cgi?id=92373
2237
2238         Reviewed by Pavel Feldman.
2239
2240         Moved formatting support from JavaScriptSource to UISourceCode.
2241         Extracted Formatter interface from ScriptFormatter and created IdentityFormatter
2242         implememntation and Formatter.createFormatter(contentType) formatter factory.
2243         Introduced virtual formattedChanged() method on UISourceCode.
2244
2245         * inspector/front-end/JavaScriptSource.js:
2246         (WebInspector.JavaScriptSource):
2247         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
2248         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
2249         (WebInspector.JavaScriptSource.prototype.searchInContent):
2250         (WebInspector.JavaScriptSource.prototype.formattedChanged):
2251         * inspector/front-end/ScriptFormatter.js:
2252         (WebInspector.Formatter):
2253         (WebInspector.Formatter.createFormatter):
2254         (WebInspector.Formatter.locationToPosition):
2255         (WebInspector.Formatter.positionToLocation):
2256         (WebInspector.Formatter.prototype.formatContent):
2257         (WebInspector.ScriptFormatter):
2258         (WebInspector.IdentityFormatter):
2259         (WebInspector.IdentityFormatter.prototype.formatContent):
2260         (WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
2261         (WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
2262         * inspector/front-end/UISourceCode.js:
2263         (WebInspector.UISourceCode):
2264         (WebInspector.UISourceCode.prototype.requestContent):
2265         (WebInspector.UISourceCode.prototype._fireContentAvailable):
2266         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
2267         (WebInspector.UISourceCode.prototype.overrideLocation):
2268         (WebInspector.UISourceCode.prototype.togglingFormatter):
2269         (WebInspector.UISourceCode.prototype.formatted):
2270         (WebInspector.UISourceCode.prototype.setFormatted.if):
2271         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent.formattedChanged):
2272         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
2273         (WebInspector.UISourceCode.prototype.setFormatted):
2274         (WebInspector.UISourceCode.prototype.createFormatter):
2275         (WebInspector.UISourceCode.prototype.formattedChanged):
2276
2277 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
2278
2279         Page object should ascertain EditorClient to be non-null
2280         https://bugs.webkit.org/show_bug.cgi?id=92458
2281
2282         Reviewed by Ryosuke Niwa.
2283
2284         The EditorClient should always be available in Page object. Added the assertion to ascertain this.
2285
2286         No new tests. Added assertion to make sure EditorClient always exist.
2287
2288         * page/Page.cpp:
2289         (WebCore::Page::Page):
2290
2291 2012-07-27  Huang Dongsung  <luxtella@company100.net>
2292
2293         Gather the duplicated timer code into CachedResource.
2294         https://bugs.webkit.org/show_bug.cgi?id=92332
2295
2296         Reviewed by Nate Chapin.
2297
2298         Internal review by Jae Hyun Park.
2299
2300         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
2301         start the timer to destroy decoded data. Those three classes have their own
2302         timer.
2303         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
2304         stop the timer. This change does not have any side effect because
2305         CachedResource::didAddClient only stops the timer in this case.
2306
2307         No new tests - no new testable functionality.
2308
2309         * loader/cache/CachedCSSStyleSheet.cpp:
2310         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2311         (WebCore::CachedCSSStyleSheet::didAddClient):
2312         * loader/cache/CachedCSSStyleSheet.h:
2313         (CachedCSSStyleSheet):
2314         * loader/cache/CachedImage.cpp:
2315         (WebCore::CachedImage::CachedImage):
2316         (WebCore::CachedImage::didAddClient):
2317         (WebCore::CachedImage::allClientsRemoved):
2318         * loader/cache/CachedImage.h:
2319         (CachedImage):
2320         * loader/cache/CachedResource.cpp:
2321         (WebCore::CachedResource::CachedResource):
2322         (WebCore::CachedResource::didAddClient):
2323         (WebCore::CachedResource::removeClient):
2324         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
2325         (WebCore):
2326         (WebCore::CachedResource::decodedDataDeletionTimerFired):
2327         * loader/cache/CachedResource.h:
2328         (CachedResource):
2329         * loader/cache/CachedScript.cpp:
2330         (WebCore::CachedScript::CachedScript):
2331         * loader/cache/CachedScript.h:
2332         (CachedScript):
2333
2334 2012-07-27  Huang Dongsung  <luxtella@company100.net>
2335
2336         Gather the duplicated timer code into CachedResource.
2337         https://bugs.webkit.org/show_bug.cgi?id=92332
2338
2339         Reviewed by Nate Chapin.
2340
2341         Internal review by Jae Hyun Park.
2342
2343         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
2344         start the timer to destroy decoded data. Those three classes have their own
2345         timer.
2346         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
2347         stop the timer. This change does not have any side effect because
2348         CachedResource::didAddClient only stops the timer in this case.
2349
2350         No new tests - no new testable functionality.
2351
2352         * loader/cache/CachedCSSStyleSheet.cpp:
2353         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2354         (WebCore::CachedCSSStyleSheet::didAddClient):
2355         * loader/cache/CachedCSSStyleSheet.h:
2356         (CachedCSSStyleSheet):
2357         * loader/cache/CachedImage.cpp:
2358         (WebCore::CachedImage::CachedImage):
2359         (WebCore::CachedImage::didAddClient):
2360         (WebCore::CachedImage::allClientsRemoved):
2361         * loader/cache/CachedImage.h:
2362         (CachedImage):
2363         * loader/cache/CachedResource.cpp:
2364         (WebCore::CachedResource::CachedResource):
2365         (WebCore::CachedResource::didAddClient):
2366         (WebCore::CachedResource::removeClient):
2367         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
2368         (WebCore):
2369         (WebCore::CachedResource::decodedDataDeletionTimerFired):
2370         * loader/cache/CachedResource.h:
2371         (CachedResource):
2372         * loader/cache/CachedScript.cpp:
2373         (WebCore::CachedScript::CachedScript):
2374         * loader/cache/CachedScript.h:
2375         (CachedScript):
2376
2377 2012-07-27  Dana Jansens  <danakj@chromium.org>
2378
2379         [chromium] Don't add a HUD layer when there is no rootLayer
2380         https://bugs.webkit.org/show_bug.cgi?id=92442
2381
2382         Reviewed by Adrienne Walker.
2383
2384         When the compositor is shutting down in threaded mode, it does a commit
2385         without a root layer. We should not try stick the hud layer onto the
2386         null root layer.
2387
2388         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2389         (WebCore::CCLayerTreeHost::willCommit):
2390
2391 2012-07-27  Alec Flett  <alecflett@chromium.org>
2392
2393         IndexedDB: inject index keys on cursor/objectstore/index get success handlers
2394         https://bugs.webkit.org/show_bug.cgi?id=91123
2395
2396         Reviewed by Tony Chang.
2397
2398         Move key-injection into the frontend, by injecting the key into
2399         the value on get rather than set for autoincremented keys. This
2400         gives a potential performance win by avoiding an IPC call to the
2401         V8 utility process on chromium, and generally cleans up the key
2402         management.
2403
2404         Note that this duplicates the logic of generateIndexKeys into the
2405         frontend until that method can be expunged from the backend. This
2406         will be cleaned up in a later patch.
2407
2408         In order to account for both old data (which has the duplicate
2409         primary key already injected and serialized) and any new data, an
2410         assertion was removed from IDBBindingUtilities.
2411
2412         This also includes some minor refactoring such as the deprecation
2413         of IDBCursorBackendInterface::update in favor of a direct call to
2414         IDBObjectStoreBackendImpl::put, and removal of the now-defunct
2415         IDBBackingStore::getObjectViaIndex.
2416
2417         Tests: storage/indexdb/index-duplicate-keypaths.html
2418
2419         * Modules/indexeddb/IDBBackingStore.h:
2420         (IDBBackingStore):
2421         * Modules/indexeddb/IDBCursor.cpp:
2422         (WebCore::IDBCursor::update):
2423         (WebCore::IDBCursor::setValueReady):
2424         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2425         (WebCore::IDBCursorBackendImpl::update):
2426         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2427         (WebCore::IDBIndexBackendImpl::getInternal):
2428         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2429         * Modules/indexeddb/IDBLevelDBBackingStore.h:
2430         (IDBLevelDBBackingStore):
2431         * Modules/indexeddb/IDBObjectStore.cpp:
2432         (WebCore::generateIndexKeysForValue):
2433         (WebCore):
2434         (WebCore::IDBObjectStore::add):
2435         (WebCore::IDBObjectStore::put):
2436         * Modules/indexeddb/IDBObjectStore.h:
2437         (IDBObjectStore):
2438         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2439         (WebCore::IDBObjectStoreBackendImpl::put):
2440         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
2441         (WebCore):
2442         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2443         * Modules/indexeddb/IDBRequest.cpp:
2444         (WebCore::IDBRequest::onSuccess):
2445         * bindings/v8/IDBBindingUtilities.cpp:
2446         (WebCore):
2447
2448 2012-07-27  Tony Chang  <tony@chromium.org>
2449
2450         changing -webkit-order should change the paint order of flex items
2451         https://bugs.webkit.org/show_bug.cgi?id=92041
2452
2453         Reviewed by Ojan Vafai.
2454
2455         Override paintChildren and use the flex order iterator to determine the order to paint the children.
2456
2457         Test: css3/flexbox/order-painting.html
2458
2459         * rendering/RenderFlexibleBox.cpp:
2460         (WebCore::RenderFlexibleBox::layoutBlock): Save a reference to the order iterator.
2461         (WebCore::RenderFlexibleBox::paintChildren):
2462         * rendering/RenderFlexibleBox.h:
2463         (RenderFlexibleBox): Hold a reference to the order iterator so we don't have to recreate it at paint time.
2464             Also mark all the virtual methods with OVERRIDE.
2465
2466 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2467
2468         Unreviewed, rolling out r123820.
2469         http://trac.webkit.org/changeset/123820
2470         https://bugs.webkit.org/show_bug.cgi?id=92465
2471
2472         It made all tests crash on all port (Requested by Ossy_home on
2473         #webkit).
2474
2475         * dom/EventNames.cpp:
2476         (WebCore):
2477
2478 2012-07-26  Ryosuke Niwa  <rniwa@webkit.org>
2479
2480         Qt build fix after r123788. Fixed the typo.
2481
2482         * xml/parser/XMLDocumentParserQt.cpp:
2483         (WebCore::handleElementAttributes):
2484
2485 2012-07-26  Hironori Bono  <hbono@chromium.org>
2486
2487         [Qt] Build fix for Qt after r123811
2488         https://bugs.webkit.org/show_bug.cgi?id=92460
2489
2490         Reviewed by Ryosuke Niwa.
2491
2492         This change explicitly converts from AtomicString to String to avoid ambiguities
2493         when compiling HTMLAppletWidget.cpp on Qt.
2494
2495         No new tests because it is a build fix.
2496
2497         * html/HTMLAppletElement.cpp:
2498         (WebCore::HTMLAppletElement::updateWidget):
2499
2500 2012-07-26  Mike Lawther  <mikelawther@chromium.org>
2501
2502         Make transitions work between different Length types
2503         https://bugs.webkit.org/show_bug.cgi?id=92220
2504
2505         Reviewed by Simon Fraser.
2506
2507         Use the existing CSS calc machinery for blending between two calculations
2508         to blend between two Lengths of differing types.
2509
2510         Test: transitions/mixed-type.html
2511
2512         * platform/Length.cpp:
2513         (WebCore::Length::blendMixedTypes):
2514         * platform/Length.h:
2515         (WebCore::Length::blend):
2516         (Length):
2517
2518 2012-07-26  Dan Bernstein  <mitz@apple.com>
2519
2520         Blocks with reverse column progression don’t have layout overflow for overflowing columns
2521         https://bugs.webkit.org/show_bug.cgi?id=92440
2522
2523         Reviewed by Sam Weinig.
2524
2525         Test: fast/multicol/progression-reverse-overflow.html
2526
2527         * rendering/RenderBox.cpp:
2528         (WebCore::RenderBox::addLayoutOverflow): If column progression is reversed, then allow
2529         layout overflow to go in the opposite direction than it would normally be allowed to go.
2530         For example, in a block with writing-mode: horizontal-tb, direction: ltr and
2531         column-progression: reverse, columns overflow to the left, so layout overflow would go on
2532         the left.
2533
2534 2012-07-26  Keishi Hattori  <keishi@webkit.org>
2535
2536         Implement ColorSuggestionPicker page popup
2537         https://bugs.webkit.org/show_bug.cgi?id=92109
2538
2539         Reviewed by Kent Tamura.
2540
2541         Implements ColorSuggestionPicker page popup. This will be used in
2542         certain ports as the datalist UI for <input type=color>.
2543
2544         No new tests because there is no way to open the popup yet.
2545
2546         * Resources/colorSuggestionPicker.css: Added.
2547         (body):
2548         (#main):
2549         (.color-swatch):
2550         (.color-swatch:hover):
2551         (.color-swatch-container):
2552         (.other-color):
2553         * Resources/colorSuggestionPicker.js: Added.
2554         (getScrollbarWidth):When there are more than 20 colors we need to
2555         increase the window width to accommodate the scroll bar.
2556         (createElement):
2557         (handleMessage):
2558         (initialize):
2559         (handleArgumentsTimeout):
2560         (validateArguments):
2561         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
2562         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
2563         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
2564         (ColorPicker):
2565         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
2566         grid.
2567         (ColorPicker.prototype._handleSwatchClick):
2568         * WebCore.gyp/WebCore.gyp: Added ColorSuggestionPicker action.
2569         * make-file-arrays.py:
2570         (main): Windows gets confused when "&&" is in the command, so we will replace " AND " with " && " internally.
2571
2572 2012-07-26  Anish Bhayani  <anish.bhayani@gmail.com>
2573
2574         De-virtualize WrapShape classes
2575         https://bugs.webkit.org/show_bug.cgi?id=90998
2576
2577         Reviewed by Andreas Kling.
2578
2579         The destructor for WrapShapes classes did not need to use a virtual
2580         pointer. WrapShapes.cpp is created to cast the WrapShape destructor 
2581         to the subclass type saving memory and avoiding virtual calls. 
2582
2583         There are existing tests that cover the validity of shapes. The
2584         added changes merely change the destructor of the shape objects
2585         which is also tested by LayoutTests/fast/exclusions.
2586
2587         * CMakeLists.txt:
2588         * GNUmakefile.list.am:
2589         * Target.pri:
2590         * WebCore.gypi:
2591         * WebCore.vcproj/WebCore.vcproj:
2592         * WebCore.xcodeproj/project.pbxproj:
2593         * rendering/style/WrapShapes.cpp: Added.
2594         (WebCore):
2595         (WebCore::WrapShape::destroy):
2596         * rendering/style/WrapShapes.h:
2597         (WebCore::WrapShape::deref):
2598         (WrapShape):
2599         (WebCore::WrapShape::type):
2600         (WebCore::WrapShape::setType):
2601         (WrapShapeRectangle):
2602         (WebCore::WrapShapeRectangle::WrapShapeRectangle):
2603         (WebCore::WrapShapeCircle::WrapShapeCircle):
2604         (WebCore::WrapShapeEllipse::WrapShapeEllipse):
2605         (WebCore::WrapShapePolygon::WrapShapePolygon):
2606         (WrapShapePolygon):
2607
2608 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2609
2610         Unreviewed, rolling out r123808.
2611         http://trac.webkit.org/changeset/123808
2612         https://bugs.webkit.org/show_bug.cgi?id=92443
2613
2614         Broke Apple Mac debug tests ASSERTION FAILED: !hasClients()
2615         (Requested by msaboff_ on #webkit).
2616
2617         * loader/cache/CachedCSSStyleSheet.cpp:
2618         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2619         (WebCore::CachedCSSStyleSheet::didAddClient):
2620         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
2621         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
2622         (WebCore):
2623         * loader/cache/CachedCSSStyleSheet.h:
2624         (CachedCSSStyleSheet):
2625         * loader/cache/CachedImage.cpp:
2626         (WebCore::CachedImage::CachedImage):
2627         (WebCore::CachedImage::decodedDataDeletionTimerFired):
2628         (WebCore):
2629         (WebCore::CachedImage::didAddClient):
2630         (WebCore::CachedImage::allClientsRemoved):
2631         * loader/cache/CachedImage.h:
2632         (CachedImage):
2633         * loader/cache/CachedResource.cpp:
2634         (WebCore::CachedResource::CachedResource):
2635         (WebCore::CachedResource::didAddClient):
2636         (WebCore::CachedResource::removeClient):
2637         * loader/cache/CachedResource.h:
2638         (CachedResource):
2639         * loader/cache/CachedScript.cpp:
2640         (WebCore::CachedScript::CachedScript):
2641         (WebCore::CachedScript::didAddClient):
2642         (WebCore):
2643         (WebCore::CachedScript::allClientsRemoved):
2644         (WebCore::CachedScript::decodedDataDeletionTimerFired):
2645         * loader/cache/CachedScript.h:
2646         (CachedScript):
2647
2648 2012-07-26  Tony Chang  <tony@chromium.org>
2649
2650         [chromium] Remove some unreachable code in ClipboardChromium.cpp
2651         https://bugs.webkit.org/show_bug.cgi?id=92427
2652
2653         Reviewed by Adam Barth.
2654
2655         convertURIListToURL does the same thing (implementation in ClipboardUtilitiesChromium.*).
2656
2657         No new tests, just deleting unused code.
2658
2659         * platform/chromium/ClipboardChromium.cpp:
2660         (WebCore::ClipboardChromium::getData):
2661
2662 2012-07-26  Sukolsak Sakshuwong  <sukolsak@google.com>
2663
2664         Implement undoscope attribute.
2665         https://bugs.webkit.org/show_bug.cgi?id=88793
2666
2667         Reviewed by Ryosuke Niwa.
2668
2669         undoscope attribute support as specified at
2670         http://dvcs.w3.org/hg/undomanager/raw-file/tip/undomanager.html
2671
2672         Test: editing/undomanager/undoscope-attribute.html
2673
2674         * Target.pri:
2675         * WebCore.gypi:
2676         * WebCore.vcproj/WebCore.vcproj:
2677         * dom/Document.cpp:
2678         (WebCore::Document::~Document):
2679         * dom/Element.cpp:
2680         (WebCore):
2681         (WebCore::Element::undoScope):
2682         (WebCore::Element::setUndoScope):
2683         (WebCore::Element::undoManager):
2684         (WebCore::Element::disconnectUndoManager):
2685         (WebCore::Element::disconnectUndoManagersInSubtree):
2686         * dom/Element.h:
2687         (Element):
2688         * dom/Element.idl:
2689         * dom/ElementRareData.h:
2690         (ElementRareData):
2691         * editing/UndoManager.cpp:
2692         (WebCore::UndoManager::disconnect):
2693         (WebCore::UndoManager::transact):
2694         (WebCore::UndoManager::undo):
2695         (WebCore::UndoManager::redo):
2696         (WebCore::UndoManager::clearUndo):
2697         (WebCore):
2698         (WebCore::UndoManager::clearRedo):
2699         (WebCore::UndoManager::clearUndoRedo):
2700         (WebCore::UndoManager::isConnected):
2701         * editing/UndoManager.h:
2702         (WebCore):
2703         (UndoManager):
2704         (WebCore::UndoManager::length):
2705         * editing/UndoManager.idl:
2706         * html/HTMLAttributeNames.in:
2707         * html/HTMLElement.cpp:
2708         (WebCore::HTMLElement::parseAttribute):
2709         (WebCore::HTMLElement::setContentEditable):
2710
2711 2012-07-26  Yoshifumi Inoue  <yosin@chromium.org>
2712
2713         [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
2714         https://bugs.webkit.org/show_bug.cgi?id=92339
2715
2716         Reviewed by Kent Tamura.
2717
2718         To detect compilation errors and test failure earlier, I would like
2719         build and run tests for input type datetime, datetime-local, month,
2720         time and week with runtime feature flags to avoid behavior changes
2721         other than test shell.
2722
2723         This patch adds runtime features for input types, datetime, datetime-local,
2724         month, time and week and integrates them into InputType::createInputTypeFactoryMap
2725         to follow runtime feature flags.
2726
2727         At this time, these runtime features are enabled by default for all
2728         ports define ENABLE_INPUT_TYPE_XXX except for Chromium port other than
2729         Android. I'll remove these #if after I update Chromium browser for
2730         disabling them for non-Android.
2731
2732         No new tests. Enabling disabled tests (fast/forms/datetime, fast/forms/dattimelocal,
2733         fast/forms/month, fast/forms/time, fast/forms/week)
2734
2735         * bindings/generic/RuntimeEnabledFeatures.cpp: Added initializations of
2736         variables for runtime features of input types.
2737         * bindings/generic/RuntimeEnabledFeatures.h:
2738         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled): Added.
2739         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled): Added.
2740         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled): Added.
2741         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Added.
2742         (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled): Added.
2743         (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Added.
2744         (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled): Added.
2745         (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Added.
2746         (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled): Added.
2747         (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Added.
2748         * html/InputType.cpp:
2749         (WebCore::createInputTypeFactoryMap): Register input types datetime,
2750         datetime-local, month, time and week if corresponding runtime feature
2751         flag is enabled.
2752         * html/InputType.h: Changed indentation to force building *InputType.cpp for
2753         making Chromium-win bots to be happy.
2754
2755 2012-07-26  Xianzhu Wang  <wangxianzhu@chromium.org>
2756
2757         [Chromium-Android] Don't overlay scrollbars in layout test mode
2758         https://bugs.webkit.org/show_bug.cgi?id=92419
2759
2760         Reviewed by Adam Barth.
2761
2762         No new tests. This fixes failures of existing tests, e.g. css1/box_properties/border.html and many others.
2763
2764         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2765         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars): Returns false in layout test mode.
2766         (WebCore):
2767         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb): Returns false in layout test mode (to match pixel test expectations).
2768         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
2769         (ScrollbarThemeChromiumAndroid):
2770
2771 2012-07-26  Jeffrey Pfau  <jpfau@apple.com>
2772
2773         Reloading substitute-data/alternate html string for unreachableURL will add an item to the back-forward-history for each reload
2774         https://bugs.webkit.org/show_bug.cgi?id=84041
2775
2776         Reviewed by Brady Eidson.
2777
2778         Previously, loadAlternateHTMLString:baseURL:forUnreachableURL: would insert a new history item, regardless of
2779         the load type of the original frame load. This could cause navigation to a broken website to make back and
2780         forward navigation difficult to use. This change ensures that a reload type makes it through all the way.
2781
2782         Added API test 'mac/BackForwardList.mm'.
2783
2784         * loader/FrameLoader.cpp:
2785         (WebCore::FrameLoader::load): Prevent m_loadType from being overwritten early and check if it's a reload.
2786         * loader/HistoryController.cpp:
2787         (WebCore::HistoryController::updateForCommit): Amend check when committing the provisional item for a reload.
2788         (WebCore::HistoryController::isReloadTypeWithProvisionalItem): Check that a reload type has a provisional item.
2789         (WebCore):
2790         * loader/HistoryController.h:
2791         (HistoryController): Add prototype for isReloadTypeWithProvisionalItem.
2792
2793 2012-07-26  Silvia Pfeiffer  <silviapf@chromium.org>
2794
2795         [Chromium] Regression: Global-buffer-overflow in WebCore::mediaControlElementType
2796         https://bugs.webkit.org/show_bug.cgi?id=91333
2797
2798         Reviewed by Eric Seidel.
2799
2800         MediaControlChromiumEnclosureElement now is a subclass of MediaControlElement, which
2801         fixes the broken cast detected in the bug.
2802         The displayType() of MediaControlChromiumEnclosureElement is set to 'MediaControlsPanel',
2803         since the Panel element is sufficiently close in functionality to the Enclosure element.
2804         By reusing this type, we do not need to introduce a Chromium-specific constant into
2805         the generally used MediaControlElementType.
2806
2807         Test: accessibility/media-controls.html
2808
2809         * html/shadow/MediaControlRootElementChromium.cpp:
2810         (WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
2811         Subclass MediaControlChromiumEnclosureElement from MediaControlElement.
2812         (WebCore::MediaControlChromiumEnclosureElement::displayType):
2813         Give the enclosure the MediaPanels type.
2814         * html/shadow/MediaControlRootElementChromium.h:
2815         Add the MediaControlElement.h header file.
2816         (MediaControlChromiumEnclosureElement):
2817         Subclass MediaControlChromiumEnclosureElement from MediaControlElement.
2818
2819 2012-07-26  Arnaud Renevier  <arno@renevier.net>
2820
2821         [GTK] avoid unneeded object creation when calling Vector::append
2822         https://bugs.webkit.org/show_bug.cgi?id=88805
2823
2824         Reviewed by Alexey Proskuryakov.
2825
2826         No new tests: no change in functionality.
2827
2828         * platform/gtk/ContextMenuGtk.cpp:
2829         (WebCore::contextMenuItemVector):
2830         * platform/gtk/KeyBindingTranslator.h:
2831         (WebCore::KeyBindingTranslator::addPendingEditorCommand):
2832
2833 2012-07-26  Benjamin Poulain  <bpoulain@apple.com>
2834
2835         Initialize the Event Names' strings from read only memory
2836         https://bugs.webkit.org/show_bug.cgi?id=92435
2837
2838         Reviewed by Anders Carlsson.
2839
2840         Similarily to r123689, we can initialize the event names' strings from memory without copying the data.
2841         This saves us memory and initialization time.
2842
2843         * dom/EventNames.cpp:
2844         (WebCore):
2845
2846 2012-07-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2847
2848         constructing TypedArray from another TypedArray is slow
2849         https://bugs.webkit.org/show_bug.cgi?id=90838
2850
2851         Reviewed by Kenneth Russell.
2852
2853         When constructing a typed array from an array like element, try to
2854         determine if the argument is a typed array. If so, cast the argument
2855         to a typed array, and read each element with .item() method. That
2856         avoid reading the value as a JSValue, and speedups construction by
2857         approximatively 3x (even 30x if TypedArrays are both the same type).
2858
2859         In order to achieve that, we use virtual getType method. We can use
2860         this information to cast the TypedArray to the actual type, and then
2861         read the values from the source.
2862
2863         Introduce constructArrayBufferViewWithTypedArrayArgument template
2864         function which returns a new typed array if first argument is a typed
2865         array, or 0 otherwise.
2866
2867         This patch also replaces previous is<Type>Array() calls with new
2868         getType method.
2869
2870         * bindings/js/JSArrayBufferViewHelper.h:
2871         (WebCore::constructArrayBufferViewWithTypedArrayArgument):
2872         (WebCore):
2873         (WebCore::constructArrayBufferView):
2874         * bindings/v8/SerializedScriptValue.cpp:
2875         * html/canvas/DataView.h:
2876         (DataView):
2877         (WebCore::DataView::getType):
2878         * html/canvas/WebGLRenderingContext.cpp:
2879         (WebCore):
2880         (WebCore::WebGLRenderingContext::readPixels):
2881         (WebCore::WebGLRenderingContext::validateTexFuncData):
2882         * page/Crypto.cpp:
2883
2884 2012-07-26  Max Vujovic  <mvujovic@adobe.com>
2885
2886         Added binding and updated chromium tests.
2887
2888         [CSS Filters] Add V8 binding for WebKitCSSFilterValue
2889         https://bugs.webkit.org/show_bug.cgi?id=92391
2890
2891         Reviewed by Adam Barth.
2892
2893         No new tests. This fixes test cases in:
2894             platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt
2895             platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt
2896             platform/chromium/css3/filters/filter-property-computed-style-expected.txt
2897             platform/chromium/css3/filters/filter-property-parsing-expected.txt
2898
2899         * bindings/v8/custom/V8CSSValueCustom.cpp:
2900         (WebCore::toV8):
2901
2902 2012-07-26  Nayan Kumar K  <nayankk@motorola.com>
2903
2904         [WebGL] Initial size of canvas can be larger than MAX_VIEWPORT_DIMS.
2905         https://bugs.webkit.org/show_bug.cgi?id=91976
2906
2907         Reviewed by Kenneth Russell.
2908
2909         From section 2.2 of the spec the WebGL implementation says initial size of
2910         the canvas can be larger than MAX_VIEWPORT_DIMS. With the current WebGL
2911         implementation, we get error when initial size if greater than MAX_VIEWPORT_DIMS.
2912         This change limits the width and height of drawingbuffer to MAX_VIEWPORT_DIMS
2913         when given initial size exceeds it.
2914
2915         Added tests to LayoutTests/fast/canvas/webgl/drawingbuffer-test.html
2916
2917         * html/canvas/WebGLRenderingContext.cpp:
2918         (WebCore):
2919         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
2920         (WebCore::WebGLRenderingContext::initializeNewContext):
2921         (WebCore::WebGLRenderingContext::markContextChanged):
2922
2923 2012-07-26  Adrienne Walker  <enne@google.com>
2924
2925         [chromium] When computing surface content scale, use top level device scale
2926         https://bugs.webkit.org/show_bug.cgi?id=92328
2927
2928         Reviewed by Kenneth Russell.
2929
2930         Previously, surface scale was calculated with layer->contentsScale(),
2931         however this value is 1 for any layer that is not ContentLayerChromium
2932         because of layer->needsContentsScale(). This would cause any surface
2933         created with a non-content owner layer to look fuzzy on a high DPI
2934         device. Fix by using the top level device scale.
2935
2936         Additionally, remove contentsScale from CCLayerImpl as it is no longer
2937         used.
2938
2939         * platform/graphics/chromium/LayerChromium.cpp:
2940         (WebCore::LayerChromium::pushPropertiesTo):
2941         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2942         (WebCore::CCLayerImpl::CCLayerImpl):
2943         * platform/graphics/chromium/cc/CCLayerImpl.h:
2944         (CCLayerImpl):
2945         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2946         (WebCore::calculateDrawTransformsInternal):
2947         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
2948
2949 2012-07-26  Anders Carlsson  <andersca@apple.com>
2950
2951         HTMLAppletElement should inherit from HTMLPlugInImageElement
2952         https://bugs.webkit.org/show_bug.cgi?id=92320
2953
2954         Reviewed by Eric Seidel.
2955
2956         In order to simplify the class hierarchy and eventually merge HTMLPlugInImageElement and HMTLPlugInElement,
2957         make HTMLAppletElement inherit from HTMLPlugInImageElement. While this does mean that HTMLAppletElement will grow by
2958         a couple of words, in practice it won't matter.
2959
2960         Also, make RenderApplet inherit from RenderEmbeddedObject and move the plug-in instantiation to HTMLAppletElement which matches
2961         both HTMLEmbedElement and HTMLObjectElement.
2962
2963         * html/HTMLAppletElement.cpp:
2964         (WebCore::HTMLAppletElement::HTMLAppletElement):
2965         (WebCore::HTMLAppletElement::create):
2966         (WebCore::HTMLAppletElement::parseAttribute):
2967         (WebCore::HTMLAppletElement::rendererIsNeeded):
2968         (WebCore::HTMLAppletElement::createRenderer):
2969         (WebCore):
2970         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
2971         (WebCore::HTMLAppletElement::updateWidget):
2972         * html/HTMLAppletElement.h:
2973         (HTMLAppletElement):
2974         * html/HTMLTagNames.in:
2975         * loader/SubframeLoader.cpp:
2976         (WebCore::SubframeLoader::createJavaAppletWidget):
2977         * loader/SubframeLoader.h:
2978         (SubframeLoader):
2979         * page/FrameView.cpp:
2980         (WebCore::FrameView::updateWidget):
2981         * rendering/RenderApplet.cpp:
2982         (WebCore::RenderApplet::RenderApplet):
2983         * rendering/RenderApplet.h:
2984         (RenderApplet):
2985         * rendering/RenderEmbeddedObject.h:
2986         (WebCore::toRenderEmbeddedObject):
2987         * rendering/RenderLayer.cpp:
2988         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2989         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2990         * rendering/RenderLayerBacking.cpp:
2991         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2992         * rendering/RenderLayerCompositor.cpp:
2993         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
2994         * rendering/RenderObject.cpp:
2995         (WebCore::RenderObject::setStyle):
2996         * rendering/RenderObject.h:
2997
2998 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2999
3000         Unreviewed, rolling out r123799.
3001         http://trac.webkit.org/changeset/123799
3002         https://bugs.webkit.org/show_bug.cgi?id=92431
3003
3004         broke the Apple Mac build (Requested by bweinstein on
3005         #webkit).
3006
3007         * CMakeLists.txt:
3008         * GNUmakefile.list.am:
3009         * Target.pri:
3010         * WebCore.gypi:
3011         * dom/EventNames.h:
3012         (WebCore):
3013         * dom/GestureEvent.cpp: Removed.
3014         * dom/GestureEvent.h: Removed.
3015         * dom/Node.cpp:
3016         * dom/Node.h:
3017         (WebCore):
3018         (Node):
3019         * page/EventHandler.cpp:
3020         (WebCore::EventHandler::clear):
3021         (WebCore::EventHandler::handleGestureEvent):
3022         * page/EventHandler.h:
3023
3024 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
3025
3026         [BlackBerry] Support async spellcheck for the blackberry port
3027         https://bugs.webkit.org/show_bug.cgi?id=92160
3028
3029         Set USE_UNIFIED_TEXT_CHECKING for PLATFORM(BLACKBERRY) to use the
3030         asynchronous spellchecking code path.
3031
3032         Reviewed by Rob Buis.
3033
3034         Internally reviewed by Mike Fenton.
3035
3036         * platform/text/TextChecking.h:
3037         (WebCore):
3038
3039 2012-07-26  Huang Dongsung  <luxtella@company100.net>
3040
3041         Gather the duplicated timer code into CachedResource.
3042         https://bugs.webkit.org/show_bug.cgi?id=92332
3043
3044         Reviewed by Nate Chapin.
3045
3046         Internal review by Jae Hyun Park.
3047
3048         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
3049         start the timer to destroy decoded data. Those three classes have their own
3050         timer.
3051         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
3052         stop the timer. This change does not have any side effect because
3053         CachedResource::didAddClient only stops the timer in this case.
3054
3055         No new tests - no new testable functionality.
3056
3057         * loader/cache/CachedCSSStyleSheet.cpp:
3058         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3059         (WebCore::CachedCSSStyleSheet::didAddClient):
3060         * loader/cache/CachedCSSStyleSheet.h:
3061         (CachedCSSStyleSheet):
3062         * loader/cache/CachedImage.cpp:
3063         (WebCore::CachedImage::CachedImage):
3064         (WebCore::CachedImage::didAddClient):
3065         (WebCore::CachedImage::allClientsRemoved):
3066         * loader/cache/CachedImage.h:
3067         (CachedImage):
3068         * loader/cache/CachedResource.cpp:
3069         (WebCore::CachedResource::CachedResource):
3070         (WebCore::CachedResource::didAddClient):
3071         (WebCore::CachedResource::removeClient):
3072         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
3073         (WebCore):
3074         (WebCore::CachedResource::decodedDataDeletionTimerFired):
3075         * loader/cache/CachedResource.h:
3076         (CachedResource):
3077         * loader/cache/CachedScript.cpp:
3078         (WebCore::CachedScript::CachedScript):
3079         * loader/cache/CachedScript.h:
3080         (CachedScript):
3081
3082 2012-07-26  Benjamin Poulain  <bpoulain@apple.com>
3083
3084         Use the constant count of Tags/Attributes names instead of getting the size when obtaining the tags/attributes
3085         https://bugs.webkit.org/show_bug.cgi?id=92411
3086
3087         Reviewed by Julien Chaffraix.
3088
3089         Since r123582, the number of tags and attributes per "namespace" is exposed in a constant in the header file.
3090         This makes it possible to access this value through two ways:
3091         1) The constant.
3092         2) The first parameter of the tags/attributes getter function.
3093
3094         Having two ways to access the value is error prone. This patches changes the code to have all accesses done
3095         through the constant.
3096
3097         * dom/make_names.pl:
3098         (printNamesHeaderFile):
3099         (printNamesCppFile):
3100         Change the code generator to not provide the size in the getter function.
3101
3102         * html/HTMLObjectElement.cpp:
3103         (WebCore::isRecognizedTagName):
3104         * html/parser/HTMLTreeBuilder.cpp:
3105         (WebCore::adjustSVGTagNameCase):
3106         (WebCore):
3107         (WebCore::adjustAttributes):
3108         (WebCore::adjustSVGAttributes):
3109         (WebCore::adjustMathMLAttributes):
3110         (WebCore::adjustForeignAttributes):
3111
3112 2012-07-26  Chang Shu  <cshu@webkit.org>
3113
3114         Support constructor-type static readonly attribute for CodeGenerator.
3115         https://bugs.webkit.org/show_bug.cgi?id=92413.
3116
3117         Reviewed by Adam Barth.
3118
3119         Added support for constructor-type static readonly attribute for CodeGenerator.
3120         This is achieved by putting the attribute entry in the table where static properties
3121         belong to but leave the implementation same as a non-static constructor-type attribute.
3122
3123         Tested by running run-bindings-tests.
3124
3125         * bindings/scripts/CodeGeneratorJS.pm:
3126         (GenerateImplementation):
3127         * bindings/scripts/test/JS/JSTestInterface.cpp:
3128         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3129         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3130         * bindings/scripts/test/JS/JSTestObj.cpp:
3131         (WebCore):
3132         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
3133         (WebCore::jsTestObjConstructorStaticStringAttr):
3134         (WebCore::jsTestObjConstructorTestSubObj):
3135         * bindings/scripts/test/JS/JSTestObj.h:
3136         (WebCore):
3137         * bindings/scripts/test/TestObj.idl:
3138         * bindings/scripts/test/V8/V8TestObj.cpp:
3139         (WebCore):
3140
3141 2012-07-26  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3142
3143         Propagate gesture events to plugins.
3144         https://bugs.webkit.org/show_bug.cgi?id=92281
3145
3146         Reviewed by Adam Barth.
3147
3148         Propagate gesture events to plugins. This change does not expose the gesture events
3149         to JavaScript, since there is no spec for that at the moment. Exposing gesture events
3150         to JavaScript will be done separately, once there is a spec for it.
3151
3152         Test: platform/chromium/plugins/gesture-events.html
3153
3154         * CMakeLists.txt:
3155         * GNUmakefile.list.am:
3156         * Target.pri:
3157         * WebCore.gypi:
3158         * dom/EventNames.h:
3159         (WebCore):
3160         (WebCore::EventNames::isGestureEventType):
3161         (EventNames):
3162         * dom/GestureEvent.cpp: Added.
3163         (WebCore):
3164         (WebCore::GestureEvent::create):
3165         (WebCore::GestureEvent::initGestureEvent):
3166         (WebCore::GestureEvent::interfaceName):
3167         (WebCore::GestureEvent::GestureEvent):
3168         (WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
3169         (WebCore::GestureEventDispatchMediator::event):
3170         (WebCore::GestureEventDispatchMediator::dispatchEvent):
3171         * dom/GestureEvent.h: Added.
3172         (WebCore):
3173         (GestureEvent):
3174         (WebCore::GestureEvent::~GestureEvent):
3175         (WebCore::GestureEvent::deltaX):
3176         (WebCore::GestureEvent::deltaY):
3177         (WebCore::GestureEvent::GestureEvent):
3178         (GestureEventDispatchMediator):
3179         (WebCore::GestureEventDispatchMediator::create):
3180         * dom/Node.cpp:
3181         (WebCore):
3182         (WebCore::Node::dispatchGestureEvent):
3183         * dom/Node.h:
3184         (WebCore):
3185         (Node):
3186         * page/EventHandler.cpp:
3187         (WebCore::EventHandler::clear):
3188         (WebCore::EventHandler::handleGestureEvent):
3189         * page/EventHandler.h:
3190
3191 2012-07-26  Gavin Peters  <gavinp@chromium.org>
3192
3193         Guard Prerenderer against inserting prerenders into detached documents.
3194         https://bugs.webkit.org/show_bug.cgi?id=92401
3195
3196         Reviewed by Adam Barth.
3197
3198         If the document is detached, we should not launch a prerender.
3199
3200         Test: fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
3201
3202         * loader/Prerenderer.cpp:
3203         (WebCore::Prerenderer::render):
3204
3205 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3206
3207         Unreviewed, rolling out r123525.
3208         http://trac.webkit.org/changeset/123525
3209         https://bugs.webkit.org/show_bug.cgi?id=92421
3210
3211         it needed to be rolled out after r123779 too (Requested by
3212         jchaffraix on #webkit).
3213
3214         * rendering/RenderObjectChildList.cpp:
3215         (WebCore::RenderObjectChildList::insertChildNode):
3216
3217 2012-07-26  Pravin D  <pravind.2k4@gmail.com>
3218
3219         Outline is always painted on the first table row regardless of the row it's set on
3220         https://bugs.webkit.org/show_bug.cgi?id=92389
3221
3222         Reviewed by Eric Seidel.
3223
3224         The outlines of all the rows are drawn on the row instead of their respective rows.
3225         The paint offset for the outlines does not take the row location into account.
3226
3227         Test: fast/table/table-row-outline-paint.html
3228
3229         * rendering/RenderTableRow.cpp:
3230         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
3231         The row's location is taken into account for calculating the correct paint offset
3232         for its outline.
3233
3234 2012-07-26  Antoine Labour  <piman@chromium.org>
3235
3236         [chromium] Combine color matrix filters and apply them in a single pass.
3237         https://bugs.webkit.org/show_bug.cgi?id=92059
3238
3239         Reviewed by Stephen White.
3240
3241         Sequential color matrix filters can easily be combined, by simply
3242         multiplying the color matrices and applying it in a single pass. This
3243         helps dramatically with performance (bandwidth savings by avoiding extra
3244         copy & clear, also saves fragment shader processing).
3245
3246         Covered by css3/filters layout tests, added effect-brightness-clamping
3247         and effect-brightness-clamping-hw.
3248
3249         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
3250         (WebCore::CCRenderSurfaceFilters::apply):
3251
3252 2012-07-26  Ryosuke Niwa  <rniwa@webkit.org>
3253
3254         Href attribute with javascript protocol is stripped when content is pasted into a XML doucment
3255         https://bugs.webkit.org/show_bug.cgi?id=92310
3256
3257         Reviewed by Adam Barth.
3258
3259         The bug was caused by setAttributeNS's stripping attributes for which isAttributeToRemove
3260         return true instead of setting an empty string. Changing this in setAttributeNS is problematic
3261         because it will trigger a logic, in HTMLAnchorElement for example, to resolve the URL.
3262
3263         Fixed the bug by making XML parsers call parserSetAttributes instead of setAttributeNS.
3264         After this patch, handleNamespaceAttributes and handleElementAttributes simply fills up a Vector
3265         with which startElementNs (or parseStartElement in Qt) calls parserSetAttributes.
3266
3267         * dom/Element.cpp:
3268         (WebCore::Element::parserSetAttributes): Sets emptyAtom instead of nullAtom as nullAtom can be
3269         turned into "null".
3270         (WebCore::Element::parseAttributeName): Extracted from setAttributeNS.
3271         (WebCore::Element::setAttributeNS): No longer takes FragmentScriptingPermission.
3272         * dom/Element.h:
3273         (Element):
3274         * editing/markup.cpp:
3275         (WebCore::completeURLs): Don't resolve URLs when it's empty since empty attribute has a canonical
3276         meaning in some cases. e.g. <frame src=""></iframe>
3277         * xml/parser/XMLDocumentParserLibxml2.cpp:
3278         (WebCore::handleNamespaceAttributes): Renamed from handleElementNamespaces. Call
3279         parserSetAttributes even when exiting early to be maintain the same behavior.
3280         (WebCore::handleElementAttributes):
3281         (WebCore::XMLDocumentParser::startElementNs):
3282         * xml/parser/XMLDocumentParserQt.cpp:
3283         (WebCore::handleNamespaceAttributes): Use XMLNSNames::xmlnsNamespaceURI. Call parserSetAttributes
3284         even when exiting early to be maintain the same behavior.
3285         (WebCore::handleElementAttributes):
3286         (WebCore::XMLDocumentParser::parseStartElement):
3287
3288 2012-07-26  Dan Bernstein  <mitz@apple.com>
3289
3290         <svg> element with no intrinsic size and max-width gets sized incorrectly
3291         https://bugs.webkit.org/show_bug.cgi?id=92410
3292
3293         Reviewed by Dean Jackson.
3294
3295         Test: svg/css/max-width-2.html
3296
3297         * rendering/RenderReplaced.cpp:
3298         (WebCore::RenderReplaced::computeReplacedLogicalWidth): The rule for computing the width for
3299         elements whose computed width and height are both auto and which have no intrinsic size, but
3300         have an intrinsic ratio was applied only to elements with a content renderer (such as <img>
3301         with an SVG source). Removed the requirement to have a content renderer, so that it will
3302         apply to all elements including <svg>.
3303
3304 2012-07-26  Tony Chang  <tony@chromium.org>
3305
3306         Regression: r123696 made css3/flexbox tests failing
3307         https://bugs.webkit.org/show_bug.cgi?id=92352
3308
3309         Reviewed by Levi Weintraub.
3310
3311         Use roundedLayoutUnit so ports without subpixel layout still pass existing tests.
3312
3313         Covered by css3/flexbox/flex-algorithm-min-max.html which should pass again.
3314
3315         * rendering/RenderFlexibleBox.cpp:
3316         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3317
3318 2012-07-26  Emil A Eklund  <eae@chromium.org>
3319
3320         Contained div with right 0 sometimes overlaps parent div
3321         https://bugs.webkit.org/show_bug.cgi?id=91521
3322
3323         Reviewed by Levi Weintraub.
3324
3325         Due to unnecessary rounding in clientLogicalWidth and clientLogicalHeight
3326         we lost precision when computing the width and position of render boxes.
3327         Change clientLogicalWidth/Height to return values with subpixel precision
3328         to avoid this.
3329
3330         Test: fast/sub-pixel/position-right-aligns-with-container.html
3331
3332         * rendering/RenderBox.h:
3333         (WebCore::RenderBox::clientLogicalWidth):
3334         (WebCore::RenderBox::clientLogicalHeight):
3335         Remove unnecessary rounding.
3336
3337 2012-07-26  Chang Shu  <cshu@webkit.org>
3338
3339         Build broken when svg is disabled.
3340         https://bugs.webkit.org/show_bug.cgi?id=92393.
3341
3342         Reviewed by Laszlo Gombos.
3343
3344         Need to surpress unused parameters warning.
3345
3346         * rendering/FilterEffectRenderer.cpp:
3347         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3348
3349 2012-07-25  Jer Noble  <jer.noble@apple.com>
3350
3351         Add diagnostic messages when media and plugins load or fail to load.
3352         https://bugs.webkit.org/show_bug.cgi?id=92341
3353
3354         Reviewed by Anders Carlsson.
3355
3356         Send diagnostic messages when a media or plugin element loads or fails to load. Include in
3357         the trace the media engine description, error code, or plugin mime type.
3358
3359         * html/HTMLEmbedElement.cpp:
3360         (WebCore::HTMLEmbedElement::updateWidget): Send a diagnostic message.
3361         * html/HTMLMediaElement.cpp:
3362         (WebCore::stringForNetworkState): Added convenience function to stringify network states.
3363         (WebCore::HTMLMediaElement::mediaLoadingFailed): Send a diagnostic message.
3364         (WebCore::HTMLMediaElement::setReadyState): Send a diagnostic message.
3365         * html/HTMLObjectElement.cpp:
3366         (WebCore::HTMLObjectElement::updateWidget): Send a diagnostic message.
3367
3368 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3369
3370         Unreviewed, rolling out r123159, r123165, r123168, r123492,
3371         and r123650.
3372         http://trac.webkit.org/changeset/123159
3373         http://trac.webkit.org/changeset/123165
3374         http://trac.webkit.org/changeset/123168
3375         http://trac.webkit.org/changeset/123492
3376         http://trac.webkit.org/changeset/123650
3377         https://bugs.webkit.org/show_bug.cgi?id=92406
3378
3379         allowing inline-table anonymous wrappers is a bad idea due to
3380         tons of corner cases that should be properly handled
3381         (Requested by jchaffraix on #webkit).
3382
3383         * rendering/RenderInline.cpp:
3384         (WebCore::RenderInline::addChildIgnoringContinuation):
3385         * rendering/RenderTable.cpp:
3386         (WebCore::RenderTable::createAnonymousWithParentRenderer):
3387
3388 2012-07-26  Jer Noble  <jer.noble@apple.com>
3389
3390         Add a ChromeClient method to send diagnostic logging messages from WebCore to the client.
3391         https://bugs.webkit.org/show_bug.cgi?id=92340
3392
3393         Reviewed by Anders Carlsson.
3394
3395         Add a new ChromeClient menthod, to be implemented by WebKit and WebKit2, which sends
3396         a diagnostic logging message up to the client.
3397
3398         * page/ChromeClient.h:
3399         (WebCore::ChromeClient::logDiagnosticMessage):
3400         * page/ChromeClient.h:
3401         (WebCore::ChromeClient::logDiagnosticMessage):
3402         (ChromeClient):
3403         * page/DiagnosticLoggingKeys.cpp: Added.
3404         (WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
3405         (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
3406         (WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
3407         (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
3408         (WebCore::DiagnosticLoggingKeys::passKey):
3409         (WebCore::DiagnosticLoggingKeys::failKey):
3410         (WebCore::DiagnosticLoggingKeys::noopKey):
3411         * page/DiagnosticLoggingKeys.h: Added.
3412         (DiagnosticLoggingKeys):
3413
3414         Add the new files DiagnosticLoggingKeys.cpp,h to the project:
3415         * CMakeLists.txt:
3416         * GNUmakefile.list.am:
3417         * Target.pri:
3418         * WebCore.gypi:
3419         * WebCore.vcproj/WebCore.vcproj:
3420         * WebCore.xcodeproj/project.pbxproj:
3421
3422 2012-07-25  Jer Noble  <jer.noble@apple.com>
3423
3424         Add setting to enable and disable diagnostic logging.
3425         https://bugs.webkit.org/show_bug.cgi?id=92337
3426
3427         Reviewed by Anders Carlsson.
3428
3429         Add a new entry in Settings, defaulting to false.
3430
3431         * page/Settings.cpp:
3432         (WebCore::Settings::Settings): Default the new setting to false.
3433         * page/Settings.h:
3434         (WebCore::Settings::setDiagnosticLoggingEnabled): Simple accessor.
3435         (WebCore::Settings::diagnosticLoggingEnabled): Ditto.
3436
3437 2012-07-26  Olivier Blin  <olivier.blin@softathome.com>
3438
3439         Add FastMalloc statistics in window.internals
3440         https://bugs.webkit.org/show_bug.cgi?id=91274
3441
3442         Reviewed by Ryosuke Niwa.
3443
3444         Test: fast/harness/fastmallocstatistics-object.html
3445
3446         * CMakeLists.txt:
3447         * DerivedSources.make:
3448         * DerivedSources.pri:
3449         * GNUmakefile.list.am:
3450         * Target.pri:
3451         * WebCore.gyp/WebCore.gyp:
3452         * WebCore.gypi:
3453         * WebCore.vcproj/WebCoreTestSupport.vcproj:
3454         * WebCore.xcodeproj/project.pbxproj:
3455         * testing/FastMallocStatistics.h: Added.
3456         (WebCore):
3457         (FastMallocStatistics):
3458         (WebCore::FastMallocStatistics::create):
3459         (WebCore::FastMallocStatistics::reservedVMBytes):
3460         (WebCore::FastMallocStatistics::committedVMBytes):
3461         (WebCore::FastMallocStatistics::freeListBytes):
3462         (WebCore::FastMallocStatistics::FastMallocStatistics):
3463         * testing/FastMallocStatistics.idl: Added.
3464         * testing/Internals.cpp:
3465         (WebCore::Internals::fastMallocStatistics):
3466         (WebCore):
3467         * testing/Internals.h:
3468         (WebCore):
3469         (Internals):
3470         * testing/Internals.idl:
3471
3472 2012-07-26  Adrienne Walker  <enne@google.com>
3473
3474         [chromium] Remove redundant surface origin transforms
3475         https://bugs.webkit.org/show_bug.cgi?id=91815