[CMAKE] Supply feature defines to CodeGeneratorTestRunner.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-09-11  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         [CMAKE] Supply feature defines to CodeGeneratorTestRunner.
4         https://bugs.webkit.org/show_bug.cgi?id=96273
5
6         Reviewed by Gyuyoung Kim.
7
8         * CMakeLists.txt: Extracted FEATURE_DEFINES with space separator to share.
9         * PlatformBlackBerry.cmake: Ditto.
10         * UseJSC.cmake: Ditto.
11         * UseV8.cmake: Ditto.
12
13 2012-09-11  Nico Weber  <thakis@chromium.org>
14
15         [chromium/mac] Fix "Class WebCoreTextFieldCell is implemented in both Chromium Framework and /System/Library/Frameworks/WebKit.framework" warning
16         https://bugs.webkit.org/show_bug.cgi?id=96460
17
18         Reviewed by Kent Tamura.
19
20         This was added incorrectly in http://trac.webkit.org/changeset/116721
21
22         * WebCore.gyp/WebCore.gyp:
23
24 2012-09-11  Keishi Hattori  <keishi@webkit.org>
25
26         Create Localizer factory method for LocaleICU
27         https://bugs.webkit.org/show_bug.cgi?id=96363
28
29         Reviewed by Kent Tamura.
30
31         Preparing to use Localizer instead of LocaleMac/Win/ICU
32
33         No new tests. Covered in unit test tests/LocalizedNumberICUTest.cpp
34
35         * platform/text/LocaleICU.cpp:
36         (WebCore::Localizer::create):
37         (WebCore):
38
39 2012-09-11  Michael Saboff  <msaboff@apple.com>
40
41         Build fixed for http://trac.webkit.org/changeset/128243
42
43         Unreviewed build fix.
44
45         Added missing include file needed by 96422 for C++ ICU APIs.
46
47         * icu/unicode/chariter.h: Added.
48
49 2012-09-11  Michael Saboff  <msaboff@apple.com>
50
51         Build fixed for http://trac.webkit.org/changeset/128243
52
53         Unreviewed build fix.
54
55         Added missing include file needed by 96422 for C++ ICU APIs.
56
57         * icu/unicode/bytestream.h: Added.
58         * icu/unicode/rep.h: Added.
59         * icu/unicode/std_string.h: Added.
60         * icu/unicode/strenum.h: Added.
61         * icu/unicode/stringpiece.h: Added.
62         * icu/unicode/unistr.h: Added.
63         * icu/unicode/uobject.h: Added.
64
65 2012-09-11  Kent Tamura  <tkent@chromium.org>
66
67         Refactor ValidationMessage class
68         https://bugs.webkit.org/show_bug.cgi?id=96365
69
70         Reviewed by Hajime Morita.
71
72         - Move some code from HTMLFormControlElement to ValidationMessage
73         - ValidationMessage class holds an element pointer as
74         HTMLFormControlElement, not FormAssociatedElement.
75
76         No new tests because of no behavior changes.
77
78         * html/HTMLFormControlElement.cpp:
79         (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
80         Moved some code to ValidationMessage::updateValidationMessage().
81         (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
82         Ask ValidationMessage whether it is visible or not.
83         * html/HTMLFormControlElement.h:
84         (HTMLFormControlElement): Removed visibleValidationMessage().
85
86         * html/ValidationMessage.cpp:
87         (WebCore::ValidationMessage::ValidationMessage):
88         Change the argument type: FormAssociatedElement -> HTMLFormControlElement
89         (WebCore::ValidationMessage::create): ditto.
90         (WebCore::ValidationMessage::updateValidationMessage):
91         Added. Moved some code from
92         HTMLFormControlElement::updateVisibleValidationMessage().
93         (WebCore::ValidationMessage::buildBubbleTree): toHTMLElement() is not needed.
94         (WebCore::ValidationMessage::deleteBubbleTree): ditto.
95         (WebCore::ValidationMessage::isVisible): Added.
96         * html/ValidationMessage.h:
97         (ValidationMessage):
98          - Change some instance of FormAssociatedElement to HTMLFormControlElement
99          - Remove message().
100          - Added updateValidationMessage() and isVisible()
101          - Made setMessage() private.
102
103 2012-09-11  Christopher Cameron  <ccameron@chromium.org>
104
105         [chromium] Make prioritized texture manager not touch backings array on the main thread
106         https://bugs.webkit.org/show_bug.cgi?id=96114
107
108         Reviewed by James Robinson.
109
110         Take a snapshot of the textures' priorities from the main thread,
111         and save it in their backings for access by the impl thread.
112         Update functions that access the sorted backings array to use the
113         snapshotted values instead of the values that the main thread may
114         have computed for the next frame.
115
116         Make the main thread not touch the m_backings array.  Split
117         prioritizeTextures into a updateBackingsPriorities function.
118         In places where the main thread would have touched m_backings,
119         set a flag specifying that m_backings needs to be re-sorted
120         before any function that requires it be sorted by priority be
121         executed.
122
123         Update the two functions that require sorted order (acquireBacking
124         and reduceMemory) to sort the backings array (if needed) before
125         traversing it.
126
127         Updated tests to set correct thread during asserts. Add a test to
128         verify that requestLate is correctly incorporated into the backing
129         sorting.
130
131         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
132         (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
133         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
134         (WebCore):
135         (WebCore::CCPrioritizedTextureManager::prioritizeBackings):
136         (WebCore::CCPrioritizedTextureManager::requestLate):
137         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
138         (WebCore::CCPrioritizedTextureManager::reduceMemory):
139         (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
140         (WebCore::CCPrioritizedTextureManager::destroyBacking):
141         (WebCore::CCPrioritizedTextureManager::assertInvariants):
142         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
143         (CCPrioritizedTextureManager):
144
145 2012-09-11  Adam Barth  <abarth@webkit.org>
146
147         Update bindings test results after http://trac.webkit.org/changeset/128242
148
149         * bindings/scripts/test/V8/V8Float64Array.cpp:
150         (WebCore::V8Float64Array::wrapSlow):
151         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
152         (WebCore::V8TestActiveDOMObject::wrapSlow):
153         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
154         (WebCore::V8TestCustomNamedGetter::wrapSlow):
155         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
156         (WebCore::V8TestEventConstructor::wrapSlow):
157         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
158         (WebCore::V8TestEventTarget::wrapSlow):
159         * bindings/scripts/test/V8/V8TestException.cpp:
160         (WebCore::V8TestException::wrapSlow):
161         * bindings/scripts/test/V8/V8TestInterface.cpp:
162         (WebCore::V8TestInterface::wrapSlow):
163         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
164         (WebCore::V8TestMediaQueryListListener::wrapSlow):
165         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
166         (WebCore::V8TestNamedConstructor::wrapSlow):
167         * bindings/scripts/test/V8/V8TestNode.cpp:
168         (WebCore::V8TestNode::wrapSlow):
169         * bindings/scripts/test/V8/V8TestObj.cpp:
170         (WebCore::V8TestObj::wrapSlow):
171         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
172         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
173
174 2012-09-11  Michael Saboff  <msaboff@apple.com>
175
176         Build fixed for http://trac.webkit.org/changeset/128243
177
178         Rubber stamped by Stephanie Lewis.
179
180         Added missing include file needed by 96422.
181
182         * icu/unicode/unorm2.h: Added.
183
184 2012-09-11  Elliott Sprehn  <esprehn@chromium.org>
185
186         Add new JSDependentRetained that allows keeping a JSObject alive as long as another is alive
187         https://bugs.webkit.org/show_bug.cgi?id=96034
188
189         Reviewed by Geoffrey Garen.
190
191         Add new JSDependentRetained (with the same API as V8DependentRetained) that allows keeping
192         a JSObject alive as long as another is alive. This is useful for keeping callbacks on
193         wrappers without keeping strong references into the JS heap in C++ which can result in
194         cycles that create memory leaks.
195
196         No new tests needed, this will be used to fix MutationObservers and UndoManager which will have tests.
197
198         * GNUmakefile.list.am:
199         * WebCore.vcproj/WebCore.vcproj:
200         * WebCore.xcodeproj/project.pbxproj:
201         * bindings/js/JSDependentRetained.h: Added.
202         (WebCore):
203         (JSDependentRetained):
204         (WebCore::JSDependentRetained::JSDependentRetained):
205         (WebCore::JSDependentRetained::~JSDependentRetained):
206         (WebCore::JSDependentRetained::get): Get the JSObject value.
207         (WebCore::JSDependentRetained::isEmpty): Check if the value is still alive.
208         (WebCore::JSDependentRetained::retain): Sets the owner of the object, should only be used once.
209         (WebCore::JSDependentRetained::release):
210         * bindings/v8/V8DependentRetained.h:
211         (WebCore::V8DependentRetained::V8DependentRetained):
212         (WebCore::V8DependentRetained::retain): Added this method so the API for JSC and V8 are identical.
213
214 2012-09-11  Alec Flett  <alecflett@chromium.org>
215
216         Add 'any' type to V8 bindings as a synonym for DOMObject                
217         https://bugs.webkit.org/show_bug.cgi?id=96429                           
218
219         Reviewed by Kentaro Hara.                                             
220
221         Adds support for 'any' as a synonym to DOMObject.                       
222
223         Test: TestObj.idl has an attribute 'anyAttribute'.                      
224
225         * bindings/scripts/CodeGeneratorJS.pm:
226         (AddIncludesForType):
227         (JSValueToNative):
228         (NativeToJSValue):
229         * bindings/scripts/CodeGeneratorV8.pm:
230         (GetNativeType):
231         (JSValueToNative):
232         (GetV8HeaderName):
233         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
234         (WebDOMTestObj::anyAttribute):
235         (WebDOMTestObj::setAnyAttribute):
236         * bindings/scripts/test/CPP/WebDOMTestObj.h:
237         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
238         (webkit_dom_test_obj_get_property):
239         (webkit_dom_test_obj_class_init):
240         (webkit_dom_test_obj_get_any_attribute):
241         (webkit_dom_test_obj_set_any_attribute):
242         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
243         * bindings/scripts/test/JS/JSTestObj.cpp:
244         (WebCore):
245         (WebCore::jsTestObjCachedAttribute1):
246         (WebCore::jsTestObjCachedAttribute2):
247         (WebCore::jsTestObjAnyAttribute):
248         (WebCore::setJSTestObjAnyAttribute):
249         * bindings/scripts/test/JS/JSTestObj.h:
250         (WebCore):
251         * bindings/scripts/test/ObjC/DOMTestObj.h:
252         * bindings/scripts/test/ObjC/DOMTestObj.mm:
253         (-[DOMTestObj anyAttribute]):
254         (-[DOMTestObj setAnyAttribute:]):
255         * bindings/scripts/test/TestObj.idl:
256         * bindings/scripts/test/V8/V8TestObj.cpp:
257         (WebCore::TestObjV8Internal::cachedAttribute1AttrGetter):
258         (WebCore::TestObjV8Internal::cachedAttribute2AttrGetter):
259         (TestObjV8Internal):
260         (WebCore::TestObjV8Internal::anyAttributeAttrGetter):
261         (WebCore::TestObjV8Internal::anyAttributeAttrSetter):
262         (WebCore):
263
264 2012-09-11  Michael Saboff  <msaboff@apple.com>
265
266         Unreviewed build fix for http://trac.webkit.org/changeset/128244
267
268         Some compilers don't like 0 for operator[](unsigned).  Changed to 0u.
269
270         * bindings/js/JSDOMBinding.h:
271         (WebCore::jsStringWithCache):
272
273 2012-09-11  Michael Saboff  <msaboff@apple.com>
274
275         Build fixed for http://trac.webkit.org/changeset/128243
276
277         Rubber stamped by Stephanie Lewis.
278
279         Added missing include file needed by 96422.
280
281         * icu/unicode/ptypes.h: Added.
282
283 2012-09-11  Michael Saboff  <msaboff@apple.com>
284
285         jsStringWithCache shouldn't call StringImpl::characters() for single character strings
286         https://bugs.webkit.org/show_bug.cgi?id=96439
287
288         Reviewed by Geoffrey Garen.
289
290         Replaced StringImpl->characters()[0] with operator[] access which is character size aware.
291         Also fixed the other FIXME so we now use SmallStrings to retunr the single character string.
292
293         No functional change, so no new tests.
294
295         * bindings/js/JSDOMBinding.h:
296         (WebCore::jsStringWithCache):
297
298 2012-09-11  Michael Saboff  <msaboff@apple.com>
299
300         Update ICU header files to more recent version
301         https://bugs.webkit.org/show_bug.cgi?id=96422
302
303         Reviewed by Geoff Garen.
304
305         Updated ICU header files to 4.6.1.  Modifications made as part of the merge are:
306         platform.h - Changed ifndef / define / endif for U_HAVE_UINT8_T, U_HAVE_UINT16_T, U_HAVE_UINT32_T,
307             U_HAVE_UINT64_T, U_IS_BIG_ENDIAN and U_ENABLE_TRACING to match the existing platform.h
308         putil.h (line 132) - Changes defined(U_WINDOWS) to defined(WIN32) || defined(OS2) to match existing putil.h
309         ustring.h (line 945) - Wrapped macro argument cs with { (const UChar *)cs } to match existing ustring.h
310         utypes.h (line 545) - Changed defined(U_WINDOWS) to defined(WIN32) to match existing utypes.h
311
312         Updated include files without any function change so no new tests.
313
314         * icu/unicode/localpointer.h: Added.
315         * icu/unicode/parseerr.h:
316         * icu/unicode/platform.h:
317         * icu/unicode/putil.h:
318         * icu/unicode/ubrk.h:
319         * icu/unicode/uchar.h:
320         * icu/unicode/ucnv.h:
321         * icu/unicode/ucnv_err.h:
322         * icu/unicode/ucol.h:
323         * icu/unicode/ucoleitr.h:
324         * icu/unicode/uconfig.h:
325         * icu/unicode/ucsdet.h:
326         * icu/unicode/uenum.h:
327         * icu/unicode/uidna.h:
328         * icu/unicode/uiter.h:
329         * icu/unicode/uloc.h:
330         * icu/unicode/umachine.h:
331         * icu/unicode/unorm.h:
332         * icu/unicode/urename.h:
333         * icu/unicode/uscript.h:
334         * icu/unicode/usearch.h:
335         * icu/unicode/uset.h:
336         * icu/unicode/ushape.h:
337         * icu/unicode/ustring.h:
338         * icu/unicode/utext.h: Added.
339         * icu/unicode/utf.h:
340         * icu/unicode/utf16.h:
341         * icu/unicode/utf8.h:
342         * icu/unicode/utypes.h:
343         * icu/unicode/uvernum.h: Added.
344         * icu/unicode/uversion.h:
345
346 2012-09-11  Adam Barth  <abarth@chromium.org>
347
348         [V8] 8% regression in dom_perf
349         https://bugs.webkit.org/show_bug.cgi?id=96433
350
351         Reviewed by Kentaro Hara.
352
353         This code used to have a fast path to find the V8PerContextData for DOM
354         nodes. I tried a bunch of variations, but nothing I can come up with is
355         as fast as the old fast path, so I've added back the fast path.
356
357         * bindings/scripts/CodeGeneratorV8.pm:
358         (GenerateToV8Converters):
359         * bindings/v8/V8DOMWrapper.cpp:
360         (WebCore::V8DOMWrapper::instantiateV8Object):
361         * bindings/v8/V8DOMWrapper.h:
362         (V8DOMWrapper):
363
364 2012-09-11  Andreas Kling  <kling@webkit.org>
365
366         ElementAttributeData: Use subclasses to manage varying object layouts.
367         <http://webkit.org/b/94465>
368
369         Reviewed by Antti Koivisto.
370
371         Add two ElementAttributeData subclasses:
372
373             - MutableElementAttributeData
374             - ImmutableElementAttributeData
375
376         The ElementAttributeData::m_isMutable bit determines which subclass to cast to when accessing
377         the attribute storage. Added mutableAttributeVector() and immutableAttributeArray() helpers
378         to ElementAttributeData (with appropriate assertions.)
379
380         This patch removes one step of indirection in the mutable case, since the Vector<Attribute> is no
381         longer heap-allocated, but part of MutableElementAttributeData.
382
383         Added a WTF::deleteOwnedPtr(ElementAttributeData*) specialization so that the appropriate subclass
384         destructor is called for these objects.
385
386         * WebCore.exp.in:
387         * dom/Element.cpp:
388         (WebCore::Element::createMutableAttributeData):
389         * dom/ElementAttributeData.cpp:
390         (WebCore::ElementAttributeData::createImmutable):
391         (WebCore::ElementAttributeData::create):
392         (WebCore::ElementAttributeData::ElementAttributeData):
393         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
394         (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
395         (WebCore::ImmutableElementAttributeData::~ImmutableElementAttributeData):
396         (WebCore::ElementAttributeData::makeMutableCopy):
397         (WebCore::ElementAttributeData::addAttribute):
398         (WebCore::ElementAttributeData::removeAttribute):
399         (WebCore::ElementAttributeData::reportMemoryUsage):
400         (WebCore::ElementAttributeData::cloneDataFrom):
401         (WebCore::ElementAttributeData::clearAttributes):
402         * dom/ElementAttributeData.h:
403         (ElementAttributeData):
404         (WebCore::ElementAttributeData::isMutable):
405         (ImmutableElementAttributeData):
406         (MutableElementAttributeData):
407         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
408         (WebCore::ElementAttributeData::immutableAttributeArray):
409         (WebCore::ElementAttributeData::mutableAttributeVector):
410         (WebCore::ElementAttributeData::length):
411         (WebCore::ElementAttributeData::attributeItem):
412
413 2012-09-11  Tony Chang  <tony@chromium.org>
414
415         Pass the logical height and logical top into RenderBox::computeLogicalHeight
416         https://bugs.webkit.org/show_bug.cgi?id=96432
417
418         Reviewed by Ojan Vafai.
419
420         This allows us to call RenderBox::computeLogicalHeight without first having to call
421         setLogicalHeight() and setLogicalTop().  Previously, computeLogicalHeight would depend
422         on these values.
423
424         No new tests, this is just a refactor.
425
426         * rendering/RenderBox.cpp:
427         (WebCore::RenderBox::updateLogicalHeight): Pass logicalHeight and logicalTop as params.
428         (WebCore::RenderBox::computeLogicalHeight): Use passed in values instead of calling logicalHeight/logicalTop.
429         (WebCore::RenderBox::computePositionedLogicalHeight): Pass the logicalHeight into computePositionedLogicalHeightUsing.
430         (WebCore::RenderBox::computePositionedLogicalHeightUsing): Pass in the logicalHeight as a parameter.
431         * rendering/RenderBox.h:
432         (RenderBox): Update computePositionedLogicalHeightUsing and computeLogicalHeight.
433
434 2012-09-11  Joshua Bell  <jsbell@chromium.org>
435
436         IndexedDB: Optimize key decode and comparison operations
437         https://bugs.webkit.org/show_bug.cgi?id=96037
438
439         Reviewed by Tony Chang.
440
441         Eliminate memory allocations in code identified as CPU bottlenecks in IDB profiling.
442
443         No new tests - just performance work.
444
445         * Modules/indexeddb/IDBLevelDBCoding.cpp:
446         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Avoid incremental allocations.
447         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Rename confusing variables p and q.
448         (IDBLevelDBCoding):
449         (WebCore::IDBLevelDBCoding::compare): Rename from decodeAndCompare, and add specializations
450         for frequently encountered types (e.g. object/index data) that can be compared without a
451         full decode.
452
453 2012-09-11  Adam Klein  <adamk@chromium.org>
454
455         Unreviewed, rolling out r128075
456         https://bugs.webkit.org/show_bug.cgi?id=96435
457
458         Broke chromium content_browsertests and included flaky layout tests
459
460         * html/shadow/MediaControlRootElementChromium.cpp:
461         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
462         (WebCore::MediaControlRootElementChromium::reset):
463         (WebCore::MediaControlRootElementChromium::playbackStarted):
464         (WebCore::MediaControlRootElementChromium::playbackProgressed):
465         (WebCore::MediaControlRootElementChromium::playbackStopped):
466         (WebCore::MediaControlRootElementChromium::updateTimeDisplay):
467         * html/shadow/MediaControlRootElementChromium.h:
468         (MediaControlPanelEnclosureElement):
469         (MediaControlRootElementChromium):
470
471 2012-09-11  Matt Lilek  <mrl@apple.com>
472
473         OS X port should compile with newer versions of clang
474         https://bugs.webkit.org/show_bug.cgi?id=96434
475
476         Reviewed by Anders Carlsson.
477
478         Guard m_hasTouchEventHandler behind ENABLE(TOUCH_EVENTS).
479         * html/HTMLInputElement.cpp:
480         (WebCore::HTMLInputElement::HTMLInputElement):
481         * html/HTMLInputElement.h:
482         (HTMLInputElement):
483
484         Fix uninitialized variable.
485         * platform/graphics/cg/GraphicsContextCG.cpp:
486         (WebCore::createLinearSRGBColorSpace):
487
488 2012-09-11  Arnaud Renevier  <a.renevier@sisa.samsung.com>
489
490         [Gtk] allow building with css-shaders
491         https://bugs.webkit.org/show_bug.cgi?id=95603
492
493         Reviewed by Martin Robinson.
494
495         Add support for css filters and shaders in GNUmakefile.am and include
496         Texture.cpp, Texture.h, TilingData.cpp and TilingData.h in
497         webcore_sources
498
499         No functional change, so no new tests.
500
501         * GNUmakefile.am:
502         * GNUmakefile.list.am:
503
504 2012-09-11  Dimitri Glazkov  <dglazkov@chromium.org>
505
506         Remove StyleResolver::setStyle, because it's no longer used.
507         https://bugs.webkit.org/show_bug.cgi?id=96423
508
509         Reviewed by Eric Seidel.
510
511         No new tests, simple refactoring.
512
513         * css/StyleResolver.h: Removed unused function.
514
515 2012-09-11  Chris Fleizach  <cfleizach@apple.com>
516
517         AX: title attribute is not exposed as the AXDescription on AXImage when there is no other fallback content
518         https://bugs.webkit.org/show_bug.cgi?id=96412
519
520         Reviewed by Jon Honeycutt.
521
522         Ensure that if an image has a title attribute, but no alt attribute, it will fallback to use the title attribute 
523         for the descriptive text.
524
525         Test: accessibility/img-fallsback-to-title.html
526
527         * accessibility/AccessibilityRenderObject.cpp:
528         (WebCore::AccessibilityRenderObject::accessibilityDescription):
529
530 2012-09-11  Rik Cabanier  <cabanier@adobe.com>
531
532         Clean up functions in RenderLayerBacking.h/.cpp
533         https://bugs.webkit.org/show_bug.cgi?id=96370
534
535         Reviewed by Simon Fraser.
536
537         Remove 'layer' from function names in RenderLayerBacking
538
539         No new test. No change in functionality.
540
541         * rendering/RenderLayerBacking.cpp:
542         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
543         (WebCore::RenderLayerBacking::updateOpacity):
544         (WebCore::RenderLayerBacking::updateTransform):
545         (WebCore::RenderLayerBacking::updateFilters):
546         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
547         (WebCore::RenderLayerBacking::startTransition):
548         * rendering/RenderLayerBacking.h:
549         (RenderLayerBacking):
550
551 2012-09-11  Stephen White  <senorblanco@chromium.org>
552
553         [skia] Switch FEComponentTransfer filter to use skia's SkColorFilter
554         https://bugs.webkit.org/show_bug.cgi?id=95238
555
556         Reviewed by Dirk Schulze.
557
558         Covered by existing tests in svg/, such as svg/custom/feComponentTransfer-Discrete.svg.
559
560         * WebCore.gypi:
561         * platform/graphics/filters/FEComponentTransfer.cpp:
562         (WebCore::FEComponentTransfer::platformApplySoftware):
563         Add a check for the skia implementation.
564         (WebCore::FEComponentTransfer::getValues):
565         * platform/graphics/filters/FEComponentTransfer.h:
566         Factor out the retrieval of LUT values into its own function, so we
567         can call it from the Skia implementation.
568         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp: Added.
569         (WebCore::FEComponentTransfer::platformApplySkia):
570
571 2012-09-11  Kevin Ellis  <kevers@chromium.org>
572
573         Crash on a long press gesture when touch adjustment is enabled.
574         https://bugs.webkit.org/show_bug.cgi?id=96313
575
576         Reviewed by Antonio Gomes.
577
578         Fix to ensure that a long-press on a shadow-DOM element does not 
579         trigger a crash in TouchAdjustment::providesContextMenuItems.
580         Prior to the patch, a null-pointer exception was trigger because
581         of a null renderer in the check.
582
583         Test: touchadjustment/context-menu-shadow-node.html
584
585         * page/TouchAdjustment.cpp:
586         (WebCore::TouchAdjustment::providesContextMenuItems):
587
588 2012-09-11  Zan Dobersek  <zandobersek@gmail.com>
589
590         Unreviewed, manually rolling out r128175.
591         The patch is causing crashes in debug builds.
592         http://trac.webkit.org/changeset/128175
593         https://bugs.webkit.org/show_bug.cgi?id=96284
594
595         * platform/network/soup/ResourceResponseSoup.cpp:
596         (WebCore::ResourceResponse::updateFromSoupMessage):
597
598 2012-09-11  James Robinson  <jamesr@chromium.org>
599
600         Unreviewed, rolling out r128212.
601         http://trac.webkit.org/changeset/128212
602         https://bugs.webkit.org/show_bug.cgi?id=96037
603
604         Assertion fails on linux 64
605
606         * Modules/indexeddb/IDBLevelDBCoding.cpp:
607         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
608         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
609         (IDBLevelDBCoding):
610         (WebCore::IDBLevelDBCoding::compare):
611
612 2012-09-11  Joshua Bell  <jsbell@chromium.org>
613
614         IndexedDB: IDBObjectStore.count() is slow
615         https://bugs.webkit.org/show_bug.cgi?id=96033
616
617         Reviewed by Tony Chang.
618
619         Avoid decoding record values when performing count() iteration, and factor out common code
620         used for initializing object store and index cursors. Also, remove unused indexDataId()
621         methods (which date back to the SQLite backing store), and rename some p's and q's.
622
623         No new tests - no functional changes. Covered by existing test:
624             LayoutTests/storage/indexeddb/objectstore-count.html
625
626         * Modules/indexeddb/IDBBackingStore.h: Expose new (internal) ObjectStoreKeyCursor
627         (IDBBackingStore):
628         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
629         (WebCore): Factor out common CursorOptions initialization code. The objectStoreCursorOptions()
630         function is needed for this patch. The indexCursorOptions() function is not, but eliminates
631         duplicated code and is a nearly identical refactor.
632         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor): Refactor.
633         (WebCore::IDBLevelDBBackingStore::openObjectStoreKeyCursor): Implement.
634         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor): Refactor.
635         (WebCore::IDBLevelDBBackingStore::openIndexCursor): Ditto.
636         * Modules/indexeddb/IDBLevelDBBackingStore.h:
637         (IDBLevelDBBackingStore):
638         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
639         (WebCore::IDBObjectStoreBackendImpl::countInternal): Use ObjectStoreKeyCursor for iteration.
640
641 2012-09-11  Ojan Vafai  <ojan@chromium.org>
642
643         Refactor computePercentageLogicalHeight to simplify the logic a bit
644         https://bugs.webkit.org/show_bug.cgi?id=96329
645
646         Reviewed by Tony Chang.
647
648         This makes it clear that the value we're computing as we go is the availableHeight.
649
650         * rendering/RenderBox.cpp:
651         (WebCore::RenderBox::computePercentageLogicalHeight):
652
653 2012-09-11  Joshua Bell  <jsbell@chromium.org>
654
655         IndexedDB: Optimize key decode and comparison operations
656         https://bugs.webkit.org/show_bug.cgi?id=96037
657
658         Reviewed by Tony Chang.
659
660         Eliminate memory allocations in code identified as CPU bottlenecks in IDB profiling.
661
662         No new tests - just performance work.
663
664         * Modules/indexeddb/IDBLevelDBCoding.cpp:
665         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Avoid incremental allocations.
666         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Rename confusing variables p and q.
667         (IDBLevelDBCoding):
668         (WebCore::IDBLevelDBCoding::compare): Rename from decodeAndCompare, and add specializations
669         for frequently encountered types (e.g. object/index data) that can be compared without a
670         full decode.
671
672 2012-09-11  Marcelo Lira  <marcelo.lira@openbossa.org>
673
674         Restore original value of mock scrollbars enabled in InternalSettings
675         https://bugs.webkit.org/show_bug.cgi?id=87680
676
677         Reviewed by Adam Barth.
678
679         Added backup support for mock scrollbars state in
680         InternalSettings::Backup, and removed support for these
681         from Qt's DumpRenderTree.
682
683         * testing/InternalSettings.cpp:
684         (WebCore::InternalSettings::Backup::Backup):
685         (WebCore::InternalSettings::Backup::restoreTo):
686         * testing/InternalSettings.h:
687         (Backup):
688
689 2012-09-11  Mike West  <mkwst@chromium.org>
690
691         Improve console error messages when 'document.domain' blocks cross-origin script access.
692         https://bugs.webkit.org/show_bug.cgi?id=96247
693
694         Reviewed by Adam Barth.
695
696         Setting 'document.domain' can produce counterintuitive "cross-origin"
697         error messages for script access in cases where the property isn't set
698         to the same value in both the accessor and accessee. This patch adds a
699         bit more context to the error message to make it clear that both sides
700         must set the property, and that the values must match.
701
702         This shouldn't change any externally visible behavior other than the
703         error warnings. It's covered by changes to existing tests.
704
705         * page/DOMWindow.cpp:
706         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
707             Adding checks for 'document.domain'-related errors, and adding an
708             ASSERT that crossDomainAccessErrorMessage is called in cases where
709             the accessing frame is actually denied access to the frame being
710             accessed.
711
712 2012-09-11  Jinwoo Song  <jinwoo7.song@samsung.com>
713
714         Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
715         https://bugs.webkit.org/show_bug.cgi?id=96344
716
717         Reviewed by Benjamin Poulain.
718
719         Use StringBuilder::appendNumber() instead of String::number(). Also deploy 
720         StringBuilder::appendLiteral() instead of String::append() in the surrounding code.
721
722         * css/CSSAspectRatioValue.cpp:
723         (WebCore::CSSAspectRatioValue::customCssText):
724         * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
725         (WebCore):
726         * svg/SVGPointList.cpp:
727         (WebCore::SVGPointList::valueAsString):
728
729 2012-09-11  Tony Chang  <tony@chromium.org>
730
731         Rename computeLogicalHeight to updateLogicalHeight
732         https://bugs.webkit.org/show_bug.cgi?id=96305
733
734         Reviewed by Ojan Vafai.
735
736         computeLogicalHeight changes the value of 4 member variables of the
737         render box, so give it a name that makes it more clear that it is
738         updating member variables.
739
740         No new tests, this is just a refactor.
741
742         * rendering/RenderBlock.cpp:
743         (WebCore::RenderBlock::computeInitialRegionRangeForBlock):
744         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
745         (WebCore::RenderBlock::layoutBlock):
746         (WebCore::RenderBlock::layoutPositionedObjects):
747         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
748         * rendering/RenderBox.cpp:
749         (WebCore::RenderBox::updateLogicalHeight):
750         (WebCore::RenderBox::computePercentageLogicalHeight):
751         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
752         (WebCore::RenderBox::availableLogicalHeightUsing):
753         * rendering/RenderBox.h:
754         (RenderBox):
755         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
756         * rendering/RenderDeprecatedFlexibleBox.cpp:
757         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
758         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
759         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
760         * rendering/RenderEmbeddedObject.cpp:
761         (WebCore::RenderEmbeddedObject::layout):
762         * rendering/RenderFlexibleBox.cpp:
763         (WebCore::RenderFlexibleBox::layoutBlock):
764         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
765         * rendering/RenderFlowThread.cpp:
766         (WebCore::RenderFlowThread::updateLogicalHeight):
767         * rendering/RenderFlowThread.h:
768         * rendering/RenderGrid.cpp:
769         (WebCore::RenderGrid::layoutBlock):
770         * rendering/RenderHTMLCanvas.cpp:
771         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
772         * rendering/RenderIFrame.cpp:
773         (WebCore::RenderIFrame::updateLogicalHeight):
774         (WebCore::RenderIFrame::layoutSeamlessly):
775         (WebCore::RenderIFrame::layout):
776         * rendering/RenderIFrame.h:
777         (RenderIFrame):
778         * rendering/RenderImage.cpp:
779         (WebCore::RenderImage::imageDimensionsChanged):
780         * rendering/RenderListBox.cpp:
781         (WebCore::RenderListBox::updateLogicalHeight):
782         * rendering/RenderListBox.h:
783         (RenderListBox):
784         * rendering/RenderMeter.cpp:
785         (WebCore::RenderMeter::updateLogicalHeight):
786         * rendering/RenderMeter.h:
787         (RenderMeter):
788         * rendering/RenderMultiColumnBlock.cpp:
789         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
790         * rendering/RenderMultiColumnFlowThread.h:
791         * rendering/RenderMultiColumnSet.cpp:
792         (WebCore::RenderMultiColumnSet::updateLogicalHeight):
793         * rendering/RenderMultiColumnSet.h:
794         (RenderMultiColumnSet):
795         * rendering/RenderReplaced.cpp:
796         (WebCore::RenderReplaced::layout):
797         * rendering/RenderSearchField.cpp:
798         (WebCore::RenderSearchField::computeControlHeight):
799         * rendering/RenderTable.cpp:
800         (WebCore::RenderTable::layout):
801         * rendering/RenderTextControl.cpp:
802         (WebCore::RenderTextControl::updateLogicalHeight):
803         * rendering/RenderTextControl.h:
804         (RenderTextControl):
805         * rendering/RenderView.cpp:
806         (WebCore::RenderView::updateLogicalHeight):
807         * rendering/RenderView.h:
808         * rendering/svg/RenderSVGForeignObject.cpp:
809         (WebCore::RenderSVGForeignObject::updateLogicalHeight):
810         * rendering/svg/RenderSVGForeignObject.h:
811         (RenderSVGForeignObject):
812         * rendering/svg/RenderSVGRoot.cpp:
813         (WebCore::RenderSVGRoot::layout):
814
815 2012-09-11  Zach Kuznia  <zork@chromium.org>
816
817         Fix FilterTypeZoom to properly call canvas->restore()
818         https://bugs.webkit.org/show_bug.cgi?id=96082
819
820         Reviewed by Adrienne Walker.
821
822         Fix zoom filter to properly call canvas->restore()
823
824         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
825         (WebCore::CCRenderSurfaceFilters::apply):
826
827 2012-09-11  Sergio Villar Senin  <svillar@igalia.com>
828
829         [GTK] WebKitGtk+ crashes with non-UTF8 HTTP header names
830         https://bugs.webkit.org/show_bug.cgi?id=96284
831
832         Reviewed by Gustavo Noronha Silva.
833
834         Non UTF-8 characters sent as part of a HTTP header name were
835         causing crashes as String::fromUTF8() was returning NULL for
836         them. Use String::fromUTF8WithLatin1Fallback() instead.
837
838         Test: http/tests/misc/non-utf8-header-name.php
839
840         * platform/network/soup/ResourceResponseSoup.cpp:
841         (WebCore::ResourceResponse::updateFromSoupMessage):
842
843 2012-09-11  Sheriff Bot  <webkit.review.bot@gmail.com>
844
845         Unreviewed, rolling out r128175.
846         http://trac.webkit.org/changeset/128175
847         https://bugs.webkit.org/show_bug.cgi?id=96395
848
849         broke hunders of tests for EFL and GTK (Requested by rakuco on
850         #webkit).
851
852         * platform/network/soup/ResourceResponseSoup.cpp:
853         (WebCore::ResourceResponse::updateFromSoupMessage):
854
855 2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
856
857         [EFL] Rewrite the EFL-related Find modules
858         https://bugs.webkit.org/show_bug.cgi?id=95237
859
860         Reviewed by Kenneth Rohde Christiansen.
861
862         * CMakeLists.txt: Stop setting the LINK_FLAGS property now that no
863         port sets WebCore_LINK_FLAGS.
864         * PlatformEfl.cmake: Add libraries and include directories for
865         each Enlightenment Foundation Library used by the port.
866
867 2012-09-11  Csaba Osztrogonác  <ossy@webkit.org>
868
869         [Qt] Unreviewed, rolling out 128054, because it broke the Windows build.
870
871         * DerivedSources.pri:
872
873 2012-09-11  Andras Becsi  <andras.becsi@nokia.com>
874
875         [Qt] Fix the build with libwebp
876
877         Rubber-stamped by Tor Arne Vestbø
878
879         The use-flag is called WEBP not LIBWEBP, so use that when appending -lwebp.
880
881         * WebCore.pri:
882
883 2012-09-10  Andrey Kosyakov  <caseq@chromium.org>
884
885         Web Inspector: visualize layout root in Timeline
886         https://bugs.webkit.org/show_bug.cgi?id=96279
887
888         Reviewed by Pavel Feldman.
889
890         - pass layout root to InspectorTimelineAgent::didLayout
891         - show rectangles of the layout root upon hover over the Layout record;
892
893         * inspector/InspectorInstrumentation.cpp:
894         (WebCore):
895         (WebCore::InspectorInstrumentation::didLayoutImpl):
896         * inspector/InspectorInstrumentation.h:
897         (WebCore):
898         (InspectorInstrumentation):
899         (WebCore::InspectorInstrumentation::didLayout):
900         * inspector/InspectorTimelineAgent.cpp:
901         (WebCore::InspectorTimelineAgent::didLayout):
902         * inspector/InspectorTimelineAgent.h:
903         (WebCore):
904         (InspectorTimelineAgent):
905         * inspector/TimelineRecordFactory.cpp:
906         (WebCore::TimelineRecordFactory::createPaintData):
907         (WebCore::TimelineRecordFactory::addRectData):
908         (WebCore):
909         * inspector/TimelineRecordFactory.h:
910         (TimelineRecordFactory):
911         * inspector/front-end/TimelinePanel.js:
912         (WebInspector.TimelinePanel.prototype._mouseMove):
913         * page/FrameView.cpp:
914         (WebCore::FrameView::layout):
915
916 2012-09-10  Andrey Kosyakov  <caseq@chromium.org>
917
918         Web Inspector: highlight of paint rectangles is broken
919         https://bugs.webkit.org/show_bug.cgi?id=96276
920
921         Reviewed by Pavel Feldman.
922
923         * inspector/InspectorOverlay.cpp:
924         (WebCore::InspectorOverlay::drawRectHighlight): Fix JS method name to match the one in InspectorOverlayPage.html
925
926 2012-09-11  Chris Guan  <chris.guan@torchmobile.com.cn>
927
928         [Blackberry] use ReadOnlyLatin1String to save a deep copy
929         https://bugs.webkit.org/show_bug.cgi?id=96364
930
931         Reviewed by Yong Li.
932         Internally reviewed by Yong li.
933
934         * platform/network/blackberry/NetworkManager.cpp:
935         (WebCore::NetworkManager::startJob):
936
937 2012-09-11  Sergio Villar Senin  <svillar@igalia.com>
938
939         [GTK] WebKitGtk+ crashes with non-UTF8 HTTP header names
940         https://bugs.webkit.org/show_bug.cgi?id=96284
941
942         Reviewed by Gustavo Noronha Silva.
943
944         Non UTF-8 characters sent as part of a HTTP header name were
945         causing crashes as String::fromUTF8() was returning NULL for
946         them. Use String::fromUTF8WithLatin1Fallback() instead.
947
948         Test: http/tests/misc/non-utf8-header-name.php
949
950         * platform/network/soup/ResourceResponseSoup.cpp:
951         (WebCore::ResourceResponse::updateFromSoupMessage):
952
953 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
954
955         [Qt] Add a configure step to the Qt build system
956
957         This allows building the Qt port using just 'qmake WebKit.pro'. Using
958         the build-webkit script is still supported, and will add slightly more
959         logic to the build, such as detecting the need for clean or incremental
960         builds.
961
962         Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
963         all things related to configuring the build, such as use/have/enable flags,
964         and these are translated to defines in default_post. Project files should
965         no longer check contains(DEFINES,...) to detect features, but use the new
966         enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
967         options have been translated into WEBKIT_CONFIG options as well, and can
968         be checked using build?().
969
970         Reviewed by Simon Hausmann.
971
972         * DerivedSources.pri:
973         * Target.pri:
974         * WebCore.pri:
975
976 2012-09-11  Alexander Pavlov  <apavlov@chromium.org>
977
978         Web Inspector: Remove no-op TreeElement.prototype.didChange method
979         https://bugs.webkit.org/show_bug.cgi?id=96376
980
981         Reviewed by Yury Semikhatsky.
982
983         * inspector/front-end/treeoutline.js:
984         (TreeElement.prototype.set title):
985         (TreeElement.prototype.set tooltip):
986         (TreeElement.prototype.set hasChildren):
987
988 2012-09-11  Tommy Widenflycht  <tommyw@google.com>
989
990         MediaStream API: add RTCPeerConnection::onnegotiationneeded
991         https://bugs.webkit.org/show_bug.cgi?id=96097
992
993         Reviewed by Adam Barth.
994
995         This patch adds the last callback to RTCPeerConnection: onnegotiationneeded.
996         This is called whenever the state in the RTCPeerConnection changes and that
997         change needs to be sent to the other side.
998
999         Test: fast/mediastream/RTCPeerConnection-onnegotiationneeded.html
1000
1001         * Modules/mediastream/RTCPeerConnection.cpp:
1002         (WebCore::RTCPeerConnection::negotiationNeeded):
1003         (WebCore):
1004         * Modules/mediastream/RTCPeerConnection.h:
1005         (RTCPeerConnection):
1006         * Modules/mediastream/RTCPeerConnection.idl:
1007         * dom/EventNames.h:
1008         (WebCore):
1009         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1010         (RTCPeerConnectionHandlerClient):
1011         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1012         (WebCore::RTCPeerConnectionHandlerChromium::negotiationNeeded):
1013         (WebCore):
1014         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
1015         (RTCPeerConnectionHandlerChromium):
1016
1017 2012-09-11  Kent Tamura  <tkent@chromium.org>
1018
1019         Sort an Xcode project file.
1020
1021         * WebCore.xcodeproj/project.pbxproj:
1022
1023 2012-09-11  Dan Carney  <dcarney@google.com>
1024
1025         Removed V8IsolatedContext
1026         https://bugs.webkit.org/show_bug.cgi?id=95735
1027
1028         Reviewed by Adam Barth.
1029
1030         Remove V8IsolatedContext and merge functionality into V8DOMWindowShell.
1031         This brings the V8 isolated world model into closer alignment with
1032         that of JSC.
1033
1034         No new tests.  No change in functionality.
1035
1036         * UseV8.cmake:
1037         * WebCore.gypi:
1038         * bindings/scripts/CodeGeneratorV8.pm:
1039         (GenerateImplementation):
1040         * bindings/scripts/test/V8/V8Float64Array.cpp:
1041         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1042         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1043         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1044         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1045         * bindings/scripts/test/V8/V8TestException.cpp:
1046         * bindings/scripts/test/V8/V8TestInterface.cpp:
1047         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1048         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1049         * bindings/scripts/test/V8/V8TestNode.cpp:
1050         * bindings/scripts/test/V8/V8TestObj.cpp:
1051         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1052         * bindings/v8/DOMData.cpp:
1053         (WebCore::DOMData::getCurrentStore):
1054         * bindings/v8/DOMWrapperWorld.cpp:
1055         (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
1056         * bindings/v8/DOMWrapperWorld.h:
1057         (DOMWrapperWorld):
1058         * bindings/v8/ScriptController.cpp:
1059         (WebCore::ScriptController::ScriptController):
1060         (WebCore::ScriptController::resetIsolatedWorlds):
1061         (WebCore::ScriptController::ensureIsolatedWorldContext):
1062         (WebCore::ScriptController::existingWindowShellInternal):
1063         (WebCore):
1064         (WebCore::ScriptController::windowShell):
1065         (WebCore::ScriptController::evaluateInIsolatedWorld):
1066         (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
1067         (WebCore::ScriptController::currentWorldContext):
1068         (WebCore::ScriptController::evaluateInWorld):
1069         (WebCore::ScriptController::collectIsolatedContexts):
1070         * bindings/v8/ScriptController.h:
1071         (WebCore):
1072         (ScriptController):
1073         (WebCore::ScriptController::existingWindowShell):
1074         * bindings/v8/SharedPersistent.h:
1075         (WebCore):
1076         (WebCore::SharedPersistent::create):
1077         (WebCore::SharedPersistent::get):
1078         (WebCore::SharedPersistent::SharedPersistent):
1079         (SharedPersistent):
1080         * bindings/v8/V8Binding.cpp:
1081         (WebCore::perContextDataForCurrentWorld):
1082         * bindings/v8/V8DOMWindowShell.cpp:
1083         (WebCore::setIsolatedWorldField):
1084         (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
1085         (WebCore):
1086         (WebCore::setInjectedScriptContextDebugId):
1087         (WebCore::V8DOMWindowShell::create):
1088         (WebCore::V8DOMWindowShell::V8DOMWindowShell):
1089         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
1090         (WebCore::isolatedContextWeakCallback):
1091         (WebCore::V8DOMWindowShell::disposeContext):
1092         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1093         (WebCore::V8DOMWindowShell::createContext):
1094         (WebCore::V8DOMWindowShell::installDOMWindow):
1095         (WebCore::V8DOMWindowShell::updateDocumentWrapper):
1096         (WebCore::V8DOMWindowShell::updateDocumentProperty):
1097         (WebCore::V8DOMWindowShell::clearDocumentProperty):
1098         (WebCore::V8DOMWindowShell::setSecurityToken):
1099         (WebCore::V8DOMWindowShell::updateDocument):
1100         (WebCore::V8DOMWindowShell::namedItemAdded):
1101         (WebCore::V8DOMWindowShell::namedItemRemoved):
1102         (WebCore::V8DOMWindowShell::updateSecurityOrigin):
1103         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
1104         * bindings/v8/V8DOMWindowShell.h:
1105         (V8DOMWindowShell):
1106         (WebCore::V8DOMWindowShell::world):
1107         (WebCore::V8DOMWindowShell::isolatedWorldSecurityOrigin):
1108         (WebCore::V8DOMWindowShell::getEntered):
1109         * bindings/v8/V8DOMWrapper.h:
1110         (WebCore::V8DOMWrapper::getCachedWrapper):
1111         * bindings/v8/V8IsolatedContext.cpp: Removed.
1112         * bindings/v8/V8IsolatedContext.h: Removed.
1113         * bindings/v8/V8LazyEventListener.cpp:
1114         * bindings/v8/WorldContextHandle.cpp:
1115         (WebCore::WorldContextHandle::WorldContextHandle):
1116         (WebCore::WorldContextHandle::adjustedContext):
1117         * bindings/v8/custom/V8DocumentCustom.cpp:
1118         (WebCore::toV8):
1119         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1120         (WebCore::toV8):
1121         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1122         (WebCore::toV8):
1123         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1124         (WebCore::V8XMLHttpRequest::constructorCallback):
1125
1126 2012-09-11  Keishi Hattori  <keishi@webkit.org>
1127
1128         Create Localizer factory method for LocaleMac
1129         https://bugs.webkit.org/show_bug.cgi?id=96355
1130
1131         Reviewed by Kent Tamura.
1132
1133         Preparing to use Localizer instead of LocaleMac/Win/ICU
1134
1135         No new tests. Covered in unit test tests/LocaleMacTest.cpp
1136
1137         * platform/text/Localizer.h:
1138         (Localizer):
1139         * platform/text/mac/LocaleMac.mm:
1140         (WebCore::Localizer::create):
1141         (WebCore):
1142
1143 2012-09-11  Mihnea Ovidenie  <mihnea@adobe.com>
1144
1145         [CSS Regions] Auto width is not working for Regions
1146         https://bugs.webkit.org/show_bug.cgi?id=74135
1147
1148         Reviewed by Julien Chaffraix.
1149
1150         It was not possible to flow content into a region having { width: auto; } since in such case, the region width was computed to 0.
1151         Now, a region having auto width, will have its width computed following the rules for calculation of widths and margins
1152         (http://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and_margins).
1153         For those cases in which resolving the width requires measuring of content's min/max-content values, we use the associated named flow min/max-content
1154         values (the same for all regions with width auto in a region chain).
1155         When a region has width:auto, the computation of width should be done using normal block/box sizing code, instead of replaced element code.
1156         Contains code contributed by Alexandru Chiculita(achicu@adobe.com).
1157
1158         Tests: fast/regions/autowidth-abspos-regionchain.html
1159                fast/regions/autowidth-abspos.html
1160                fast/regions/autowidth-attachedinvalidregion.html
1161                fast/regions/autowidth-float.html
1162                fast/regions/autowidth-inlineblock.html
1163                fast/regions/autowidth-nonreplaced-abspos.html
1164                fast/regions/autowidth-nonreplacedblock-normalflow.html
1165                fast/regions/autowidth-normalflow-maxwidth.html
1166                fast/regions/autowidth-normalflow-minmaxwidth.html
1167                fast/regions/autowidth-normalflow-minwidth.html
1168                fast/regions/autowidth-normalflow-vertrl.html
1169                fast/regions/autowidth-normalflow.html
1170
1171         * rendering/RenderBox.cpp:
1172         (WebCore::RenderBox::computePositionedLogicalWidth): For positioned auto-width regions, skip the code path for replaced elements.
1173         * rendering/RenderRegion.cpp:
1174         (WebCore): Override min/maxPreferredLogicalWidth as they are used in the process of computing width for regions with auto width.
1175         As this moment, a region is still a RenderReplaced element, so this code needs to be revisited when the region will become a RenderBlock.
1176         Also, for min/max-width, we support only <length> values. We will extend support for other values in a following patch.
1177         We only attempt to use the flowThread min/maxPreferredLogicalWidth if the region is valid (there are no circular dependencies).
1178         (WebCore::RenderRegion::minPreferredLogicalWidth):
1179         (WebCore::RenderRegion::maxPreferredLogicalWidth):
1180         * rendering/RenderRegion.h:
1181         (RenderRegion): Override isInlineBlockOrInlineTable() and shouldComputeSizeAsReplaced() to ensure that computation for width auto follows the normal
1182         block/box sizing code.
1183         (WebCore::RenderRegion::expandToEncompassFlowThreadContentsIfNeeded):
1184
1185 2012-09-10  Ilya Tikhonovsky  <loislo@chromium.org>
1186
1187         Web Inspector: NMI: move MemoryInstrumentation.h to wtf
1188         https://bugs.webkit.org/show_bug.cgi?id=96356
1189
1190         Reviewed by Yury Semikhatsky.
1191
1192         It is necessary step because it helps us to remove dependency between platform and WebCore.
1193
1194         * GNUmakefile.list.am:
1195         * Target.pri:
1196         * WebCore.gypi:
1197         * WebCore.vcproj/WebCore.vcproj:
1198         * WebCore.xcodeproj/project.pbxproj:
1199         * dom/WebCoreMemoryInstrumentation.h:
1200         * inspector/MemoryInstrumentationImpl.h:
1201
1202 2012-09-10  Keishi Hattori  <keishi@webkit.org>
1203
1204         Move InputTypeNames to a separate file
1205         https://bugs.webkit.org/show_bug.cgi?id=96255
1206
1207         Reviewed by Kent Tamura.
1208
1209         We want to move InputTypeNames to a separate file so we can use it without including InputType.h.
1210
1211         No new tests. No behavior change.
1212
1213         * CMakeLists.txt:
1214         * GNUmakefile.list.am:
1215         * Target.pri:
1216         * WebCore.gypi:
1217         * WebCore.vcproj/WebCore.vcproj:
1218         * WebCore.xcodeproj/project.pbxproj:
1219         * html/ButtonInputType.cpp:
1220         * html/CheckboxInputType.cpp:
1221         * html/ColorInputType.cpp:
1222         * html/DateInputType.cpp:
1223         * html/DateTimeInputType.cpp:
1224         * html/DateTimeLocalInputType.cpp:
1225         * html/EmailInputType.cpp:
1226         * html/FileInputType.cpp:
1227         * html/HiddenInputType.cpp:
1228         * html/ImageInputType.cpp:
1229         * html/InputType.cpp:
1230         * html/InputType.h:
1231         * html/InputTypeNames.cpp: Added.
1232         (WebCore):
1233         (InputTypeNames):
1234         (WebCore::InputTypeNames::button):
1235         (WebCore::InputTypeNames::checkbox):
1236         (WebCore::InputTypeNames::color):
1237         (WebCore::InputTypeNames::date):
1238         (WebCore::InputTypeNames::datetime):
1239         (WebCore::InputTypeNames::datetimelocal):
1240         (WebCore::InputTypeNames::email):
1241         (WebCore::InputTypeNames::file):
1242         (WebCore::InputTypeNames::hidden):
1243         (WebCore::InputTypeNames::image):
1244         (WebCore::InputTypeNames::month):
1245         (WebCore::InputTypeNames::number):
1246         (WebCore::InputTypeNames::password):
1247         (WebCore::InputTypeNames::radio):
1248         (WebCore::InputTypeNames::range):
1249         (WebCore::InputTypeNames::reset):
1250         (WebCore::InputTypeNames::search):
1251         (WebCore::InputTypeNames::submit):
1252         (WebCore::InputTypeNames::telephone):
1253         (WebCore::InputTypeNames::text):
1254         (WebCore::InputTypeNames::time):
1255         (WebCore::InputTypeNames::url):
1256         (WebCore::InputTypeNames::week):
1257         * html/InputTypeNames.h: Added.
1258         (WebCore):
1259         (InputTypeNames):
1260         * html/MonthInputType.cpp:
1261         * html/NumberInputType.cpp:
1262         * html/PasswordInputType.cpp:
1263         * html/RadioInputType.cpp:
1264         * html/RangeInputType.cpp:
1265         * html/ResetInputType.cpp:
1266         * html/SearchInputType.cpp:
1267         * html/SubmitInputType.cpp:
1268         * html/TelephoneInputType.cpp:
1269         * html/TextInputType.cpp:
1270         * html/TimeInputType.cpp:
1271         * html/URLInputType.cpp:
1272         * html/WeekInputType.cpp:
1273         * html/parser/HTMLPreloadScanner.cpp:
1274         * platform/efl/RenderThemeEfl.cpp:
1275         * rendering/RenderThemeChromiumCommon.cpp:
1276
1277 2012-09-10  Yoshifumi Inoue  <yosin@chromium.org>
1278
1279         REGRESSION (r127226): Calling DateTimeEditElement::layout() in focus handler should not dispatch blur event
1280         https://bugs.webkit.org/show_bug.cgi?id=96232
1281
1282         Reviewed by Kent Tamura.
1283
1284         This patch makes DateTimeEditElement::layout() not to dispatch blur
1285         event by removing existing fields, one of them can be focused, after
1286         moving focus to newly created field.
1287
1288         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1289         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1290
1291         Test: fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html
1292
1293         * html/shadow/DateTimeEditElement.cpp:
1294         (WebCore::DateTimeEditBuilder::build): Changed to call resetFields().
1295         (WebCore::DateTimeEditElement::focusedFieldIndex): Changed to use
1296         Document::focusedNode(). When this function is called during handling
1297         focus event, Element::focused() isn't true.
1298         (WebCore::DateTimeEditElement::layout): Changed to remove existing
1299         child nodes after moving focus to newly created field.
1300         (WebCore::DateTimeEditElement::resetFields): Renamed from resetLayout().
1301         This function makes m_fields vector empty.
1302         (WebCore::DateTimeEditElement::resetLayout): Renamed to resetFields().
1303         We moved removing field elements and spin button to layout().
1304         * html/shadow/DateTimeEditElement.h:
1305         (DateTimeEditElement): Renamed resetLayout() to resetFields().
1306
1307 2012-09-10  Keishi Hattori  <keishi@webkit.org>
1308
1309         Rename NumberLocalizer to Localizer
1310         https://bugs.webkit.org/show_bug.cgi?id=96350
1311
1312         Reviewed by Kent Tamura.
1313
1314         Renaming NumberLocalizer to Localizer so we can unify our localization methods into this class in the future.
1315
1316         No new tests. No behavior change.
1317
1318         * WebCore.gypi:
1319         * WebCore.xcodeproj/project.pbxproj:
1320         * platform/text/LocaleICU.cpp:
1321         (WebCore::LocaleICU::initializeLocalizerData):
1322         * platform/text/LocaleICU.h:
1323         (LocaleICU):
1324         * platform/text/LocaleWin.cpp:
1325         (WebCore::LocaleWin::initializeLocalizerData):
1326         * platform/text/LocaleWin.h:
1327         (LocaleWin):
1328         * platform/text/Localizer.cpp: Renamed from Source/WebCore/platform/text/NumberLocalizer.cpp.
1329         (WebCore):
1330         (WebCore::Localizer::~Localizer):
1331         (WebCore::Localizer::setLocalizerData):
1332         (WebCore::Localizer::convertToLocalizedNumber):
1333         (WebCore::matches):
1334         (WebCore::Localizer::detectSignAndGetDigitRange):
1335         (WebCore::Localizer::matchedDecimalSymbolIndex):
1336         (WebCore::Localizer::convertFromLocalizedNumber):
1337         (WebCore::Localizer::localizedDecimalSeparator):
1338         * platform/text/Localizer.h: Renamed from Source/WebCore/platform/text/NumberLocalizer.h.
1339         (WebCore):
1340         (Localizer):
1341         (WebCore::Localizer::Localizer):
1342         * platform/text/mac/LocaleMac.h:
1343         (LocaleMac):
1344         * platform/text/mac/LocaleMac.mm:
1345         (WebCore::LocaleMac::initializeLocalizerData):
1346
1347 2012-09-10  Dan Bernstein  <mitz@apple.com>
1348
1349         Use an API symbol instead of a hardcoded string for the TIFF uniform type identifier.
1350
1351         Reviewed by Mark Rowe.
1352
1353         * platform/graphics/mac/ImageMac.mm:
1354         (WebCore::BitmapImage::getTIFFRepresentation): Replaced CFSTR("public.tiff") with kUTTypeTIFF.
1355
1356 2012-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1357
1358         [CMake] Remove duplicated file in CMakeLists.txt
1359         https://bugs.webkit.org/show_bug.cgi?id=96346
1360
1361         Reviewed by Benjamin Poulain.
1362
1363         * CMakeLists.txt: Remove duplicated files.
1364
1365 2012-09-10  Joanmarie Diggs  <jdiggs@igalia.com>
1366
1367         Properly expose <legend> elements to ATs
1368         https://bugs.webkit.org/show_bug.cgi?id=84137
1369
1370         Reviewed by Chris Fleizach.
1371
1372         Created a new WebCore Accessibility Role, LegendRole. Used it to map to
1373         the expected platform role, ATK_ROLE_LABEL. Also established the needed
1374         AtkRelation pair, label-for/labelled-by between the legend and fieldset.
1375
1376         No new test needed - Existing legend.html test is now unskipped for Gtk.
1377
1378         * accessibility/AccessibilityObject.h: Added LegendRole
1379         * accessibility/AccessibilityRenderObject.cpp:
1380         (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Map legendTag to LegendRole
1381         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
1382         (webkitAccessibleGetName): Fieldset accessible should take its name from the associated LegendRole/label
1383         (setAtkRelationSetFromCoreObject): Set label-for/labelled-by AtkRelation pair between fieldset and legend
1384         (atkRole): Map LegendRole to ATK_ROLE_LABEL
1385         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1386         (createAccessibilityRoleMap):  Map LegendRole to NSAccessibilityGroupRole
1387
1388 2012-09-10  Adam Barth  <abarth@chromium.org>
1389
1390         [V8] Code assumes that getScriptExecutionContext can return 0
1391         https://bugs.webkit.org/show_bug.cgi?id=96340
1392
1393         Reviewed by Eric Seidel.
1394
1395         This function can never return 0 (as long as V8 is on the stack).
1396         There's no reason to try to handle a 0 return as an error.
1397
1398         * bindings/scripts/CodeGeneratorV8.pm:
1399         (GenerateCallWith):
1400         (GenerateConstructorCallback):
1401         * bindings/scripts/test/V8/V8TestInterface.cpp:
1402         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1403         (WebCore::V8TestInterface::constructorCallback):
1404         * bindings/scripts/test/V8/V8TestObj.cpp:
1405         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
1406         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
1407         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
1408         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
1409         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
1410         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
1411         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
1412         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
1413         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
1414         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
1415         (WebCore::TestObjV8Internal::withScriptExecutionContextCallback):
1416         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
1417         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
1418         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
1419         * bindings/v8/custom/V8BlobCustom.cpp:
1420         (WebCore::V8Blob::constructorCallback):
1421         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1422         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
1423         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
1424         (WebCore::V8MessageChannel::constructorCallback):
1425         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1426         (WebCore::V8MutationObserver::constructorCallback):
1427         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1428         (WebCore::V8SQLTransaction::executeSqlCallback):
1429         * bindings/v8/custom/V8WebSocketCustom.cpp:
1430         (WebCore::V8WebSocket::constructorCallback):
1431         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1432         (WebCore::V8XMLHttpRequest::constructorCallback):
1433         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1434         (WebCore::V8XMLHttpRequest::openCallback):
1435
1436 2012-09-10  Adam Barth  <abarth@chromium.org>
1437
1438         [V8] We don't us the global handle map for anything useful---let's remove it
1439         https://bugs.webkit.org/show_bug.cgi?id=96343
1440
1441         Reviewed by Kentaro Hara.
1442
1443         The global handle map was a dream of tracking all the persistent V8
1444         handles in WebCore. Unfortunately, it has never been complete, and I'm
1445         not aware of us using it for anything. This patch removes what little
1446         is left of it.
1447
1448         * bindings/v8/NPV8Object.cpp:
1449         (WebCore::freeV8NPObject):
1450         (WebCore::npCreateV8ScriptObject):
1451         * bindings/v8/V8GCController.cpp:
1452         (WebCore):
1453         (WebCore::V8GCController::gcEpilogue):
1454         (WebCore::V8GCController::collectGarbage):
1455         * bindings/v8/V8GCController.h:
1456         (V8GCController):
1457         * bindings/v8/V8PerIsolateData.h:
1458         (WebCore):
1459         (V8PerIsolateData):
1460
1461 2012-09-10  John Bates  <jbates@google.com>
1462
1463         [chromium] Fix trace event macro naming issue
1464         https://bugs.webkit.org/show_bug.cgi?id=96337
1465
1466         Reviewed by James Robinson.
1467
1468         * platform/chromium/TraceEvent.h:
1469
1470 2012-09-10  Joshua Bell  <jsbell@chromium.org>
1471
1472         IndexedDB: IDBFactory.deleteDatabase() is slow
1473         https://bugs.webkit.org/show_bug.cgi?id=96036
1474
1475         Reviewed by Tony Chang.
1476
1477         The deleteDatabase() operation is implemented by creating a LevelDBTansaction to accumulate
1478         the records to delete, then committing it. The transaction is a tree of key/operation pairs.
1479         As each (key, delete) entry is added to the tree compares need to be made, potentially
1480         requiring full key decodes. Since this temporary transaction is never read from, this is
1481         overkill.
1482
1483         Add a new "write only" transaction type that simply wraps a write batch, which provides
1484         transaction integrity but avoids the insertion overhead and has a minimal interface.
1485
1486         No new tests - no functional changes, only perf improvement.
1487
1488         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1489         (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use new write-only transaction type.
1490         * platform/leveldb/LevelDBTransaction.cpp:
1491         (WebCore::LevelDBWriteOnlyTransaction::create):
1492         (WebCore):
1493         (WebCore::LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction):
1494         (WebCore::LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction):
1495         (WebCore::LevelDBWriteOnlyTransaction::remove):
1496         (WebCore::LevelDBWriteOnlyTransaction::commit):
1497         * platform/leveldb/LevelDBTransaction.h:
1498         (WebCore):
1499         (LevelDBWriteOnlyTransaction):
1500
1501 2012-09-10  Adam Barth  <abarth@chromium.org>
1502
1503         [V8] createFunctionOnlyCallback should be in V8Callback.h with the other callback functions
1504         https://bugs.webkit.org/show_bug.cgi?id=96336
1505
1506         Reviewed by Kentaro Hara.
1507
1508         Moving this function to V8Callback.h also lets us delete
1509         setTypeMismatchException because we no longer have a header inclusion
1510         cycle.
1511
1512         * bindings/v8/V8Callback.h:
1513         (WebCore::createFunctionOnlyCallback):
1514         (WebCore):
1515         * bindings/v8/V8Utilities.cpp:
1516         * bindings/v8/V8Utilities.h:
1517         (WebCore):
1518         * bindings/v8/custom/V8GeolocationCustom.cpp:
1519         * bindings/v8/custom/V8NotificationCustom.cpp:
1520
1521 2012-09-10  Beth Dakin  <bdakin@apple.com>
1522
1523         https://bugs.webkit.org/show_bug.cgi?id=96158
1524         Need API to suppress scrollbar animations
1525         -and corresponding-
1526         <rdar://problem/12210972>
1527
1528         Reviewed by Sam Weinig.
1529
1530         This patch re-names ScrollableAre::isOnActivePage() to 
1531         ScrollableArea::scrollbarsCanBeActive(). The new name better reflects 
1532         how the function is actually used, and it allows us to use the same 
1533         function for the new API that has been added to WebKit2. Now when a 
1534         client has used that API to indicate that scrollbars should be 
1535         suppressed, ScrollableArea::scrollbarsCanBeActive() will return 
1536         false.
1537
1538         Page has a new member variable which indicated whether scrollbar 
1539         animations for all scrollbars associated with that page should be 
1540         suppressed. Whenever it is set to true (meaning the animations 
1541         should be suppressed), Page iterates through all of the 
1542         ScrollableAreas to tell each one to finishCurrentScrollAnimations().
1543         * WebCore.exp.in:
1544         * page/Page.cpp:
1545         (WebCore::Page::Page):
1546         (WebCore::Page::setShouldSuppressScrollbarAnimations):
1547         (WebCore):
1548         * page/Page.h:
1549         (WebCore::Page::shouldSuppressScrollbarAnimations):
1550         (Page):
1551
1552         FrameView::isOnActivePage() is renamed to scrollbarsCanBeActive () 
1553         and it will now return false if the Page says that scrollbar 
1554         animations should be suppressed. 
1555         * page/FrameView.cpp:
1556         (WebCore::FrameView::scrollbarsCanBeActive):
1557
1558         scrollbarsCanBeActive() must now be a public member of FrameView so  
1559         that it can be called from RenderLayer and RenderListBox.
1560         * page/FrameView.h:
1561         (FrameView):
1562
1563         New ScrollAnimator function calls hideOverlayScrollers.
1564         * platform/ScrollAnimator.h:
1565         (WebCore::ScrollAnimator::finishCurrentScrollAnimations):
1566         (ScrollAnimator):
1567         * platform/ScrollableArea.cpp:
1568         (WebCore::ScrollableArea::finishCurrentScrollAnimations):
1569         (WebCore):
1570         * platform/ScrollableArea.h:
1571         (ScrollableArea):
1572         * platform/mac/ScrollAnimatorMac.h:
1573         (ScrollAnimatorMac):
1574         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
1575
1576         Re-name. isOnActivePage() -> scrollbarsCanBeActive()
1577         (WebCore::FrameView::setAnimatorsAreActive):
1578         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
1579         * platform/mac/ScrollAnimatorMac.mm:
1580         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1581         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
1582         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
1583         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
1584         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
1585         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
1586         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
1587         (WebCore::ScrollAnimatorMac::willStartLiveResize):
1588         (WebCore::ScrollAnimatorMac::contentsResized):
1589         (WebCore::ScrollAnimatorMac::willEndLiveResize):
1590         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
1591         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
1592         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
1593         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
1594         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
1595         (WebCore):
1596         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
1597         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1598         * rendering/RenderLayer.cpp:
1599
1600         RenderLayer and RenderListBox should call into FrameView's 
1601         scrollbarsCanBeActive() so that they also return false when Page:: 
1602         shouldSuppressScrollbarAnimations() is true.
1603         (WebCore::RenderLayer::scrollbarsCanBeActive):
1604         * rendering/RenderLayer.h:
1605         (RenderLayer):
1606         * rendering/RenderListBox.cpp:
1607         (WebCore::RenderListBox::scrollbarsCanBeActive):
1608         * rendering/RenderListBox.h:
1609
1610         This is the one caller of ScrollableArea:: scrollbarsCanBeActive() 
1611         that needs to distinguish between the scrollbar-suppressing scenario 
1612         and the in-the-page-cache scenario.
1613         * page/FocusController.cpp:
1614         (WebCore::FocusController::setContainingWindowIsVisible):
1615
1616 2012-09-10  James Robinson  <jamesr@chromium.org>
1617
1618         Unreviewed, rolling out r127837.
1619         http://trac.webkit.org/changeset/127837
1620         https://bugs.webkit.org/show_bug.cgi?id=93898
1621
1622         Broke ScrollingCoordinator on chromium
1623
1624         * WebCore.xcodeproj/project.pbxproj:
1625         * page/scrolling/ScrollingCoordinator.cpp:
1626         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
1627         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
1628         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
1629         (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
1630         (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
1631         (WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
1632         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
1633         * page/scrolling/ScrollingCoordinator.h:
1634         (ScrollingCoordinator):
1635         * page/scrolling/ScrollingCoordinatorNone.cpp:
1636         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
1637         * page/scrolling/ScrollingTree.cpp:
1638         (WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
1639         * page/scrolling/ScrollingTree.h:
1640         * page/scrolling/ScrollingTreeNode.cpp:
1641         (WebCore::ScrollingTreeNode::ScrollingTreeNode):
1642         (WebCore::ScrollingTreeNode::update):
1643         * page/scrolling/ScrollingTreeNode.h:
1644         (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
1645         (ScrollingTreeNode):
1646         * page/scrolling/ScrollingTreeState.cpp:
1647         (WebCore::ScrollingTreeState::ScrollingTreeState):
1648         (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
1649         * page/scrolling/ScrollingTreeState.h:
1650         (WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
1651         (ScrollingTreeState):
1652         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1653         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
1654         * page/scrolling/mac/ScrollingTreeMac.mm:
1655         (WebCore::ScrollingTree::updateDebugRootLayer):
1656         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
1657         (WebCore::ScrollingTreeNodeMac::update):
1658         (WebCore::ScrollingTreeNodeMac::scrollPosition):
1659         (WebCore::ScrollingTreeNodeMac::setScrollPosition):
1660         (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
1661         (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
1662
1663 2012-09-10  Philip Rogers  <pdr@google.com>
1664
1665         Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
1666         https://bugs.webkit.org/show_bug.cgi?id=96224
1667
1668         Reviewed by Nikolas Zimmermann.
1669
1670         This change removes two sources of unnecessary code in
1671         SMILTimeContainer::updateAnimations:
1672             1) After r117711 we now accumulate the result of multiple
1673                animations into the first _contributing_ animation
1674                element. As a result it is no longer necessary to
1675                track both which elements are contributing AND which elements
1676                we are storing results into. Both cases are now handled
1677                together with resultsElements.
1678
1679             2) r32044 added a second sort of the animation elements
1680                in order to process animateTransform last. This change
1681                was added 4 years ago, before we correctly handled <use>
1682                and the instance tree, and I think the extra sort is no
1683                longer necessary. A test has been added to ensure this
1684                is the case.
1685
1686         This change also does a minor cleanup of resultsElements. Previously,
1687         we added animation elements to resultsElements and then removed them
1688         if the animation element did not contribute. After this change, we
1689         only add to resultsElements (no more add-then-remove).
1690
1691         Test: svg/animations/use-animate-transform-and-position.html
1692
1693         * svg/animation/SMILTimeContainer.cpp:
1694         (WebCore::SMILTimeContainer::sortByPriority):
1695         (WebCore::SMILTimeContainer::updateAnimations):
1696
1697 2012-09-10  Ojan Vafai  <ojan@chromium.org>
1698
1699         Rename box-sizing applying methods to be more clear about just applying box-sizing.
1700         https://bugs.webkit.org/show_bug.cgi?id=96319
1701
1702         Reviewed by Tony Chang.
1703
1704         This is strictly a rename. No logic or web-exposed changes.
1705
1706         * rendering/AutoTableLayout.cpp:
1707         (WebCore::AutoTableLayout::recalcColumn):
1708         * rendering/FixedTableLayout.cpp:
1709         (WebCore::FixedTableLayout::calcWidthArray):
1710         * rendering/RenderBlock.cpp:
1711         (WebCore::RenderBlock::computePreferredLogicalWidths):
1712         * rendering/RenderBox.cpp:
1713         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
1714         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
1715         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
1716         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
1717         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1718         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1719         (WebCore::RenderBox::computeLogicalHeightUsing):
1720         (WebCore::RenderBox::computeLogicalClientHeight):
1721         (WebCore::RenderBox::computePercentageLogicalHeight):
1722         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1723         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1724         (WebCore::RenderBox::availableLogicalHeightUsing):
1725         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1726         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1727         * rendering/RenderBox.h:
1728         (RenderBox):
1729         * rendering/RenderDeprecatedFlexibleBox.cpp:
1730         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
1731         * rendering/RenderFileUploadControl.cpp:
1732         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1733         * rendering/RenderFlexibleBox.cpp:
1734         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1735         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1736         * rendering/RenderListBox.cpp:
1737         (WebCore::RenderListBox::computePreferredLogicalWidths):
1738         * rendering/RenderMenuList.cpp:
1739         (WebCore::RenderMenuList::computePreferredLogicalWidths):
1740         * rendering/RenderSlider.cpp:
1741         (WebCore::RenderSlider::computePreferredLogicalWidths):
1742         * rendering/RenderTextControl.cpp:
1743         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1744
1745 2012-09-10  Jer Noble  <jer.noble@apple.com>
1746
1747         Unreviewed; rolling out r128081.
1748         http://trac.webkit.org/changeset/128081
1749         https://bugs.webkit.org/show_bug.cgi?id=96134
1750
1751         New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
1752
1753         * html/HTMLMediaElement.cpp:
1754         * html/HTMLMediaElement.h:
1755         (HTMLMediaElement):
1756         * loader/FrameLoaderClient.h:
1757         * platform/graphics/MediaPlayer.h:
1758         (MediaPlayer):
1759         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1760         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1761
1762 2012-09-10  Dimitri Glazkov  <dglazkov@chromium.org>
1763
1764         Reduce the number of treeScope queries when matching rules.
1765         https://bugs.webkit.org/show_bug.cgi?id=96315
1766
1767         Reviewed by Eric Seidel.
1768
1769         In the worst case, treeScope() requires a HashMap lookup, which could be slow. Since the value is always the same for the element,
1770         we can just ask for it once.
1771
1772         No new tests, no change in behavior.
1773
1774         * css/StyleResolver.cpp:
1775         (WebCore::StyleResolver::collectMatchingRulesForList): Moved the call to treeScope out of the loop.
1776
1777 2012-09-10  Adam Barth  <abarth@chromium.org>
1778
1779         [V8] V8PerIsolateData::m_toStringTemplate leaks memory
1780         https://bugs.webkit.org/show_bug.cgi?id=96322
1781
1782         Reviewed by Kentaro Hara.
1783
1784         We never call Dispose to balance the call to v8::Persistent::New. This
1785         patch uses ScopedPersistent to call Dispose automatically.
1786
1787         * bindings/v8/V8PerIsolateData.cpp:
1788         (WebCore::V8PerIsolateData::toStringTemplate):
1789             - I've changed this function to return a new local handle in case
1790               anyone is trying to hold on to these handles during shutdown.
1791         * bindings/v8/V8PerIsolateData.h:
1792         (V8PerIsolateData):
1793
1794 2012-09-10  Adam Barth  <abarth@chromium.org>
1795
1796         [V8] V8LazyEventListener::prepareListenerObject uses inefficient string operations
1797         https://bugs.webkit.org/show_bug.cgi?id=96324
1798
1799         Reviewed by Kentaro Hara.
1800
1801         Previously, this code called String::append several times, which
1802         mallocs a new string buffer each time. This patch switches this code to
1803         use operator+, which uses StringAppend to optimize these operations
1804         down to a single malloc.
1805
1806         * bindings/v8/V8LazyEventListener.cpp:
1807         (WebCore::V8LazyEventListener::prepareListenerObject):
1808
1809 2012-09-10  Adam Barth  <abarth@chromium.org>
1810
1811         [V8] V8AuxiliaryContext used by IDB leaks memory
1812         https://bugs.webkit.org/show_bug.cgi?id=96317
1813
1814         Reviewed by Tony Chang.
1815
1816         Before this patch, we leaked m_auxiliaryContext on V8PerIsolateData
1817         because no one ever called Dispose to balance the call to
1818         V8::Context::New. This patch uses ScopedPersistent to call Dispose
1819         automatically.
1820
1821         Also, I've deleted the V8AuxiliaryContext because it just reinvents
1822         V8::Context::Scope.
1823
1824         * bindings/v8/IDBBindingUtilities.cpp:
1825         (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
1826         (WebCore::injectIDBKeyIntoSerializedValue):
1827         * bindings/v8/V8PerIsolateData.cpp:
1828         (WebCore::V8PerIsolateData::ensureAuxiliaryContext):
1829         (WebCore):
1830         * bindings/v8/V8PerIsolateData.h:
1831         (V8PerIsolateData):
1832         * bindings/v8/V8Utilities.cpp:
1833         * bindings/v8/V8Utilities.h:
1834
1835 2012-09-10  Adam Barth  <abarth@chromium.org>
1836
1837         [V8] currentDocument doesn't need to handle the case where there is no v8::Context
1838         https://bugs.webkit.org/show_bug.cgi?id=96312
1839
1840         Reviewed by Eric Seidel.
1841
1842         This function is always called while V8 is on the stack. It doesn't
1843         need to handle this impossible error condition.
1844
1845         * bindings/v8/BindingState.cpp:
1846         (WebCore::currentDocument):
1847
1848 2012-09-10  Adam Barth  <abarth@chromium.org>
1849
1850         [V8] Inline firstFrame and currentFrame into their unique callers
1851         https://bugs.webkit.org/show_bug.cgi?id=96309
1852
1853         Reviewed by Eric Seidel.
1854
1855         These functions have only one caller. We'd prefer not to have more
1856         callers (because there's usually no reason to indirect through the
1857         Frame), so we should inline them into their one caller (which is the
1858         Chromium WebKit API).
1859
1860         * bindings/js/BindingState.h:
1861         (WebCore):
1862         * bindings/v8/BindingState.cpp:
1863         * bindings/v8/BindingState.h:
1864         (WebCore):
1865         * bindings/v8/ScriptController.cpp:
1866         * bindings/v8/ScriptController.h:
1867         (ScriptController):
1868
1869 2012-09-10  Justin Novosad  <junov@chromium.org>
1870
1871         Implement canvas v5 line dash feature
1872         https://bugs.webkit.org/show_bug.cgi?id=82560
1873
1874         Reviewed by Darin Adler.
1875
1876         Adding new canvas 2d context API methods getLineDash and setLineDash,
1877         and new attribute lineDashOffset. Implementation mostly based on
1878         the existing webkitLineDash feature, with changes that reflect the
1879         canvas v5 specification. This change is visible to all JS ports,
1880         unlike webkitLineDash which is not exposed to V8. The new lineDash 
1881         and the legacy webkitLineDash features access the same rendering
1882         context state. The JavasScriptCore binding layer was augmented to
1883         support the sequence<float> IDL type.
1884
1885         Tests: fast/canvas/canvas-lineDash-invalid.html
1886                fast/canvas/canvas-lineDash.html
1887
1888         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1889         (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
1890         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1891         * bindings/js/JSDOMBinding.h:
1892         Added template specialization on float to NativeValueTraits in order to
1893         add support for the sequence<double> IDL type to JavaScriptCore.
1894         * html/canvas/CanvasRenderingContext2D.cpp:
1895         (WebCore::CanvasRenderingContext2D::getLineDash):
1896         New 2D canvas API method, returns the current line dash array
1897         (WebCore::lineDashSequenceIsValid):
1898         Returns true if the line dash array contains only non-negative finite
1899         numbers.
1900         (WebCore::CanvasRenderingContext2D::setLineDash):
1901         New 2D canvas API method, set the line dash array.
1902         (WebCore::CanvasRenderingContext2D::setWebkitLineDash):
1903         Legacy implementation, does not double the new line dash array if
1904         it contains an odd number of elements.  Just accepts it as is.
1905         (WebCore::CanvasRenderingContext2D::lineDashOffset):
1906         Attribute getter
1907         (WebCore::CanvasRenderingContext2D::setLineDashOffset):
1908         Attribute setter
1909         (WebCore::CanvasRenderingContext2D::webkitLineDashOffset):
1910         Alias for lineDashOffset
1911         (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset):
1912         Alias for setLineDashOffset
1913         (WebCore::CanvasRenderingContext2D::applyLineDash):
1914         Sends the line dash state to the GraphicsContext
1915         * html/canvas/CanvasRenderingContext2D.h:
1916         (CanvasRenderingContext2D):
1917         (State):
1918         * html/canvas/CanvasRenderingContext2D.idl:
1919         * platform/graphics/DashArray.h:
1920
1921 2012-09-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1922
1923         Unreviewed, rolling out r128109.
1924         http://trac.webkit.org/changeset/128109
1925         https://bugs.webkit.org/show_bug.cgi?id=96326
1926
1927         broke win and lion builds (Requested by kling on #webkit).
1928
1929         * WebCore.exp.in:
1930         * dom/Element.cpp:
1931         (WebCore::Element::createMutableAttributeData):
1932         * dom/ElementAttributeData.cpp:
1933         (WebCore::immutableElementAttributeDataSize):
1934         (WebCore::ElementAttributeData::createImmutable):
1935         (WebCore::ElementAttributeData::ElementAttributeData):
1936         (WebCore::ElementAttributeData::~ElementAttributeData):
1937         (WebCore::ElementAttributeData::addAttribute):
1938         (WebCore::ElementAttributeData::removeAttribute):
1939         (WebCore::ElementAttributeData::reportMemoryUsage):
1940         (WebCore::ElementAttributeData::cloneDataFrom):
1941         (WebCore::ElementAttributeData::clearAttributes):
1942         * dom/ElementAttributeData.h:
1943         (WebCore):
1944         (WebCore::ElementAttributeData::create):
1945         (ElementAttributeData):
1946         (WebCore::ElementAttributeData::isMutable):
1947         (WebCore::ElementAttributeData::makeMutable):
1948         (WebCore::ElementAttributeData::length):
1949         (WebCore::ElementAttributeData::attributeItem):
1950
1951 2012-09-10  Chris Fleizach  <cfleizach@apple.com>
1952
1953         AccessibilityNodeObject* is not in Mac xcode file
1954         https://bugs.webkit.org/show_bug.cgi?id=96327
1955
1956         Reviewed by Sam Weinig.
1957
1958         * WebCore.xcodeproj/project.pbxproj:
1959
1960 2012-09-07  Jon Lee  <jonlee@apple.com>
1961
1962         Update notifications to latest spec
1963         https://bugs.webkit.org/show_bug.cgi?id=91726
1964         <rdar://problem/11910451>
1965
1966         Reviewed by Alexey Proskuryakov.
1967
1968         Among the changes:
1969
1970         Addition of lang attribute
1971         http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0025.html
1972
1973         Specification of icon URL is icon instead of iconURL
1974         http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0012.html
1975
1976         Tests are not possible since at best they only verify exposure of the attributes, which isn't
1977         terribly useful, and use of the attributes depend on the platform.
1978
1979         * Modules/notifications/Notification.cpp:
1980         (WebCore::Notification::create): Add support for reading lang, dir, and icon from option dictionary.
1981         * Modules/notifications/Notification.h:
1982         (Notification): Make url() and setURL(), which are used for HTML notifications, only available with
1983         ENABLE(LEGACY_NOTIFICATIONS).
1984         (WebCore::Notification::setIconURL): Added so that it can be set from the option dictionary.
1985         (WebCore::Notification::lang):
1986         (WebCore::Notification::setLang):
1987         * Modules/notifications/Notification.idl: According to specification, dir is not exposed.
1988
1989 2012-08-31  Jon Lee  <jonlee@apple.com>
1990
1991         The options dictionary in Notification constructor should not accept event listeners
1992         https://bugs.webkit.org/show_bug.cgi?id=95538
1993         <rdar://problem/12213901>
1994
1995         Reviewed by Alexey Proskuryakov.
1996
1997         The latest spec only allows setting the event listeners after the notification has been created.
1998
1999         Test: http/tests/notifications/events-in-dictionary.html
2000
2001         * Modules/notifications/Notification.cpp:
2002         (WebCore::Notification::create): Do not look for the event handlers in the options dictionary.
2003
2004 2012-09-10  Tony Chang  <tony@chromium.org>
2005
2006         Rename computeLogicalWidth to updateLogicalWidth
2007         https://bugs.webkit.org/show_bug.cgi?id=96288
2008
2009         Reviewed by Ojan Vafai.
2010
2011         Also rename recomputeLogicalWidth to updateLogicalWidthAndColumnWidth.
2012         Also rename RenderTableCell::updateLogicalWidth to RenderTableCell::setCellLogicalWidth.
2013
2014         No new tests, this is just a refactor.
2015
2016         * rendering/RenderBlock.cpp:
2017         (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
2018         (WebCore::RenderBlock::layoutBlock):
2019         (WebCore::RenderBlock::layoutPositionedObjects):
2020         (WebCore::RenderBlock::insertFloatingObject):
2021         (WebCore::RenderBlock::getClearDelta):
2022         * rendering/RenderBlock.h:
2023         * rendering/RenderBox.cpp:
2024         (WebCore::RenderBox::updateLogicalWidth):
2025         * rendering/RenderBox.h:
2026         (RenderBox):
2027         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
2028         * rendering/RenderDeprecatedFlexibleBox.cpp:
2029         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2030         * rendering/RenderEmbeddedObject.cpp:
2031         (WebCore::RenderEmbeddedObject::layout):
2032         * rendering/RenderFlexibleBox.cpp:
2033         (WebCore::RenderFlexibleBox::layoutBlock):
2034         * rendering/RenderFlowThread.cpp:
2035         (WebCore::RenderFlowThread::layout):
2036         (WebCore::RenderFlowThread::updateLogicalWidth):
2037         * rendering/RenderFlowThread.h:
2038         * rendering/RenderGrid.cpp:
2039         (WebCore::RenderGrid::layoutBlock):
2040         * rendering/RenderHTMLCanvas.cpp:
2041         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
2042         * rendering/RenderIFrame.cpp:
2043         (WebCore::RenderIFrame::updateLogicalWidth):
2044         (WebCore::RenderIFrame::layoutSeamlessly):
2045         (WebCore::RenderIFrame::layout):
2046         * rendering/RenderIFrame.h:
2047         (RenderIFrame):
2048         * rendering/RenderImage.cpp:
2049         (WebCore::RenderImage::imageDimensionsChanged):
2050         * rendering/RenderMeter.cpp:
2051         (WebCore::RenderMeter::updateLogicalWidth):
2052         * rendering/RenderMeter.h:
2053         (RenderMeter):
2054         * rendering/RenderMultiColumnBlock.cpp:
2055         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
2056         * rendering/RenderMultiColumnBlock.h:
2057         (RenderMultiColumnBlock):
2058         * rendering/RenderMultiColumnSet.cpp:
2059         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2060         * rendering/RenderMultiColumnSet.h:
2061         (RenderMultiColumnSet):
2062         * rendering/RenderReplaced.cpp:
2063         (WebCore::RenderReplaced::layout):
2064         * rendering/RenderTable.cpp:
2065         (WebCore::RenderTable::updateLogicalWidth):
2066         (WebCore::RenderTable::layout):
2067         * rendering/RenderTable.h:
2068         (RenderTable):
2069         * rendering/RenderTableCell.cpp:
2070         (WebCore::RenderTableCell::updateLogicalWidth):
2071         (WebCore::RenderTableCell::setCellLogicalWidth):
2072         * rendering/RenderTableCell.h:
2073         (RenderTableCell):
2074         * rendering/RenderTableSection.cpp:
2075         (WebCore::RenderTableSection::setCellLogicalWidths):
2076         * rendering/RenderView.cpp:
2077         (WebCore::RenderView::updateLogicalWidth):
2078         * rendering/RenderView.h:
2079         * rendering/svg/RenderSVGForeignObject.cpp:
2080         (WebCore::RenderSVGForeignObject::updateLogicalWidth):
2081         * rendering/svg/RenderSVGForeignObject.h:
2082         (RenderSVGForeignObject):
2083         * rendering/svg/RenderSVGRoot.cpp:
2084         (WebCore::RenderSVGRoot::layout):
2085
2086 2012-09-10  Andreas Kling  <kling@webkit.org>
2087
2088         ElementAttributeData: Use subclasses to manage varying object layouts.
2089         <http://webkit.org/b/94465>
2090
2091         Reviewed by Antti Koivisto.
2092
2093         Add two ElementAttributeData subclasses:
2094
2095             - MutableElementAttributeData
2096             - ImmutableElementAttributeData
2097
2098         The ElementAttributeData::m_isMutable bit determines which subclass to cast to when accessing
2099         the attribute storage. Added mutableAttributeVector() and immutableAttributeArray() helpers
2100         to ElementAttributeData (with appropriate assertions.)
2101
2102         This patch removes one step of indirection in the mutable case, since the Vector<Attribute> is no
2103         longer heap-allocated, but part of MutableElementAttributeData.
2104
2105         Added a WTF::deleteOwnedPtr(ElementAttributeData*) specialization so that the appropriate subclass
2106         destructor is called for these objects.
2107
2108         * WebCore.exp.in:
2109         * dom/Element.cpp:
2110         (WebCore::Element::createMutableAttributeData):
2111         * dom/ElementAttributeData.cpp:
2112         (WebCore::ElementAttributeData::createImmutable):
2113         (WebCore::ElementAttributeData::create):
2114         (WebCore::ElementAttributeData::ElementAttributeData):
2115         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
2116         (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
2117         (WebCore::ImmutableElementAttributeData::~ImmutableElementAttributeData):
2118         (WebCore::ElementAttributeData::makeMutableCopy):
2119         (WebCore::ElementAttributeData::addAttribute):
2120         (WebCore::ElementAttributeData::removeAttribute):
2121         (WebCore::ElementAttributeData::reportMemoryUsage):
2122         (WebCore::ElementAttributeData::cloneDataFrom):
2123         (WebCore::ElementAttributeData::clearAttributes):
2124         * dom/ElementAttributeData.h:
2125         (ElementAttributeData):
2126         (WebCore::ElementAttributeData::isMutable):
2127         (ImmutableElementAttributeData):
2128         (MutableElementAttributeData):
2129         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
2130         (WebCore::ElementAttributeData::immutableAttributeArray):
2131         (WebCore::ElementAttributeData::mutableAttributeVector):
2132         (WebCore::ElementAttributeData::length):
2133         (WebCore::ElementAttributeData::attributeItem):
2134
2135 2012-09-10  Tony Chang  <tony@chromium.org>
2136
2137         Remove stray spaces found after :: in case statements
2138         https://bugs.webkit.org/show_bug.cgi?id=96314
2139
2140         Reviewed by Ojan Vafai.
2141
2142         New contributors keep copy/pasting this style error and it makes me sad.
2143         Also remove the extra spaces in MediaQueryEvaluator.cpp.
2144
2145         No new tests, this is just a style refactor.
2146
2147         * css/CSSPrimitiveValue.cpp:
2148         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2149         (WebCore::unitCategory):
2150         * css/MediaQueryEvaluator.cpp:
2151         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
2152
2153 2012-09-10  Adam Barth  <abarth@webkit.org>
2154
2155         [V8] setNamedHiddenWindowReference doesn't need to be a special case
2156         https://bugs.webkit.org/show_bug.cgi?id=96198
2157
2158         Reviewed by Nate Chapin.
2159
2160         Prior to this patch, the DOMWindow cached its properties on the outter
2161         global object rather than on the Holder of the properties. (We cache
2162         properties to prevent their DOM wrappers from being garbage collected
2163         too early.) There doesn't seem to be any reason why DOMWindow need to
2164         be special-cased in this regard. We can just cache the properities on
2165         their Holders, as usual.
2166
2167         * bindings/scripts/CodeGeneratorV8.pm:
2168         (GenerateNormalAttrGetter):
2169         * bindings/v8/V8DOMWrapper.cpp:
2170         * bindings/v8/V8DOMWrapper.h:
2171         (V8DOMWrapper):
2172         * bindings/v8/custom/V8LocationCustom.cpp:
2173         * page/Location.idl:
2174             - Previously, Location had a custom toV8 function so that
2175               document.location would cache its wrapper in the same place as
2176               window.location. However, that's no longer necessary as the
2177               DOMWindow now holds its Document in a hidden property, which
2178               means the DOMWindow keeps the cached location property on
2179               Document alive anyway.
2180
2181 2012-09-10  Anders Carlsson  <andersca@apple.com>
2182
2183         Silence a warning when running update-webkit-localizable-strings
2184         https://bugs.webkit.org/show_bug.cgi?id=96307
2185
2186         Reviewed by John Sullivan.
2187
2188         Since both the blockedPluginByContentSecurityPolicyText and insecurePluginVersionText strings use exact the same wording,
2189         use WEB_UI_STRING_KEY to indicate that they are different.
2190
2191         * English.lproj/Localizable.strings:
2192         Update the localizable strings file.
2193
2194         * platform/LocalizedStrings.cpp:
2195         (WebCore::blockedPluginByContentSecurityPolicyText):
2196         (WebCore::insecurePluginVersionText):
2197
2198 2012-09-10  Adam Barth  <abarth@chromium.org>
2199
2200         [V8] V8HTMLDocument::write and friends should not indirect through Frame
2201         https://bugs.webkit.org/show_bug.cgi?id=96289
2202
2203         Reviewed by Eric Seidel.
2204
2205         There is no reason why document.write and friends need to indirect
2206         through the Frame to find the active document. This patch makes these
2207         functions work the same as the JSC versions.
2208
2209         * bindings/v8/BindingState.cpp:
2210         * bindings/v8/BindingState.h:
2211             - This patch removes the last callers of activeFrame, so we can
2212               remove the function entirely.
2213         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2214         (WebCore::V8HTMLDocument::writeCallback):
2215         (WebCore::V8HTMLDocument::writelnCallback):
2216         (WebCore::V8HTMLDocument::openCallback):
2217
2218 2012-09-10  Adam Barth  <abarth@chromium.org>
2219
2220         [V8] Constructors try to handle errors that cannot occur
2221         https://bugs.webkit.org/show_bug.cgi?id=96304
2222
2223         Reviewed by Kentaro Hara.
2224
2225         There's no reason for constructors to indirect through the Frame. Now
2226         that we can reliably get the Document from the v8::Context, we can just
2227         grab it without worrying about handling error conditions related to not
2228         being able to find the Document.
2229
2230         * bindings/scripts/CodeGeneratorV8.pm:
2231         (GenerateNamedConstructorCallback):
2232         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2233         (WebCore::V8TestNamedConstructorConstructorCallback):
2234         * bindings/v8/custom/V8AudioContextCustom.cpp:
2235         (WebCore::V8AudioContext::constructorCallback):
2236         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2237         (WebCore::v8HTMLImageElementConstructorCallback):
2238
2239 2012-09-10  Andrey Kosyakov  <caseq@chromium.org>
2240
2241         Web Inspector: highlight of paint rectangles is broken
2242         https://bugs.webkit.org/show_bug.cgi?id=96276
2243
2244         Reviewed by Vsevolod Vlasov.
2245
2246         * inspector/InspectorOverlay.cpp:
2247         (WebCore::InspectorOverlay::drawRectHighlight): Fix JS method name to match the one in InspectorOverlayPage.html
2248
2249 2012-09-10  Catalin Badea  <badea@adobe.com>
2250
2251         webkit build for 64-bit Mac chromium
2252         https://bugs.webkit.org/show_bug.cgi?id=95977
2253
2254         Reviewed by Eric Seidel.
2255
2256         Use the correct definitions for NS types in order to fix build issues for 64-bit chromium on mac.
2257
2258         * platform/chromium/PlatformSupport.h:
2259         Remove a deprecated Carbon typedef.
2260         * platform/graphics/FloatPoint.h:
2261         (FloatPoint):
2262         * platform/graphics/FloatRect.h:
2263         (FloatRect):
2264         * platform/graphics/FloatSize.h:
2265         (FloatSize):
2266         * platform/graphics/IntRect.h:
2267         (IntRect):
2268
2269 2012-09-10  Hans Muller  <hmuller@adobe.com>
2270
2271         [CSS Exlusions] add support for the basic shapes
2272         https://bugs.webkit.org/show_bug.cgi?id=95490
2273
2274         Reviewed by David Hyatt.
2275
2276         Initial commit of a subset of the ExclusionShape classes.
2277
2278         This set of classes enables the exclusions layout code to determine how to break up a line into segments
2279         that will fit within or around a shape, given the Y coordinates of the line's top edge and bottom edges.
2280         The ExclusionShape class represents BasicShapes whose coordinates have been resolved to actual values. It
2281         provides a pair of methods, getInsideIntervals() and getOutsideIntervals(), that return the line segments'
2282         start and end X coordinates, and a method that computes the shape's bounding box. The line segments'
2283         coordinates are represented by a Vector of ExclusionIntervals. ExclusionInterval is just a pair
2284         of X coordinates.
2285
2286         The other classes, ExclusionRectangle (and TBD ExclusionPolygon et al), are internal to the
2287         ExclusionShape implementation.
2288
2289         This is the initial version of the ExclusionShapes code and it's only being used to the limited extent WebKit
2290         currently supports shape-inside exclusions. It will be extended to support computing a minimal
2291         line segment's "first layout location" and other improvements, in tandem with the exclusions layout code.
2292
2293         No new tests have been added since this code just replaces a provisional implementation stub.
2294
2295         More information about the algorithms used by the ExclusionShapes classes can be found here: http://hansmuller-webkit.blogspot.com.
2296
2297         * CMakeLists.txt:
2298         * GNUmakefile.list.am:
2299         * Target.pri:
2300         * WebCore.gypi:
2301         * WebCore.vcproj/WebCore.vcproj:
2302         * WebCore.xcodeproj/project.pbxproj:
2303         * rendering/ExclusionInterval.cpp: Added.
2304         (WebCore):
2305         (WebCore::IntervalX1Comparator::operator()):
2306         Compare x1 ExclusionInterval fields.
2307         (WebCore::ExclusionInterval::intersect):
2308         Compute the intersection of this interval with another interval. Unlike merge/subtract,
2309         the result is always a single interval.
2310         (WebCore::sortExclusionIntervals):
2311         Sort a vector of intervals by their x1 (start) field.
2312         (WebCore::mergeExclusionIntervals):
2313         Union of two vectors of intervals.
2314         (WebCore::intersectExclusionIntervals):
2315         Intersecion of two vectors of intervals.
2316         (WebCore::subtractExclusionIntervals):
2317         Difference of two vectors of intervals.
2318
2319         * rendering/ExclusionInterval.h: Added.
2320         Represents the actual start and end coordinates of a horizontal line segment.
2321         (WebCore):
2322         (ExclusionInterval):
2323         (WebCore::ExclusionInterval::ExclusionInterval):
2324
2325         * rendering/ExclusionRectangle.cpp: Added.
2326         (WebCore):
2327         (WebCore::ellipseXIntercept):
2328         (WebCore::ExclusionRectangle::getOutsideIntervals):
2329         (WebCore::ExclusionRectangle::getInsideIntervals):
2330
2331         * rendering/ExclusionRectangle.h: Added.
2332         A subclass of ExclusionShape used to represent rounded rectangles, circles, and ellipses.
2333         (WebCore):
2334         (ExclusionRectangle)
2335         (WebCore::ExclusionRectangle::ExclusionRectangle):
2336         (WebCore::ExclusionRectangle::shapeBoundingBox):
2337
2338         * rendering/ExclusionShape.cpp: Added.
2339         (WebCore):
2340         (WebCore::createExclusionRectangle):
2341         (WebCore::createExclusionCircle):
2342         (WebCore::createExclusionEllipse):
2343         (WebCore::Exclusionhape::createExclusionShape):
2344         Creates an ExclusionShape given a BasicShape and the width/height of a border box.  Currently rounded
2345         rectangles, circles, and ellipses are supported.  Support for polygons will be included in the
2346         next patch.
2347
2348         * rendering/ExclusionShape.h: Added.
2349         The rest of the exclusions implementation will only depend on the definitions included by this file: ExclusionShape,
2350         and ExclusionInterval. ExclusionShape subclasses define shape-specific implementations of the methods that compute the
2351         horizontal intervals that fit within or around a specific shape, a shape's bounding box, and - in future
2352         revisions - other operations required by the exclusions implementation, like computing the first possible
2353         layout location within a shape. ExclusionShapes are created for BasicShape objects as needed, using the
2354         createExclusionShape() method.
2355         (WebCore):
2356         (ExclusionShape):
2357         (WebCore::ExclusionShape::~ExclusionShape):
2358
2359         * rendering/WrapShapeInfo.cpp:
2360         (WebCore::WrapShapeInfo::computeShapeSize):
2361         Create an ExclusionShape for the RenderBlock's BasicShape.
2362         (WebCore::WrapShapeInfo::computeSegmentsForLine):
2363         Use ExclusionShape::getInsideIntervals() to compute the shape-inside intervals within which a line will fit.
2364
2365         * rendering/WrapShapeInfo.h:
2366         (WebCore::WrapShapeInfo::shapeTop):
2367         Removed - no longer used.
2368         (WrapShapeInfo):
2369         (WebCore::WrapShapeInfo::lineState):
2370         Use the ExclusionShape's bounding box to compute lineState.
2371
2372 2012-09-07  Jer Noble  <jer.noble@apple.com>
2373
2374         <audio> and <video> should send Do Not Track when appropriate
2375         https://bugs.webkit.org/show_bug.cgi?id=96134
2376
2377         Reviewed by Eric Carlson.
2378
2379         Add a FrameLoaderClient function to determine whether the DNT header should be sent,
2380         and plumb that new function down into the MediaPlayerPrivateAVFoundationObjC class.
2381
2382         Test: http/tests/media/video-donottrack.html
2383
2384         * html/HTMLMediaElement.cpp:
2385         (WebCore::HTMLMediaElement::mediaPlayerShouldSendDoNotTrackHTTPHeader):
2386             Pass the question on through to the FrameLoaderClient.
2387         * html/HTMLMediaElement.h:
2388         * loader/FrameLoaderClient.h:
2389         (WebCore::FrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
2390             Call through to the implementation in WebKit or WebKit2.
2391         * platform/graphics/MediaPlayer.h:
2392         (WebCore::MediaPlayerClient::mediaPlayerShouldSendDoNotTrackHTTPHeader):
2393             Pass the question on to the HTMLMediaElement.
2394         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2395         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2396             If we should send the DNT header, add it to the header options array
2397             when creating the AVAsset.
2398
2399 2012-08-31  Jon Lee  <jonlee@apple.com>
2400
2401         The options dictionary in Notification constructor should not accept event listeners
2402         https://bugs.webkit.org/show_bug.cgi?id=95538
2403         <rdar://problem/12213901>
2404
2405         Reviewed by Alexey Proskuryakov.
2406
2407         The latest spec only allows setting the event listeners after the notification has been created.
2408
2409         Test: http/tests/notifications/events-in-dictionary.html
2410
2411         * Modules/notifications/Notification.cpp:
2412         (WebCore::Notification::create): Do not look for the event handlers in the options dictionary.
2413
2414 2012-09-04  Robert Hogan  <robert@webkit.org>
2415
2416         CSS 2.1 failure: content-counter-010.htm fails
2417         https://bugs.webkit.org/show_bug.cgi?id=81447
2418
2419         Reviewed by Alexey Proskuryakov.
2420
2421         Test: fast/css/content-counter-010.htm
2422
2423         Per http://lists.w3.org/Archives/Public/public-css-testsuite/2010Nov/0064.html, the correct rendering of 
2424         7000 to 7999 in Armenian changed in Nov 2010. Update implementation to match the revised spec.
2425        
2426         * rendering/RenderListMarker.cpp:
2427         (WebCore::toArmenianUnder10000):
2428
2429 2012-09-10  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2430
2431         Font value should be parsed as a individual property
2432         https://bugs.webkit.org/show_bug.cgi?id=96271
2433
2434         Reviewed by Eric Seidel.
2435
2436         Parsing the font value as an individual CSS property instead of a style
2437         body should make it significantly more effective and will not
2438         validate something like ctx.font = "25px serif; background: green".
2439
2440         Updated canvas/philip/tests/2d.text.font.parse.invalid.html to cover
2441         this use case.
2442
2443         * html/canvas/CanvasRenderingContext2D.cpp:
2444         (WebCore::CanvasRenderingContext2D::setFont):
2445
2446 2012-09-10  Silvia Pfeiffer  <silviapf@chromium.org>
2447
2448         [Chromium] Handle smaller sizes of media elements in media controls.
2449         https://bugs.webkit.org/show_bug.cgi?id=89344
2450
2451         Reviewed by Eric Carlson.
2452
2453         The redesign of the Chrome video controls calls for successive removal of individual
2454         elements in the Chrome video and audio controls as the element becomes smaller in width.
2455         It also requires decreasing padding on the enclosure element of videos.
2456
2457         This patch introduces a layout() function into the MediaControlRootElementChromium to
2458         react to any changes of the media controls width and appropriately hide/show the
2459         interactive elements and apply the correct padding on video elements.
2460
2461         Tests: platform/chromium/media/controls-audio-sizes.html
2462                platform/chromium/media/controls-video-sizes-padding.html
2463                platform/chromium/media/controls-video-sizes.html
2464
2465         * html/shadow/MediaControlRootElementChromium.cpp:
2466         (WebCore):
2467         (RenderMediaControlPanelEnclosureElement):
2468         Introduce a renderer for the MediaControlPanelEnclosureElement in which to deal with the layout changes.
2469         Following the pattern in MediaControlElements.cpp .
2470         (WebCore::RenderMediaControlPanelEnclosureElement::RenderMediaControlPanelEnclosureElement):
2471         Definition of the new RenderMediaControlPanelEnclosureElement class.
2472         (WebCore::RenderMediaControlPanelEnclosureElement::layout):
2473         Definition of the layout() function for the renderer. This does most of the actual work.
2474         (WebCore::MediaControlPanelEnclosureElement::createRenderer):
2475         Create the renderer for the MediaControlPanelEnclosureElement.
2476         (WebCore::MediaControlPanelEnclosureElement::updatePadding):
2477         Update padding as part of the MediaControlPanelEnclosureElement functions.
2478         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2479         Add a class property to store whether the duration and current time display are hidden.
2480         (WebCore::MediaControlRootElementChromium::reset):
2481         Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
2482         (WebCore::MediaControlRootElementChromium::playbackStarted):
2483         Include the hiding/showing of the timeline and time display into the updateTimeDisplay() function
2484         to reduce code duplication.
2485         (WebCore::MediaControlRootElementChromium::playbackProgressed):
2486         Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
2487         (WebCore::MediaControlRootElementChromium::playbackStopped):
2488         Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
2489         (WebCore::MediaControlRootElementChromium::updateTimeDisplay):
2490         Only show time display if not hidden. Add timeline update here to reduce code duplication/
2491         (WebCore::MediaControlRootElementChromium::hideVolumeSlider):
2492         New function to allow layout() function to hide the volume slider.
2493         (WebCore::MediaControlRootElementChromium::showTimeDisplay):
2494         New function to allow layout() function to show the time display.
2495         (WebCore::MediaControlRootElementChromium::hideTimeDisplay):
2496         New function to allow layout() function to hide the time display.
2497         (WebCore::MediaControlRootElementChromium::showMuteButton):
2498         New function to allow layout() function to show the mute button.
2499         (WebCore::MediaControlRootElementChromium::hideMuteButton):
2500         New function to allow layout() function to hide the mute button.
2501         (WebCore::MediaControlRootElementChromium::showFullscreenButton):
2502         New function to allow layout() function to show the fullscreen button.
2503         (WebCore::MediaControlRootElementChromium::hideFullscreenButton):
2504         New function to allow layout() function to hide the fullscreen button.
2505         (WebCore::MediaControlRootElementChromium::showTimeline):
2506         New function to allow layout() function to show the timeline.
2507         (WebCore::MediaControlRootElementChromium::hideTimeline):
2508         New function to allow layout() function to hide the timeline.
2509
2510         * html/shadow/MediaControlRootElementChromium.h:
2511         (MediaControlPanelEnclosureElement):
2512         Add a createRender() and a updatePadding() function to the MediaControlPanelEnclosureElement class.
2513         (MediaControlRootElementChromium):
2514         Add hide/show functions for volume slider, time display, mute button, fullscreen button and timeline.
2515         Add a class property to store whether the duration and current time display are hidden.
2516
2517 2012-09-10  Joanmarie Diggs  <jdiggs@igalia.com>
2518
2519         [GTK][a11y] editing/pasteboard/paste-blockquote-into-blockquote-4.html crashes
2520         https://bugs.webkit.org/show_bug.cgi?id=96199
2521
2522         Reviewed by Martin Robinson.
2523
2524         Added sanity check to correct erroneous assumption that there will
2525         always be a child object.
2526
2527         No new tests as the bug crashes two existing Layout Tests which should
2528         no longer crash as a result of this fix.
2529
2530         * accessibility/gtk/AccessibilityObjectAtk.cpp:
2531         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2532
2533 2012-09-10  Mike West  <mkwst@chromium.org>
2534
2535         Clarify the cause of console warnings generated by "cross-origin" access to sandboxed iframes.
2536         https://bugs.webkit.org/show_bug.cgi?id=64079
2537
2538         Reviewed by Adam Barth.
2539
2540         The error message generated when accessing cross-origin content is a bit
2541         too generic at the moment, which is misleading when the "cross-origin"
2542         nature of an access attempt isn't visible in the URLs that the error
2543         displays. Sandboxed iframes, for example, are put into unique origins by
2544         default, meaning that all access in or out are subject to cross-origin
2545         restrictions, even if the resources would otherwise be same-origin.
2546
2547         This patch improces the error message to explicitly point to sandboxing
2548         as the core of cross-origin requests when relevant. It adds a single new
2549         test to check access from parents to children, and relies on existing
2550         tests for access in the other direction.
2551
2552         Test: http/tests/security/sandboxed-iframe-blocks-access-from-parent.html
2553
2554         * page/DOMWindow.cpp:
2555         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
2556             Check 'isSandboxed(SandboxOrigin)' against the document and
2557             activeWindow when generating the error message. If one or the other
2558             is sandboxed, make that clear in the console warning.
2559
2560 2012-09-10  Tommy Widenflycht  <tommyw@google.com>
2561
2562         [chromium] MediaStream API: Remove the Descriptor postfix
2563         https://bugs.webkit.org/show_bug.cgi?id=96268
2564
2565         Reviewed by Adam Barth.
2566
2567         After consideration I realized that there is no need whatsoever in using the Descriptor prefix
2568         in the WekKit embedder API. Removed from WebRTCSessionDescription and WebRTCICECandidate to start with.
2569
2570         No code changes that affects functionality.
2571
2572         * WebCore.gypi:
2573         * platform/chromium/support/WebRTCICECandidate.cpp: Renamed from Source/WebCore/platform/chromium/support/WebRTCICECandidateDescriptor.cpp.
2574         (WebKit):
2575         (WebKit::WebRTCICECandidate::WebRTCICECandidate):
2576         (WebKit::WebRTCICECandidate::assign):
2577         (WebKit::WebRTCICECandidate::reset):
2578         (WebKit::WebRTCICECandidate::initialize):
2579         (WebKit::WebRTCICECandidate::operator PassRefPtr<WebCore::RTCIceCandidateDescriptor>):
2580         (WebKit::WebRTCICECandidate::candidate):
2581         (WebKit::WebRTCICECandidate::sdpMid):
2582         (WebKit::WebRTCICECandidate::sdpMLineIndex):
2583         * platform/chromium/support/WebRTCSessionDescription.cpp: Renamed from Source/WebCore/platform/chromium/support/WebRTCSessionDescriptionDescriptor.cpp.
2584         (WebKit):
2585         (WebKit::WebRTCSessionDescription::WebRTCSessionDescription):
2586         (WebKit::WebRTCSessionDescription::assign):
2587         (WebKit::WebRTCSessionDescription::reset):
2588         (WebKit::WebRTCSessionDescription::operator WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>):
2589         (WebKit::WebRTCSessionDescription::initialize):
2590         (WebKit::WebRTCSessionDescription::type):
2591         (WebKit::WebRTCSessionDescription::setType):
2592         (WebKit::WebRTCSessionDescription::sdp):
2593         (WebKit::WebRTCSessionDescription::setSDP):
2594         * platform/chromium/support/WebRTCSessionDescriptionRequest.cpp:
2595         (WebKit::WebRTCSessionDescriptionRequest::requestSucceeded):
2596         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2597         (WebCore::RTCPeerConnectionHandlerChromium::didGenerateICECandidate):
2598         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2599         (WebKit):
2600         (RTCPeerConnectionHandlerChromium):
2601
2602 2012-09-10  Pavel Podivilov  <podivilov@chromium.org>
2603
2604         Web Inspector: support empty entries in source maps.
2605         https://bugs.webkit.org/show_bug.cgi?id=96088
2606
2607         Reviewed by Vsevolod Vlasov.
2608
2609         Empty entries should be mapped to the compiled script.
2610
2611         * inspector/front-end/CompilerScriptMapping.js:
2612         (WebInspector.CompilerScriptMapping):
2613         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2614         (WebInspector.CompilerScriptMapping.prototype._reset):
2615         (WebInspector.SourceMapParser.prototype._parseMap):
2616
2617 2012-09-07  Andrey Kosyakov  <caseq@chromium.org>
2618
2619         Web Inspector: only display heap size statistics for timeline records when it makes sense
2620         https://bugs.webkit.org/show_bug.cgi?id=96119
2621
2622         Reviewed by Yury Semikhatsky.
2623
2624         - drop totalHeapSize from timeline records;
2625         - add usedHeapSizeDelta (not set if 0), for heap delta between start and end of the event;
2626         - only display memory details for events of scriping category or when delta is not 0;
2627
2628         * English.lproj/localizedStrings.js:
2629         * inspector/InspectorTimelineAgent.cpp:
2630         (WebCore::getUsedHeapSize):
2631         (WebCore):
2632         (WebCore::InspectorTimelineAgent::setHeapSizeStatistics):
2633         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2634         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2635         * inspector/InspectorTimelineAgent.h:
2636         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2637         (TimelineRecordEntry):
2638         * inspector/front-end/TimelinePresentationModel.js:
2639         (WebInspector.TimelinePresentationModel.Record.prototype.get usedHeapSizeDelta):
2640         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
2641
2642 2012-09-10  Simon Hausmann  <simon.hausmann@nokia.com>
2643
2644         [Qt] Drastically shorten length of commandline needed for JS bindings generator
2645         https://bugs.webkit.org/show_bug.cgi?id=96266
2646
2647         Reviewed by Kenneth Rohde Christiansen.
2648
2649         The generate-bindings script supports the SOURCE_ROOT environment variable for IDL include file
2650         lookups, which allows specifying relative include search directories.
2651
2652         * DerivedSources.pri:
2653
2654 2012-09-10  Kevin Funk  <kevin.funk@kdab.com>
2655
2656         [Qt] Fix deprecation failures if QT_NO_DEPRECATED enabled
2657         https://bugs.webkit.org/show_bug.cgi?id=96258
2658
2659         Reviewed by Simon Hausmann.
2660
2661         Sync with latest changes in Qt5.
2662
2663         * platform/qt/RenderThemeQt.cpp:
2664         * platform/qt/SharedTimerQt.cpp:
2665
2666 2012-09-10  Christophe Dumez  <christophe.dumez@intel.com>
2667
2668         [EFL] Create a toggle button for closed captions
2669         https://bugs.webkit.org/show_bug.cgi?id=96259
2670
2671         Reviewed by Kenneth Rohde Christiansen.
2672
2673         Add toggle button for closed captions to EFL's
2674         RenderTheme.
2675
2676         Test: media/video-controls-captions.html
2677
2678         * platform/efl/RenderThemeEfl.cpp:
2679         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
2680         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
2681         (WebCore):
2682         (WebCore::RenderThemeEfl::supportsClosedCaptioning):
2683         (WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
2684         * platform/efl/RenderThemeEfl.h:
2685         (RenderThemeEfl):
2686
2687 2012-09-10  Simon Hausmann  <simon.hausmann@nokia.com>
2688
2689         [TexMap] Fix compilation on Windows
2690         https://bugs.webkit.org/show_bug.cgi?id=96257
2691
2692         Reviewed by Noam Rosenthal.
2693
2694         TextureMapperGL uses near and far as variable names and unfortunately
2695         WinDefs.h on Windows has the nasty habit of unconditionally(!) defining
2696         near and far as empty macros. There's no way to prevent WinDefs.h from
2697         doing so. Instead we rename the variables. (Another option would've been to
2698         #undef)
2699
2700         * platform/graphics/texmap/TextureMapperGL.cpp:
2701
2702 2012-09-10  Alexander Pavlov  <apavlov@chromium.org>
2703
2704         Web Inspector: [Elements] Poor performance upon continuous attribute changes
2705         https://bugs.webkit.org/show_bug.cgi?id=96252
2706
2707         Reviewed by Vsevolod Vlasov.
2708
2709         The DOM tree is now updated after a non-zero timeout, and same node updates are coalesced rather than added into an array
2710         as many times as the DOM node has been tampered with during the update interval.
2711
2712         * inspector/front-end/ElementsTreeOutline.js:
2713         * inspector/front-end/utilities.js: Implement Map.prototype.size
2714
2715 2012-09-10  Mike West  <mkwst@chromium.org>
2716
2717         Warn authors about CSP directives ignored due to non-ASCII values.
2718         https://bugs.webkit.org/show_bug.cgi?id=96061
2719
2720         Reviewed by Adam Barth.
2721
2722         CSP defines directive values as VCHAR minus ';' and ','. Currently, we
2723         ignore these directives completely in CSPDirectiveList::parseDirective,
2724         but we don't warn authors. We ought to set their expectations correctly,
2725         and help them fix issues in their policy.
2726
2727         This patch adds a console warning for directives that are ignored, and
2728         points authors to the wonderful world of percent-encoding for situations
2729         where high-ASCII or Unicode (or whatever) characters are required.
2730
2731         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii.html
2732
2733         * page/ContentSecurityPolicy.cpp:
2734         (WebCore::CSPDirectiveList::parseDirective):
2735             Call ContentSecurityPolicy::reportInvalidDirectiveValueCharacter in
2736             order to report ignored directives.
2737         (WebCore::ContentSecurityPolicy::reportInvalidDirectiveValueCharacter):
2738         (WebCore):
2739         * page/ContentSecurityPolicy.h:
2740             Add new error message.
2741
2742 2012-09-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2743
2744         Unreviewed. Fix make distcheck.
2745
2746         * GNUmakefile.list.am: Add missing header files.
2747
2748 2012-09-10  Simon Hausmann  <simon.hausmann@nokia.com>
2749
2750         [Qt] Fix linking of QtWebKit.dll on Windows
2751         https://bugs.webkit.org/show_bug.cgi?id=96250
2752
2753         Reviewed by Kenneth Rohde Christiansen.
2754
2755         On Windows when using ANGLE, the DLL import library of EGL is called libEGL.lib instead of EGL.lib.
2756         However as it turns out we do not need to explicitly link against EGL, because when Qt is configured with ANGLE
2757         support it will do that automatically for us.
2758
2759         * WebCore.pri:
2760
2761 2012-09-10  Christophe Dumez  <christophe.dumez@intel.com>
2762
2763         [EFL] fast/forms/menulist-restrict-line-height.html is failing
2764         https://bugs.webkit.org/show_bug.cgi?id=94878
2765
2766         Reviewed by Kenneth Rohde Christiansen.
2767
2768         <select> element's text is no longer clipped when a CSS
2769         line-height is specified. The fix is the same as for
2770         Mac port in r24886.
2771
2772         Test: fast/forms/menulist-restrict-line-height.html
2773
2774         * platform/efl/RenderThemeEfl.cpp:
2775         (WebCore::RenderThemeEfl::adjustMenuListStyle):
2776
2777 2012-09-10  Kevin Funk  <kevin.funk@kdab.com>
2778
2779         Replace calls to QString::fromAscii which is deprecated in Qt5
2780         https://bugs.webkit.org/show_bug.cgi?id=96242
2781
2782         Reviewed by Simon Hausmann.
2783
2784         Replace with QString::fromLatin1 which does the same.
2785
2786         * bridge/qt/qt_runtime.cpp:
2787
2788 2012-09-09  Taiju Tsuiki  <tzik@chromium.org>
2789
2790         successCallback of ResolveLocalFileSystemURL should not be optional.
2791         https://bugs.webkit.org/show_bug.cgi?id=94802
2792
2793         Reviewed by Kent Tamura.
2794
2795         Spec says it should not optional.
2796         http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL-void-DOMString-url-EntryCallback-successCallback-ErrorCallback-errorCallback
2797
2798         Tests: fast/filesystem/entry-points-missing-arguments.html
2799
2800         * Modules/filesystem/DOMWindowFileSystem.idl:
2801         * Modules/filesystem/WorkerContextFileSystem.idl:
2802
2803 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2804
2805         Add StringBuilder::appendNumber() and use it
2806         https://bugs.webkit.org/show_bug.cgi?id=96030
2807
2808         Reviewed by Eric Seidel.
2809
2810         Also fix a bunch of append() vs. appendLiteral() issues in the surrounding code.
2811
2812         * Modules/websockets/WebSocketHandshake.cpp:
2813         (WebCore::hostName):
2814         * bindings/v8/ScriptController.cpp:
2815         (WebCore::resourceString):
2816         * css/FontFeatureValue.cpp:
2817         (WebCore::FontFeatureValue::customCssText):
2818         * dom/Position.cpp:
2819         (WebCore::Position::formatForDebugger):
2820         * dom/Range.cpp:
2821         (WebCore::Range::formatForDebugger):
2822         * html/FormController.cpp:
2823         (WebCore::FormKeyGenerator::formKey):
2824         * html/HTMLAnchorElement.cpp:
2825         (WebCore::appendServerMapMousePosition):
2826         * html/canvas/CanvasRenderingContext2D.cpp:
2827         (WebCore::CanvasRenderingContext2D::font):
2828         * inspector/IdentifiersFactory.cpp:
2829         (WebCore::IdentifiersFactory::addProcessIdPrefixTo):
2830         * page/FrameTree.cpp:
2831         (WebCore::FrameTree::uniqueChildName):
2832         * page/SecurityOrigin.cpp:
2833         (WebCore::SecurityOrigin::toRawString):
2834         * platform/Decimal.cpp:
2835         (WebCore::Decimal::toString):
2836         * platform/network/ProxyServer.cpp:
2837         (WebCore::appendProxyServerString):
2838         * platform/text/TextStream.cpp:
2839         (WebCore::TextStream::operator<<):
2840         * platform/text/TextStream.h:
2841         * rendering/RenderTreeAsText.cpp:
2842         (WebCore::nodePosition):
2843         * xml/XMLErrors.cpp:
2844         (WebCore::XMLErrors::appendErrorMessage):
2845
2846 2012-09-09  KyungTae Kim  <ktf.kim@samsung.com>
2847
2848         [EFL] Wrong rendering results for square-button-appearance.html
2849         https://bugs.webkit.org/show_bug.cgi?id=85493
2850
2851         Reviewed by Gyuyoung Kim.
2852
2853         A square-button is an element that has '-webkit-appearance: square-button' style.
2854         
2855         If it is a block element, 
2856         the RenderBlock::recomputeLogicalWidth recalculate the width from the padding values.
2857         
2858         But the recalculated width became wrong because the RenderThemeEfl::adjustSizeConstraints 
2859         called from RenderThemeEfl::adjustButtonStyle adds padding values for a button.
2860
2861         So, the adjustSizeConstraints must not be called for a square-button(SquareButtonPart).
2862
2863         Test : fast/css/square-button-appearance.html
2864
2865         * platform/efl/RenderThemeEfl.cpp:
2866         (WebCore::RenderThemeEfl::adjustButtonStyle): Call adjustSizeConstrains only for PushButtonPart and ButtonPart
2867
2868 2012-09-09  Jinwoo Song  <jinwoo7.song@samsung.com>
2869
2870         [EFL][WK2] Minibrowser locks up when right clicking editable filed
2871         https://bugs.webkit.org/show_bug.cgi?id=96074
2872
2873         Reviewed by Gyuyoung Kim.
2874
2875         WebProcess crashes when the context menu type is SubmenuType and non-CROSS_PLATFORM_CONTEXT_MENUS is used.
2876         It is because platformSubMenu() in the ContextMenuItemEfl.cpp returns null. This patch implements the setSubMenu()
2877         and platformSubMenu() to set and return the subMenuItems.
2878
2879         * platform/efl/ContextMenuItemEfl.cpp:
2880         (WebCore::ContextMenuItem::setSubMenu):
2881         (WebCore::ContextMenuItem::platformSubMenu):
2882         (WebCore):
2883
2884 2012-09-09  Kangil Han  <kangil.han@samsung.com>
2885
2886         Pass full target idl file path to CodeGenerator as a constructor argument.
2887         https://bugs.webkit.org/show_bug.cgi?id=96190
2888
2889         Reviewed by Kentaro Hara.
2890
2891         Passing idl file path to CodeGenerator would be useful because CodeGenerator* family could manipulate it when creating derived header and cpp files.
2892
2893         * bindings/scripts/CodeGenerator.pm:
2894         (new):
2895         (ProcessDocument):
2896         * bindings/scripts/generate-bindings.pl:
2897
2898 2012-09-09  Dan Bernstein  <mitz@apple.com>
2899
2900         Try to fix the build after r128006.
2901
2902         * dom/Element.cpp:
2903         (WebCore::Element::boundsInRootViewSpace): Updated for rename.
2904         (WebCore::Element::getBoundingClientRect): Ditto.
2905         * svg/SVGElement.cpp:
2906         (WebCore::SVGElement::getBoundingBox): Renamed boundingBox() to this, to avoid clashing
2907         with the virtual function on Node. The 'get' prefix also indicates that the result is
2908         returned in an out parameter.
2909         * svg/SVGElement.h:
2910         (SVGElement):
2911
2912 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2913
2914         Replace WTF::numberToString() with String::numberToStringECMAScript()
2915         https://bugs.webkit.org/show_bug.cgi?id=96130
2916
2917         Reviewed by Benjamin Poulain.
2918
2919         The String class provides a nice wrapper for this function
2920         in the meantime, so just use it to avoid code duplication.
2921
2922         * html/parser/HTMLParserIdioms.cpp:
2923         (WebCore::serializeForNumberType):
2924         * platform/Decimal.cpp:
2925         (WebCore::Decimal::fromDouble):
2926
2927 2012-09-09  Emil A Eklund  <eae@chromium.org>
2928
2929         Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
2930         https://bugs.webkit.org/show_bug.cgi?id=81413
2931
2932         Reviewed by David Hyatt.
2933
2934         Rename Node::getRect and getPixelSnappedRect to boundingBox and
2935         pixelSnappedBoundingBox respectively.
2936
2937         Remove overridden getRect method from ContainerNode as it calculates the
2938         same rect as the Node implementation but in a more complicated and
2939         error-prone way. Also remove the getUpperLeftCorner/getLowerRightCorner
2940         support functions as they are no longer needed.
2941
2942         No new tests, no change in functionality.
2943
2944         * accessibility/AccessibilitySlider.cpp:
2945         (WebCore::AccessibilitySliderThumb::elementRect):
2946         Update to call boundingBox.
2947
2948         * dom/ContainerNode.cpp:
2949         * dom/ContainerNode.h:
2950         Remove overridden getRect method and the getUpperLeftCorner/
2951         getLowerRightCorner support methods .
2952
2953         * dom/Element.cpp:
2954         (WebCore::Element::scrollIntoView):
2955         (WebCore::Element::scrollIntoViewIfNeeded):
2956         (WebCore::Element::updateFocusAppearance):
2957         Update to call boundingBox.
2958         
2959         * dom/Node.h:
2960         * dom/Node.cpp:
2961         (WebCore::Node::boundingBox):
2962         Rename getRect to boundingBox.
2963
2964         (WebCore::Node::pixelSnappedBoundingBox):
2965         Rename getPixelSnappedRect to pixelSnappedBoundingBox.
2966         
2967         * html/ColorInputType.cpp:
2968         (WebCore::ColorInputType::elementRectRelativeToRootView):
2969         * html/ValidationMessage.cpp:
2970         (WebCore::ValidationMessage::buildBubbleTree):
2971         * html/shadow/CalendarPickerElement.cpp:
2972         (WebCore::CalendarPickerElement::openPopup):
2973         * html/shadow/TextControlInnerElements.cpp:
2974         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
2975         * page/FrameView.cpp:
2976         (WebCore::FrameView::scrollElementToRect):
2977         (WebCore::FrameView::scrollToAnchor):
2978         * page/SpatialNavigation.cpp:
2979         (WebCore::nodeRectInAbsoluteCoordinates):
2980         Update to call boundingBox/pixelSnappedBoundingBox.
2981
2982 2012-09-09  Christopher Cameron  <ccameron@chromium.org>
2983
2984         [chromium] Do not delete texture backing structures on the main thread
2985         https://bugs.webkit.org/show_bug.cgi?id=96018
2986
2987         Reviewed by James Robinson.
2988
2989         Do not delete CCPrioritizedTexture::Backing structures on the main
2990         thread.  Instead, unlink them from their owning CCPrioritizedTexture
2991         in the main thread, and have the impl thread then delete all unlinked
2992         textures.
2993
2994         This is towards having the main thread not access the m_backings set,
2995         which will allow the impl thread to traverse that set when deleting
2996         resources in response to GPU memory management events.
2997
2998         Tested by existing eviction tests (CCLayerTreeHostTest's
2999         TestEvictTextures, LostContextAfterEvictTextures)
3000
3001         Fix a place where single thread proxy wasn't setting the main thread
3002         blocked state correctly.
3003
3004         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3005         (WebCore::CCLayerTreeHost::unlinkAllContentTextures):
3006         (WebCore):
3007         (WebCore::CCLayerTreeHost::deleteUnlinkedTextures):
3008         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3009         (CCLayerTreeHost):
3010         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
3011         (WebCore::CCPrioritizedTextureManager::clearAllMemory):
3012         (WebCore::CCPrioritizedTextureManager::unlinkAllBackings):
3013         (WebCore):
3014         (WebCore::CCPrioritizedTextureManager::deleteAllUnlinkedBackings):
3015         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
3016         (CCPrioritizedTextureManager):
3017         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3018         (WebCore::CCSingleThreadProxy::commitAndComposite):
3019         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3020         (WebCore::CCThreadProxy::beginFrame):
3021         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
3022
3023 2012-09-09  Andreas Kling  <kling@webkit.org>
3024
3025         EventListenerMap: Use Vector instead of HashMap as backend.
3026         <http://webkit.org/b/77982>
3027
3028         Reviewed by Geoff Garen.
3029
3030         Refactor EventListenerMap to store pair<AtomicString, EventListenerVector> in a Vector
3031         instead of using key/value HashMap stores. This is much more space efficient and actually
3032         faster since we were spending more time/effort managing the hash map than it costs us
3033         to iterate over and compare a couple of pointers. (It's very rare to have more than
3034         4 different event types registered in a single EventListenerMap.)
3035
3036         This gets rid of the slightly hacky optimization for nodes with listeners of a single type,
3037         reducing the complexity of EventListenerMap greatly.
3038
3039         ~1.1MB progression on Membuster. Also strong (20+ MB on larger patches) savings on WebKit
3040         bugzilla review pages, though they don't necessarily represent a common usecase.
3041
3042         * dom/EventListenerMap.cpp:
3043         (WebCore::EventListenerMap::contains):
3044         (WebCore::EventListenerMap::clear):
3045         (WebCore::EventListenerMap::eventTypes):
3046         (WebCore::EventListenerMap::add):
3047         (WebCore::EventListenerMap::remove):
3048         (WebCore::EventListenerMap::find):
3049         (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
3050         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
3051         (WebCore::EventListenerIterator::EventListenerIterator):
3052         (WebCore::EventListenerIterator::nextListener):
3053         * dom/EventListenerMap.h:
3054         (WebCore::EventListenerMap::isEmpty):
3055         (WebCore::EventListenerMapEntry::EventListenerMapEntry):
3056         (EventListenerMapEntry):
3057         (EventListenerMap):
3058         (EventListenerIterator):
3059
3060 2012-09-09  Lucas Forschler  <lforschler@apple.com>
3061
3062         Build Fix.  <rdar://problem/12260893>
3063         
3064         * platform/graphics/mac/WebGLLayer.mm:
3065
3066 2012-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3067
3068         Unreviewed, rolling out r127979.
3069         http://trac.webkit.org/changeset/127979
3070         https://bugs.webkit.org/show_bug.cgi?id=96217
3071
3072         Appears to have broken the windows and linux builds (Requested
3073         by jamesr_ on #webkit).
3074
3075         * bindings/scripts/CodeGeneratorV8.pm:
3076         (NativeToJSValue):
3077         * bindings/v8/V8DOMWrapper.h:
3078         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
3079         (V8DOMWrapper):
3080
3081 2012-09-09  James Robinson  <jamesr@chromium.org>
3082
3083         [chromium] webkit_platform should only be linked into the webkit target
3084         https://bugs.webkit.org/show_bug.cgi?id=96213
3085
3086         Reviewed by Adrienne Walker.
3087
3088         The Platform.gyp:webkit_platform target provides the implementation of several WEBKIT_EXPORTed symbols. It only
3089         makes sense as a target of WebKit.gyp:webkit, other targets shouldn't directly depend on it.
3090
3091         * WebCore.gyp/WebCore.gyp:
3092
3093 2012-09-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3094
3095         [EFL] Fix build break when MEDIA_STREAM is enabled.
3096         https://bugs.webkit.org/show_bug.cgi?id=96063
3097
3098         Unreviewed. Fix build break when MEDIA_STREAM is enabled.
3099
3100         * CMakeLists.txt:
3101
3102 2012-09-09  Adam Barth  <abarth@webkit.org>
3103
3104         [V8] convertEventTargetToV8Object doesn't need to be overloaded
3105         https://bugs.webkit.org/show_bug.cgi?id=96195
3106
3107         Reviewed by Kentaro Hara.
3108
3109         WTF::getPtr solves this problem for us.
3110
3111         * bindings/scripts/CodeGeneratorV8.pm:
3112         (NativeToJSValue):
3113         * bindings/v8/V8DOMWrapper.h:
3114         (V8DOMWrapper):
3115
3116 2012-09-09  Adam Barth  <abarth@webkit.org>
3117
3118         [V8] V8PerContextData holds m_context using a v8::Handle rather than a v8::Persistent
3119         https://bugs.webkit.org/show_bug.cgi?id=96193
3120
3121         Reviewed by Kentaro Hara.
3122
3123         There are two types of handles in V8: Local and Persistent. We are now
3124         permitted to keep Local handles in the heap because they get
3125         deallocated when the C++ stack unwinds and v8::HandleScope objects are
3126         destructed.
3127
3128         V8PerContextData holds its m_context using the non-specific v8::Handle
3129         type. If we used a Local handle here, we'd have a memory safety
3130         problem. Thankfully, we use a Persistent handle, which need to be
3131         allocated and freed manually.
3132
3133         This patch makes the type of V8PerContextData::m_context more specific
3134         to ensure that we never try to store a local handle in this variable.
3135         This patch should not have any behavior change because we were already
3136         storing a Persistent handle.
3137
3138         * bindings/v8/V8PerContextData.h:
3139         (WebCore::V8PerContextData::create):
3140         (WebCore::V8PerContextData::V8PerContextData):
3141         (V8PerContextData):
3142
3143 2012-09-09  Adam Barth  <abarth@webkit.org>
3144
3145         [V8] V8DOMWindowShell does not need to be RefCounted
3146         https://bugs.webkit.org/show_bug.cgi?id=96192
3147
3148         Reviewed by Kentaro Hara.
3149
3150         V8DOMWindowShell holds a raw Frame pointer, which would point to
3151         unallocated memory if any object that wasn't owned by the frame took a
3152         reference to a V8DOMWindowShell. Thankfully, the only object that takes
3153         a reference to the V8DOMWindowShell is ScriptController, which is owned
3154         by the Frame.
3155
3156         This patch stops V8DOMWindowShell from being RefCounted so that no
3157         other objects are tempted to take a reference to it in the future.
3158
3159         * bindings/v8/ScriptController.h:
3160         (ScriptController):
3161         * bindings/v8/V8DOMWindowShell.cpp:
3162         (WebCore::V8DOMWindowShell::create):
3163         * bindings/v8/V8DOMWindowShell.h:
3164         (V8DOMWindowShell):
3165
3166 2012-09-08  Adam Barth  <abarth@webkit.org>
3167
3168         [V8] unsafeHandleToCurrentWorldContext doesn't need to exist
3169         https://bugs.webkit.org/show_bug.cgi?id=96191
3170
3171         Reviewed by Kentaro Hara.
3172
3173         Previously, we used this function when instantiating DOM wrappers. Now
3174         we get the context from the creationContext, so we don't need access to
3175         this unsafe handle. This patch inlines the function into its one other
3176         caller.
3177
3178         * bindings/v8/ScriptController.cpp:
3179         (WebCore::ScriptController::currentWorldContext):
3180         * bindings/v8/ScriptController.h:
3181         (ScriptController):
3182
3183 2012-09-08  Benjamin Poulain  <bpoulain@apple.com>
3184
3185         Specialize nextBreakablePosition depending on breakNBSP
3186         https://bugs.webkit.org/show_bug.cgi?id=96042
3187
3188         Reviewed by Eric Seidel.
3189
3190         The speed of isBreakableSpace() is limited by the speed of the inner loop of nextBreakablePosition().
3191         The branches done to handle noBreakSpace can be simplified outside the loop
3192         to reduce the number of tests inside the loop.
3193
3194         This patch split the code of nextBreakablePosition() in two function, depending if breakNBSP is true
3195         or false.
3196
3197         If breakNBSP is true, isBreakableSpace() would return true on noBreakSpace.
3198         ->There is no need to test that value again for needsLineBreakIterator().
3199         ->There is no need to special case the switch() of isBreakableSpace() for noBreakSpace.
3200
3201         If breakNBSP is false:
3202         ->isBreakableSpace() does not need to test for noBreakSpace.
3203
3204         On x86_64, this improves PerformanceTests/Layout/line-layout.html by 2.8%.
3205
3206         * rendering/break_lines.cpp:
3207         (WebCore::isBreakableSpace):
3208         (WebCore::nextBreakablePositionIgnoringNBSP):
3209         (WebCore::nextBreakablePosition):
3210         * rendering/break_lines.h:
3211         (WebCore::isBreakable): Remove the default value for breakNBSP, no caller is using it.
3212
3213 2012-09-08  Adam Barth  <abarth@chromium.org>
3214
3215         [V8] DOM wrapper creation involves a bunch of sketchy code related to finding the Frame
3216         https://bugs.webkit.org/show_bug.cgi?id=96147
3217
3218         Reviewed by Eric Seidel.
3219
3220         Previously, we used the Frame when instantiating DOM wrappers. That's
3221         sketchy because not all DOM wrappers know how to find their Frame, and
3222         the Frame might be displaying a different document now anyway. This
3223         patch now gets all the information directly from the creation context.
3224
3225         In addition, this patch gets the proper creation context in a few more
3226         cases, including Location.
3227
3228         * bindings/scripts/CodeGeneratorV8.pm:
3229         (GetInternalFields):
3230         (GenerateNormalAttrGetter):
3231         (GenerateToV8Converters):
3232         (GenerateFunctionCallString):
3233         (NativeToJSValue):
3234         * bindings/scripts/test/V8/V8Float64Array.cpp:
3235         (WebCore::Float64ArrayV8Internal::fooCallback):
3236         (WebCore::V8Float64Array::wrapSlow):
3237         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3238         (WebCore::V8TestActiveDOMObject::wrapSlow):
3239         * bindings/scripts/test/V8/V8TestCallback.cpp:
3240         (WebCore::V8TestCallback::callbackWithClass1Param):
3241         (WebCore::V8TestCallback::callbackWithClass2Param):
3242         (WebCore::V8TestCallback::callbackWithStringList):
3243         (WebCore::V8TestCallback::callbackRequiresThisToPass):
3244         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3245         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3246         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3247         (WebCore::V8TestEventConstructor::wrapSlow):
3248         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3249         (WebCore::TestEventTargetV8Internal::itemCallback):
3250         (WebCore::V8TestEventTarget::wrapSlow):
3251         * bindings/scripts/test/V8/V8TestException.cpp:
3252         (WebCore::V8TestException::wrapSlow):
3253         * bindings/scripts/test/V8/V8TestInterface.cpp:
3254         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetter):
3255         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
3256         (WebCore::V8TestInterface::wrapSlow):
3257         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3258         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3259         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3260         (WebCore::V8TestNamedConstructor::wrapSlow):
3261         * bindings/scripts/test/V8/V8TestNode.cpp:
3262         (WebCore::V8TestNode::wrapSlow):
3263         * bindings/scripts/test/V8/V8TestObj.cpp:
3264         (WebCore::TestObjV8Internal::testObjAttrAttrGetter):
3265         (WebCore::TestObjV8Internal::XMLObjAttrAttrGetter):
3266         (WebCore::TestObjV8Internal::typedArrayAttrAttrGetter):
3267         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
3268         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
3269         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
3270         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
3271         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
3272         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
3273         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
3274         (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
3275         (WebCore::TestObjV8Internal::objMethodCallback):
3276         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
3277         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
3278         (WebCore::TestObjV8Internal::withScriptStateObjCallback):
3279         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
3280         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
3281         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
3282         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
3283         (WebCore::TestObjV8Internal::strictFunctionCallback):
3284         (WebCore::V8TestObj::wrapSlow):
3285         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3286         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3287         * bindings/v8/V8DOMWindowShell.cpp:
3288         (WebCore::V8DOMWindowShell::disposeContext):
3289         * bindings/v8/V8DOMWrapper.cpp:
3290         (WebCore::V8DOMWrapper::instantiateV8Object):
3291         * bindings/v8/V8DOMWrapper.h:
3292         (V8DOMWrapper):
3293         * bindings/v8/V8PerContextData.cpp:
3294         (WebCore):
3295         (WebCore::V8PerContextData::current):
3296         (WebCore::V8PerContextData::dispose):
3297         (WebCore::V8PerContextData::init):
3298         * bindings/v8/V8PerContextData.h:
3299         (V8PerContextData):
3300
3301 2012-09-08  Arvid Nilsson  <anilsson@rim.com>
3302
3303         [CSS Shaders] [BlackBerry] Refactor CustomFilterMesh and CustomFilter*Program
3304         https://bugs.webkit.org/show_bug.cgi?id=94725
3305
3306         Reviewed by George Staikos.
3307
3308         Separate the MeshGenerator from the CustomFilterMesh into
3309         CustomFilterMeshGenerator.h/cpp. This allows the BlackBerry port to
3310         reuse the mesh generator in its accelerated compositing implementation.
3311
3312         Also add support for creating a "PlatformCompiledProgram" from a
3313         CustomFilterValidatedProgram, so the BlackBerry port can reuse the
3314         shader validation code in its accelerated compositing implementation.
3315
3316         It turns out the GraphicsContext3D is not needed for ANGLE to function,
3317         so this patch removes an ASSERT that required a context before
3318         validating the shaders using ANGLE. This allows the BlackBerry port to
3319         reuse the validation code without triggering the assert. In the future,
3320         the validation code could be moved to a separate class to make it more
3321         obvious that it isn't really related to GraphicsContext3D.
3322
3323         In general, this refactoring can be useful for any port that uses
3324         OpenGL to implement accelerated compositing.
3325
3326         Inspired by an original patch by Joshua Netterfield.
3327
3328         No new tests, because this patch implements no new functionality.
3329
3330         * GNUmakefile.list.am:
3331         * Target.pri:
3332         * WebCore.gypi:
3333         * WebCore.vcproj/WebCore.vcproj:
3334         * WebCore.xcodeproj/project.pbxproj:
3335         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
3336         (WebCore::CustomFilterGlobalContext::getValidatedProgram):
3337         * platform/graphics/filters/CustomFilterMesh.cpp:
3338         (WebCore::CustomFilterMesh::CustomFilterMesh):
3339         * platform/graphics/filters/CustomFilterMeshGenerator.cpp: Added.
3340         (WebCore):
3341         (WebCore::CustomFilterMeshGenerator::CustomFilterMeshGenerator):
3342         (WebCore::CustomFilterMeshGenerator::addAttachedMeshIndex):
3343         (WebCore::CustomFilterMeshGenerator::generateAttachedMesh):
3344         (WebCore::CustomFilterMeshGenerator::addDetachedMeshVertexAndIndex):
3345         (WebCore::CustomFilterMeshGenerator::generateDetachedMesh):
3346         (WebCore::CustomFilterMeshGenerator::addPositionAttribute):
3347         (WebCore::CustomFilterMeshGenerator::addTexCoordAttribute):
3348         (WebCore::CustomFilterMeshGenerator::addMeshCoordAttribute):
3349         (WebCore::CustomFilterMeshGenerator::addTriangleCoordAttribute):
3350         (WebCore::CustomFilterMeshGenerator::addAttachedMeshVertexAttributes):
3351         (WebCore::CustomFilterMeshGenerator::addDetachedMeshVertexAttributes):
3352         (WebCore::CustomFilterMeshGenerator::dumpBuffers):
3353         * platform/graphics/filters/CustomFilterMeshGenerator.h: Added.
3354         (WebCore):
3355         (CustomFilterMeshGenerator):
3356         (WebCore::CustomFilterMeshGenerator::vertices):
3357         (WebCore::CustomFilterMeshGenerator::indices):
3358         (WebCore::CustomFilterMeshGenerator::points):
3359         (WebCore::CustomFilterMeshGenerator::pointsCount):
3360         (WebCore::CustomFilterMeshGenerator::tiles):
3361         (WebCore::CustomFilterMeshGenerator::tilesCount):
3362         (WebCore::CustomFilterMeshGenerator::indicesCount):
3363         (WebCore::CustomFilterMeshGenerator::floatsPerVertex):
3364         (WebCore::CustomFilterMeshGenerator::verticesCount):
3365         (WebCore::CustomFilterMeshGenerator::addTile):
3366         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
3367         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
3368         (WebCore::CustomFilterValidatedProgram::compiledProgram):
3369         (WebCore::CustomFilterValidatedProgram::~CustomFilterValidatedProgram):
3370         (WebCore):
3371         (WebCore::CustomFilterValidatedProgram::platformCompiledProgram):
3372         (WebCore::CustomFilterValidatedProgram::platformDestroy):
3373         * platform/graphics/filters/CustomFilterValidatedProgram.h:
3374         (WebCore):
3375         (CustomFilterValidatedProgram):
3376         * platform/graphics/filters/blackberry/CustomFilterValidatedProgramBlackBerry.cpp: Added.
3377         (WebCore):
3378         (WebCore::CustomFilterValidatedProgram::platformCompiledProgram):
3379         (WebCore::CustomFilterValidatedProgram::platformDestroy):
3380
3381 2012-09-07  Simon Hausmann  <simon.hausmann@nokia.com>
3382
3383         Fix the build of OpenGLShims on Windows
3384         https://bugs.webkit.org/show_bug.cgi?id=96123
3385
3386         Reviewed by Kenneth Rohde Christiansen.
3387
3388         OpenGL functions on Windows are generally defined as __stdcall, so we need to make sure
3389         that we declare our own "copies" of those functions with the same calling convention.
3390
3391         This is also required for the situation where we build against ANGLE, because then we
3392         initialize the function table entries with a direct assignment (entry = ::glMyFunction())
3393         and the assignment does not compile if the types don't match, i.e. if RHS has a different
3394         calling convention than LHS.
3395
3396         The approach chosen is basically the same as in the Khronos headers,
3397         using a GLAPIENTRY macro.
3398
3399         * platform/graphics/OpenGLShims.h:
3400
3401 2012-09-07  Benjamin Poulain  <bpoulain@apple.com>
3402
3403         Rename the ustring() accessor to string()
3404         https://bugs.webkit.org/show_bug.cgi?id=95919
3405
3406         Reviewed by Geoffrey Garen.
3407
3408         * bindings/js/Dictionary.cpp:
3409         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
3410         (WebCore::Dictionary::getOwnPropertyNames):
3411         * bindings/js/SerializedScriptValue.cpp:
3412         Simplify a few String constructions which were still using type conversion
3413         through StringImpl.
3414
3415         (WebCore::CloneSerializer::write):
3416         (WebCore::CloneDeserializer::CachedString::string):
3417         (WebCore::CloneDeserializer::readFile):
3418         (WebCore::CloneDeserializer::readTerminal):
3419         (WebCore::CloneDeserializer::deserialize):
3420         * bridge/NP_jsobject.cpp:
3421         (_NPN_Enumerate):
3422
3423 2012-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3424
3425         Unreviewed, rolling out r127955.
3426         http://trac.webkit.org/changeset/127955
3427         https://bugs.webkit.org/show_bug.cgi?id=96174
3428
3429         Hits an ASSERT (Requested by abarth on #webkit).
3430
3431         * bindings/scripts/CodeGeneratorV8.pm:
3432         (GetInternalFields):
3433         (GenerateNormalAttrGetter):
3434         (GenerateToV8Converters):
3435         (GenerateFunctionCallString):
3436         (NativeToJSValue):
3437         * bindings/scripts/test/V8/V8Float64Array.cpp:
3438         (WebCore::Float64ArrayV8Internal::fooCallback):
3439         (WebCore::V8Float64Array::wrapSlow):
3440         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3441         (WebCore::V8TestActiveDOMObject::wrapSlow):
3442         * bindings/scripts/test/V8/V8TestCallback.cpp:
3443         (WebCore::V8TestCallback::callbackWithClass1Param):
3444         (WebCore::V8TestCallback::callbackWithClass2Param):
3445         (WebCore::V8TestCallback::callbackWithStringList):
3446         (WebCore::V8TestCallback::callbackRequiresThisToPass):
3447         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3448         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3449         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3450         (WebCore::V8TestEventConstructor::wrapSlow):
3451         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3452         (WebCore::TestEventTargetV8Internal::itemCallback):
3453         (WebCore::V8TestEventTarget::wrapSlow):
3454         * bindings/scripts/test/V8/V8TestException.cpp:
3455         (WebCore::V8TestException::wrapSlow):
3456         * bindings/scripts/test/V8/V8TestInterface.cpp:
3457         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetter):
3458         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
3459         (WebCore::V8TestInterface::wrapSlow):
3460         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3461         (WebCore::V8TestMediaQueryListListener::wrapSlow):