[Qt] Remove unnecessary executeable bits after r116085
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-04  Zoltan Horvath  <zoltan@webkit.org>
2
3         [Qt] Remove unnecessary executeable bits after r116085
4
5         No new tests.
6
7         * Target.pri:
8         * WebCore.pri:
9         * platform/graphics/ImageSource.cpp:
10         * platform/graphics/ImageSource.h:
11         * platform/graphics/qt/ImageDecoderQt.cpp:
12         * platform/graphics/qt/ImageDecoderQt.h:
13         * platform/image-decoders/ImageDecoder.cpp:
14         * platform/image-decoders/ImageDecoder.h:
15
16 2012-05-04  Zoltan Horvath  <zoltan@webkit.org>
17
18         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
19         https://bugs.webkit.org/show_bug.cgi?id=80400
20
21         This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
22         The new behavior is to use QImageDecoder only if WebCoreImageDecoder doesn't support the requested
23         image type.
24         The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
25
26         This change adds build depedency for libpng-dev and libjpeg-dev packages, becuase PNG and JPEG imagedecoders
27         need not only these libraries, but their headers also. Qmake-config tests for these libraries were
28         introduced in r110045.
29
30         Reviewed by Simon Hausmann.
31
32         No new tests needed.
33
34         * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
35         * WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
36         * platform/MIMETypeRegistry.cpp:
37         (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
38         (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
39         * platform/graphics/ImageSource.cpp: Remove unnecessary includes.
40         * platform/graphics/ImageSource.h: Remove unnecessary typedefs.
41         (WebCore):
42         * platform/graphics/qt/ImageDecoderQt.cpp:
43         (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
44         (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
45         (WebCore):
46         (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
47         * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
48         (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder.
49         * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
50         (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
51         (ImageFrame):
52         * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
53         ImageDecoderQt.cpp.
54
55 2012-05-03  Ilya Tikhonovsky  <loislo@chromium.org>
56
57         Web Inspector: createRawLocationByURL is too slow if a big number of evals happen.
58         https://bugs.webkit.org/show_bug.cgi?id=85477
59
60         It iterates through all the _scripts even they have no url.
61         We can keep a separate map of scripts with url.
62
63         Reviewed by Yury Semikhatsky.
64
65         * inspector/front-end/DebuggerModel.js:
66         (WebInspector.DebuggerModel):
67         (WebInspector.DebuggerModel.prototype._globalObjectCleared):
68         (WebInspector.DebuggerModel.prototype._resetScriptsMap):
69         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
70         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
71
72 2012-05-03  David Barr  <davidbarr@chromium.org>
73
74         Antialias single-edge solid borders
75         https://bugs.webkit.org/show_bug.cgi?id=85031
76
77         Reviewed by Simon Fraser.
78
79         Antialiasing is avoided for adjacent edges due to artifacts at the seam.
80         There are no such artifacts for single-edge borders so enable antialiasing.
81
82         Test: fast/css/border-solid-single-edge-antialias.html
83
84         * rendering/RenderBoxModelObject.cpp:
85         (WebCore::RenderBoxModelObject::paintBorder):
86
87 2012-05-03  Adam Barth  <abarth@webkit.org>
88
89         CSP: Eval isn't blocked in about:blank subframes
90         https://bugs.webkit.org/show_bug.cgi?id=85553
91
92         Reviewed by Eric Seidel.
93
94         ContentSecurityPolicy has a back pointer to ScriptExecutionContext.
95         That means we shouldn't share a single ContentSecurityPolicy object
96         between multiple ScriptExecutionContexts.  This patch copies the state
97         from one ScriptExecutionContext to another rather than sharing the
98         ContentSecurityPolicy object itself.
99
100         This resulted in a subtle but w.r.t. blocking eval.  Because we block
101         eval by setting a bit in the JavaScript engine when enforcing the
102         policy, that bit wasn't copied along with the rest of the state when we
103         were sharing the ContentSecurityPolicy object.  Now that we use the
104         more robust ContentSecurityPolicy::copyStateFrom function, we don't
105         have that bug.
106
107         Test: http/tests/security/contentSecurityPolicy/eval-blocked-in-about-blank-iframe.html
108
109         * dom/Document.cpp:
110         (WebCore::Document::initSecurityContext):
111         (WebCore):
112         (WebCore::Document::initContentSecurityPolicy):
113         * dom/Document.h:
114         (Document):
115         * dom/SecurityContext.cpp:
116         (WebCore::SecurityContext::setContentSecurityPolicy):
117         * dom/SecurityContext.h:
118         (SecurityContext):
119         * loader/FrameLoader.cpp:
120         (WebCore::FrameLoader::didBeginDocument):
121         * page/ContentSecurityPolicy.h:
122         (WebCore::ContentSecurityPolicy::create):
123
124 2012-05-03  Abhishek Arya  <inferno@chromium.org>
125
126         Regression(r113769): Crash in AudioNodeOutput::disconnectAllParams.
127         https://bugs.webkit.org/show_bug.cgi?id=85196
128
129         Reviewed by Chris Rogers.
130
131         RefPtr the AudioParam hashset in AudioNodeOutput to prevent accessing
132         destroyed entries.
133
134         No new tests. Unable to reproduce it in DRT.
135
136         * Modules/webaudio/AudioNodeOutput.cpp:
137         (WebCore::AudioNodeOutput::disconnectAllParams):
138         * Modules/webaudio/AudioNodeOutput.h:
139         (AudioNodeOutput):
140
141 2012-05-03  Noel Gordon  <noel.gordon@gmail.com>
142
143         PNGImageDecoder: Clean up rowAvailable() some more
144         https://bugs.webkit.org/show_bug.cgi?id=85464
145
146         Reviewed by Eric Seidel.
147
148         No new tests. Covered by existing tests: fast/images/png-extra-row-crash.html in
149         particular.
150
151         * platform/image-decoders/png/PNGImageDecoder.cpp:
152         (WebCore::PNGImageDecoder::rowAvailable): Use colorChannels consistently. Split
153         the useful libpng comments in two, then place the early-out code and conditions
154         inbetween. The png variable is only used in one place so move it there.
155
156 2012-05-03  Ojan Vafai  <ojan@chromium.org>
157
158         Histogram total allocated bytes in the arena in addition to the render tree size
159         https://bugs.webkit.org/show_bug.cgi?id=85537
160
161         Reviewed by Eric Seidel.
162
163         We only free bytes allocated to a RenderArena when destroying the Document.
164         Histogram both the render tree size and the total bytes allocated. This
165         gives a better sense of the overhead of RenderArena as well as giving a more
166         accurate number for the amount of actual memory used by the render tree.
167
168         No new tests. This is not webfacing, so this can't be tested without adding
169         API to layout test controller, which doesn't seem worth it for this code.
170
171         * page/Page.cpp:
172         (WebCore::Page::renderTreeSize):
173         (WebCore::Page::setVisibilityState):
174         * page/Page.h:
175         (Page):
176         * platform/Arena.cpp:
177         (WebCore::ArenaAllocate):
178         * platform/Arena.h:
179         (WebCore):
180         * rendering/RenderArena.cpp:
181         (WebCore::RenderArena::allocate):
182         * rendering/RenderArena.h:
183         (WebCore::RenderArena::totalRenderArenaAllocatedBytes):
184         (RenderArena):
185
186 2012-05-03  Mary Wu  <mary.wu@torchmobile.com.cn>
187
188         [BlackBerry] Add missed member in CrossThreadResourceRequestData
189         https://bugs.webkit.org/show_bug.cgi?id=85448
190
191         Reviewed by Antonio Gomes.
192
193         * platform/network/blackberry/ResourceRequest.h:
194         (CrossThreadResourceRequestData):
195         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
196         (WebCore::ResourceRequest::doPlatformCopyData):
197         (WebCore::ResourceRequest::doPlatformAdopt):
198
199 2012-05-03  Adam Barth  <abarth@webkit.org>
200
201         CSP shouldn't block about:blank for iframes
202         https://bugs.webkit.org/show_bug.cgi?id=85233
203
204         Reviewed by Eric Seidel.
205
206         As discussed at the W3C WebAppSec face-to-face meeting, there's no
207         point in blocking about:blank iframes or objects because blocking a
208         frame or object just results in displaying about:blank anyway.  This
209         patch just removes the spurious console message and violation report.
210
211         Test: http/tests/security/contentSecurityPolicy/frame-src-about-blank-allowed-by-default.html
212
213         * page/ContentSecurityPolicy.cpp:
214         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
215         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
216
217 2012-05-03  Sheriff Bot  <webkit.review.bot@gmail.com>
218
219         Unreviewed, rolling out r116040.
220         http://trac.webkit.org/changeset/116040
221         https://bugs.webkit.org/show_bug.cgi?id=85559
222
223         Broke a few IndexedDB browsertests (Requested by zhenyao on
224         #webkit).
225
226         * Modules/indexeddb/IDBCursor.cpp:
227         (WebCore::IDBCursor::direction):
228         * Modules/indexeddb/IDBCursor.h:
229         (IDBCursor):
230         * Modules/indexeddb/IDBCursor.idl:
231         * Modules/indexeddb/IDBDatabase.cpp:
232         (WebCore::IDBDatabase::transaction):
233         (WebCore):
234         * Modules/indexeddb/IDBDatabase.h:
235         * Modules/indexeddb/IDBDatabase.idl:
236         * Modules/indexeddb/IDBIndex.cpp:
237         (WebCore::IDBIndex::openCursor):
238         (WebCore::IDBIndex::openKeyCursor):
239         * Modules/indexeddb/IDBIndex.h:
240         (WebCore::IDBIndex::openCursor):
241         (WebCore::IDBIndex::openKeyCursor):
242         * Modules/indexeddb/IDBIndex.idl:
243         * Modules/indexeddb/IDBObjectStore.cpp:
244         (WebCore::IDBObjectStore::openCursor):
245         * Modules/indexeddb/IDBObjectStore.h:
246         (WebCore::IDBObjectStore::openCursor):
247         (IDBObjectStore):
248         * Modules/indexeddb/IDBObjectStore.idl:
249         * Modules/indexeddb/IDBRequest.cpp:
250         (WebCore::IDBRequest::IDBRequest):
251         (WebCore::IDBRequest::readyState):
252         (WebCore::IDBRequest::markEarlyDeath):
253         (WebCore::IDBRequest::resetReadyState):
254         (WebCore::IDBRequest::abort):
255         (WebCore::IDBRequest::finishCursor):
256         (WebCore::IDBRequest::onSuccess):
257         (WebCore::IDBRequest::stop):
258         * Modules/indexeddb/IDBRequest.h:
259         * Modules/indexeddb/IDBRequest.idl:
260         * Modules/indexeddb/IDBTransaction.cpp:
261         (WebCore::IDBTransaction::mode):
262         * Modules/indexeddb/IDBTransaction.h:
263         (IDBTransaction):
264         * Modules/indexeddb/IDBTransaction.idl:
265
266 2012-05-03  Raphael Kubo da Costa  <rakuco@webkit.org>
267
268         [CMake] Rewrite FindCairo.cmake.
269         https://bugs.webkit.org/show_bug.cgi?id=84895
270
271         Reviewed by Daniel Bates.
272
273         The old approach relied on pkg-config for finding Cairo (which
274         introduced a dependency on pkg-config that could be avoided), used
275         the LibFindMacros code that we should probably remove in the
276         future and did not use the FindPackageHandleStandardArguments
277         module.
278
279         Change all that by rewriting the module.
280         - Use the pkg-config output optionally instead of requiring it
281         like LibFindMacros did.
282         - Remove the implicit dependency on FreeType which often found it
283         the wrong way via pkg-config and without considering
284         CMAKE_PREFIX_PATH.
285         - Retrieve the Cairo version by looking at cairo-version.h instead
286         of relying on pkg-config. It requires some additional code for
287         checking if the desired version has been found, but that will not
288         be needed once we start depending on CMake 2.8.3 or later.
289
290         The only downside is that FPHSA sets <UPPERCASED_NAME>_FOUND
291         instead of <Name>_FOUND, and to keep things consistent
292         Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES
293         and CAIRO_INCLUDE_DIRS.
294
295         No new tests, build system change.
296
297         * PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.
298
299 2012-05-03  Anders Carlsson  <andersca@apple.com>
300
301         Focus ring only appears in top-left tile
302         https://bugs.webkit.org/show_bug.cgi?id=85556
303         <rdar://problem/11359656>
304
305         Reviewed by Simon Fraser.
306
307         It is sufficient to just apply the current CTM to the clip rect and set that as the focus ring clip rect.
308
309         * platform/graphics/mac/WebLayer.mm:
310         (drawLayerContents):
311
312 2012-05-03  Alec Flett  <alecflett@chromium.org>
313
314         IndexedDB: Replace numeric constants with strings
315         https://bugs.webkit.org/show_bug.cgi?id=84894
316
317         Reviewed by Tony Chang.
318
319         Test: storage/indexeddb/legacy-constants.html
320
321         Update IDBObjectStore.openCursor, IDBIndex.openCursor,
322         IDBIndex.openKeyCursor, IDBDatabase.transaction,
323         IDBCursor.direction, IDBTransaction.mode, and
324         IDBRequest.readyState to meet the latest spec. All of these APIs
325         now support string-based values in addition to the
326         legacy/deprecated enum-based values.
327
328         * Modules/indexeddb/IDBCursor.cpp:
329         (WebCore):
330         (WebCore::IDBCursor::direction):
331         (WebCore::IDBCursor::stringToDirection):
332         (WebCore::IDBCursor::directionToString):
333         * Modules/indexeddb/IDBCursor.h:
334         (IDBCursor):
335         * Modules/indexeddb/IDBCursor.idl:
336         * Modules/indexeddb/IDBDatabase.cpp:
337         (WebCore::IDBDatabase::transaction):
338         (WebCore):
339         * Modules/indexeddb/IDBDatabase.h:
340         (IDBDatabase):
341         * Modules/indexeddb/IDBDatabase.idl:
342         * Modules/indexeddb/IDBIndex.cpp:
343         (WebCore::IDBIndex::openCursor):
344         (WebCore):
345         (WebCore::IDBIndex::openKeyCursor):
346         * Modules/indexeddb/IDBIndex.h:
347         (WebCore::IDBIndex::openCursor):
348         (IDBIndex):
349         (WebCore::IDBIndex::openKeyCursor):
350         * Modules/indexeddb/IDBIndex.idl:
351         * Modules/indexeddb/IDBObjectStore.cpp:
352         (WebCore::IDBObjectStore::openCursor):
353         (WebCore):
354         * Modules/indexeddb/IDBObjectStore.h:
355         (WebCore::IDBObjectStore::openCursor):
356         (IDBObjectStore):
357         * Modules/indexeddb/IDBObjectStore.idl:
358         * Modules/indexeddb/IDBRequest.cpp:
359         (WebCore::IDBRequest::IDBRequest):
360         (WebCore::IDBRequest::readyState):
361         (WebCore::IDBRequest::markEarlyDeath):
362         (WebCore::IDBRequest::resetReadyState):
363         (WebCore::IDBRequest::abort):
364         (WebCore::IDBRequest::finishCursor):
365         (WebCore::IDBRequest::onSuccess):
366         (WebCore::IDBRequest::stop):
367         * Modules/indexeddb/IDBRequest.h:
368         * Modules/indexeddb/IDBRequest.idl:
369         * Modules/indexeddb/IDBTransaction.cpp:
370         (WebCore):
371         (WebCore::IDBTransaction::mode):
372         (WebCore::IDBTransaction::stringToMode):
373         (WebCore::IDBTransaction::modeToString):
374         * Modules/indexeddb/IDBTransaction.h:
375         (IDBTransaction):
376         * Modules/indexeddb/IDBTransaction.idl:
377
378 2012-05-03  Sam Weinig  <sam@webkit.org>
379
380         Add an eventPhase NONE constant
381         https://bugs.webkit.org/show_bug.cgi?id=85397
382
383         Reviewed by Anders Carlsson.
384
385         Updates existing tests.
386
387         * dom/Event.h:
388         * dom/Event.idl:
389         Add NONE constant.
390
391 2012-05-03  Tony Chang  <tony@chromium.org>
392
393         Height overflow when nesting multiple new Flexbox'es.
394         https://bugs.webkit.org/show_bug.cgi?id=83572
395
396         Reviewed by Ojan Vafai.
397
398         Test: css3/flexbox/nested-stretch.html
399
400         * rendering/RenderFlexibleBox.cpp:
401         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
402
403 2012-05-03  Julien Chaffraix  <jchaffraix@webkit.org>
404
405         ASSERT(!m_zOrderListsDirty) is triggering in Safari
406         https://bugs.webkit.org/show_bug.cgi?id=85512
407
408         Reviewed by Simon Fraser.
409
410         Unfortunately no test as I don't think the 2 cases are testable reliably.
411
412         A better fix would be to introduce some iterator that handle updating the
413         lists for you. For now, just adding the missing updateLayerListsIfNeeded()
414         calls.
415
416         * rendering/RenderLayerBacking.cpp:
417         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
418         * rendering/RenderLayerCompositor.cpp:
419         (WebCore::RenderLayerCompositor::layerHas3DContent):
420
421 2012-05-03  Philip Rogers  <pdr@google.com>
422
423         Fix numeric precision issue in SVG animations
424         https://bugs.webkit.org/show_bug.cgi?id=85502
425
426         Reviewed by Dirk Schulze.
427
428         r93938 had a bug where floating point numbers where compared exactly,
429         exposing a bug when floating point precision was not sufficient. This
430         change compares against an epsilon value to get around these precision
431         issues.
432
433         Test: svg/animations/animate-end-attribute-numeric-precision.html
434
435         * svg/animation/SVGSMILElement.cpp:
436         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
437
438 2012-05-03  Joshua Bell  <jsbell@chromium.org>
439
440         Fix coding style issues in IDBLevelDBCoding.cpp
441         https://bugs.webkit.org/show_bug.cgi?id=85536
442
443         Reviewed by Tony Chang.
444
445         No tests - just code formatting changes.
446
447         * Modules/indexeddb/IDBLevelDBCoding.cpp:
448         (WebCore::IDBLevelDBCoding::encodeIDBKey):
449         (WebCore::IDBLevelDBCoding::decodeIDBKey):
450         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
451         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
452
453 2012-04-30  Filip Pizlo  <fpizlo@apple.com>
454
455         PageCache autorelease should not wait until 3 seconds and 42 pages
456         https://bugs.webkit.org/show_bug.cgi?id=85254
457         <rdar://problem/11349613>
458
459         Reviewed by Geoffrey Garen.
460
461         No new tests, since there is no change in behavior.
462
463         * history/PageCache.cpp:
464         (WebCore):
465         (WebCore::PageCache::PageCache):
466         (WebCore::PageCache::releaseAutoreleasedPagesNowDueToTimer):
467         * history/PageCache.h:
468         (PageCache):
469
470 2012-05-03  Levi Weintraub  <leviw@chromium.org>
471
472         Unreviewed build fix for Mac WK2. Adding a mistakenly removed symbol back to WebCore.exp.in.
473
474         * WebCore.exp.in:
475
476 2012-05-03  Levi Weintraub  <leviw@chromium.org>
477
478         Unreviewed build fix for Qt after 116009. No changes in behavior.
479
480         * rendering/RenderTreeAsText.cpp:
481         (WebCore::RenderTreeAsText::writeRenderObject):
482
483 2012-05-03  W. James MacLean  <wjmaclean@chromium.org>
484
485         [chromium] Revise touchpad fling curve to use exponential curve, to improve feel and small fling performance.
486         https://bugs.webkit.org/show_bug.cgi?id=85530
487
488         Reviewed by Kenneth Russell.
489
490         Existing unit tests updated for new curve.
491
492         Modifies TouchpadFLingGestureCurve to use an exponential, rather than polynomial, curve.
493         This change appears to improve the overall feel of touchpad fling, and substantially
494         improves small-fling performance.
495
496         * platform/TouchpadFlingPlatformGestureCurve.cpp:
497         (WebCore::TouchpadFlingPlatformGestureCurve::create):
498         (WebCore):
499         (WebCore::position):
500         (WebCore::velocity):
501         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
502
503 2012-04-23  Levi Weintraub  <leviw@chromium.org> and Emil A Eklund <eae@chromium.org>
504
505         [meta] Switch away from integers representing pixels for layout/event handling/rendering
506         https://bugs.webkit.org/show_bug.cgi?id=60318
507
508         Reviewed by Eric Seidel.
509
510         Swapping the LayoutUnit backend to FractionalLayoutUnit from int.
511         
512         FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel.
513         We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction
514         between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off,
515         so FractionalLayoutUnits will effectively continue to act as integers.
516         
517         With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel
518         CSS values and applied zooming, and painting uses pixel-snapping to align these values
519         to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details.
520
521         In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree
522         to prepare for this change. This included a number of functions in LayoutTypes.h and
523         the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were
524         integers. Subsequent patches will remove unnecessary versions of these functions; see
525         http://webkit.org/b/84616 for tracking these changes.
526
527         Tests: fast/sub-pixel/client-width-height-snapping.html
528                fast/sub-pixel/layout-boxes-with-zoom.html
529                fast/sub-pixel/size-of-box-with-zoom.html
530
531         * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits.
532         * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header.
533         * css/CSSComputedStyleDeclaration.cpp:
534         (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int
535         to make use of extra precision before returning the pixel value.
536         * css/CSSPrimitiveValue.cpp:
537         (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion
538         when sub-pixel layout is enabled.
539         (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels.
540         * dom/Element.cpp:
541         (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before
542         adjusting to account for truncation when sub-pixel layout is enabled.
543         * page/SpatialNavigation.cpp:
544         (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs.
545         * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the
546         constant denominator to switch it between 1/1 and 1/60 depending on the feature flag.
547         * platform/Length.h: Changing the default type for value to float, and adding intValue
548         since this more closely matches usage in a sub-pixel layout world.
549         * platform/win/PopupMenuWin.cpp:
550         (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code
551         instead of LayoutUnits.
552         * rendering/InlineFlowBox.cpp:
553         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
554         * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits
555         to be FractionalLayoutUnits. Also updating stub methods with their proper implementations.
556         * rendering/PaintInfo.h:
557         (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the
558         FractionalLayoutUnit bounds.
559         * rendering/RenderBlockLineLayout.cpp:
560         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to
561         FractionalLayoutUnit's abs function instead of std::abs.
562         * rendering/RenderBoxModelObject.cpp:
563         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for
564         setting the phase of the background geometry before applying modulo from the tile size.
565         * rendering/RenderDeprecatedFlexibleBox.cpp:
566         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when
567         we have less than a pixel to distribute.
568         * rendering/RenderLayer.cpp:
569         (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the
570         LayoutRect equivalent.
571         * rendering/RenderLineBoxList.cpp:
572         (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs
573         instead of std::abs.
574         * rendering/RenderObject.cpp:
575         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto.
576         * rendering/RenderObject.h:
577         (WebCore): Removing unnecessary adjustForAbsoluteZoom function.
578         (WebCore::RenderObject::outlineSize): Outlines remain ints.
579         * rendering/RenderTableCell.cpp:
580         (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because
581         colWidthSum is a Length which uses floats.
582         * rendering/RenderThemeChromiumSkia.cpp:
583         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization
584         for max.
585         * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It
586         may be worth outputting float values in test expectations, but this isn't done with
587         the inline box tree yet, either.
588         * rendering/RenderTreeAsText.h:
589         (WebCore): Adding a FractionalLayoutPoint operator.
590         * rendering/RenderWidget.cpp:
591         (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching
592         absoluteContentBox to an IntRect, as this is what boundingBox returns.
593         * rendering/svg/SVGRenderTreeAsText.cpp:
594         (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results.
595
596 <<<<<<< .mine
597 2012-05-03  Levi Weintraub  <leviw@chromium.org> and Emil A Eklund <eae@chromium.org>
598
599         [meta] Switch away from integers representing pixels for layout/event handling/rendering
600         https://bugs.webkit.org/show_bug.cgi?id=60318
601
602         Reviewed by Eric Seidel.
603
604         Swapping the LayoutUnit backend to FractionalLayoutUnit from int.
605         
606         FractionalLayoutUnit is a new type that uses an integer that can represent a fraction of a
607         pixel. The ENABLE_SUBPIXEL_LAYOUT feature flags toggles this fraction between 1/1 and 1/60.
608         Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits
609         will effectively continue to act as integers.
610         
611         With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel
612         CSS values and applied zooming, and painting uses pixel-snapping to align these values
613         to pixels and prevent unwanted anti-aliasing. See http://trac.webkit.org/wiki/LayoutUnit for
614         details.
615
616         In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to
617         prepare for this change. This included a number of functions in LayoutTypes.h and the
618         IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. See
619         http://webkit.org/b/60318 for the exhaustive list of changes that were done in preparation
620         for this. Subsequent patches will remove unnecessary versions of these functions.
621         http://webkit.org/b/84616 tracks these changes.
622
623         Tests: fast/sub-pixel/client-width-height-snapping.html
624                fast/sub-pixel/layout-boxes-with-zoom.html
625                fast/sub-pixel/size-of-box-with-zoom.html
626
627         * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits.
628         * WebCore.order: Ditto.
629         * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header.
630         * css/CSSPrimitiveValue.cpp:
631         (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion
632         when sub-pixel layout is enabled.
633         * dom/Element.cpp:
634         (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before
635         adjusting to account for truncation when sub-pixel layout is enabled.
636         * rendering/mathml/RenderMathMLBlock.cpp:
637         (WebCore): Fixing a static initializer build error by moving an integer constant to be
638         an int.
639         * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits
640         to be FractionalLayoutUnits. Also updating stub methods with their proper implementations.
641         * rendering/PaintInfo.h:
642         (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the
643         FractionalLayoutUnit bounds. LayoutRect::infiniteRect() is the largest rectangle that can
644         be represented using LayoutUnits.
645         * rendering/RenderLayer.h:
646         (WebCore::ClipRect::operator!=): Add overload of != to fix complaining compilers when
647         * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It
648         may be worth outputting float values in test expectations, but this isn't done with
649         the inline box tree yet, either.
650         * rendering/RenderTreeAsText.h:
651         (WebCore): Adding a FractionalLayoutPoint operator.
652         * rendering/svg/SVGRenderTreeAsText.cpp:
653         (WebCore::writePositionAndStyle):
654         (WebCore): Adding a FractionalLayoutPoint operator.
655
656 =======
657 2012-05-03  Anders Carlsson  <andersca@apple.com>
658
659         Move repaint counter drawing code out into a separate function
660         https://bugs.webkit.org/show_bug.cgi?id=85539
661
662         Reviewed by Simon Fraser.
663
664         The majority of code in TileCache::drawLayer deals with drawing the repaint counter. Move this code out
665         into a separate function to make it more clear what drawLayer does.
666
667         * platform/graphics/ca/mac/TileCache.h:
668         (TileCache):
669         * platform/graphics/ca/mac/TileCache.mm:
670         (WebCore::TileCache::drawLayer):
671         (WebCore::TileCache::drawRepaintCounter):
672         (WebCore):
673
674 2012-05-03  Simon Fraser  <simon.fraser@apple.com>
675
676         Compositing 'requiresOwnBackingStore' logic caused new clip rect assertions
677         https://bugs.webkit.org/show_bug.cgi?id=85455
678
679         Reviewed by Dean Jackson.
680         
681         r114283 added logic that allows compositing layers to avoid allocating their own
682         backing store and to paint into an ancestor instead. However, that caused
683         assertions in RenderLayer::updateClipRects() about m_clipRectsRoot being
684         incorrect, because clip rect code assumed that compositing layers
685         always painted themselves.
686         
687         Fixed by calling paintsIntoCompositedAncestor() in RenderLayer::clippingRoot(),
688         so that clip rect computation matches painting.
689
690         I wasn't able to easily make a test that reproduces the assertion in DRT.
691
692         * rendering/RenderLayer.cpp:
693         (WebCore::RenderLayer::clippingRoot):
694
695 2012-05-03  Tim Horton  <timothy_horton@apple.com>
696
697         REGRESSION(99539): SVG <img> disregards page scale and device scale
698         https://bugs.webkit.org/show_bug.cgi?id=77237
699         <rdar://problem/10767413>
700
701         Reviewed by Simon Fraser.
702
703         Rename SVGImageCache::SizeAndZoom to SVGImageCache::SizeAndScales, as it carries more than just zoom now.
704
705         Pass the product of the device and page scales through everything that takes a SVGImageCache::SizeAndScales,
706         using it to inflate the size of the buffer created in lookupOrCreateBitmapImageForRenderer,
707         and to inflate the destination rectangle passed to SVGImage::draw, which will cause a transformation
708         on the context being drawn into.
709
710         Invalidate the SVGImageCache entry on device/page scale changes in addition to zoom changes.
711
712         This patch does not cause SVGImageCache to take into account scale caused by CSS transforms; that is tracked
713         separately by https://bugs.webkit.org/show_bug.cgi?id=85335.
714
715         Tests: svg/as-image/image-respects-deviceScaleFactor.html
716                svg/as-image/image-respects-pageScaleFactor.html
717
718         * loader/cache/CachedImage.cpp:
719         (WebCore::CachedImage::setContainerSizeForRenderer):
720         (WebCore::CachedImage::imageSizeForRenderer):
721         * svg/graphics/SVGImage.cpp:
722         (WebCore::SVGImage::drawSVGToImageBuffer):
723         * svg/graphics/SVGImage.h:
724         * svg/graphics/SVGImageCache.cpp:
725         (WebCore::SVGImageCache::~SVGImageCache):
726         (WebCore::SVGImageCache::removeRendererFromCache):
727         (WebCore::SVGImageCache::setRequestedSizeAndScales):
728         (WebCore::SVGImageCache::requestedSizeAndScales):
729         (WebCore::SVGImageCache::redraw):
730         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
731         * svg/graphics/SVGImageCache.h:
732         (WebCore::SVGImageCache::SizeAndScales::SizeAndScales):
733         (SizeAndScales):
734         (SVGImageCache):
735         (WebCore::SVGImageCache::ImageData::ImageData):
736         (ImageData):
737
738 2012-05-03  Fady Samuel  <fsamuel@chromium.org>
739
740         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
741         https://bugs.webkit.org/show_bug.cgi?id=70609
742
743         Reviewed by Kenneth Rohde Christiansen.
744
745         Make Viewport Attributes' layoutSize be a FloatRect to avoid rounding
746         too early, and the occasional off by one fixed layout dimensions.
747
748         * dom/ViewportArguments.cpp:
749         (WebCore::computeViewportAttributes):
750         * dom/ViewportArguments.h:
751         (ViewportAttributes):
752
753 2012-05-03  Joshua Bell  <jsbell@chromium.org>
754
755         IndexedDB: Handle generated keys up to 2^53
756         https://bugs.webkit.org/show_bug.cgi?id=85114
757
758         The spec defines the behavior for generated keys up to 2^53
759         (the maximum integer storable as an ECMAScript number) and
760         the error case when going beyond that. Ensure that we can
761         handle values up to that point and generate errors beyond.
762
763         Reviewed by Tony Chang.
764
765         Test: storage/indexeddb/key-generator.html
766
767         * Modules/indexeddb/IDBBackingStore.h:
768         (IDBBackingStore):
769         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
770         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
771         * Modules/indexeddb/IDBLevelDBBackingStore.h:
772         (IDBLevelDBBackingStore):
773         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
774         (WebCore::IDBObjectStoreBackendImpl::putInternal):
775         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
776         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
777         (IDBObjectStoreBackendImpl):
778
779 2012-05-03  Simon Fraser  <simon.fraser@apple.com>
780
781         Remove RenderLayerCompositor::didStartAcceleratedAnimation()
782         https://bugs.webkit.org/show_bug.cgi?id=85514
783
784         Reviewed by Antti Koivisto.
785         
786         Remove RenderLayerCompositor::didStartAcceleratedAnimation(), which is no longer
787         needed.
788
789         Code removal, no new tests.
790
791         * rendering/RenderLayerBacking.cpp:
792         (WebCore::RenderLayerBacking::startAnimation):
793         (WebCore::RenderLayerBacking::startTransition):
794         * rendering/RenderLayerCompositor.cpp:
795         * rendering/RenderLayerCompositor.h:
796
797 2012-05-03  Andreas Kling  <kling@webkit.org>
798
799         REGRESSION(r111387): CSSOM representation of 'background-image' values should be CSSPrimitiveValue.
800         <http://webkit.org/b/85500>
801
802         Reviewed by Antti Koivisto.
803
804         Use the cloneForCSSOM() mechanism in CSSValue to expose CSSImageValue to bindings as a URI
805         primitive value. This matches the specced behavior of computed image values, and restores our
806         previous behavior without having CSSImageValue subclass CSSPrimitiveValue.
807
808         Also added a failsafe return after the isCSSOMSafe() assertion in the JSC bindings, since it's
809         better to expose an incorrect return value than an insecurely shared one, should we have or add
810         bugs in this code.
811
812         * bindings/js/JSCSSValueCustom.cpp:
813         (WebCore::toJS):
814         * css/CSSImageValue.cpp:
815         (WebCore::CSSImageValue::cloneForCSSOM):
816         * css/CSSImageValue.h:
817         * css/CSSValue.cpp:
818         (WebCore::CSSValue::cloneForCSSOM):
819
820 2012-05-03  Keishi Hattori  <keishi@webkit.org>
821
822         Crash in HTMLFormControlElement::m_fieldSetAncestor
823         https://bugs.webkit.org/show_bug.cgi?id=85453
824
825         Reviewed by Kent Tamura.
826
827         Modified tests: fast/forms/datalist/datalist-child-validation.html
828                         fast/forms/form-control-element-crash.html
829
830         * html/HTMLFormControlElement.cpp:
831         (WebCore::HTMLFormControlElement::removedFrom): Only set the invalid ancestor flag.
832         The element will be detached from the document so there is no need to update the style.
833         And the validation message will be hidden by the blur event.
834         (WebCore::HTMLFormControlElement::willValidate): Because of the change to removedFrom,
835         m_ancestorsValid may be false.
836
837 2012-05-03  Simon Fraser  <simon.fraser@apple.com>
838
839         Keep overlap testing for compositing on pages with 3d transforms when possible
840         https://bugs.webkit.org/show_bug.cgi?id=62487
841
842         Reviewed by Antti Koivisto.
843         
844         Change RenderLayerCompositor to always use overlap testing when possible.
845
846         Rather than turn off overlap testing wholesale when encountering a non-affine
847         transform, or starting an accelerated transform animation, we constrain
848         the disabling of overlap testing to within overflow:hidden areas when possible.
849
850         Tests: compositing/layer-creation/overlap-animation.html
851                compositing/layer-creation/overlap-transforms.html
852
853         * rendering/RenderLayerBacking.cpp:
854         (WebCore::RenderLayerBacking::setCompositedBounds): Whitespace fix.
855         * rendering/RenderLayerCompositor.cpp:
856         (WebCore::CompositingState::CompositingState):
857         (CompositingState): Add a member boolean to track whether we're testing overlap. Add a copy
858         constructor.
859         (WebCore::RenderLayerCompositor::updateCompositingLayers): Initialize the 'testing overlap'
860         setting based on m_compositingConsultsOverlap (though this will always be true until removed
861         in a future commit).
862         (WebCore::RenderLayerCompositor::updateBacking): No longer turn off overlap testing
863         when we see a non-affine transform.
864         (WebCore::RenderLayerCompositor::computeCompositingRequirements): No need for the 'struct'
865         in the arguments.
866         Consult compositingState.m_testingOverlap to see if we want to test overlap.
867         Use the new CompositingState copy ctor for childState, but set m_subtreeIsCompositing to false
868         as before.
869         If this layer is composited, look to see if need to disable over lap testing based on
870         the transform or an animation.
871         Just as we propagate m_subtreeIsCompositing, we have to propagate m_testingOverlap=false
872         for the rest of the traverse.
873         If we've just processed a layer which clips compositing descendants, we can go back
874         to testing for overlap.
875         (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation): No need to do anything
876         here now. It will be removed in future.
877         (WebCore::RenderLayerCompositor::hasNonAffineTransform): No longer check
878         perspective here, since that doesn't affect whether _this_ layer should disable
879         overlap testing. Checking for a non-affine transform is sufficient.
880         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
881         New method to check if AnimationController is running a transform animation.
882         * rendering/RenderLayerCompositor.h:
883         (RenderLayerCompositor):
884
885 2012-05-03  Chris Fleizach  <cfleizach@apple.com>
886
887         accessibility/misspelled-attributed-string.html test sometimes throws exceptions
888         https://bugs.webkit.org/show_bug.cgi?id=85081
889
890         Reviewed by Darin Adler.
891
892         Add in more range checking in case we get back ranges from spell checking that are wrong.
893
894         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
895         (AXAttributeStringSetFont):
896         (AXAttributeStringSetColor):
897         (AXAttributeStringSetNumber):
898         (AXAttributeStringSetBlockquoteLevel):
899         (AXAttributeStringSetHeadingLevel):
900         (AXAttributeStringSetElement):
901
902 2012-05-03  Pavel Feldman  <pfeldman@chromium.org>
903
904         Web Inspector: move canonical mime type calculation to Resource
905         https://bugs.webkit.org/show_bug.cgi?id=85507
906
907         Reviewed by Yury Semikhatsky.
908
909         Drive-by: small refactoring that prepares code for formatter extraction.
910
911         * inspector/front-end/BreakpointsSidebarPane.js:
912         * inspector/front-end/DebuggerModel.js:
913         (WebInspector.DebuggerModel.prototype.createLiveLocation):
914         (WebInspector.DebuggerModel.prototype.rawLocationToUILocation):
915         * inspector/front-end/DebuggerPresentationModel.js:
916         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._uiSourceCodeForResource):
917         * inspector/front-end/NetworkManager.js:
918         (WebInspector.NetworkDispatcher.prototype._createNetworkRequest):
919         (get WebInspector):
920         * inspector/front-end/Resource.js:
921         (WebInspector.Resource.prototype.requestContent):
922         (WebInspector.Resource.prototype.canonicalMimeType):
923         (WebInspector.Resource.prototype._innerRequestContent.callback):
924         (WebInspector.Resource.prototype._innerRequestContent):
925         * inspector/front-end/ResourceView.js:
926         (WebInspector.ResourceSourceFrame.prototype.requestContent):
927         (WebInspector.ResourceSourceFrame.prototype._contentChanged):
928
929 2012-05-03  Yury Semikhatsky  <yurys@chromium.org>
930
931         Web Inspector: 'expires' value is incorrect for cookies
932         https://bugs.webkit.org/show_bug.cgi?id=85489
933
934         Reviewed by Pavel Feldman.
935
936         Fixed cookie 'expires' property type from integer to number so that
937         we don't lose precision when assembling Cookie parameter in InspectorResourceAgent.
938
939         * inspector/Inspector.json:
940
941 2012-05-03  Dan Bernstein  <mitz@apple.com>
942
943         highlight for Ruby text is mispositioned in the Web Inspector
944         https://bugs.webkit.org/show_bug.cgi?id=82684
945
946         Reviewed by Simon Fraser.
947
948         Tests: fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html
949                fast/writing-mode/flipped-blocks-inline-map-local-to-container.html
950
951         In flipped blocks writing modes, flipping was being applied twice to box descendants of
952         inline children of the flipped block, once during RenderBox::mapLocalToContainer, and then
953         again by RenderInline::mapLocalToContainer. The fix is to make the latter only apply the
954         flip to local coordinates originating in the inline or a descendant inline. This is done
955         by adding a parameter of type ApplyContainerFlipOrNot, which defaults to ApplyContainerFlip
956         but is reset to DoNotApplyContainerFlip in recursive calls into mapLocalToContainer().
957
958         * rendering/RenderBox.cpp:
959         (WebCore::RenderBox::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing
960         DoNotApplyContainerFlip when recursing into the container.
961         * rendering/RenderBox.h:
962
963         * rendering/RenderInline.cpp:
964         (WebCore::RenderInline::mapLocalToContainer): Added ApplyContainerFlipOrNot paramerer, and
965         made the flipping conditional on its value.
966
967         * rendering/RenderInline.h:
968
969         * rendering/RenderObject.cpp:
970         (WebCore::RenderObject::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter,
971         passing DoNotApplyContainerFlip when recursing into the container.
972         (WebCore::RenderObject::localToContainerQuad): Pass ApplyContainerFlip.
973         (WebCore::RenderObject::localToContainerPoint): Ditto.
974         * rendering/RenderObject.h:
975
976         * rendering/RenderView.cpp:
977         (WebCore::RenderView::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter.
978         * rendering/RenderView.h:
979
980         * rendering/svg/RenderSVGForeignObject.cpp:
981         (WebCore::RenderSVGForeignObject::mapLocalToContainer): Ditto.
982         * rendering/svg/RenderSVGForeignObject.h:
983
984         * rendering/svg/RenderSVGInline.cpp:
985         (WebCore::RenderSVGInline::mapLocalToContainer): Ditto.
986         * rendering/svg/RenderSVGInline.h:
987
988         * rendering/svg/RenderSVGModelObject.cpp:
989         (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto.
990         * rendering/svg/RenderSVGModelObject.h:
991
992         * rendering/svg/RenderSVGRoot.cpp:
993         (WebCore::RenderSVGRoot::mapLocalToContainer): Ditto.
994         * rendering/svg/RenderSVGRoot.h:
995
996         * rendering/svg/RenderSVGText.cpp:
997         (WebCore::RenderSVGText::mapLocalToContainer): Ditto.
998         * rendering/svg/RenderSVGText.h:
999
1000         * rendering/svg/SVGRenderSupport.cpp:
1001         (WebCore::SVGRenderSupport::mapLocalToContainer): Pass DoNotApplyContainerFlip when
1002         recursing into the parent.
1003
1004 2012-05-03  Pavel Feldman  <pfeldman@chromium.org>
1005
1006         Web Inspector: make Script a ContentProvider.
1007         https://bugs.webkit.org/show_bug.cgi?id=85486
1008
1009         Reviewed by Yury Semikhatsky.
1010
1011         This allows us to get rid of the corresponding content provider wrapper.
1012
1013         * inspector/front-end/ContentProviders.js:
1014         * inspector/front-end/RawSourceCode.js:
1015         (WebInspector.RawSourceCode.prototype._createContentProvider):
1016         * inspector/front-end/Script.js:
1017         (WebInspector.Script.prototype.contentURL):
1018         (WebInspector.Script.prototype.requestContent.didGetScriptSource):
1019         (WebInspector.Script.prototype.requestContent):
1020         * inspector/front-end/SnippetsModel.js:
1021         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
1022
1023 2012-05-03  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1024
1025         Remove extra checks for empty string when parsing CSS value
1026         https://bugs.webkit.org/show_bug.cgi?id=85480
1027
1028         Reviewed by Alexis Menard.
1029
1030         Each parse value helper function was checking whether the value string was empty. For the
1031         common case this check is already done by StylePropertySet::setProperty(). So this patch
1032         make CSSParser::parseValue() assume the value string is not empty, and fix the other two
1033         clients.
1034
1035         Test: fast/html/font-face-empty-should-not-crash.html
1036
1037         * css/CSSParser.cpp:
1038         (WebCore::parseColorValue): Replace the string empty check by an ASSERT() to document
1039         function's expectations.
1040         (WebCore::parseSimpleLengthValue): Ditto.
1041         (WebCore::parseKeywordValue): Ditto.
1042         (WebCore::CSSParser::parseFontFaceValue): This will be covered by the added test.
1043         (WebCore::CSSParser::parseValue):
1044         * css/WebKitCSSMatrix.cpp:
1045         (WebCore::WebKitCSSMatrix::setMatrixValue): This is already covered by
1046         transforms/cssmatrix-2d-interface.xhtml.
1047
1048 2012-05-03  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1049
1050         Broken handling of pseudo-elements in selectors API
1051         https://bugs.webkit.org/show_bug.cgi?id=83446
1052
1053         Reviewed by Antti Koivisto.
1054
1055         Test: fast/dom/Window/querySelectorAll-with-pseudo-elements.html
1056
1057         * css/SelectorChecker.cpp:
1058         (WebCore::SelectorChecker::SelectorChecker):
1059         Setting the default value for the enum member m_mode to ResolvingStyle.
1060
1061         (WebCore::SelectorChecker::checkSelector):
1062         Instead of verifying against the bool m_isCollectingRulesOnly, we now check whether or not
1063         m_mode is set to ResolvingStyle.
1064
1065         (WebCore::SelectorChecker::checkOneSelector):
1066         Instead of verifying against the bool m_isCollectingRulesOnly, we now check whether or not
1067         m_mode is set to ResolvingStyle. Also, for the pseudo-elements case we check if its
1068         value is set to QueryingRules in which case we return false.
1069
1070         * css/SelectorChecker.h:
1071         (WebCore::SelectorChecker::mode):
1072         Returns the mode (m_mode) value.
1073
1074         (WebCore::SelectorChecker::setMode):
1075         Sets the mode (m_mode) to the passed enum value.
1076
1077         * css/StyleResolver.cpp:
1078         (WebCore::StyleResolver::sortAndTransferMatchedRules):
1079         (WebCore::StyleResolver::collectMatchingRulesForList):
1080         Retrieves SelectorChecker's mode value.
1081
1082         * dom/SelectorQuery.cpp:
1083         (WebCore::SelectorQuery::SelectorQuery):
1084         Sets SelectorChecker's mode to QueryingRules.
1085
1086         * html/shadow/ContentSelectorQuery.cpp:
1087         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
1088         Sets SelectorChecker's mode to CollectingRules.
1089
1090 2012-05-03  Pavel Feldman  <pfeldman@chromium.org>
1091
1092         Web Inspector: EXC_BAD_ACCESS in DOM breakpoint processing code.
1093         https://bugs.webkit.org/show_bug.cgi?id=85482
1094
1095         Reviewed by Yury Semikhatsky.
1096
1097         0 check added since we are guaranteed to get immediate parent, but not the whole ancestor tree.
1098
1099         * inspector/InspectorDOMDebuggerAgent.cpp:
1100         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
1101
1102 2012-05-03  Ilya Tikhonovsky  <loislo@chromium.org>
1103
1104         Web Inspector: compile time ambiguity happens when I try to assign a TypeBuilder object to an out argument.
1105         https://bugs.webkit.org/show_bug.cgi?id=85462
1106
1107         It happens because we have type casting operators for both types RefPtr<*Type*> and PassRefPtr<*Type*>.
1108         I think we can drop PassRefPtr type casting operator and use a named function 'release'.
1109
1110         Reviewed by Yury Semikhatsky.
1111
1112         * inspector/CodeGeneratorInspector.py:
1113         * inspector/ContentSearchUtils.cpp:
1114         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
1115         * inspector/InspectorApplicationCacheAgent.cpp:
1116         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
1117         * inspector/InspectorPageAgent.cpp:
1118         (WebCore::buildObjectForCookie):
1119         (WebCore::buildObjectForSearchResult):
1120         * inspector/InspectorResourceAgent.cpp:
1121         (WebCore::buildObjectForTiming):
1122         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1123         * inspector/ScriptCallFrame.cpp:
1124         (WebCore::ScriptCallFrame::buildInspectorObject):
1125
1126 2012-05-03  Yury Semikhatsky  <yurys@chromium.org>
1127
1128         Web Inspector: crash in InspectorResourceAgent::didReceiveWebSocketFrame
1129         https://bugs.webkit.org/show_bug.cgi?id=85394
1130
1131         Reviewed by Pavel Feldman.
1132
1133         Pass string length explicitely when creating String object from non-null-terminated
1134         char* strings.
1135
1136         * inspector/InspectorResourceAgent.cpp:
1137         (WebCore):
1138         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
1139         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
1140
1141 2012-05-03  'Pavel Feldman'  <pfeldman@chromium.org>
1142
1143         Not reviewed: never surround InspectorInstrumentation:: with ENABLED(INSPECTOR)
1144
1145         * dom/ContainerNode.cpp:
1146         (WebCore::ContainerNode::insertBefore):
1147         (WebCore::ContainerNode::replaceChild):
1148         (WebCore::ContainerNode::appendChild):
1149         (WebCore::dispatchChildRemovalEvents):
1150
1151 2012-04-30  Pavel Feldman  <pfeldman@chromium.org>
1152
1153         Web Inspector: migrate breakpoint manager to live locations.
1154         https://bugs.webkit.org/show_bug.cgi?id=85136
1155
1156         Reviewed by Yury Semikhatsky.
1157
1158         - Merges Breakpoint and UIBreakpoint to have single instance
1159         - Extracts storage from the breakpoint manager
1160         - Makes breakpoint manager use source mapping from the script, not the presentation model
1161         - Removes breakpoints collection from the UISourceCode
1162         Unfortunately, there are too many inter-dependencies that require that these changes are done simultaneously.
1163
1164         * inspector/front-end/BreakpointManager.js:
1165         (WebInspector.BreakpointManager):
1166         (WebInspector.BreakpointManager.prototype.setBreakpoint):
1167         (WebInspector.BreakpointManager.prototype.breakpoint):
1168         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
1169         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
1170         (WebInspector.BreakpointManager.prototype.reset):
1171         (WebInspector.BreakpointManager.prototype.debuggerReset):
1172         (WebInspector.BreakpointManager.prototype._breakpointResolved):
1173         (WebInspector.BreakpointManager.prototype._removeBreakpoint):
1174         (WebInspector.BreakpointManager.prototype._uiLocationAdded):
1175         (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
1176         (WebInspector.BreakpointManager.prototype.storage):
1177         (WebInspector.BreakpointManager.Breakpoint):
1178         (WebInspector.BreakpointManager.Breakpoint.prototype.primaryUILocation):
1179         (WebInspector.BreakpointManager.Breakpoint.prototype._addResolvedLocation):
1180         (WebInspector.BreakpointManager.Breakpoint.prototype.enabled):
1181         (WebInspector.BreakpointManager.Breakpoint.prototype.setEnabled):
1182         (WebInspector.BreakpointManager.Breakpoint.prototype.condition):
1183         (WebInspector.BreakpointManager.Breakpoint.prototype.setCondition):
1184         (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):
1185         (WebInspector.BreakpointManager.Breakpoint.prototype.remove):
1186         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint):
1187         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger):
1188         (WebInspector.BreakpointManager.Breakpoint.prototype._removeFromDebugger):
1189         (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations):
1190         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
1191         (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation):
1192         (WebInspector.BreakpointManager.Storage.get this):
1193         (WebInspector.BreakpointManager.Storage):
1194         (WebInspector.BreakpointManager.Storage.prototype.restoreBreakpoints):
1195         (WebInspector.BreakpointManager.Storage.prototype._updateBreakpoint):
1196         (WebInspector.BreakpointManager.Storage.prototype._removeBreakpoint):
1197         (WebInspector.BreakpointManager.Storage.prototype._save):
1198         (set WebInspector.BreakpointManager.Storage.Item):
1199         * inspector/front-end/BreakpointsSidebarPane.js:
1200         (WebInspector.JavaScriptBreakpointsSidebarPane):
1201         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded.didRequestContent):
1202         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
1203         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved):
1204         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint):
1205         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId):
1206         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked):
1207         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
1208         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
1209         * inspector/front-end/DebuggerModel.js:
1210         (WebInspector.DebuggerModel):
1211         (WebInspector.DebuggerModel.prototype.breakpointsActive):
1212         (WebInspector.DebuggerModel.prototype.createLiveLocation):
1213         * inspector/front-end/DebuggerPresentationModel.js:
1214         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
1215         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
1216         * inspector/front-end/JavaScriptSource.js:
1217         (WebInspector.JavaScriptSource):
1218         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
1219         * inspector/front-end/JavaScriptSourceFrame.js:
1220         (WebInspector.JavaScriptSourceFrame):
1221         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
1222         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
1223         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
1224         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
1225         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1226         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
1227         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
1228         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
1229         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
1230         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
1231         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
1232         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
1233         (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded):
1234         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
1235         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
1236         (WebInspector.JavaScriptSourceFrame.prototype._updateBreakpointsAfterLiveEdit):
1237         * inspector/front-end/Script.js:
1238         (WebInspector.Script.prototype.rawLocationToUILocation):
1239         * inspector/front-end/ScriptsPanel.js:
1240         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
1241         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
1242         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation):
1243         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
1244         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
1245         * inspector/front-end/UISourceCode.js:
1246         (WebInspector.UISourceCode.prototype.contentChanged):
1247
1248 2012-05-03  Andrey Kosyakov  <caseq@chromium.org>
1249
1250         Unreviewed attemp to fix chromium win build broken at r115943.
1251
1252         * notifications/NotificationClient.h:
1253         (WebCore):
1254
1255 2012-05-03  Vivek Galatage  <vivekgalatage@gmail.com>
1256
1257         Linker warnings due to duplicate symbols for SimplifyMarkupCommand.cpp on Windows
1258         https://bugs.webkit.org/show_bug.cgi?id=85467
1259
1260         Reviewed by Ryosuke Niwa.
1261
1262         Removed the multiple inclusion of the file SimplifyMarkupCommand.cpp 
1263
1264         No new tests required.
1265
1266         * WebCore.vcproj/WebCore.vcproj:
1267
1268 2012-05-03  Uday Kiran  <udaykiran@motorola.com>
1269
1270         CSS clip: auto clips to box borders instead of removing clipping
1271         https://bugs.webkit.org/show_bug.cgi?id=36772
1272
1273         Reviewed by Andreas Kling.
1274
1275         According to CSS 2.1 spec, http://www.w3.org/TR/CSS2/visufx.html#propdef-clip,
1276         clip property with value 'auto' the element does not clip.
1277         Also getPropertyValue for clip when auto is specified should return "auto"
1278         and not "rect(0px 0px 0px 0px)".
1279
1280         Tests: css2.1/20110323/clip-001-expected.html
1281                css2.1/20110323/clip-001.html
1282
1283         * css/StyleBuilder.cpp:
1284         (WebCore::ApplyPropertyClip::applyValue):
1285
1286 2012-05-02  Antti Koivisto  <antti@apple.com>
1287
1288         Add temporary feature define for parsed stylesheet caching
1289         https://bugs.webkit.org/show_bug.cgi?id=85413
1290
1291         Rubber-stamped by Nikolas Zimmermann.
1292
1293         While not an externally visible feature this is still a significant internal change.
1294         It is good to have define in case someone has an urgent need to turn it off.
1295         
1296         Caching is enabled by default on all platforms. The define should be removed after some bake time.
1297
1298         * html/HTMLLinkElement.cpp:
1299         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1300
1301 2012-05-03  Nikolas Zimmermann  <nzimmermann@rim.com>
1302
1303         Accumulation for values-animation is broken
1304         https://bugs.webkit.org/show_bug.cgi?id=85158
1305
1306         Reviewed by Zoltan Herczeg.
1307
1308         Follow-up patch: Add const Foo& foo() const accessors to SVGAnimatedType,
1309         to avoid the "Foo& foo = animated->foo()" idiom in all cases where we
1310         don't need to mutate 'foo'. Use "const Foo& foo = animated->foo()" instead.
1311         Inline all of these methods to avoid the function call overhead.
1312
1313         For to-animations we actually mutated the from value before, but it wasn't a
1314         problem in practive, as we did that on every animation step. Fully avoid these
1315         inconsitencies by never mutating the from/to types stored in SVGAnimateElement.
1316
1317         Cache toAtEndOfDurationType just like m_toType/m_fromType in SVGAnimateElement,
1318         to avoid reconstructing it on every animation step.
1319
1320         No new tests, only design/performance fixes.
1321
1322         * svg/SVGAnimateElement.cpp:
1323         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1324         (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue):
1325         (WebCore::SVGAnimateElement::targetElementWillChange):
1326         * svg/SVGAnimateElement.h:
1327         (SVGAnimateElement):
1328         * svg/SVGAnimateMotionElement.cpp:
1329         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
1330         (WebCore::SVGAnimateMotionElement::calculateToAtEndOfDurationValue):
1331         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
1332         (WebCore::SVGAnimateMotionElement::calculateFromAndByValues):
1333         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
1334         * svg/SVGAnimateMotionElement.h:
1335         (SVGAnimateMotionElement):
1336         * svg/SVGAnimatedAngle.cpp:
1337         (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes):
1338         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
1339         * svg/SVGAnimatedBoolean.cpp:
1340         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
1341         * svg/SVGAnimatedColor.cpp:
1342         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
1343         * svg/SVGAnimatedEnumeration.cpp:
1344         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
1345         * svg/SVGAnimatedInteger.cpp:
1346         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
1347         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1348         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes):
1349         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
1350         * svg/SVGAnimatedLength.cpp:
1351         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
1352         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
1353         * svg/SVGAnimatedLengthList.cpp:
1354         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
1355         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
1356         * svg/SVGAnimatedNumber.cpp:
1357         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
1358         * svg/SVGAnimatedNumberList.cpp:
1359         (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
1360         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
1361         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1362         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes):
1363         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
1364         * svg/SVGAnimatedPath.cpp:
1365         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1366         * svg/SVGAnimatedPointList.cpp:
1367         (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
1368         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
1369         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1370         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
1371         * svg/SVGAnimatedRect.cpp:
1372         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
1373         * svg/SVGAnimatedString.cpp:
1374         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
1375         * svg/SVGAnimatedTransformList.cpp:
1376         (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
1377         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
1378         * svg/SVGAnimatedType.cpp:
1379         * svg/SVGAnimatedType.h:
1380         (WebCore::SVGAnimatedType::angleAndEnumeration):
1381         (SVGAnimatedType):
1382         (WebCore::SVGAnimatedType::boolean):
1383         (WebCore::SVGAnimatedType::color):
1384         (WebCore::SVGAnimatedType::enumeration):
1385         (WebCore::SVGAnimatedType::integer):
1386         (WebCore::SVGAnimatedType::integerOptionalInteger):
1387         (WebCore::SVGAnimatedType::length):
1388         (WebCore::SVGAnimatedType::lengthList):
1389         (WebCore::SVGAnimatedType::number):
1390         (WebCore::SVGAnimatedType::numberList):
1391         (WebCore::SVGAnimatedType::numberOptionalNumber):
1392         (WebCore::SVGAnimatedType::path):
1393         (WebCore::SVGAnimatedType::pointList):
1394         (WebCore::SVGAnimatedType::preserveAspectRatio):
1395         (WebCore::SVGAnimatedType::rect):
1396         (WebCore::SVGAnimatedType::string):
1397         (WebCore::SVGAnimatedType::transformList):
1398         * svg/SVGAnimationElement.cpp:
1399         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1400         (WebCore::SVGAnimationElement::startedActiveInterval):
1401         (WebCore::SVGAnimationElement::updateAnimation):
1402         * svg/SVGAnimationElement.h:
1403         (WebCore::SVGAnimationElement::adjustFromToListValues):
1404         (WebCore::SVGAnimationElement::animateDiscreteType):
1405         (SVGAnimationElement):
1406
1407 2012-05-02  Alexander Færøy  <ahf@0x90.dk>
1408
1409         Rename deviceDPI to devicePixelRatio
1410         https://bugs.webkit.org/show_bug.cgi?id=85049
1411
1412         Reviewed by Kenneth Rohde Christiansen.
1413
1414         No new tests added since this is a minor refactoring with no changes
1415         that should affect tests.
1416
1417         * page/Settings.cpp:
1418         (WebCore::Settings::Settings):
1419         * page/Settings.h:
1420         (WebCore::Settings::setDevicePixelRatio):
1421         (WebCore::Settings::devicePixelRatio):
1422         (Settings):
1423
1424 2012-05-03  Nikolas Zimmermann  <nzimmermann@rim.com>
1425
1426         Fix multiple begin values support - especially with seeking through setCurrentTime
1427         https://bugs.webkit.org/show_bug.cgi?id=85372
1428
1429         Reviewed by Zoltan Herczeg.
1430
1431         Multiple begin values aka. begin="0s; 2s" aren't correctly handled - resulting in broken & unexpected behavior.
1432         Supporting seeking properly on documents containing such animations is very important, otherwise we can't reliable
1433         test animations using either reftests or the SVG JS animation test framework.
1434
1435         Testcase:
1436         <rect height="100" fill="green">
1437             <animate attributeName="width" begin="0s; 2s" dur="8s" from="0" to="100" fill="freeze"/>
1438         </rect>
1439
1440         What's expected?
1441         Two times should be contained in the 'begin' times list in SVGSMILElement: m_beginTimes = { 0s, 2s }.
1442         The initial first resolved interval is: m_intervalBegin=0.0s, m_intervalEnd=8.0s.
1443
1444         During t=0s..1.9999s the m_intervalBegin/m_intervalEnd are correct.
1445         At t=2s, a new interval can be started. m_intervalEnd should be set to nextBeginTime, where nextBeginTime=2s.
1446         The current interval should get cropped to: m_intervalBegin=0s, m_intervalEnd=2s. The following call to
1447         resolveNextInterval() sees that elapsed >= m_intervalEnd, and thus moves on to the next interval.
1448         m_intervalBegin should be 2s and m_intervalEnd=10s after that.
1449
1450         In trunk this behavior is only partly implemented and broken. Especially broken together with seeking via SVGSVGElement.setCurrentTime.
1451         That's because we don't correctly seek to the right interval in case of multiple begin values, eg. if we sample an animation with
1452         begin="0s; 3s" dur="6s" we always remain in the first interval and don't move on.
1453
1454         Fix all of these issues, making lots more tests work in Dr. Olaf Hofmanns SVG Animation test suite.
1455
1456         Tests: svg/animations/multiple-begin-additive-animation.html
1457                svg/animations/multiple-begin-animation-discrete-expected.svg
1458                svg/animations/multiple-begin-animation-discrete.svg
1459                svg/animations/multiple-begin-animation-expected.svg
1460                svg/animations/multiple-begin-animation.svg
1461
1462         * svg/animation/SMILTimeContainer.cpp:
1463         (WebCore::SMILTimeContainer::begin):
1464         (WebCore::SMILTimeContainer::setElapsed):
1465         (WebCore::SMILTimeContainer::updateAnimations):
1466         * svg/animation/SMILTimeContainer.h:
1467         (SMILTimeContainer):
1468         * svg/animation/SVGSMILElement.cpp:
1469         (WebCore::SVGSMILElement::findInstanceTime):
1470         (WebCore::SVGSMILElement::resolveInterval):
1471         (WebCore::SVGSMILElement::resolveNextInterval):
1472         (WebCore):
1473         (WebCore::SVGSMILElement::checkRestart):
1474         (WebCore::SVGSMILElement::seekToIntervalCorrespondingToTime):
1475         (WebCore::SVGSMILElement::progress):
1476         * svg/animation/SVGSMILElement.h:
1477         (SVGSMILElement):
1478
1479 2012-05-03  Dana Jansens  <danakj@chromium.org>
1480
1481         [chromium] Don't add small opaque areas to the occlusion tracker's Region
1482         https://bugs.webkit.org/show_bug.cgi?id=85297
1483
1484         Reviewed by Adrienne Walker.
1485
1486         Don't add small opaque areas (smaller than 160x160) to the occlusion
1487         tracker's Region objects to avoid high Region::unite() costs.
1488
1489         We would like Region to just be fast enough that this isn't a concern,
1490         and there are patches in flight to do this, but at the moment, small
1491         opaque areas add significant cost if there is many of them, for
1492         potentially small gains since they do not cover entire tiles.
1493
1494         Comments in http://code.google.com/p/chromium/issues/detail?id=124687
1495         motivate this approach for now, and point to around 160x160 being
1496         a reasonable threshold.
1497
1498         Removes the opaque paint tracking flag while we're here. The flag is
1499         no longer used, and was broken when we moved the "paint vs opaque
1500         flag" distinction out to the layers.
1501
1502         Unit test: CCOcclusionTrackerTestMinimumTrackingSize
1503
1504         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1505         (WebCore::CCLayerTreeHost::paintLayerContents):
1506         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1507         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1508         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1509         (WebCore::::CCOcclusionTrackerBase):
1510         (WebCore::addOcclusionBehindLayer):
1511         (WebCore::::markOccludedBehindLayer):
1512         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
1513         (WebCore::CCOcclusionTrackerBase::setMinimumTrackingSize):
1514         (CCOcclusionTrackerBase):
1515         (WebCore::CCOcclusionTrackerBase::preferredMinimumTrackingSize):
1516
1517 2012-05-02  Jon Lee  <jonlee@apple.com>
1518
1519         Migrate permission functions to Notification from NotificationCenter
1520         https://bugs.webkit.org/show_bug.cgi?id=80485
1521         <rdar://problem/10965458>
1522
1523         Reviewed by Jian Li.
1524
1525         * notifications/Notification.idl: Add permission functions.
1526         * notifications/DOMWindowNotifications.idl: Wrap webkitNotifications as part of legacy API.
1527
1528         * notifications/Notification.cpp: New permission functions are wrapped with ENABLE(NOTIFICATIONS)
1529         (WebCore::Notification::taskTimerFired): Use the new permission functions to determine whether we can show the
1530         notification.
1531         (WebCore::Notification::permissionLevel):
1532         (WebCore::Notification::permissionString): Declare three static locals for each of the values, and return
1533         based on the permission enum.
1534         (WebCore::Notification::requestPermission): Forward request to client.
1535         * notifications/Notification.h:
1536
1537         * notifications/NotificationPermissionCallback.h: Added.
1538         (NotificationPermissionCallback):
1539         (WebCore::NotificationPermissionCallback::~NotificationPermissionCallback):
1540         * notifications/NotificationPermissionCallback.idl: Added.
1541
1542         * notifications/NotificationCenter.cpp: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS)
1543         * notifications/NotificationCenter.h: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS)
1544         * notifications/NotificationCenter.idl: Refactor conditionals to make the center available only when
1545         ENABLE(LEGACY_NOTIFICATIONS) is on.
1546         * notifications/NotificationPresenter.h:
1547         (WebCore::NotificationPresenter::requestPermission): Add new requestPermission() function for new
1548         NotificationPermissionCallback type. Make it a stub implementation until all ports have adopted.
1549
1550         * notifications/NotificationClient.h: Add another requestPermission() client call, wrapped in
1551         ENABLE(NOTIFICATIONS) that accepts the NotificationPermissionCallback. Wrap the original one in
1552         ENABLE(LEGACY_NOTIFICATIONS).
1553
1554         * bindings/js/JSDesktopNotificationsCustom.cpp: Change to include the implementation only in
1555         ENABLE(LEGACY_NOTIFICATIONS).
1556         * bindings/js/JSNotificationsCustom.cpp: Custom implementation of requestPermission().
1557         * bindings/v8/custom/V8NotificationCustom.cpp: Custom implementation of requestPermission().
1558
1559         * notifications/WorkerContextNotifications.idl: Make webktNotifications available only in legacy API.
1560         * CMakeLists.txt: Add new callback idl.
1561         * DerivedSources.make: Add new callback idl.
1562         * DerivedSources.pri: Add new callback idl.
1563         * GNUmakefile.list.am: Add NotificationPermissionCallback files.
1564         * Target.pri: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp
1565         * UseJSC.cmake: Include JSNotificationCustom.cpp
1566         * UseV8.cmake: Include V8NotificationCustom.cpp
1567         * WebCore.gypi: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp}
1568         * WebCore.vcproj/WebCore.vcproj: Include JSNotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp}
1569         * WebCore.exp.in: Export permissionString().
1570         * WebCore.xcodeproj/project.pbxproj: Add callback idl, h, and cpp files.
1571
1572 2012-05-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1573
1574         Unreviewed, rolling out r115907.
1575         http://trac.webkit.org/changeset/115907
1576         https://bugs.webkit.org/show_bug.cgi?id=85458
1577
1578         It broke all viewport tests on Qt and on GTK (Requested by
1579         Ossy on #webkit).
1580
1581         * dom/ViewportArguments.cpp:
1582         (WebCore::computeViewportAttributes):
1583         * dom/ViewportArguments.h:
1584         (ViewportAttributes):
1585
1586 2012-05-02  Gustavo Noronha Silva  <gns@gnome.org>
1587
1588         [GTK] Finish moving modules into libWebCoreModules.la
1589         https://bugs.webkit.org/show_bug.cgi?id=85449
1590
1591         Unreviewed build fix.
1592
1593         * GNUmakefile.list.am: move remaining modules source files into the
1594         libWebCoreModules library, this should fix the problems people had
1595         building the 1.9.1 tarball with unpatched make.
1596
1597 2012-05-02  Dongwoo Im  <dw.im@samsung.com>
1598
1599         [EFL] Unreviewed, Fix build break when WEB_AUDIO is enabled.
1600         https://bugs.webkit.org/show_bug.cgi?id=85443
1601
1602         Unreviewed build fix.
1603
1604         Three new files were added in the Modules/webaudio directory.
1605         These files should be included into the CMakeLists.txt file.
1606
1607         * CMakeLists.txt: Add the newly created files into the CMakeLists.txt
1608
1609 2012-05-02  Eric Seidel  <eric@webkit.org>
1610
1611         Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate)
1612         https://bugs.webkit.org/show_bug.cgi?id=85433
1613
1614         Reviewed by Adam Barth.
1615
1616         I have a script which can autogenerate these xcconfig files as well as the
1617         vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists
1618         from a central feature list file.
1619         In preparation for posting such a tool, I'm re-sorting these xcconfig files to be
1620         alphabetically ordered (currently they're close, but not quite).
1621         There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which
1622         I will fix in a second pass.  I will also sort the FEATURE_DEFINES = line in a follow-up patch.
1623
1624         * Configurations/FeatureDefines.xcconfig:
1625
1626 2012-05-02  Dana Jansens  <danakj@chromium.org>
1627
1628         [chromium] Don't occlude pixels in a surface that are needed for a background filter blur
1629         https://bugs.webkit.org/show_bug.cgi?id=84317
1630
1631         Reviewed by Adrienne Walker.
1632
1633         Blur filters move pixels around, so a pixel can influence the value of
1634         pixels at some distance away. If a pixel is not occluded, then all
1635         pixels within the radius of the blur may influence the value of that
1636         pixel, so they should also stay unoccluded.
1637
1638         For background filters, the pixels are read from the filter's target
1639         surface, so we remove occlusion from that target surface from pixels
1640         that will blur into visible pixels.
1641
1642         Unit test: CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter
1643                    CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice
1644                    CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip
1645                    CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter
1646                    CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded
1647                    CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded
1648
1649         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1650         (WebCore::reduceOcclusion):
1651         (WebCore):
1652         (WebCore::reduceOcclusionBelowSurface):
1653         (WebCore::::leaveToTargetRenderSurface):
1654         (WebCore::::unoccludedContributingSurfaceContentRect):
1655         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
1656         (CCOcclusionTrackerBase):
1657         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1658         (WebCore::CCQuadCuller::appendSurface):
1659         (WebCore::CCQuadCuller::appendReplica):
1660
1661 2012-05-02  Levi Weintraub  <leviw@chromium.org>
1662
1663         Convert FractionalLayoutUnit overflow assertions to stderr warnings
1664         https://bugs.webkit.org/show_bug.cgi?id=85393
1665
1666         Reviewed by Eric Seidel.
1667
1668         Writing warnings to stderr when FractionalLayoutUnits overflow on debug builds instead of asserting
1669         and crashing. It can be very useful to WebKit developers know when overflow is occurring, but it's
1670         not always a programming error, so assert wasn't the right action.
1671
1672         No new tests. No change in behavior.
1673
1674         * platform/FractionalLayoutUnit.h:
1675         (WebCore):
1676         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
1677         (WebCore::FractionalLayoutUnit::toUnsigned):
1678         (WebCore::FractionalLayoutUnit::setRawValue):
1679
1680 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
1681
1682         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
1683         information about the form being submitted
1684         https://bugs.webkit.org/show_bug.cgi?id=84297
1685
1686         Reviewed by Andy Estes.
1687
1688         * html/HTMLFormElement.cpp:
1689         (WebCore::HTMLFormElement::prepareForSubmission):
1690         Get the form field names and values, and use them to create a FormState
1691         object. Pass this object when calling dispatchWillSendSubmitEvent().
1692         (WebCore::HTMLFormElement::getTextFieldValues):
1693         Loop over the associated elements, looking for <input> elements.
1694         Collect their names and values.
1695
1696         * html/HTMLFormElement.h:
1697         Declare getTextFieldData().
1698
1699         * loader/EmptyClients.h:
1700         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
1701         Updated declaration for new parameter type.
1702
1703         * loader/FrameLoaderClient.h:
1704         Updated declaration of dispatchWillSendSubmitEvent() for new param
1705         type.
1706
1707 2012-04-13  Jon Honeycutt  <jhoneycutt@apple.com>
1708
1709         Make Page::setDefersLoading() have a call count so that each time
1710         loading is deferred, it must be balanced with a call to resume.
1711         https://bugs.webkit.org/show_bug.cgi?id=84522
1712
1713         Reviewed by Andy Estes.
1714
1715         * page/Page.cpp:
1716         (WebCore::Page::Page):
1717         Initialize new call count member.
1718         (WebCore::Page::setDefersLoading):
1719         Check whether the callers wants balanced defer/resume loading behavior.
1720         If the call count is not changing from 0 to 1 or 1 to 0, return early.
1721         Otherwise, defer or resume loading for frames in this page.
1722
1723         * page/Page.h:
1724         (WebCore::Page::defersLoading):
1725         Added a member to hold the call count.
1726
1727         * page/Settings.cpp:
1728         (WebCore::Settings::Settings):
1729         Initialized new member m_wantsBalancedSetDefersLoadingBehavior.
1730
1731         * page/Settings.h:
1732         (Settings):
1733         Added new member m_wantsBalancedSetDefersLoadingBehavior.
1734         (WebCore::Settings::setWantsBalancedSetDefersLoadingBehavior):
1735         Setter.
1736         (WebCore::Settings::wantsBalancedSetDefersLoadingBehavior):
1737         Getter.
1738
1739 2012-05-02  Ojan Vafai  <ojan@chromium.org>
1740
1741         Add a histogram for rendertree size
1742         https://bugs.webkit.org/show_bug.cgi?id=85226
1743
1744         Reviewed by Eric Seidel.
1745
1746         We record it when the page gets hidden, since this is a point
1747         at which, in theory, we could kill the rendertree.
1748
1749         No new tests. This isn't web visible, so there's no way to test it.
1750
1751         * loader/FrameLoader.cpp:
1752         (WebCore::FrameLoader::clear):
1753         * page/Page.cpp:
1754         (WebCore::Page::renderTreeSize):
1755         (WebCore):
1756         (WebCore::Page::setVisibilityState):
1757         * page/Page.h:
1758         (Page):
1759         * platform/HistogramSupport.cpp:
1760         (WebCore::HistogramSupport::histogramCustomCounts):
1761         (WebCore):
1762         * platform/HistogramSupport.h:
1763         (HistogramSupport):
1764         * platform/chromium/HistogramSupportChromium.cpp:
1765         (WebCore::HistogramSupport::histogramCustomCounts):
1766         (WebCore):
1767
1768 2012-05-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1769
1770         Unreviewed, rolling out r115902.
1771         http://trac.webkit.org/changeset/115902
1772         https://bugs.webkit.org/show_bug.cgi?id=85441
1773
1774         Compile failure on linux 32 (Requested by zhenyao on #webkit).
1775
1776         * Modules/indexeddb/IDBBackingStore.h:
1777         (IDBBackingStore):
1778         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1779         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
1780         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1781         (IDBLevelDBBackingStore):
1782         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1783         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1784         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
1785         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1786         (IDBObjectStoreBackendImpl):
1787
1788 2012-05-02  Julien Chaffraix  <jchaffraix@webkit.org>
1789
1790         Add ASSERTs to avoid querying dirtied z-index or normal flow lists on RenderLayer
1791         https://bugs.webkit.org/show_bug.cgi?id=84920
1792
1793         Reviewed by Simon Fraser.
1794
1795         Covered by existing tests in Debug (at least several time!).
1796
1797         This change adds some ASSERTs on RenderLayer that prevent any use of its lists if they
1798         are dirtied.
1799
1800         On top of this change, we added an invariant that non-stacking contexts should have their
1801         z-index lists NULL (instead of empty or NULL previously). This is enforced at
1802         updateZOrderLists time as we now ensure that it is called in a timely manner.
1803
1804         * rendering/RenderLayer.cpp:
1805         (WebCore::RenderLayer::calculateLayerBounds):
1806         Added call to updateLayersIfNeeded as we will query them later and there is no guarantee
1807         that they are not dirty (we recurse in our children as part of calculateLayerBounds).
1808         This was causing the new ASSERTs to trigger on css3/filter/ tests.
1809
1810         (WebCore::RenderLayer::dirtyZOrderLists):
1811         Added a comment as to why we can't ASSERT that we are in a stacking context here.
1812
1813         (WebCore::RenderLayer::rebuildZOrderLists):
1814         Added an ASSERT that we only rebuild z-index lists for dirtied stacking context.
1815
1816         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1817         Updated to ensure that the reflection layer has its layers updated too. This was triggering
1818         the new ASSERTs on fast/runins/run-in-layer-not-removed-crash.html.
1819
1820         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
1821         Updated to use the new isDirtyStackingContext function.
1822
1823         * rendering/RenderLayer.h:
1824         (WebCore::RenderLayer::isDirtyStackingContext):
1825         New helper function. Also made updateLayerListsIfNeeded() the only way
1826         to update layer. That should prevent any misuse.
1827
1828         (WebCore::RenderLayer::posZOrderList):
1829         (WebCore::RenderLayer::negZOrderList):
1830         (WebCore::RenderLayer::normalFlowList):
1831         ASSERT that we don't query any of the previous lists if they are dirty. Also
1832         enforce the invariant that non-stacking contexts should have NULL z-index lists.
1833
1834         (WebCore::RenderLayer::clearZOrderLists):
1835         New function to clearZOrderLists so that we can enfore the previous invariant.
1836
1837         (WebCore::RenderLayer::updateZOrderLists):
1838         Updated to clear the dirty flag and the z-index lists for non-stacking context.
1839
1840         * rendering/RenderLayerCompositor.cpp:
1841         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1842         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1843         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1844         Removed the explicit ASSERTs.
1845
1846         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1847         (WebCore::RenderLayerCompositor::canBeComposited):
1848         Disabled compositing on RenderLayer in flow thread. Because flow thread's
1849         RenderLayer are not collected as part of RenderLayer's lists and could be composited,
1850         this was causing the new ASSERTs to trigger (e.g. on fast/regions/webkit-flow-renderer-layer.html).
1851
1852         * rendering/RenderTreeAsText.cpp:
1853         (WebCore::writeLayers):
1854         Updated to use updateLayerListsIfNeeded().
1855
1856 2012-05-02  Levi Weintraub  <leviw@chromium.org>
1857
1858         Remove unused adjustForAbsoluteZoom method in RenderObject.h
1859         https://bugs.webkit.org/show_bug.cgi?id=85396
1860
1861         Reviewed by Eric Seidel.
1862
1863         We only want to use the integer adjustForAbsoluteZoom method, so this remnant is both unused
1864         and potentially confusing.
1865
1866         No new tests. Removing unused code.
1867
1868         * rendering/RenderObject.h:
1869         (WebCore):
1870
1871 2012-05-02  Fady Samuel  <fsamuel@chromium.org>
1872
1873         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
1874         https://bugs.webkit.org/show_bug.cgi?id=70609
1875
1876         Reviewed by Kenneth Rohde Christiansen.
1877
1878         Make ViewportAttributes' layoutSize be a FloatRect to avoid rounding
1879         too early, and the occasional off by one fixed layout dimensions.
1880
1881         * dom/ViewportArguments.cpp:
1882         (WebCore::computeViewportAttributes):
1883         * dom/ViewportArguments.h:
1884         (ViewportAttributes):
1885
1886 2012-05-02  Joshua Bell  <jsbell@chromium.org>
1887
1888         IndexedDB: Handle generated keys up to 2^53
1889         https://bugs.webkit.org/show_bug.cgi?id=85114
1890
1891         The spec defines the behavior for generated keys up to 2^53
1892         (the maximum integer storable as an ECMAScript number) and
1893         the error case when going beyond that. Ensure that we can
1894         handle values up to that point and generate errors beyond.
1895
1896         Reviewed by Tony Chang.
1897
1898         Test: storage/indexeddb/key-generator.html
1899
1900         * Modules/indexeddb/IDBBackingStore.h:
1901         (IDBBackingStore):
1902         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1903         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
1904         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1905         (IDBLevelDBBackingStore):
1906         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1907         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1908         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
1909         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1910         (IDBObjectStoreBackendImpl):
1911
1912 2012-05-02  Adam Klein  <adamk@chromium.org>
1913
1914         Childlist mutations in shadow DOM should be observable with MutationObservers
1915         https://bugs.webkit.org/show_bug.cgi?id=85402
1916
1917         Reviewed by Ojan Vafai.
1918
1919         Though Mutation Events are not supported in Shadow DOM,
1920         MutationObservers are supposed to be. Due to a misplacement of the
1921         ChildListMutationScope, they were erroneously getting skipped.
1922
1923         This patch moves code around to properly notify when childlist are
1924         mutated in shadow DOM and covers that change with a new test.
1925
1926         Test: fast/mutation/shadow-dom.html
1927
1928         * dom/ContainerNode.cpp:
1929         (WebCore::willRemoveChild): Handle notification of removal directly.
1930         (WebCore::willRemoveChildren): ditto.
1931         (WebCore::dispatchChildInsertionEvents): Remove notification of insertion.
1932         (WebCore::dispatchChildRemovalEvents): Remove notification of removal.
1933         (WebCore::updateTreeAfterInsertion): Handle notification of insertion directly.
1934
1935 2012-05-02  Eric Carlson  <eric.carlson@apple.com>
1936
1937         Crash in WebCore::TextTrackList::remove
1938         https://bugs.webkit.org/show_bug.cgi?id=85095
1939
1940         Reviewed by Maciej Stachowiak.
1941
1942         Test: media/track/track-remove-quickly.html
1943
1944         * html/HTMLMediaElement.cpp:
1945         (WebCore::HTMLMediaElement::willRemoveTrack): Return immediately if the tracks collection
1946             has not been allocated yet.
1947
1948 2012-05-02  David Barton  <dbarton@mathscribe.com>
1949
1950         After appending MathML with jquery the table renders with overlaps
1951         https://bugs.webkit.org/show_bug.cgi?id=52444
1952
1953         Reviewed by Julien Chaffraix.
1954
1955         This patch also fixes bugs 72834 and 47781. The main problem is that correct preferred
1956         logical widths are affected by operator stretching. Thus we add a call to
1957         setNeedsLayoutAndPrefWidthsRecalc() after the stretching code in
1958         RenderMathMLOperator.cpp, and change RenderMathMLBlock and RenderMathMLRow to make sure
1959         that stretching of children is done before an <mrow>'s preferred logical widths are
1960         computed.
1961         
1962         Test: Added a test to mathml/presentation/mo-stretch.html
1963
1964         * rendering/mathml/RenderMathMLBlock.cpp:
1965         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
1966         (WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
1967         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
1968         (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
1969         * rendering/mathml/RenderMathMLBlock.h:
1970         (WebCore::RenderMathMLBlock::unembellishedOperator):
1971         (WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty):
1972         (WebCore::RenderMathMLBlock::preferredLogicalHeight):
1973         (WebCore::RenderMathMLBlock::setPreferredLogicalHeight):
1974             - Add m_preferredLogicalHeight and methods to compute and return it.
1975             - Remove stretchToHeight() from most classes as it no longer needs to be done
1976               recursively. We just call it on the base of an embellished operator, and that
1977               calls setNeedsLayoutAndPrefWidthsRecalc() to mark itself and its container
1978               chain.
1979         
1980         * rendering/mathml/RenderMathMLOperator.cpp:
1981         (WebCore::RenderMathMLOperator::stretchToHeight):
1982             - Don't compare an unexpanded height to an expanded one.
1983         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
1984         (WebCore::RenderMathMLOperator::updateFromElement):
1985             - After stretching, call setNeedsLayoutAndPrefWidthsRecalc().
1986         * rendering/mathml/RenderMathMLOperator.h:
1987         (RenderMathMLOperator):
1988         
1989         * rendering/mathml/RenderMathMLRow.cpp:
1990         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
1991         (WebCore::RenderMathMLRow::layout):
1992         * rendering/mathml/RenderMathMLRow.h:
1993         (RenderMathMLRow):
1994             - Add computePreferredLogicalWidths(), using computeChildrenPreferredLogicalHeights()
1995               to compute our children's preferred logical heights if necessary, followed by
1996               operator stretching.
1997         
1998         * rendering/mathml/RenderMathMLSubSup.cpp:
1999         * rendering/mathml/RenderMathMLSubSup.h:
2000         (RenderMathMLSubSup):
2001         * rendering/mathml/RenderMathMLUnderOver.cpp:
2002         * rendering/mathml/RenderMathMLUnderOver.h:
2003         (RenderMathMLUnderOver):
2004
2005 2012-05-02  Dana Jansens  <danakj@chromium.org>
2006
2007         [chromium] Avoid extra Region copies in CCOcclusionTracker
2008         https://bugs.webkit.org/show_bug.cgi?id=85257
2009
2010         Reviewed by Adrienne Walker.
2011
2012         Instead of making a Region for each layer and then uniting the region
2013         with the current occlusion, directly add the rects for the given layer
2014         to the current occlusion.
2015
2016         When subtracting a region from a rect, just subtract the region
2017         directly instead of computing the intersecting region.
2018
2019         Covered by existing tests.
2020
2021         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2022         (WebCore::addOcclusionBehindLayer):
2023         (WebCore::::markOccludedBehindLayer):
2024         (WebCore::rectSubtractRegion):
2025
2026 2012-05-02  Keith Rosenblatt  <keith.rosenblatt@nokia.com>
2027
2028         [Qt] ASSERT in FontCustomPlatformDataQt.cpp with invalid font in data URI
2029         https://bugs.webkit.org/show_bug.cgi?id=85089
2030
2031         Reviewed by Simon Hausmann.
2032
2033         Do not return data referencing an invalid QRawFont from createFontCustomPlatformData().  Instead
2034         return null.
2035
2036         Test: fast/css/font-face-data-uri-invalid.html
2037
2038         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
2039         (WebCore::createFontCustomPlatformData):
2040
2041 2012-05-02  Michal Mocny  <mmocny@google.com>
2042
2043         [chromium] Set contents texture manager preferred memory limit based on GpuMemoryManager suggestion.
2044         https://bugs.webkit.org/show_bug.cgi?id=84270
2045
2046         Reviewed by Kenneth Russell.
2047
2048         Updates the content texture manager memory limits based on GpuMemoryManager memory allocation suggestions.
2049
2050         The memory allocation size (in bytes) is fed from LayerRendererChromium memory allocation changed callback
2051         handler to CCLayerTreeHost.  At that point we adjust the limits, using the existing notions of preferred and
2052         max limits.
2053
2054         On android, the preferred limit is half the maximum (as it has always been), but on all other platforms the
2055         preferred limit is now equal to max, in order to allow more agressive prepainting.
2056
2057         Finally, android has memory constraints dependant on viewportSize, but that logic has been pushed into
2058         the GpuMemoryManager.
2059
2060         * platform/graphics/chromium/LayerRendererChromium.cpp:
2061         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
2062         (WebCore::LayerRendererChromium::beginDrawingFrame):
2063         * platform/graphics/chromium/LayerRendererChromium.h:
2064         (LayerRendererChromiumClient):
2065         * platform/graphics/chromium/TextureManager.cpp:
2066         (WebCore::TextureManager::setMemoryAllocationLimitBytes):
2067         (WebCore):
2068         * platform/graphics/chromium/TextureManager.h:
2069         (TextureManager):
2070         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2071         (WebCore::CCLayerTreeHost::setViewportSize):
2072         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
2073         (WebCore):
2074         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2075         (CCLayerTreeHost):
2076         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2077         (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes):
2078         (WebCore):
2079         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2080         (CCLayerTreeHostImplClient):
2081         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2082         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2083         (WebCore):
2084         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2085         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2086         (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2087         (WebCore):
2088         (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes):
2089         * platform/graphics/chromium/cc/CCThreadProxy.h:
2090         (CCThreadProxy):
2091
2092 2012-05-02  Emil A Eklund  <eae@chromium.org>
2093
2094         Fix usage of layout types in platform code
2095         https://bugs.webkit.org/show_bug.cgi?id=85392
2096
2097         Reviewed by Eric Seidel.
2098
2099         No new tests, no change in functionality.
2100
2101         * page/EventHandler.cpp:
2102         (WebCore::EventHandler::handleGestureTap):
2103         Use rounded point for gestures as event handling is still mostly int based.
2104
2105 2012-05-02  Kenneth Russell  <kbr@google.com>
2106
2107         Don't allocate stencil buffer if stencil flag is false in context creation attributes
2108         https://bugs.webkit.org/show_bug.cgi?id=85317
2109
2110         Reviewed by Dimitri Glazkov.
2111
2112         Make it appear to WebGL application that there is no stencil
2113         buffer even if the underlying GraphicsContext3D allocated one.
2114         Verified intended behavior with test case from Mozilla's bug report.
2115
2116         Updated context-attributes-alpha-depth-stencil-antialias.html test
2117         from Khronos repository. Ran WebGL layout tests on Linux in
2118         Chrome's DRT and on Mac OS in Safari's.
2119
2120         * html/canvas/WebGLFramebuffer.cpp:
2121         (WebCore::WebGLFramebuffer::hasStencilBuffer): Added query method.
2122         (WebCore): Changed desired semantics of isValidRenderbuffer.
2123         * html/canvas/WebGLFramebuffer.h:
2124         (WebGLFramebuffer): Added hasStencilBuffer.
2125         * html/canvas/WebGLRenderingContext.cpp:
2126         (WebCore):
2127         (WebCore::WebGLRenderingContext::initializeNewContext):
2128             Clear new flag.
2129         (WebCore::WebGLRenderingContext::bindFramebuffer):
2130             Reset stencil test upon framebuffer change.
2131         (WebCore::WebGLRenderingContext::disable):
2132             Cache flag; reset stencil test.
2133         (WebCore::WebGLRenderingContext::enable):
2134             Cache flag; reset stencil test.
2135         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
2136             Reset stencil test upon renderbuffer change.
2137         (WebCore::WebGLRenderingContext::getContextAttributes):
2138             Force depth and stencil to false if false was requested.
2139         (WebCore::WebGLRenderingContext::isEnabled):
2140             Return cached flag.
2141         (WebCore::WebGLRenderingContext::renderbufferStorage):
2142             Reset stencil test upon renderbuffer reallocation.
2143         (WebCore::WebGLRenderingContext::applyStencilTest):
2144             Enable or disable stencil test based on request and availability.
2145         (WebCore::WebGLRenderingContext::enableOrDisable):
2146             Helper function.
2147         * html/canvas/WebGLRenderingContext.h:
2148         (WebGLRenderingContext):
2149             Added cache of STENCIL_TEST flag. Deleted unused m_stencilBits.
2150
2151 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
2152
2153         Drag and drop text into table is pasting the text in the next <td> element
2154         https://bugs.webkit.org/show_bug.cgi?id=75004
2155
2156         Reviewed by Darin Adler.
2157
2158         The bug was caused by ReplaceSelectionCommand adjusting the insertion position to be before
2159         of the block element containing the insertion position even when the block element is a table cell.
2160
2161         Fixed the bug by not moving the insertion position before the table cell in this case.
2162
2163         Test: editing/pasteboard/paste-into-table-cell.html
2164
2165         * editing/ReplaceSelectionCommand.cpp:
2166         (WebCore::ReplaceSelectionCommand::doApply):
2167
2168 2012-05-02  Beth Dakin  <bdakin@apple.com>
2169
2170         https://bugs.webkit.org/show_bug.cgi?id=85309
2171         supportsExpandedScrollbars() should check for the method we actually call rather 
2172         than a related method
2173
2174         Reviewed by Anders Carlsson.
2175
2176         Missing colon.
2177         * platform/mac/ScrollbarThemeMac.mm:
2178         (WebCore::supportsExpandedScrollbars):
2179
2180 2012-05-02  Antti Koivisto  <antti@apple.com>
2181
2182         Move title and media queries from StyleSheetInternal to CSSStyleSheet
2183         https://bugs.webkit.org/show_bug.cgi?id=85387
2184
2185         Reviewed by Anders Carlsson.
2186
2187         Stylesheet title and media queries are determined by the owner, not by the stylesheet itself.
2188         The fields belong to CSSStyleSheet.
2189         
2190         This will make it easier to share StyleSheetInternal instances between documents.
2191
2192         * css/CSSStyleSheet.cpp:
2193         (WebCore::StyleSheetInternal::StyleSheetInternal):
2194         (WebCore::StyleSheetInternal::isCacheable):
2195         (WebCore):
2196         (WebCore::CSSStyleSheet::setDisabled):
2197         
2198             Invalidate the document style directly instead of ping-ponging through StyleSheetInternal.
2199
2200         (WebCore::CSSStyleSheet::setMediaQueries):
2201         (WebCore::CSSStyleSheet::media):
2202         * css/CSSStyleSheet.h:
2203         (StyleSheetInternal):
2204         (WebCore::StyleSheetInternal::originalURL):
2205         (WebCore::StyleSheetInternal::hasCharsetRule):
2206         (WebCore::CSSStyleSheet::mediaQueries):
2207         (CSSStyleSheet):
2208         (WebCore::CSSStyleSheet::setTitle):
2209         * css/StyleResolver.cpp:
2210         (WebCore::StyleResolver::appendAuthorStylesheets):
2211         (WebCore::StyleResolver::collectMatchingRulesForList):
2212         * dom/DOMImplementation.cpp:
2213         (WebCore::DOMImplementation::createCSSStyleSheet):
2214         * dom/ProcessingInstruction.cpp:
2215         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2216         * dom/StyleElement.cpp:
2217         (WebCore::StyleElement::createSheet):
2218         * html/HTMLLinkElement.cpp:
2219         (WebCore::HTMLLinkElement::parseAttribute):
2220         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2221         * html/HTMLStyleElement.cpp:
2222         (WebCore::HTMLStyleElement::parseAttribute):
2223         * svg/SVGStyleElement.cpp:
2224         (WebCore::SVGStyleElement::parseAttribute):
2225
2226 2012-05-02  Alexis Menard  <alexis.menard@openbossa.org>
2227
2228         Unreviewed Qt build fix with GCC 4.7.0.
2229
2230         * platform/qt/DeviceMotionProviderQt.h:
2231         (DeviceMotionProviderQt):
2232         * platform/qt/DeviceOrientationProviderQt.cpp:
2233         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
2234         (WebCore):
2235         * platform/qt/DeviceOrientationProviderQt.h:
2236         (DeviceOrientationProviderQt):
2237
2238 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
2239
2240         [Texmap] Enable css filters in TextureMapperGL
2241         https://bugs.webkit.org/show_bug.cgi?id=75778
2242
2243         Unreviewed build fix to greenify the Qt Minimal bot.
2244
2245         * platform/graphics/texmap/TextureMapperShaderManager.h:
2246
2247 2012-05-02  Philippe Normand  <pnormand@igalia.com>
2248
2249         [GTK] Compilation warnings in RenderTheme
2250         https://bugs.webkit.org/show_bug.cgi?id=85286
2251
2252         Reviewed by Martin Robinson.
2253
2254         Removed un-needed code and refactored fileListNameForWidth
2255         accordingly to avoid un-used variable warnings during compilation.
2256
2257         * platform/gtk/RenderThemeGtk.cpp:
2258         (WebCore):
2259         (WebCore::RenderThemeGtk::fileListNameForWidth):
2260
2261 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
2262
2263         NULL ptr in WebCore::AppendNodeCommand::AppendNodeCommand
2264         https://bugs.webkit.org/show_bug.cgi?id=75843
2265
2266         Reviewed by Tony Chang.
2267
2268         The crash was caused by indentIntoBlockquote's passing a bad outerBlock to moveParagraphsWithClone.
2269
2270         When the position is created after blockquote in the following DOM:
2271         BODY
2272         * BLOCKQUOTE style=margin: 0 0 0 40px; border: none; padding: 0px;
2273             E
2274                 #text "\nx\n"
2275         VisiblePosition's constructor (of startOfContents) turns the position into a legacy position (blockquote, 0).
2276         The crash occurs because this position doesn't belong in the same paragraph as E, which is the paragraph
2277         we're trying to move into the blockquote.
2278
2279         Fixed bug by calling positionInParentAfterNode instead of positionAfterNode for now. We should eventually be
2280         able to use positionAfterNode here once VisiblePosition's constructor starts handling before/after positions
2281         properly.
2282
2283         Test: editing/execCommand/indent-with-after-content-crash.html
2284
2285         * editing/IndentOutdentCommand.cpp:
2286         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
2287
2288 2012-05-02  Jer Noble  <jer.noble@apple.com>
2289
2290         WebWindowFadeAnimation ignores "duration" parameter.
2291         https://bugs.webkit.org/show_bug.cgi?id=85386
2292
2293         Reviewed by Brady Eidson.
2294
2295         Ignoring the "duration" parameter causes the full screen fade and scale animations
2296         to get out of sync.
2297
2298         * platform/mac/WebWindowAnimation.mm:
2299         (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]):
2300
2301 2012-05-02  Julien Chaffraix  <jchaffraix@webkit.org>
2302
2303         REGRESSION(110072): Clipping is not applied on layers that are animated using platform code
2304         https://bugs.webkit.org/show_bug.cgi?id=83954
2305
2306         Reviewed by Simon Fraser.
2307
2308         Tests: fast/layers/no-clipping-overflow-hidden-added-after-transform-expected.html
2309                fast/layers/no-clipping-overflow-hidden-added-after-transform.html
2310                fast/layers/no-clipping-overflow-hidden-added-after-transition-expected.html
2311                fast/layers/no-clipping-overflow-hidden-added-after-transition.html
2312                fast/layers/no-clipping-overflow-hidden-hardware-acceleration-expected.html
2313                fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
2314                (and all the tests that will need to be rebaselined)
2315
2316         r110072 changed the way we create layers to lazily allocate overflow: hidden ones
2317         based on layout overflow. However with hardware acceleration, certain operations
2318         do cause overflow without actually calling layout (the test cases added as part
2319         of this change are using transition / animation). This means that those cases
2320         wouldn't properly clip.
2321
2322         Due to the above issue and the other regressions from r110072, the easiest fix is
2323         to just to roll it out.
2324
2325         * rendering/RenderBox.h:
2326         Changed to allocate a layer whenever we have an overflow clip.
2327
2328         * rendering/RenderBox.cpp:
2329         (WebCore::RenderBox::scrolledContentOffset):
2330         (WebCore::RenderBox::cachedSizeForOverflowClip):
2331         Reverted those 2 to avoid using the cached size logic.
2332
2333         * rendering/RenderBlock.cpp:
2334         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
2335         (WebCore::RenderBlock::layoutBlock):
2336         (WebCore::RenderBlock::paint):
2337         (WebCore::RenderBlock::isPointInOverflowControl):
2338         * rendering/RenderBlock.h:
2339         * rendering/RenderBox.cpp:
2340         (WebCore::RenderBox::willBeDestroyed):
2341         (WebCore::RenderBox::styleDidChange):
2342         (WebCore::RenderBox::layout):
2343         (WebCore::RenderBox::scrollWidth):
2344         (WebCore::RenderBox::scrollHeight):
2345         (WebCore::RenderBox::scrollLeft):
2346         (WebCore::RenderBox::scrollTop):
2347         (WebCore::RenderBox::setScrollLeft):
2348         (WebCore::RenderBox::setScrollTop):
2349         (WebCore::RenderBox::includeVerticalScrollbarSize):
2350         (WebCore::RenderBox::includeHorizontalScrollbarSize):
2351         (WebCore::RenderBox::pushContentsClip):
2352         (WebCore::RenderBox::popContentsClip):
2353         (WebCore::RenderBox::addLayoutOverflow):
2354         * rendering/RenderBoxModelObject.cpp:
2355         (WebCore::RenderBoxModelObject::styleDidChange):
2356         * rendering/RenderBoxModelObject.h:
2357         (RenderBoxModelObject):
2358         * rendering/RenderDeprecatedFlexibleBox.cpp:
2359         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2360         * rendering/RenderFlexibleBox.cpp:
2361         (WebCore::RenderFlexibleBox::layoutBlock):
2362         * rendering/RenderTable.cpp:
2363         (WebCore::RenderTable::layout):
2364         * rendering/RenderTableRow.h:
2365         (RenderTableRow):
2366         * rendering/RenderTableSection.cpp:
2367         (WebCore::RenderTableSection::layout):
2368         Removed the previous scaffolding code and reverted some functions to
2369         being private (as they were prior to r110072).
2370
2371 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
2372
2373         [Texmap] Enable css filters in TextureMapperGL
2374         https://bugs.webkit.org/show_bug.cgi?id=75778
2375
2376         Reviewed by Jocelyn Turcotte.
2377
2378         Added support for color filters in TextureMapperGL. Blur and shadow would be done in a
2379         different patch.
2380
2381         Modified BitmapTexture::applyFilters to return a texture, since GL cannot paint a texture
2382         into itself.
2383         Created a shader map for standard filters, since all of them work more or less the same way
2384         with a single uniform. Added the colorization shaders based on the W3C filter spec, as
2385         already implemented in FEFilterRenderer.cpp and FEColorMatrix.cpp.
2386         We use two swapping textures to render the filters.
2387
2388         Covered by tests in css3/filters.
2389
2390         * platform/graphics/texmap/TextureMapper.cpp:
2391         (WebCore::TextureMapper::acquireTextureFromPool):
2392         * platform/graphics/texmap/TextureMapper.h:
2393         (WebCore::BitmapTexture::applyFilters):
2394         * platform/graphics/texmap/TextureMapperGL.cpp:
2395         (WebCore::BitmapTextureGL::updateContents):
2396         (WebCore):
2397         (WebCore::TextureMapperGL::drawFiltered):
2398         (WebCore::BitmapTextureGL::applyFilters):
2399         (WebCore::BitmapTextureGL::bind):
2400         * platform/graphics/texmap/TextureMapperGL.h:
2401         (TextureMapperGL):
2402         (BitmapTextureGL):
2403         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2404         (WebCore::BitmapTextureImageBuffer::applyFilters):
2405         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2406         (BitmapTextureImageBuffer):
2407         * platform/graphics/texmap/TextureMapperLayer.cpp:
2408         (WebCore::applyFilters):
2409         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
2410         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2411         (WebCore::TextureMapperShaderManager::~TextureMapperShaderManager):
2412         (WebCore):
2413         (WebCore::StandardFilterProgram::~StandardFilterProgram):
2414         (WebCore::StandardFilterProgram::StandardFilterProgram):
2415         (WebCore::StandardFilterProgram::create):
2416         (WebCore::StandardFilterProgram::prepare):
2417         (WebCore::TextureMapperShaderManager::getShaderForFilter):
2418         * platform/graphics/texmap/TextureMapperShaderManager.h:
2419         (WebCore):
2420         (StandardFilterProgram):
2421         (WebCore::StandardFilterProgram::vertexAttrib):
2422         (WebCore::StandardFilterProgram::texCoordAttrib):
2423         (WebCore::StandardFilterProgram::textureUniform):
2424         (TextureMapperShaderManager):
2425
2426 2012-05-02  Philippe Normand  <pnormand@igalia.com>
2427
2428         [GTK] media/track/track-cue-rendering-snap-to-lines-not-set.html fails
2429         https://bugs.webkit.org/show_bug.cgi?id=84378
2430
2431         Reviewed by Eric Carlson.
2432
2433         Fix positioning of the controls panel back to relative, as it is
2434         in the parent CSS. Also remove some duplicate CSS attributes.
2435
2436         * css/mediaControlsGtk.css:
2437         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2438
2439 2012-05-02  Beth Dakin  <bdakin@apple.com>
2440
2441         https://bugs.webkit.org/show_bug.cgi?id=85309
2442         supportsExpandedScrollbars() should check for the method we actually call rather 
2443         than a related method
2444         -and corresponding-
2445         <rdar://problem/11065691>
2446
2447         Reviewed by Anders Carlsson.
2448
2449         * platform/mac/ScrollbarThemeMac.mm:
2450         (WebCore::supportsExpandedScrollbars):
2451
2452 2012-05-02  Zalan Bujtas  <zbujtas@gmail.com>
2453
2454         [Qt] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions()
2455         https://bugs.webkit.org/show_bug.cgi?id=84241
2456
2457         Reviewed by Kenneth Rohde Christiansen.
2458
2459         No need to update viewport arguments when the body element is inserted into the Document.
2460         Viewport arguments are updated first when the Document is set on the Frame, and later
2461         on any subsequent occurence of the viewport meta tag in the document.
2462         It is sufficient to dispatch viewport update once per main frame, if no viewport meta tag is present.
2463
2464         Also add a flag to be able to track viewport argument update dispatch.
2465
2466         No tests. Currrent viewport tests cover this behaviour.
2467
2468         * dom/Document.cpp:
2469         (WebCore::Document::Document):
2470         (WebCore::Document::updateViewportArguments):
2471         (WebCore::Document::documentWillSuspendForPageCache):
2472         * dom/Document.h:
2473         (Document):
2474         (WebCore::Document::didDispatchViewportPropertiesChanged):
2475         * html/HTMLBodyElement.cpp:
2476         (WebCore::HTMLBodyElement::didNotifyDescendantInseretions):
2477
2478 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
2479
2480         Web Inspector: Cannot read property 'length' of undefined TextEditorModel.js:467
2481         https://bugs.webkit.org/show_bug.cgi?id=85360
2482
2483         Reviewed by Yury Semikhatsky.
2484
2485         Added the undo/redo stack length checks.
2486
2487         * inspector/front-end/TextEditorModel.js:
2488         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2489
2490 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
2491
2492         WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed.
2493         https://bugs.webkit.org/show_bug.cgi?id=85361
2494
2495         Reviewed by Yury Semikhatsky.
2496
2497         Added content validation upon script show.
2498
2499         * inspector/front-end/JavaScriptSourceFrame.js:
2500         (WebInspector.JavaScriptSourceFrame.prototype.wasShown):
2501
2502 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
2503
2504         Web Inspector: breakpoints are de-activated only upon the second click.
2505         https://bugs.webkit.org/show_bug.cgi?id=85359
2506
2507         Reviewed by Yury Semikhatsky.
2508
2509         Initial value for activated state is set.
2510
2511         * inspector/front-end/DebuggerModel.js:
2512         (WebInspector.DebuggerModel):
2513
2514 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
2515
2516         Web Inspector: live edit fails to report error
2517         https://bugs.webkit.org/show_bug.cgi?id=85357
2518
2519         Reviewed by Yury Semikhatsky.
2520
2521         ProtocolError is now a string, not an error object.
2522
2523         * inspector/front-end/DatabaseQueryView.js:
2524         (WebInspector.DatabaseQueryView.prototype._queryError):
2525         * inspector/front-end/SourceFrame.js:
2526         (WebInspector.SourceFrame.prototype.didEditContent):
2527
2528 2012-05-02  Lars Knudsen  <lars.knudsen@nokia.com>
2529
2530         [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2
2531         https://bugs.webkit.org/show_bug.cgi?id=64595
2532
2533         Reviewed by Kenneth Rohde Christiansen.
2534
2535         No new tests added.  This change adds support for WK2
2536         what was in WK1.
2537
2538         Also moving DeviceMotion and DeviceOrientation clients and
2539         providers to WebCore.  This is done to allow clean dependencies
2540         when statically linking WK2.
2541
2542         * Target.pri:
2543         * WebCore.pri:
2544         * platform/qt/DeviceMotionClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp.
2545         (WebCore):
2546         (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
2547         (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
2548         (WebCore::DeviceMotionClientQt::setController):
2549         (WebCore::DeviceMotionClientQt::startUpdating):
2550         (WebCore::DeviceMotionClientQt::stopUpdating):
2551         (WebCore::DeviceMotionClientQt::currentDeviceMotion):
2552         * platform/qt/DeviceMotionClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h.
2553         (WebCore):
2554         (DeviceMotionClientQt):
2555         (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
2556         * platform/qt/DeviceMotionProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp.
2557         (WebCore):
2558         (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
2559         (WebCore::DeviceMotionProviderQt::~DeviceMotionProviderQt):
2560         (WebCore::DeviceMotionProviderQt::setController):
2561         (WebCore::DeviceMotionProviderQt::start):
2562         (WebCore::DeviceMotionProviderQt::stop):
2563         (WebCore::DeviceMotionProviderQt::filter):
2564         * platform/qt/DeviceMotionProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h.
2565         (WebCore):
2566         (DeviceMotionProviderQt):
2567         (WebCore::DeviceMotionProviderQt::currentDeviceMotion):
2568         * platform/qt/DeviceOrientationClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp.
2569         (WebCore):
2570         (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
2571         (WebCore::DeviceOrientationClientQt::setController):
2572         (WebCore::DeviceOrientationClientQt::startUpdating):
2573         (WebCore::DeviceOrientationClientQt::stopUpdating):
2574         (WebCore::DeviceOrientationClientQt::lastOrientation):
2575         * platform/qt/DeviceOrientationClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h.
2576         (WebCore):
2577         (DeviceOrientationClientQt):
2578         * platform/qt/DeviceOrientationProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp.
2579         (WebCore):
2580         (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
2581         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
2582         (WebCore::DeviceOrientationProviderQt::setController):
2583         (WebCore::DeviceOrientationProviderQt::start):
2584         (WebCore::DeviceOrientationProviderQt::stop):
2585         (WebCore::DeviceOrientationProviderQt::filter):
2586         * platform/qt/DeviceOrientationProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h.
2587         (WebCore):
2588         (DeviceOrientationProviderQt):
2589         (WebCore::DeviceOrientationProviderQt::isActive):
2590         (WebCore::DeviceOrientationProviderQt::lastOrientation):
2591         (WebCore::DeviceOrientationProviderQt::hasAlpha):
2592
2593 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
2594
2595         Web Inspector: exception in console when there are watch expressions
2596         https://bugs.webkit.org/show_bug.cgi?id=85351
2597
2598         Check if script execution is still paused before trying to resolve an
2599         object for script popover because execution may be resumed after popover
2600         showing is scheduled but before we start resolving the object under
2601         the cursor in which case there is no selected call frame any more and
2602         we should hide the popover.
2603
2604         Reviewed by Pavel Feldman.
2605
2606         * inspector/front-end/JavaScriptSourceFrame.js:
2607         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
2608
2609 2012-05-02  Tommy Widenflycht  <tommyw@google.com>
2610
2611         MediaStream API: Changing webkitGetUserMedia to take an object instead of a string
2612         https://bugs.webkit.org/show_bug.cgi?id=84850
2613
2614         Reviewed by Dimitri Glazkov.
2615
2616         The standard changed a while back to use an object as a dictionary but since JSC
2617         didn't support the Dictionary class until just recently we have not updated the API until now.
2618
2619         Change covered by existing, and edited, tests.
2620
2621         * Modules/mediastream/NavigatorMediaStream.cpp:
2622         (WebCore::NavigatorMediaStream::webkitGetUserMedia):
2623         * Modules/mediastream/NavigatorMediaStream.h:
2624         (WebCore):
2625         (NavigatorMediaStream):
2626         * Modules/mediastream/NavigatorMediaStream.idl:
2627         * Modules/mediastream/UserMediaRequest.cpp:
2628         (WebCore::UserMediaRequest::create):
2629         (WebCore::UserMediaRequest::UserMediaRequest):
2630         * Modules/mediastream/UserMediaRequest.h:
2631         (WebCore):
2632         (UserMediaRequest):
2633         * platform/mediastream/MediaStreamSourcesQueryClient.h:
2634         (MediaStreamSourcesQueryClient):
2635
2636 2012-05-02  Antti Koivisto  <antti@apple.com>
2637
2638         StyleSheetInternal::parseUserStyleSheet() should be called parseAuthorStyleSheet().
2639
2640         Rubber-stamped by Nikolas Zimmermann.
2641
2642         * css/CSSImportRule.cpp:
2643         (WebCore::StyleRuleImport::setCSSStyleSheet):
2644         * css/CSSStyleSheet.cpp:
2645         (WebCore::StyleSheetInternal::parseAuthorStyleSheet):
2646         * css/CSSStyleSheet.h:
2647         (StyleSheetInternal):
2648         * html/HTMLLinkElement.cpp:
2649         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2650
2651 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
2652
2653         REGRESSION: Web Inspector doesn't show cookies anymore
2654         https://bugs.webkit.org/show_bug.cgi?id=85349
2655
2656         Pass root node instead of DataGrid object to the "populateNode" method.
2657         Added compiler annotations so that closure compiler catches such errors.
2658
2659         Reviewed by Pavel Feldman.
2660
2661         * inspector/front-end/CookiesTable.js:
2662         (WebInspector.CookiesTable.prototype._rebuildTable):
2663         * inspector/front-end/NetworkRequest.js:
2664         (WebInspector.NetworkRequest.prototype.addFrameError):
2665
2666 2012-05-02  Dongwoo Im  <dw.im@samsung.com>
2667
2668         [EFL] Implement the Web Audio API feature.
2669         https://bugs.webkit.org/show_bug.cgi?id=78688
2670
2671         Reviewed by Philippe Normand.
2672
2673         Implement the Web Audio API feature on the EFL port.
2674         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
2675
2676         * CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi.
2677         * PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi.
2678         * UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi.
2679         * platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro.
2680         (WebCore):
2681         * platform/audio/efl/AudioBusEfl.cpp: Added.
2682         (WebCore):
2683         (WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource.
2684
2685 2012-05-01  Kentaro Hara  <haraken@chromium.org>
2686
2687         [V8] Add an Isolate parameter to setJSWrapperForXXX()
2688         https://bugs.webkit.org/show_bug.cgi?id=85329
2689
2690         Reviewed by Adam Barth.
2691
2692         The objective is to pass Isolate around in V8 bindings.
2693         This patch adds an Isolate parameter to setJSWrapperForXXX()
2694         and passes Isolate to setJSWrapperForXXX() in CodeGeneratorV8.pm.
2695         I'll pass Isolate to setJSWrapperForXXX() in custom bindings
2696         in a follow-up patch.
2697
2698         No tests. No change in behavior.
2699
2700         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
2701         (GenerateConstructorCallback):
2702         (GenerateEventConstructorCallback):
2703         (GenerateNamedConstructorCallback):
2704         (GenerateToV8Converters):
2705         * bindings/v8/V8DOMWrapper.cpp:
2706         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
2707         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode):
2708         * bindings/v8/V8DOMWrapper.h:
2709         (V8DOMWrapper):
2710         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
2711         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
2712
2713         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results.
2714         (WebCore::V8Float64Array::wrapSlow):
2715         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2716         (WebCore::V8TestActiveDOMObject::wrapSlow):
2717         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2718         (WebCore::V8TestCustomNamedGetter::wrapSlow):
2719         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2720         (WebCore::V8TestEventConstructor::constructorCallback):
2721         (WebCore::V8TestEventConstructor::wrapSlow):
2722         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2723         (WebCore::V8TestEventTarget::wrapSlow):
2724         * bindings/scripts/test/V8/V8TestInterface.cpp:
2725         (WebCore::V8TestInterface::constructorCallback):
2726         (WebCore::V8TestInterface::wrapSlow):
2727         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2728         (WebCore::V8TestMediaQueryListListener::wrapSlow):
2729         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2730         (WebCore::V8TestNamedConstructorConstructorCallback):
2731         (WebCore::V8TestNamedConstructor::wrapSlow):
2732         * bindings/scripts/test/V8/V8TestNode.cpp:
2733         (WebCore::V8TestNode::constructorCallback):
2734         (WebCore::V8TestNode::wrapSlow):
2735         * bindings/scripts/test/V8/V8TestObj.cpp:
2736         (WebCore::V8TestObj::constructorCallback):
2737         (WebCore::V8TestObj::wrapSlow):
2738         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2739         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2740         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
2741
2742 2012-05-01  Eric Seidel  <eric@webkit.org>
2743
2744         Add <iframe seamless> navigation code (and pass all the navigation tests)
2745         https://bugs.webkit.org/show_bug.cgi?id=85340
2746
2747         Reviewed by Adam Barth.
2748
2749         This code was primarily written by Adam Barth and then submitted to my
2750         GitHub branch via a pull request:
2751         https://github.com/eseidel/webkit/compare/master...seamless
2752         https://github.com/eseidel/webkit/pull/2
2753         https://github.com/eseidel/webkit/pull/3
2754
2755         I rewrote parts of it to use Docment::shouldDisplaySeamlesslyWithParent.
2756
2757         Other parts of the original change have already been committed to WebKit by Adam
2758         as part of prep-work for making the loader seamless-ready.
2759
2760         * loader/FrameLoader.cpp:
2761         (WebCore::FrameLoader::findFrameForNavigation):
2762
2763 2012-05-01  Vincent Scheib  <scheib@chromium.org>
2764
2765         Fullscreen pop-up logic restored to using processingUserGesture.
2766         https://bugs.webkit.org/show_bug.cgi?id=85105
2767
2768         WebKit was recently updated to the new Fullscreen API:
2769         http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
2770         http://trac.webkit.org/changeset/111028
2771
2772         This change reverts back to using processingUserGesture() instead
2773         of DOMWindow::allowPopUp(). This fixes incorrect behavior in
2774         at least the Chromium port and is consistent with the cited
2775         definition of "allowed to show a pop-up":
2776           An algorithm is allowed to show a pop-up if, in the task in which the algorithm is running, either:
2777           - an activation behavior is currently being processed whose click event was trusted, or
2778           - the event listener for a trusted click event is being handled.
2779
2780         Reviewed by Dimitri Glazkov.
2781
2782         No new tests.
2783
2784         * dom/Document.cpp:
2785         (WebCore::Document::requestFullScreenForElement):
2786
2787 2012-05-01  Xiaomei Ji  <xji@chromium.org>
2788
2789         enable ctrl-arrow move by word visually in non-Windows platforms.
2790         https://bugs.webkit.org/show_bug.cgi?id=85017
2791
2792         Reviewed by Ryosuke Niwa.
2793
2794         Enable ctrl-arrow moves caret by word in visual order in non-Windows platforms that use ICU word
2795         break iterator (it is not enabled for WinCE and Qt where ICU is not used). For those platforms, ctrl-arrow
2796         moves caret to word break position before spaces. For example, given a logical text "abc def hij", the word
2797         break positions using ctrl-left-arrow from rightmost position are "|abc |def |hij".
2798         The word break positions using ctrl-right-arrow from leftmost position are "abc| def| hij|".
2799
2800         Test: editing/selection/move-by-word-visually-mac.html
2801
2802         * editing/EditingBehavior.h:
2803         (EditingBehavior):
2804         (WebCore::EditingBehavior::shouldEatSpaceToNextWord): To control different word break positions
2805         (regards to space) for different platforms.
2806         * editing/FrameSelection.cpp:
2807         (WebCore::FrameSelection::modifyMovingRight): Enable visual word movement for all platforms that use ICU.
2808         (WebCore::FrameSelection::modifyMovingLeft):
2809         * editing/visible_units.cpp:
2810         (WebCore::visualWordPosition): Determine the right word break position (regards to space) based on EditingBehavior.
2811         (WebCore::leftWordPosition):
2812         (WebCore::rightWordPosition):
2813         * editing/visible_units.h:
2814
2815 2012-05-01  Raymond Liu  <raymond.liu@intel.com>
2816
2817         Modify RealtimeAnalyserNode pull mechanism
2818         https://bugs.webkit.org/show_bug.cgi?id=77515
2819
2820         Reviewed by Chris Rogers.
2821
2822         Test: webaudio/automatic-pull-node.html
2823
2824         * GNUmakefile.list.am:
2825         * Modules/webaudio/AudioBasicInspectorNode.cpp: Added.
2826         (WebCore):
2827         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
2828         (WebCore::AudioBasicInspectorNode::pullInputs):
2829         (WebCore::AudioBasicInspectorNode::connect):
2830         (WebCore::AudioBasicInspectorNode::disconnect):
2831         (WebCore::AudioBasicInspectorNode::checkNumberOfChannelsForInput):
2832         (WebCore::AudioBasicInspectorNode::updatePullStatus):
2833         * Modules/webaudio/AudioBasicInspectorNode.h: Added.
2834         (WebCore):
2835         (AudioBasicInspectorNode):
2836         * Modules/webaudio/AudioContext.cpp:
2837         (WebCore::AudioContext::AudioContext):
2838         (WebCore::AudioContext::~AudioContext):
2839         (WebCore::AudioContext::handlePreRenderTasks):
2840         (WebCore::AudioContext::handlePostRenderTasks):
2841         (WebCore::AudioContext::markForDeletion):
2842         (WebCore):
2843         (WebCore::AudioContext::addAutomaticPullNode):
2844         (WebCore::AudioContext::removeAutomaticPullNode):
2845         (WebCore::AudioContext::updateAutomaticPullNodes):
2846         (WebCore::AudioContext::processAutomaticPullNodes):
2847         * Modules/webaudio/AudioContext.h:
2848         (AudioContext):
2849         * Modules/webaudio/AudioDestinationNode.cpp:
2850         (WebCore::AudioDestinationNode::provideInput):
2851         * Modules/webaudio/AudioNode.h:
2852         (AudioNode):
2853         * Modules/webaudio/AudioNodeOutput.h:
2854         (WebCore::AudioNodeOutput::isConnected):
2855         (AudioNodeOutput):
2856         * Modules/webaudio/RealtimeAnalyserNode.cpp:
2857         (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
2858         * Modules/webaudio/RealtimeAnalyserNode.h:
2859         (RealtimeAnalyserNode):
2860         * WebCore.gypi:
2861         * WebCore.xcodeproj/project.pbxproj:
2862
2863 2012-05-01  Keishi Hattori  <keishi@webkit.org>
2864
2865         datalist: Form control in a <datalist> should be barred from constraint validation
2866         https://bugs.webkit.org/show_bug.cgi?id=84359
2867
2868         Reviewed by Kent Tamura.
2869
2870         Tests: fast/forms/datalist/datalist-child-validation.html
2871                fast/forms/form-control-element-crash.html
2872
2873         * html/HTMLFormControlElement.cpp:
2874         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2875         (WebCore::HTMLFormControlElement::updateAncestors): Updates the ancestor information.
2876         (WebCore::HTMLFormControlElement::insertedInto): Invalidate the ancestor information and call setNeedsWillValidateCheck because willValidate might have changed.
2877         (WebCore::HTMLFormControlElement::removedFrom): Ditto.
2878         (WebCore::HTMLFormControlElement::disabled):
2879         (WebCore::HTMLFormControlElement::recalcWillValidate): Returns false if element has a datalist ancestor.
2880         (WebCore::HTMLFormControlElement::willValidate): Check if ancestor information is valid too.
2881         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
2882         * html/HTMLFormControlElement.h:
2883         (HTMLFormControlElement):
2884
2885 2012-05-01  Kent Tamura  <tkent@chromium.org>
2886
2887         Calendar Picker: Close the picker by ESC key
2888         https://bugs.webkit.org/show_bug.cgi?id=85337
2889
2890         Reviewed by Kentaro Hara.
2891
2892         No new tests. Calendar picker is not testable in DRT yet.
2893
2894         * Resources/calendarPicker.js:
2895         (handleGlobalKey): Close the popup by ESC key.
2896
2897 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
2898
2899         PNGImageDecoder: Handle interlace buffer allocation failure
2900         https://bugs.webkit.org/show_bug.cgi?id=85276
2901
2902         Reviewed by Eric Seidel.
2903
2904         No new tests. Not something we can easily test (malloc failure).
2905
2906         * platform/image-decoders/png/PNGImageDecoder.cpp:
2907         (WebCore::PNGImageDecoder::rowAvailable): Check interlace buffer allocations
2908         and bail via longjmp on failure. Note PNG_INTERLACE_ADAM7 is the only libpng
2909         supported interlace type so test for it explicitly.
2910
2911 2012-05-01  Kent Tamura  <tkent@chromium.org>
2912
2913         Calendar Picker: Too wide in Japanese locale
2914         https://bugs.webkit.org/show_bug.cgi?id=85331
2915
2916         Reviewed by Kentaro Hara.
2917
2918         No new tests. This is a locale-specific behavior.
2919
2920         * Resources/calendarPicker.js:
2921         (formatJapaneseImperialEra):
2922         Do not show an imperial era later than 平成99年 to avoid very long
2923         year string like "275760年(平成273772年)."
2924         (YearMonthController.prototype.attachTo):
2925         - Respect the maximum year specfied by <input max=...>
2926           If <input max="9999-12-31"> is specified, we don't need to
2927           secure space for the year 275,760.
2928         - Check the width for 平成99年 as well as the maximum year because
2929           "2087年(平成99年)" is usually wider than "275760年".
2930
2931 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
2932
2933         PNGImageDecoder: Add ENABLE(IMAGE_DECODER_DOWN_SAMPLING) guards to rowAvailable
2934         https://bugs.webkit.org/show_bug.cgi?id=85268
2935
2936         Reviewed by Eric Seidel.
2937
2938         PNGImageDecoder supports image downsampling. Add ENABLE guards to show where
2939         downsampling is applied when outputting decoded rows to the frame buffer. Most
2940         ports don't enable the flag: don't penalize them in terms speed in this tight
2941         row pixel write loop. s/y/destY/ to match setRGBA() and amend some comments.
2942
2943         No new tests. No change in behavior.
2944
2945         * platform/image-decoders/png/PNGImageDecoder.cpp:
2946         (WebCore::PNGImageDecoder::rowAvailable):
2947
2948 2012-05-01  Eric Seidel  <eric@webkit.org>
2949
2950         Remove uneeded min/max pref width assignment from RenderView
2951         https://bugs.webkit.org/show_bug.cgi?id=85325
2952
2953         Reviewed by Julien Chaffraix.
2954
2955         This code has been with us since the original import from KDE:
2956         http://trac.webkit.org/browser/trunk/WebCore/khtml/rendering/render_root.cpp?annotate=blame&rev=4#L93
2957         It's never been documented, or explained.  Removing it showed no
2958         effect on my local layout tests run.
2959         However this code blocks proper implementation of <iframe seamless>
2960         as we have to do proper min/max width negotiation across the iframe boundary.
2961
2962         I would remove the whole function, but doing so opens a whole can of worms
2963         as this override is public, yet normally this function is *private* (well protected on RenderBox).
2964         It seems plausible that frame flattening code needs this override since it doesn't always
2965         call the min/maxPreferredWidth() calls which normally automatically call this compute*
2966         function if the pref-widths are dirty.
2967         Instead of trying to track that all down, I'm just removing this line, and we'll go
2968         back and remove the whole function at a later date if possible.
2969
2970         * rendering/RenderView.cpp:
2971         (WebCore::RenderView::computePreferredLogicalWidths):
2972
2973 2012-05-01  Nate Chapin  <japhet@chromium.org>
2974
2975         REGRESSION(r115654): PDFs come up blank
2976         https://bugs.webkit.org/show_bug.cgi?id=85275
2977
2978         Reviewed by Alexey Proskuryakov.
2979
2980         Test: http/tests/loading/pdf-commit-load-callbacks.html
2981
2982         * loader/DocumentLoader.cpp:
2983         (WebCore::DocumentLoader::finishedLoading): The load needs to be
2984             committed before we call finishedLoading on the
2985             FrameLoaderClient.
2986         * loader/FrameLoader.cpp:
2987         (WebCore::FrameLoader::transitionToCommitted): We're guaranteeing
2988             that receivedFirstData() will be called other ways (namely,
2989             DocumentLoader won't finish without doing so). This call now
2990             causes custom representations to double-commit, which is bad.
2991
2992 2012-05-01  Eric Seidel  <eric@webkit.org>
2993
2994         Add support for seamless attribute as well as seamless sandbox flag and default CSS styling
2995         https://bugs.webkit.org/show_bug.cgi?id=85302
2996
2997         Reviewed by Ojan Vafai.
2998
2999         This also adds support for the seamless sandbox flag from HTML 5.
3000         The sandbox flag is not speficially overridable in the current HTML5,
3001         but it is set (like all sandbox flags) by default when sandbox is specified.
3002         Unfortunately this support is not yet observable in this patch, as
3003         this patch adds not observable features of seamless.
3004
3005         This patch also adds the html.css additions for seamless, as specified:
3006         http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#replaced-elements
3007
3008         I noticed that my previous testing did not confirm that iframes marked
3009         for seamless (but not possible to display as seamless due to sandbox, etc.)
3010         were still to have this seamless styling.  I've added additional testing for this case.
3011
3012         I also added another test for the about:blank FIXME added as part of this change.
3013
3014         In order to support srcdoc w/ seamless, we needed to move the srcdoc determination
3015         sooner in the initSecurityContext function (before the should-inherit early return).
3016
3017         The next patch will make seamless actually observable from JS/DOM, this one
3018         just lays down all the plumbing, and separates the security aspects for
3019         easy review.
3020
3021         Test: fast/frames/seamless/seamless-inherited-origin.html
3022
3023         * css/html.css:
3024         (iframe:not([seamless])):
3025         (iframe[seamless]):
3026         * dom/Document.cpp:
3027         (WebCore::isEligibleForSeamless):
3028         (WebCore):
3029         (WebCore::Document::initSecurityContext):
3030         (WebCore::Document::seamlessParentIFrame):
3031         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
3032         * dom/Document.h:
3033         (WebCore):
3034         (Document):
3035         * dom/SecurityContext.cpp:
3036         (WebCore::SecurityContext::SecurityContext):
3037         * dom/SecurityContext.h:
3038         (WebCore::SecurityContext::mayDisplaySeamlessWithParent):
3039         (SecurityContext):
3040         * html/HTMLAttributeNames.in:
3041         * html/HTMLIFrameElement.cpp:
3042         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
3043         (WebCore):
3044         * html/HTMLIFrameElement.h:
3045         (HTMLIFrameElement):
3046         * html/HTMLIFrameElement.idl:
3047
3048 2012-05-01  Min Qin  <qinmin@google.com>
3049
3050         use USE(NATIVE_FULLSCREEN_VIDEO) instead of ENABLE(NATIVE_FULLSCREEN_VIDEO)
3051         https://bugs.webkit.org/show_bug.cgi?id=85316
3052
3053         Reviewed by Kent Tamura.
3054
3055         NATIVE_FULLSCREEN_VIDEO means the fullscreen video is implemented by native
3056         system view instead of webkit.
3057         So it is more appropriate to use USE(NATIVE_FULLSCREEN_VIDEO).
3058         This chagne also disabled the rendering of the fullscreen video element in webkit
3059         when that flag is set.
3060         Just renaming the variable, no new tests.
3061
3062         * dom/Document.cpp:
3063         (WebCore::Document::webkitWillEnterFullScreenForElement):
3064         (WebCore):
3065         * platform/graphics/MediaPlayer.cpp:
3066         (WebCore):
3067         * platform/graphics/MediaPlayer.h:
3068         (MediaPlayer):
3069         * platform/graphics/MediaPlayerPrivate.h:
3070         (MediaPlayerPrivateInterface):
3071
3072 2012-05-01  Jeffrey Pfau  <jpfau@apple.com>
3073
3074         <rdar://problem/10422318> Support for web content filter delegate for filtering https content
3075         https://bugs.webkit.org/show_bug.cgi?id=85300
3076
3077         Reviewed by Alexey Proskuryakov.
3078
3079         No new tests.
3080
3081         * WebCore.exp.in:
3082         * loader/MainResourceLoader.cpp:
3083         (WebCore::MainResourceLoader::MainResourceLoader):
3084         (WebCore::MainResourceLoader::~MainResourceLoader):
3085         (WebCore::MainResourceLoader::didCancel):
3086         (WebCore::MainResourceLoader::didReceiveResponse):
3087         (WebCore::MainResourceLoader::didReceiveData):
3088         (WebCore::MainResourceLoader::didFinishLoading):
3089         (WebCore::MainResourceLoader::didFail):
3090         * loader/MainResourceLoader.h:
3091         (MainResourceLoader):
3092         * platform/mac/WebCoreSystemInterface.h:
3093         * platform/mac/WebCoreSystemInterface.mm:
3094
3095 2012-05-01  Kent Tamura  <tkent@chromium.org>
3096
3097         Calendar Picker: Add capability to add platform-specific style sheet
3098         https://bugs.webkit.org/show_bug.cgi?id=85272
3099
3100         Reviewed by Kentaro Hara.
3101
3102         Add RenderTheme::extraCalendarPickerStyleSheet(). The resultant string
3103         of the function is inserted into the calendar picker page.
3104
3105         No new tests. Calendar picker apperance is not testable yet.
3106
3107         * Resources/calendarPicker.css: Removed styles for year-month buttons.
3108         * Resources/calendarPickerMac.css:
3109         Moved from calendarPicker.css, and adjust styles so that they look
3110         standard Lion buttons.
3111         (.year-month-button):
3112         (.year-month-button:active):
3113         (.year-month-button:disabled):
3114         * WebCore.gyp/WebCore.gyp: Add a rule to produce CalendarPickerMac.{cpp,h}.
3115         * html/shadow/CalendarPickerElement.cpp:
3116         (WebCore::CalendarPickerElement::writeDocument):
3117         Add extraCalendarPickerStyleSheet() result to the document.
3118         * rendering/RenderTheme.cpp:
3119         (WebCore::RenderTheme::extraCalendarPickerStyleSheet):
3120         Added. Returns an empty CString by default.
3121         * rendering/RenderTheme.h:
3122         (RenderTheme): Added extraCalendarPickerStyleSheet().
3123         * rendering/RenderThemeChromiumMac.h: Added extraCalendarPickerStyleSheet().
3124         * rendering/RenderThemeChromiumMac.mm:
3125         (WebCore::RenderThemeChromiumMac::extraCalendarPickerStyleSheet):
3126         Added. Returns the content of Resources/calendarPickerMac.css.
3127
3128 2012-05-01  James Simonsen  <simonjam@chromium.org>
3129
3130         Ensure HTMLElementStack fails gracefully if it has a non-Element.
3131         https://bugs.webkit.org/show_bug.cgi?id=85167
3132
3133         Reviewed by Adam Barth.
3134
3135         Test: Added to html5lib/resources/webkit02.dat
3136
3137         * html/parser/HTMLElementStack.cpp:
3138         (WebCore::HTMLElementStack::oneBelowTop):
3139         * html/parser/HTMLTreeBuilder.cpp:
3140         (WebCore::HTMLTreeBuilder::processEndTag):
3141
3142 2012-05-01  Ryosuke Niwa  <rniwa@webkit.org>
3143
3144         *Command.h files shouldn't be exported to WebKit layer
3145         https://bugs.webkit.org/show_bug.cgi?id=74778
3146
3147         Reviewed by Eric Seidel.
3148
3149         Remove the dependency on *Command.h files from Mac port's WebKit layer.
3150         Also wrapped the call to TypingCommand::insertParagraphSeparatorInQuotedContent in the Editor class
3151         so that we can just expose Editor's method instead of directly exposing the said static method.
3152
3153         * WebCore.exp.in:
3154         * WebCore.xcodeproj/project.pbxproj:
3155         * editing/Editor.h:
3156         (Editor):
3157         * editing/mac/EditorMac.mm:
3158         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
3159         (WebCore):
3160
3161 2012-05-01  Julien Chaffraix  <jchaffraix@webkit.org>
3162
3163         Remove one bit from m_column to pack RenderTableCell bits more
3164         https://bugs.webkit.org/show_bug.cgi?id=85291
3165
3166         Reviewed by Ojan Vafai.
3167
3168         Memory improvement, covered by the existing unit tests.
3169
3170         * rendering/RenderTableCell.cpp:
3171         * rendering/RenderTableCell.h:
3172         Remove one bit from m_column (which should be fine as I wouldn't expect tables above 1 millions
3173         columns to render at all anyway) to pack the bitfields in 32 bits. Re-arranged the bits to have the bigger
3174         bitfield first.
3175
3176 2012-05-01  Anders Carlsson  <andersca@apple.com>
3177
3178         Slow scrolling on www.sholby.net
3179         https://bugs.webkit.org/show_bug.cgi?id=85304
3180         <rdar://problem/11138952>
3181
3182         Reviewed by Beth Dakin.
3183
3184         Fix two performance issues that showed up on the profiles.
3185
3186         * loader/FrameLoader.cpp:
3187         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3188         Reset the relevant painted object counter; it's only interesting when loading.
3189
3190         * page/Page.cpp:
3191         (WebCore::Page::startCountingRelevantRepaintedObjects):
3192         Set m_isCountingRelevantRepaintedObjects to true after calling reset, since reset now sets it to false.
3193
3194         (WebCore::Page::resetRelevantPaintedObjectCounter):
3195         Set m_isCountingRelevantRepaintedObjects to false.
3196
3197         (WebCore::Page::addRelevantRepaintedObject):
3198         Use HashSet::find to avoid an extra hash lookup.
3199
3200         * page/scrolling/ScrollingCoordinator.cpp:
3201         (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
3202         Remove the call to FrameView::updateCompositingLayersAfterLayout now, since FrameView::notifyScrollPositionChanged
3203         already calls this and was making us to a lot of work twice.
3204
3205 2012-05-01  Silvia Pfeiffer  <silviapf@chromium.org>
3206
3207         Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
3208         which needs overwriting.
3209         https://bugs.webkit.org/show_bug.cgi?id=84570
3210
3211         Reviewed by Eric Carlson.
3212
3213         No new tests - covered by existing audio rendering tests.
3214
3215         * rendering/RenderMedia.cpp:
3216         (WebCore::RenderMedia::paintReplaced): Overwrite inherited function.
3217         (WebCore):
3218         * rendering/RenderMedia.h:
3219         (RenderMedia):
3220
3221 2012-05-01  Terry Anderson  <tdanderson@chromium.org>
3222
3223         Allow a pre-targeted node to be specified when dispatching a GestureTap event
3224         https://bugs.webkit.org/show_bug.cgi?id=85296
3225
3226         Reviewed by Adam Barth.
3227
3228         https://bugs.webkit.org/show_bug.cgi?id=85101
3229             The new parameter will be used and tested in this patch.
3230
3231         * page/EventHandler.cpp:
3232         (WebCore::EventHandler::handleGestureTap):
3233             The new preTargetedNode parameter can be used to pass in the Node that is
3234             the target of the GestureTap event. If this parameter is used, adjustedPoint
3235             is changed to be the center of the Node's bounding rectangle.
3236         * page/EventHandler.h:
3237         (EventHandler):
3238
3239 2012-05-01  Jessie Berlin  <jberlin@apple.com>
3240
3241         Crash calling disconnectFrame on a DOMWindowExtension a second time.
3242         https://bugs.webkit.org/show_bug.cgi?id=85301
3243
3244         Reviewed by Darin Adler.
3245
3246         DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
3247         to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
3248         DOMWindowProperties, even if it already did so when it entered the page cache.
3249
3250         * page/DOMWindowExtension.cpp:
3251         (WebCore::DOMWindowExtension::disconnectFrame):
3252         Don't do anything if the frame has already been disconnected.
3253
3254 2012-05-01  Aaron Colwell  <acolwell@chromium.org>
3255
3256         Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
3257         until the rest of the Media Source v0.5 methods are implemented. This is
3258         to prevent ambiguity about whether v0.5 is fully supported or not.
3259         https://bugs.webkit.org/show_bug.cgi?id=85295
3260
3261         Reviewed by Eric Carlson.
3262
3263         No new tests. Removing methods from DOM so relevant tests are removed.
3264
3265         * html/HTMLMediaElement.idl:
3266
3267 2012-05-01  Douglas Stockwell  <dstockwell@chromium.org>
3268
3269         IndexedDB: stale index entries may not be removed in some cases
3270         https://bugs.webkit.org/show_bug.cgi?id=85224
3271
3272         Reviewed by Ojan Vafai.
3273
3274         Ensure that stale index entries are removed when the corresponding
3275         object store entry no longer exists.
3276
3277         No new tests. Addresses a performance / storage leak that is
3278         not amenable to verification in a layout test.
3279
3280         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
3281         (WebCore):
3282
3283 2012-05-01  Igor Oliveira  <igor.o@sisa.samsung.com>
3284
3285         Use HashMap<OwnPtr> for CounterMap in RenderCounter
3286         https://bugs.webkit.org/show_bug.cgi?id=85294
3287
3288         Reviewed by Eric Seidel.
3289
3290         * rendering/RenderCounter.cpp:
3291         (WebCore):
3292         (WebCore::makeCounterNode):
3293         (WebCore::RenderCounter::destroyCounterNodes):
3294
3295 2012-05-01  Philip Rogers  <pdr@google.com>
3296
3297         Skip building instance tree for disallowed target
3298         https://bugs.webkit.org/show_bug.cgi?id=85202
3299
3300         Reviewed by Nikolas Zimmermann.
3301
3302         When the target of a use is disallowed (e.g., a mask element) we can
3303         skip building the instance tree because the shadow tree will be
3304         skipped as well.
3305
3306         Test: svg/custom/animate-disallowed-mask-element.svg
3307
3308         * svg/SVGUseElement.cpp:
3309         (WebCore::SVGUseElement::buildInstanceTree):
3310
3311 2012-04-29  Nikolas Zimmermann  <nzimmermann@rim.com>
3312
3313         Accumulation for values-animation is broken
3314         https://bugs.webkit.org/show_bug.cgi?id=85158
3315
3316         Reviewed by Darin Adler.
3317
3318         Example:
3319         <rect width="999" height="100" fill="green"/>
3320             <animate begin="0s" values="0; 30; 20" accumulate="sum" repeatCount="5" dur="2s"/>
3321         </rect>
3322
3323         The rect should animate like this:
3324         0.000s -> 0
3325         0.500s -> 15
3326         1.000s -> 30
3327         1.500s -> 25
3328         1.999s -> 20
3329         2.000s -> 20 (first accumulation, starts accumulating from the last set value, here '20').
3330         2.500s -> 45
3331         3.000s -> 50
3332         3.500s -> 45
3333         3.999s -> 40
3334         4.000s -> 40 (second accumulation)
3335         etc.
3336
3337         This is currently broken for values-animation. The accumulation should happen after a full cycle of the values animation ran (aka. at the end of the duration).
3338         A values animation works like this: iterate over the list of values, and calculate a 'from' and 'to' value for a given time. Example for values="0; 30; 20" dur="2s":
3339             - 0.0s .. 1.0s -> from=0, to=30
3340             - 1.0s .. 2.0s -> from=30, to=20
3341
3342         Accumulation currently is taken into account at each interval for a values-animation instead of the end of the cycle. Fix that
3343         by passing an additional 'toAtEndOfDuration' type to calculateAnimatedValue() which is used for accumulation instead of the
3344         current 'to' value.
3345
3346         Test: svg/animations/accumulate-values-width-animation.html
3347
3348         * svg/SVGAnimateElement.cpp:
3349         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3350         * svg/SVGAnimateElement.h:
3351         (SVGAnimateElement):
3352         * svg/SVGAnimateMotionElement.cpp:
3353         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
3354         * svg/SVGAnimateMotionElement.h:
3355         (SVGAnimateMotionElement):
3356         * svg/SVGAnimatedAngle.cpp:
3357         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
3358         * svg/SVGAnimatedAngle.h:
3359         (SVGAnimatedAngleAnimator):
3360         * svg/SVGAnimatedBoolean.cpp:
3361         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
3362         * svg/SVGAnimatedBoolean.h:
3363         (SVGAnimatedBooleanAnimator):
3364         * svg/SVGAnimatedColor.cpp:
3365         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
3366         * svg/SVGAnimatedColor.h:
3367         (SVGAnimatedColorAnimator):
3368         * svg/SVGAnimatedEnumeration.cpp:
3369         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
3370         * svg/SVGAnimatedEnumeration.h:
3371         (SVGAnimatedEnumerationAnimator):
3372         * svg/SVGAnimatedInteger.cpp:
3373         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
3374         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
3375         * svg/SVGAnimatedInteger.h:
3376         (SVGAnimatedIntegerAnimator):
3377         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
3378         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
3379         * svg/SVGAnimatedIntegerOptionalInteger.h:
3380         (SVGAnimatedIntegerOptionalIntegerAnimator):
3381         * svg/SVGAnimatedLength.cpp:
3382         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
3383         * svg/SVGAnimatedLength.h:
3384         (SVGAnimatedLengthAnimator):
3385         * svg/SVGAnimatedLengthList.cpp:
3386         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
3387         * svg/SVGAnimatedLengthList.h:
3388         (SVGAnimatedLengthListAnimator):
3389         * svg/SVGAnimatedNumber.cpp:
3390         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
3391         * svg/SVGAnimatedNumber.h:
3392         (SVGAnimatedNumberAnimator):
3393         * svg/SVGAnimatedNumberList.cpp:
3394         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3395         * svg/SVGAnimatedNumberList.h:
3396         (SVGAnimatedNumberListAnimator):
3397         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3398         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
3399         * svg/SVGAnimatedNumberOptionalNumber.h:
3400         (SVGAnimatedNumberOptionalNumberAnimator):
3401         * svg/SVGAnimatedPath.cpp:
3402         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
3403         * svg/SVGAnimatedPath.h:
3404         (SVGAnimatedPathAnimator):
3405         * svg/SVGAnimatedPointList.cpp:
3406         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
3407         * svg/SVGAnimatedPointList.h:
3408         (SVGAnimatedPointListAnimator):
3409         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3410         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
3411         * svg/SVGAnimatedPreserveAspectRatio.h:
3412         (SVGAnimatedPreserveAspectRatioAnimator):
3413         * svg/SVGAnimatedRect.cpp:
3414         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
3415         * svg/SVGAnimatedRect.h:
3416         (SVGAnimatedRectAnimator):
3417         * svg/SVGAnimatedString.cpp:
3418         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
3419         * svg/SVGAnimatedString.h:
3420         (SVGAnimatedStringAnimator):
3421         * svg/SVGAnimatedTransformList.cpp:
3422         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
3423         * svg/SVGAnimatedTransformList.h:
3424         (SVGAnimatedTransformListAnimator):
3425         * svg/SVGAnimatedTypeAnimator.h:
3426         (SVGAnimatedTypeAnimator):
3427         * svg/SVGAnimationElement.cpp:
3428         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3429         (WebCore::SVGAnimationElement::updateAnimation):
3430         * svg/SVGAnimationElement.h:
3431         (WebCore::SVGAnimationElement::animateAdditiveNumber):
3432         (SVGAnimationElement):
3433
3434 2012-05-01  Beth Dakin  <bdakin@apple.com>
3435
3436         https://bugs.webkit.org/show_bug.cgi?id=85231
3437         Fixed position objects that are removed from the DOM don't kick off 
3438         fixed position recalculation
3439         -and corresponding-
3440         <rdar://problem/11297916>
3441
3442         Reviewed by Darin Adler.
3443
3444         * rendering/RenderBox.cpp:
3445         (WebCore::RenderBox::willBeDestroyed):
3446
3447 2012-05-01  Dana Jansens  <danakj@chromium.org>
3448
3449         Early-out for subtracting a non-intersecting region
3450         https://bugs.webkit.org/show_bug.cgi?id=85258
3451
3452         Reviewed by Hajime Morita.
3453
3454         Given regions A and B, if the bounds of the regions do not intersect,
3455         then the regions themselves do not intersect. If the intersection of
3456         A and B is empty, then A subtract B == A.
3457
3458         * platform/graphics/Region.cpp:
3459         (WebCore::Region::subtract):
3460
3461 2012-04-30  Kent Tamura  <tkent@chromium.org>
3462
3463         [Chromium/Windows] Add LocalizedDateWin
3464         https://bugs.webkit.org/show_bug.cgi?id=84935
3465
3466         Reviewed by Kentaro Hara.
3467
3468         LocalizedDateICU.cpp doesn't reflect system settings. So there were some
3469         problems such as <input type=date> doesn't use system's date format.
3470
3471         We need to use Windows API to get a date format and calendar parameters.
3472
3473         We obtain a date format like "MM/dd/yy" via Windows API, and
3474         format/parse dates for the format by our own code because Windows API
3475         can't handle years older than 1601 and doesn't have date parsing API.
3476
3477         Unit test: Source/WebKit/chromium/tests/LocaleWinTest.cpp
3478
3479         * WebCore.gypi: Add LocalizedDateWin.cpp.
3480         * WebCore.gyp/WebCore.gyp:
3481         For Windows, remove LocalizedDateICU.cpp and add LocalizedDateWin.cpp.
3482         All of *Win.cpp files are excluded by default.
3483
3484         * platform/text/LocaleWin.cpp: Added.
3485         (WebCore::LocaleWin::LocaleWin):
3486         (WebCore::LocaleWin::create):
3487         (WebCore::LocaleWin::currentLocale):
3488         (WebCore::LocaleWin::~LocaleWin):
3489         (WebCore::LocaleWin::getLocaleInfoString):
3490         A helper function to obtain a string by GetLocaleInfo().
3491         (WebCore::LocaleWin::initializeShortMonthLabels):
3492         Obtain short month names from Windows.
3493
3494         (WebCore::DateFormatToken): A struct to represent a token in a date format.
3495         e.g. A format string "MM/dd/yy" generates five DateFormatToken:
3496          Month2, Literal, Day2, Literal, Year2.
3497         (isEraSymbol): A readability helper function.
3498         (isYearSymbol): ditto.
3499         (isMonthSymbol): ditto.
3500         (isDaySymbol): ditto.
3501         (countContinuousLetters):
3502         (commitLiteralToken): A helper for parseDateFormat().
3503         (parseDateFormat):
3504         Parse a format string, and generate a list of DateFormatToken.
3505
3506         (WebCore::parseNumber): A helper for parseDate().
3507         (WebCore::LocaleWin::parseNumberOrMonth): ditto.
3508         (WebCore::LocaleWin::parseDate):
3509         Parse a user-provided date string by matching with a DateFormatToken list.
3510
3511         (WebCore::appendNumber): A helper for formatDate().
3512         (WebCore::appendTwoDigitsNumber): ditto. Write at least two digits.
3513         (WebCore::appendFourDigitsNumber): ditto. Write at least four digits.
3514         (WebCore::LocaleWin::formatDate):
3515         Format a DateComponents by iterating a DateFormatToken list.
3516
3517         (WebCore::LocaleWin::initializeShortDateTokens):
3518         (WebCore::substituteLabelsIntoFormat):
3519         Creates a user-visible format string by iterating a DateFormatToken list.
3520         (WebCore::LocaleWin::dateFormatText):
3521         (WebCore::LocaleWin::initializeMonthLabels):
3522         Creates month names by Windows API.
3523         (WebCore::LocaleWin::initializeWeekDayShortLabels):
3524          Creates day names by Windows API.
3525         (WebCore::LocaleWin::monthLabels):
3526         Public accessor function for month names.
3527         (WebCore::LocaleWin::weekDayShortLabels):
3528         Public accessor function for day names.
3529         * platform/text/LocaleWin.h: Added.
3530
3531         * platform/text/LocalizedDateWin.cpp:
3532         Added. The following functions simply delegate to LocaleWin::currentLocale().
3533         (WebCore::parseLocalizedDate):
3534         (WebCore::formatLocalizedDate):
3535         (WebCore::localizedDateFormatText):
3536         (WebCore::monthLabels):
3537         (WebCore::weekDayShortLabels):
3538         (WebCore::firstDayOfWeek):
3539
3540 2012-04-30  Kent Tamura  <tkent@chromium.org>
3541
3542         REGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
3543         https://bugs.webkit.org/show_bug.cgi?id=85176
3544
3545         Reviewed by Kentaro Hara.
3546
3547         Test: fast/forms/date/input-date-commit-valid-only.html
3548
3549         * platform/text/mac/LocalizedDateMac.mm:
3550         (WebCore::parseLocalizedDate):
3551         We should check nil for the result of NSDateFormtter::dateFromString.
3552
3553 2012-04-30  Mark Rowe  <mrowe@apple.com>
3554
3555         Fix another leak due to misuse of createCFString.
3556
3557         Reviewed by Darin Adler.
3558
3559         * plugins/mac/PluginPackageMac.cpp:
3560         (WebCore::PluginPackage::fetchInfo): Adopt the result of createCFString.
3561
3562 2012-04-30  Mark Rowe  <mrowe@apple.com>
3563
3564         <rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html
3565
3566         Reviewed by Darin Adler.
3567
3568         * platform/mac/ClipboardMac.mm:
3569         (WebCore::utiTypeFromCocoaType): Adopt the result of createCFString.
3570
3571 2012-04-30  Mark Rowe  <mrowe@apple.com>
3572
3573         <rdar://problem/11352575> Many CGImageRefs leaked during media layout tests
3574
3575         Reviewed by Brian Weinstein.
3576
3577         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3578         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Adopt the CGImageRef.
3579
3580 2012-04-30  Emil A Eklund  <eae@chromium.org>
3581
3582         Change RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
3583         https://bugs.webkit.org/show_bug.cgi?id=85249
3584
3585         Reviewed by Eric Seidel.
3586
3587         Prepare RenderBoxModelObject for FractionalLayoutUnits by adding rounding
3588         logic to calculateBackgroundImageGeometry. Background images, as all
3589         images, needs to be layed out on pixel boundaries thus we need to convert
3590         it to a integer value.
3591
3592         No new tests, no change in functionality.
3593
3594         * rendering/RenderBoxModelObject.cpp:
3595         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3596
3597 2012-04-30  Ilya Sherman  <isherman@chromium.org>
3598
3599         Unreviewed, rolling out r113511.
3600         http://trac.webkit.org/changeset/113511
3601         https://bugs.webkit.org/show_bug.cgi?id=66032
3602         https://bugs.webkit.org/show_bug.cgi?id=85150
3603
3604         Regression: Many autofilled form fields lack the default
3605         autofill background even when authors don’t override the
3606         autofill colors
3607
3608         * css/html.css:
3609         (input:-webkit-autofill): Restore !important modifiers
3610
3611 2012-04-30  Julien Chaffraix  <jchaffraix@webkit.org>
3612
3613         Move RenderTableCell's row index to RenderTableRow
3614         https://bugs.webkit.org/show_bug.cgi?id=85229
3615
3616         Reviewed by Ojan Vafai.
3617
3618         Covered by the existing table tests.
3619
3620         Row index is a RenderTableRow concept and as such this change moves
3621         the relevant logic into the class.
3622
3623         While touching the code, renamed row() -> rowIndex() as now RenderTableCell
3624         can return its parent RenderTableRow and we were returning an index, not the row
3625         itself.
3626
3627         * accessibility/AccessibilityTable.cpp:
3628         (WebCore::AccessibilityTable::cellForColumnAndRow):
3629         * accessibility/AccessibilityTableCell.cpp:
3630         (WebCore::AccessibilityTableCell::rowIndexRange):
3631         (WebCore::AccessibilityTableCell::titleUIElement):
3632         * rendering/RenderTable.cpp:
3633         (WebCore::RenderTable::cellAbove):
3634         (WebCore::RenderTable::cellBelow):
3635         (WebCore::RenderTable::cellBefore):
3636         (WebCore::RenderTable::cellAfter):
3637         * rendering/RenderTreeAsText.cpp:
3638         (WebCore::RenderTreeAsText::writeRenderObject):
3639         Updated after the renaming RenderTableCell::row() -> rowIndex().
3640
3641         * rendering/RenderTableCell.cpp:
3642         (WebCore::RenderTableCell::RenderTableCell):
3643         (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
3644         (WebCore::RenderTableCell::computeCollapsedAfterBorder):
3645         Updated after m_rowIndex removal and row() -> rowIndex() renaming.
3646
3647         (WebCore::RenderTableCell::styleDidChange):
3648         Switched the rowWasSet check to an ASSERT. The new logic guarantees that
3649         row index was set straight when we insert the row. The previous logic was
3650         opened to some race conditions as we could wait for a recalcCells call before
3651         setting the index on the rows which made this check necessary.
3652
3653         * rendering/RenderTableCell.h:
3654         (WebCore::RenderTableCell::row):
3655         Added this RenderTableRow getter.
3656
3657         (WebCore::RenderTableCell::rowIndex):
3658         Renamed from row().
3659
3660         * rendering/RenderTableRow.cpp:
3661         (WebCore::RenderTableRow::RenderTableRow):
3662         (WebCore::RenderTableRow::styleDidChange):
3663         Updated after adding m_rowIndex / rowIndex().
3664
3665         * rendering/RenderTableRow.h:
3666         (WebCore::RenderTableRow::setRowIndex):
3667         (WebCore::RenderTableRow::rowIndex):
3668         Added those getter / setter. Also kept m_rowIndex's smaller size
3669         for future optimization and for symmetry with the column index on
3670         RenderTableCell.
3671
3672         * rendering/RenderTableSection.cpp:
3673         (WebCore::RenderTableSection::addChild):
3674         (WebCore::RenderTableSection::recalcCells):
3675         Made sure that whenever we insert or update our row index
3676         we do call setRowIndex().
3677
3678         (WebCore::RenderTableSection::addCell):
3679         This logic now doesn't need to query insertionRow as the cell's
3680         should have the index of the row in which it is inserted.
3681
3682         (WebCore::RenderTableSection::calcRowLogicalHeight):
3683         (WebCore::RenderTableSection::layoutRows):
3684         (WebCore::compareCellPositionsWithOverflowingCells):
3685         More updates after row() -> rowIndex() renaming.
3686
3687         * rendering/RenderTableSection.h:
3688         Removed rowIndexForRenderer now that the row caches this informatin.
3689
3690 2012-04-30  Keishi Hattori  <keishi@webkit.org>
3691
3692         datalist: Inconsistent behavior of HTMLInputElement::list
3693         https://bugs.webkit.org/show_bug.cgi?id=84351
3694
3695         Each platform will have a different set of input types that support the datalist UI.
3696         This patch makes shouldRespectListAttribute ask the RenderTheme if it supports datalist UI for that input type.
3697         Thus making it possible to do feature detection with JS.
3698
3699         Reviewed by Kent Tamura.
3700
3701         * WebCore.gypi: Added RenderThemeChromiumCommon.{cpp,h}
3702         * html/ColorInputType.cpp:
3703         (WebCore::ColorInputType::shouldRespectListAttribute):
3704         (WebCore):
3705         * html/ColorInputType.h:
3706         (ColorInputType):
3707         * html/InputType.cpp:
3708         (WebCore::InputType::themeSupportsDataListUI): Static method used by TextFieldInputType, RangeInputType, and ColorInputType.
3709         (WebCore):
3710         * html/InputType.h:
3711         (InputType):
3712         * html/RangeInputType.cpp:
3713         (WebCore::RangeInputType::shouldRespectListAttribute):
3714         * html/TextFieldInputType.cpp:
3715         (WebCore::TextFieldInputType::shouldRespectListAttribute):
3716         * rendering/RenderTheme.h:
3717         (RenderTheme):
3718         (WebCore::RenderTheme::supportsDataListUI): Returns true if the platform can show the datalist suggestions for a given input type.
3719         * rendering/RenderThemeChromiumCommon.cpp: Added.
3720         (WebCore):
3721         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
3722         * rendering/RenderThemeChromiumCommon.h: Added.
3723         (WebCore):
3724         (RenderThemeChromiumCommon):
3725         * rendering/RenderThemeChromiumMac.h:
3726         (RenderThemeChromiumMac):
3727         * rendering/RenderThemeChromiumMac.mm:
3728         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
3729         (WebCore):
3730         * rendering/RenderThemeChromiumSkia.cpp:
3731         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
3732         (WebCore):
3733         * rendering/RenderThemeChromiumSkia.h:
3734         (RenderThemeChromiumSkia):
3735
3736 2012-04-30  Levi Weintraub  <leviw@chromium.org>
3737
3738         RenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
3739         https://bugs.webkit.org/show_bug.cgi?id=85248
3740
3741         Reviewed by Eric Seidel.
3742
3743         Reverting RenderObject::maximalOutlineSize to int. This is a slop value for repaint
3744         rects that doesn't affect layout. It also derives its value from RenderView's function
3745         of the same name, which is already an integer.
3746
3747         No new tests. No change in behavior.
3748
3749         * rendering/RenderObject.cpp:
3750         (WebCore::RenderObject::maximalOutlineSize):
3751         * rendering/RenderObject.h:
3752         (RenderObject):
3753
3754 2012-04-30  Xingnan Wang  <xingnan.wang@intel.com>
3755
3756         Add multichannel support for input of JavaScriptAudioNode
3757         https://bugs.webkit.org/show_bug.cgi?id=84687
3758
3759         Reviewed by Chris Rogers.
3760
3761         Tests: webaudio/javascriptaudionode-downmix8-2channel-input.html
3762                webaudio/javascriptaudionode-upmix2-8channel-input.html
3763
3764         * Modules/webaudio/JavaScriptAudioNode.cpp:
3765         (WebCore::JavaScriptAudioNode::create):
3766         (WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
3767         (WebCore::JavaScriptAudioNode::initialize):
3768         (WebCore::JavaScriptAudioNode::process):
3769         * Modules/webaudio/JavaScriptAudioNode.h:
3770         (JavaScriptAudioNode):
3771
3772 >>>>>>> .r116022
3773 2012-04-30  Oliver Hunt  <oliver@apple.com>
3774
3775         Harden arithmetic in ImageBufferDataCG
3776         https://bugs.webkit.org/show_bug.cgi?id=61373
3777
3778         Reviewed by Gavin Barraclough.
3779
3780         We have a checked type that allows us to automate many of the
3781         bounds checks we want here, so let's replace the floating point
3782         math, and just use Checked<> throughout.  We use a non-recording
3783         Checked<> as no overflows should reach this point, so we'll take
3784         a hard early failure, over the cost of many branches when
3785         accessing the raw values in loops.
3786
3787         * platform/graphics/cg/ImageBufferDataCG.cpp:
3788         (WebCore::ImageBufferData::getData):
3789         (WebCore::ImageBufferData::putData):
3790
3791 2012-04-30  Levi Weintraub  <leviw@chromium.org>
3792
3793         Add absoluteValue method for LayoutUnits to allow overloading abs()
3794         https://bugs.webkit.org/show_bug.cgi?id=85214
3795
3796         Reviewed by Eric Seidel.
3797
3798         Adding an absoluteValue free inline function that operates on LayoutUnits, which
3799         allows us to have one function signature for ints or FractionalLayoutUnits. We
3800         can't simply add a FractionalLayoutUnit flavor of abs because it confuses
3801         some compilers due to the implicit FractionalLayoutUnit constructors that take
3802         ints and floats.
3803
3804         No new tests. No change in behavior.
3805
3806         * page/SpatialNavigation.cpp:
3807         (WebCore::distanceDataForNode):
3808         * rendering/LayoutTypes.h:
3809         (WebCore::absoluteValue):
3810         (WebCore):
3811         * rendering/RenderBlockLineLayout.cpp:
3812         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
3813         * rendering/RenderLineBoxList.cpp:
3814         (WebCore::RenderLineBoxList::rangeIntersectsRect):
3815         * rendering/RenderObject.cpp:
3816         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3817
3818 2012-04-30  Levi Weintraub  <leviw@chromium.org>
3819
3820         Update LayoutUnit usage in InlineFlowBox and RenderWidget
3821         https://bugs.webkit.org/show_bug.cgi?id=85239
3822
3823         Reviewed by Eric Seidel.
3824
3825         Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching
3826         to FractionalLayoutUnits for layout instead of integers.
3827
3828         No new tests. No change in behavior.
3829
3830         * rendering/InlineFlowBox.cpp:
3831         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always
3832         set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this
3833         behavior affects text decorations, most notably underlines.
3834         * rendering/RenderWidget.cpp:
3835         (WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's
3836         not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox
3837         as an IntRect.
3838
3839 2012-04-30  Levi Weintraub  <leviw@chromium.org>
3840
3841         Prepare RenderDeprecatedFlexibleBox for sub-pixel layout
3842         https://bugs.webkit.org/show_bug.cgi?id=85217
3843
3844         Reviewed by Eric Seidel.
3845
3846         Bailing from the space distribution loop in layoutHorizontal/VerticalBox when
3847         the remaining space falls below one pixel. This has no effect in whole-pixel
3848         layout, but avoids unnecessary work/infinite loops in the sub-pixel case.
3849
3850         No new tests. No change in behavior.
3851
3852         * rendering/RenderDeprecatedFlexibleBox.cpp:
3853         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3854         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3855
3856 2012-04-30  Ryosuke Niwa  <rniwa@webkit.org>
3857
3858         NULL ptr in WebCore::Range::getBorderAndTextQuads
3859         https://bugs.webkit.org/show_bug.cgi?id=77218
3860
3861         Reviewed by Eric Seidel.
3862
3863         The crash was caused by a malformed range obtained within an event handler of mutation events
3864         (DOMNodeRemovedFromDocument). Because this range wasn't updated per node removal, range functions
3865         end up not behaving well.
3866
3867         Fixed the bug by changing the order of the notifications in ContainerNode::willRemoveChild.
3868         We now fire mutation events first before updating ranges so that any range created inside those
3869         event handlers can also be updated prior to the actual node removal.
3870
3871         Test: fast/dom/Range/range-created-in-mutation-event-crash.xhtml
3872
3873         * dom/ContainerNode.cpp:
3874         (WebCore::willRemoveChild):
3875
3876 2012-04-30  Anders Carlsson  <andersca@apple.com>
3877
3878         ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
3879         https://bugs.webkit.org/show_bug.cgi?id=85240
3880         <rdar://problem/11286609>
3881
3882         Reviewed by Sam Weinig.
3883
3884         The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
3885         on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
3886         position updates and remove the call to updateMainFrameScrollPosition.
3887
3888         * page/scrolling/ScrollingCoordinator.cpp:
3889         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
3890
3891 2012-04-30  Anders Carlsson  <andersca@apple.com>
3892
3893         Add a way to asynchronously call a function once the scroll position of a page has been updated
3894         https://bugs.webkit.org/show_bug.cgi?id=85237
3895
3896         Reviewed by Sam Weinig.
3897
3898         * WebCore.exp.in:
3899         Export functions needed by WebKit2.
3900
3901         * page/scrolling/ScrollingCoordinator.h:
3902         Make commitTreeStateIfNeeded public.
3903
3904 2012-04-30  Kentaro Hara  <haraken@chromium.org>
3905
3906         WebGLRenderingContext methods should throw TypeError for not enough arguments
3907         https://bugs.webkit.org/show_bug.cgi?id=84787
3908
3909         Reviewed by Kenneth Russell.
3910
3911         Currently, WebGLRenderingcontext methods implement
3912         "Not enough arguments" error as SyntaxError. The Web IDL
3913         spec requires that it should be TypeError:
3914         http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
3915
3916         This patch changes SyntaxError to TypeError.
3917
3918         I wanted to confirm the behavior of Firefox and Opera,
3919         but they do not implement WebGL yet.
3920
3921         Test: fast/canvas/webgl/webgl-exceptions.html
3922
3923         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3924         (WebCore::getObjectParameter):
3925         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
3926         (WebCore::JSWebGLRenderingContext::getExtension):
3927         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
3928         (WebCore::JSWebGLRenderingContext::getParameter):
3929         (WebCore::JSWebGLRenderingContext::getProgramParameter):
3930         (WebCore::JSWebGLRenderingContext::getShaderParameter):
3931         (WebCore::JSWebGLRenderingContext::getUniform):
3932         (WebCore::dataFunctionf):
3933         (WebCore::dataFunctioni):
3934         (WebCore::dataFunctionMatrix):
3935         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3936         (WebCore::getObjectParameter):
3937         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
3938         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
3939         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
3940         (WebCore::V8WebGLRenderingContext::getParameterCallback):
3941         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
3942         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
3943         (WebCore::V8WebGLRenderingContext::getUniformCallback):
3944         (WebCore::vertexAttribAndUniformHelperf):
3945         (WebCore::uniformHelperi):
3946         (WebCore::uniformMatrixHelper):
3947
3948 2012-04-30  Emil A Eklund  <eae@chromium.org>
3949
3950         [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
3951         https://bugs.webkit.org/show_bug.cgi?id=85222
3952
3953         Reviewed by Eric Seidel.
3954
3955         Update platform code to use the pixel snapped values for painting rects
3956         to line up with device pixels and change platform specific hit testing
3957         code to use roundedPoint as hit testing is still mostly done on integer
3958         bounds.
3959
3960         No new tests, no change in functionality.
3961
3962         * platform/qt/RenderThemeQt.cpp:
3963         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
3964         * platform/win/PopupMenuWin.cpp:
3965         (WebCore::PopupMenuWin::paint):
3966         * rendering/RenderThemeChromiumSkia.cpp:
3967         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
3968         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
3969         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
3970
3971 2012-04-30  Kentaro Hara  <haraken@chromium.org>
3972
3973         [V8][JSC] Remove hard-coded "Not enough arguments" errors
3974         https://bugs.webkit.org/show_bug.cgi?id=85207
3975
3976         Reviewed by Sam Weinig.
3977
3978         In bug 85022 and bug 85097, we implemented
3979         createNotEnoughArgumentsError() in JSC and
3980         V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
3981         removed hard-coded "Not enough arguments" errors.
3982         This patch removes hard-coded "Not enough arguments"
3983         errors by using the helper methods.
3984
3985         No tests. No change in behavior.
3986
3987         * bindings/js/JSAudioContextCustom.cpp:
3988         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3989         * bindings/js/JSSVGLengthCustom.cpp:
3990         (WebCore::JSSVGLength::convertToSpecifiedUnits):
3991         * bindings/js/JSWebSocketCustom.cpp:
3992         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
3993         (WebCore::JSWebSocket::send):
3994         * bindings/js/JSXMLHttpRequestCustom.cpp:
3995         (WebCore::JSXMLHttpRequest::open):
3996         * bindings/v8/ScriptController.cpp:
3997         (WebCore::setValueAndClosePopupCallback):
3998         * bindings/v8/custom/V8AudioContextCustom.cpp:
3999         (WebCore::V8AudioContext::constructorCallback):
4000         * bindings/v8/custom/V8SVGLengthCustom.cpp:
4001         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
4002         * bindings/v8/custom/V8WebSocketCustom.cpp:
4003         (WebCore::V8WebSocket::constructorCallback):
4004         (WebCore::V8WebSocket::sendCallback):
4005         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
4006         (WebCore::V8XMLHttpRequest::openCallback):
4007
4008 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
4009
4010         Add String::startsWith() and endsWith() for string literals
4011         https://bugs.webkit.org/show_bug.cgi?id=85154
4012
4013         Reviewed by Darin Adler.