FeatureObserver should distinguish between legacy HTML and text notifications
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-04  Adam Barth  <abarth@webkit.org>
2
3         FeatureObserver should distinguish between legacy HTML and text notifications
4         https://bugs.webkit.org/show_bug.cgi?id=98441
5
6         Reviewed by Tony Chang.
7
8         We might be able to drop support for legacy HTML notifications before
9         we can drop support for legacy text notifications. We should measure
10         and find out.
11
12         * Modules/notifications/NotificationCenter.idl:
13         * page/FeatureObserver.h:
14
15 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
16
17         Removing the unused member variable m_wasMalformed from HTMLFormElement class and its related code frgment.
18         https://bugs.webkit.org/show_bug.cgi?id=98444
19
20         Reviewed by Eric Seidel.
21
22         The member variable m_wasMalformed of HTMLFormElement class was used to determine if the <form> tag was malformed or not.
23         This information was used elsewhere to decide if bottom margins have to be included for such a <form>.
24         However currently this member variable is not being set by any code following code refactoring in HTML parser class.
25
26         Code cleanup patch. No new tests required.
27
28         * html/HTMLFormElement.cpp:
29         (WebCore::HTMLFormElement::HTMLFormElement):
30           Removed m_wasMalformed initialization.
31
32         * html/HTMLFormElement.h:
33         (HTMLFormElement):
34          Removed m_wasMalformed variable.
35          Removed m_wasMalformed variable's setter and getter functions.
36
37         * rendering/RenderBlock.cpp:
38         (WebCore::RenderBlock::layoutBlock):
39          Removed code fragment using/dependent on m_wasMalformed.
40
41 2012-10-04  Rik Cabanier  <cabanier@adobe.com>
42
43         Turn Compositing on by default in WebKit build
44         https://bugs.webkit.org/show_bug.cgi?id=98315
45
46         Reviewed by Simon Fraser.
47
48         enable -webkit-blend-mode on trunk.
49
50         No new tests. Existing blending test were updated.
51
52         * Configurations/FeatureDefines.xcconfig:
53         * css/CSSPropertyNames.in:
54         * css/CSSValueKeywords.in:
55
56 2012-10-04  Hayato Ito  <hayato@chromium.org>
57
58         [Refactoring] Introduce a traversal strategy in SelectorChecker
59         https://bugs.webkit.org/show_bug.cgi?id=97298
60
61         Reviewed by Antti Koivisto.
62
63         We extract DOM traversal code from SelectorChecker so that we can use another traversal strategy.
64         Another traversal strategy will be introduced in Bug 96990.
65
66         Since this code path is very hot, we were very careful not to regress performance.
67         We will use template specialization to change the traversal implementation.
68
69         We confirmed that this patch does not regress SelectorCheckerPerformance. I have checked the performance of
70         the added test in my Linux Box using run-perf-tests.
71
72         The performance of the added test before using this patch was:
73
74           RESULT CSS: PseudoClassSelectors= 3399.68308031 runs/s
75           median= 3404.48685564 runs/s, stdev= 37.3480114449 runs/s, min= 3272.64871114 runs/s, max= 3438.72385184 runs/s
76
77         When we used this patch, the performance was:
78
79           RESULT CSS: PseudoClassSelectors= 3367.74473886 runs/s
80           median= 3367.12072755 runs/s, stdev= 14.1464547639 runs/s, min= 3348.55881171 runs/s, max= 3395.98212857 runs/s
81
82         Test: PerformanceTests/CSS/PseudoClass-Selectors.html
83
84         * css/SelectorChecker.cpp:
85         (WebCore):
86         (WebCore::SelectorChecker::checkSelector): Make this a template method to accept another Context type.
87         Another Context type will be introduced in coming patch.
88         (WebCore::SelectorChecker::checkOneSelector):
89         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild):
90         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild):
91         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType):
92         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType):
93         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore):
94         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore):
95         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter):
96         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter):
97         * css/SelectorChecker.h:
98         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
99         (SelectorCheckingContext):
100         (SelectorChecker):
101         (DOMTraversalStrategy): Extracted the DOM traversal code from SelectorChecker. Another traversal code
102         will be introduced the coming patch.
103
104 2012-10-04  Eric Seidel  <eric@webkit.org>
105
106         SVGAttributeHashTranslator does not need to copy QualifiedName in the common case
107         https://bugs.webkit.org/show_bug.cgi?id=98473
108
109         Reviewed by Adam Barth.
110
111         I tested this using instruments on a test case which modified SVG attributes in a loop.
112         I believe pdr has some perf-tests in this area, but they weren't needed here.  A simple sample showed this as a huge win,
113         since we're no longer creating a QualifiedName (and thus adding it to the hash) on each QualifiedName-based lookup in SVG.
114
115         * svg/SVGElement.h:
116         (WebCore::SVGAttributeHashTranslator::hash):
117         (WebCore::SVGAttributeHashTranslator::equal):
118
119 2012-10-04  Julien Chaffraix  <jchaffraix@webkit.org>
120
121         Split the intrinsic padding update code out of RenderTableSection::layoutRows
122         https://bugs.webkit.org/show_bug.cgi?id=98454
123
124         Reviewed by Eric Seidel.
125
126         RenderTableSection::layoutRows is very long and it's difficult to see what's
127         going on. This change moves the intrinsic padding update code into RenderTableCell
128         for clarity. While at it, cleaned up a bit the code (renaming variables, functions).
129
130         Change covered by existing table tests.
131
132         * rendering/RenderTableCell.cpp:
133         (WebCore::RenderTableCell::computeIntrinsicPadding):
134         Added this new function that does the update. Removed the 'default' case, replaced by
135         the explicit label BASELINE_MIDDLE.
136
137         * rendering/RenderTableCell.h:
138         (WebCore::RenderTableCell::setIntrinsicPaddingBefore):
139         (WebCore::RenderTableCell::setIntrinsicPaddingAfter):
140         (WebCore::RenderTableCell::setIntrinsicPadding):
141         Moved those setters to the private section as we want other classes
142         to use computeIntrinsicPadding.
143
144         * rendering/RenderTableSection.cpp:
145         (WebCore::RenderTableSection::layoutRows):
146         Replaced the code with a call to RenderTableCell::computeIntrinsicPadding.
147         Also moved 2 variables in the loop per our coding style.
148
149         * rendering/RenderTableSection.h:
150         (WebCore::RenderTableSection::rowBaseline):
151         Renamed to match our coding style.
152
153 2012-10-04  Nate Chapin  <japhet@chromium.org>
154
155         Crash in EventHandler::mouseMoved().
156         https://bugs.webkit.org/show_bug.cgi?id=98460
157
158         Reviewed by Abhishek Arya.
159
160         No new tests, this fixes fast/events/mouse-moved-remove-frame-crash.html.
161
162         * page/EventHandler.cpp:
163         (WebCore::EventHandler::mouseMoved):
164
165 2012-10-04  Adam Barth  <abarth@webkit.org>
166
167         [V8] NotificationCenter leaks because it uses buggy custom bindings
168         https://bugs.webkit.org/show_bug.cgi?id=98445
169
170         Reviewed by Tony Chang.
171
172         There's no reason to use custom bindings here. All they do is cause leaks..
173
174         * Modules/notifications/NotificationCenter.idl:
175         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
176
177 2012-10-04  Tab Atkins  <jackalmage@gmail.com>
178
179         Selector specificity categories "overflow" into higher categories
180         https://bugs.webkit.org/show_bug.cgi?id=98295
181
182         Reviewed by Eric Seidel.
183
184         This patch adds per-component overflow guards for CSS selector specificity.
185         Previously, we didn't guard against overflow. 
186         Since we stored each component as a byte mapped into a single unsigned int for the whole specificity,
187         256 of a particular simple selector was equivalent to 1 of the next-higher-group selector.
188         This violated the Selectors specification,
189         which requires the components to be compared lexicographically.
190
191         Tests: /fast/selectors/specificity-overflow.html
192
193         * css/CSSSelector.cpp:
194         (WebCore::CSSSelector::specificity):
195
196 2012-10-04  Enrica Casucci  <enrica@apple.com>
197
198         Font::glyphDataAndPageForCharacter doesn't account for text orientation when using systemFallback on a cold cache.
199         https://bugs.webkit.org/show_bug.cgi?id=98452.
200
201         Reviewed by Dan Bernstein.
202
203         The text orientation was considered only when there is a cache hit.
204         This change moves the logic to handle text orientation to a separate
205         inline function that is called also when the glyph is added to the cache.
206
207         Test: fast/text/vertical-rl-rtl-linebreak.html
208
209         * platform/graphics/FontFastPath.cpp:
210         (WebCore::applyTextOrientationForCharacter): Added.
211         (WebCore::Font::glyphDataAndPageForCharacter): Modified to use the new function in
212         both cases of cold and warm cache.
213
214 2012-10-04  Adam Klein  <adamk@chromium.org>
215
216         MutationRecord attributeName should be null for non attribute changes
217         https://bugs.webkit.org/show_bug.cgi?id=98438
218
219         Reviewed by Ojan Vafai.
220
221         Test: fast/mutation/mutation-record-nullity.html
222
223         * dom/MutationRecord.idl:
224
225 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
226
227         Final part of "sync" to "flush" renaming
228         https://bugs.webkit.org/show_bug.cgi?id=98430
229
230         Reviewed by Tim Horton.
231
232         Change method names on GraphicsLayer and GraphicsLayerClient that
233         refer to "sync" to use the term "flush" instead, to be consistent
234         with the rest of the code.
235
236         * platform/graphics/GraphicsLayer.h:
237         (WebCore::GraphicsLayer::flushCompositingState):
238         (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
239         * platform/graphics/GraphicsLayerClient.h:
240         (GraphicsLayerClient):
241         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
242         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
243         * platform/graphics/blackberry/LayerWebKitThread.cpp:
244         (WebCore::LayerWebKitThread::setNeedsCommit):
245         * platform/graphics/ca/GraphicsLayerCA.cpp:
246         (WebCore::GraphicsLayerCA::flushCompositingState):
247         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
248         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
249         (WebCore::GraphicsLayerCA::positionForCloneRootLayer):
250         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
251         * platform/graphics/ca/GraphicsLayerCA.h:
252         (GraphicsLayerCA):
253         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
254         (WebCore::GraphicsLayerTextureMapper::notifyChange):
255         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
256         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
257         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
258         (GraphicsLayerTextureMapper):
259         * platform/graphics/texmap/TextureMapperLayer.cpp:
260         (WebCore::TextureMapperLayer::flushCompositingState):
261         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
262         * platform/graphics/texmap/TextureMapperLayer.h:
263         (TextureMapperLayer):
264         * rendering/RenderLayerBacking.cpp:
265         (WebCore::RenderLayerBacking::notifyFlushRequired):
266         * rendering/RenderLayerBacking.h:
267         (RenderLayerBacking):
268         * rendering/RenderLayerCompositor.cpp:
269         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
270         * rendering/RenderLayerCompositor.h:
271         (WebCore::RenderLayerCompositor::notifyFlushRequired):
272
273 2012-10-04  Tab Atkins  <tabatkins@google.com>
274
275         1ex should equal .5em when the font has no x-height metric
276         https://bugs.webkit.org/show_bug.cgi?id=80360
277
278         Reviewed by Eric Seidel.
279
280         Updated FontMetrics and CSSPrimitiveValue to have/use an explicit "hasXHeight" flag to determine how to size an 'ex' unit.
281
282         Updated a few of the platform font files to set the flag properly.
283
284         Patch cleanup by David Barr <davidbarr@chromium.org>.
285
286         Test: fast/css/ex-unit-with-no-x-height.html
287
288         * css/CSSPrimitiveValue.cpp:
289         (WebCore::CSSPrimitiveValue::computeLengthDouble):
290         * platform/graphics/FontMetrics.h:
291         (WebCore::FontMetrics::FontMetrics):
292         (WebCore::FontMetrics::setXHeight):
293         (FontMetrics):
294         (WebCore::FontMetrics::hasXHeight):
295         (WebCore::FontMetrics::setHasXHeight):
296         (WebCore::FontMetrics::reset):
297         * platform/graphics/skia/SimpleFontDataSkia.cpp:
298         (WebCore::SimpleFontData::platformInit):
299
300 2012-10-04  Ryosuke Niwa  <rniwa@webkit.org>
301
302         Build fix after r130411. Add the right offset.
303         Also use RefPtr instead of a raw pointer for next and previous pointers.
304
305         * editing/ReplaceSelectionCommand.cpp:
306         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
307
308 2012-10-04  Alec Flett  <alecflett@chromium.org>
309
310         IndexedDB: promote objectstore/index backend ids to the frontend
311         https://bugs.webkit.org/show_bug.cgi?id=97834
312
313         Reviewed by Tony Chang.
314
315         Expose int64-based database/objectStore/index ids to the renderer,
316         step 1 of 2. Support both styles of createObjectStore and
317         createIndex: those that take an explicit id, and those that take
318         -1, meaning to autogenerate an id on the backend. In part 2, after
319         the chromium side lands, support for the autogenerated ids will be
320         removed. (See https://bugs.webkit.org/show_bug.cgi?id=98085)
321
322         This is a part of larger refactoring work to ultimately make the interface
323         between the frontend and the backend simpler.
324
325         No new tests, extensive ASSERTs and existing tests cover correctness.
326
327         * Modules/indexeddb/IDBBackingStore.h:
328         (IDBBackingStore):
329         * Modules/indexeddb/IDBDatabase.cpp:
330         (WebCore::IDBDatabase::createObjectStore):
331         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
332         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
333         (WebCore::IDBDatabaseBackendImpl::openInternal):
334         (WebCore::IDBDatabaseBackendImpl::metadata):
335         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
336         (WebCore):
337         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
338         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
339         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
340         (IDBDatabaseBackendImpl):
341         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
342         (IDBDatabaseBackendInterface):
343         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
344         (WebCore::IDBIndexBackendImpl::metadata):
345         * Modules/indexeddb/IDBIndexBackendImpl.h:
346         (WebCore::IDBIndexBackendImpl::create):
347         (IDBIndexBackendImpl):
348         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
349         (WebCore):
350         (WebCore::getMaxObjectStoreId):
351         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
352         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
353         (WebCore::IDBLevelDBBackingStore::getObjectStores):
354         (WebCore::setMaxObjectStoreId):
355         (WebCore::IDBLevelDBBackingStore::createObjectStore):
356         (WebCore::getMaxIndexId):
357         (WebCore::setMaxIndexId):
358         (WebCore::IDBLevelDBBackingStore::createIndex):
359         * Modules/indexeddb/IDBLevelDBBackingStore.h:
360         (IDBLevelDBBackingStore):
361         * Modules/indexeddb/IDBMetadata.h:
362         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
363         (IDBDatabaseMetadata):
364         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
365         (IDBObjectStoreMetadata):
366         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
367         (IDBIndexMetadata):
368         * Modules/indexeddb/IDBObjectStore.cpp:
369         (WebCore::IDBObjectStore::createIndex):
370         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
371         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
372         (WebCore::IDBObjectStoreBackendImpl::metadata):
373         (WebCore::IDBObjectStoreBackendImpl::createIndex):
374         (WebCore):
375         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
376         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
377         (WebCore::IDBObjectStoreBackendImpl::create):
378         (IDBObjectStoreBackendImpl):
379         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
380 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
381
382         Layout broken after cloning and re-inserting a table with a misplaced <form>
383         https://bugs.webkit.org/show_bug.cgi?id=86746
384
385         Reviewed by Julien Chaffraix.
386
387         There is a concept of demotion for a <form> contained in a table. A <form> is demoted if its immediate parent
388         is either a <table>, table sections (tbody, etc) or a table row (tr). A renderer for such a <form> is created only
389         if its display is one of the table display types (TABLE, INLINE_TABLE, TABLE_FOOTER_GROUP, etc).
390         However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and 
391         results in the table getting improperly rendered.
392
393         Test: fast/table/form-with-non-table-display-inside-table-elements.html
394
395         * html/HTMLFormElement.cpp:
396         (WebCore::HTMLFormElement::copyNonAttributePropertiesFromElement):
397           Extended the virtual function for HTMLFormElement class specific implementation.
398           The function is used to copy any necessary state information(member variables) associated with
399           the <form> element being cloned to the current node.
400           For HTMLFormElement node the member variable can be classified into five groups based on the 
401           information they hold:
402             1) Variables containing information regarding <form> subtree and elements associated with it.
403                These get updated as and when an element is added to the <form> subtree.
404             2) Variables containing <form> submit state information.
405             3) Flag to hold information if reset() has been called.
406             4) Flag(m_wasDemoted) that indicates whether the form is demoted or not, based on which it needs to
407                be handled differently during creation of its renderer.
408                This information is currently being updated only during the HTML tree construction phase.
409             5) Flag(m_wasMalformed) to hold information if the <form> is malformed or not.
410
411           Variables of group (1) will be updated as and when elements are added to the <form> subtree. Whereas,
412           (2) and (3) hold instance specific information, thus copying them is not required. Also (5) is currently not
413           being used(not set by any code).
414
415           On the other hand, (4) is required to be copied during cloning as this information cannot be accessed
416           during the cloning process.
417
418         (WebCore):
419         * html/HTMLFormElement.h:
420           Added copyNonAttributePropertiesFromElement() declaration.
421
422 2012-10-04  Dean Jackson  <dino@apple.com>
423
424         Attribute and Uniform variable names need translation in shader
425         https://bugs.webkit.org/show_bug.cgi?id=70989
426
427         Reviewed by Tim Horton (and Darin Adler).
428
429         WebGL specifies some maximum lengths for variable names (attributes
430         and uniforms). Also, some GL drivers have issues with long names. For
431         that reason, ANGLE has an option to rewrite the shader, translating
432         long names into short names. Turning this on helps shaders compile,
433         but we need to keep a mapping between the original names and the
434         translated names, so that we bind to the right location from user code
435         (which won't ever see the translated source).
436
437         This provided an opportunity to clean up some other bits of code:
438         CSS Filters examined the uniform names after a compilation; It can
439         now use the variable name map. I also added a typedef for the
440         HashMaps that keep the shader, the source code and the variable name
441         mappings.
442
443         I also opened a followup bug to make sure these tables are deleted
444         when the associated shaders (or linked programs) go away:
445         https://bugs.webkit.org/show_bug.cgi?id=98204
446
447         Covered by existing tests (with some enhancements):
448         - fast/canvas/webgl/attrib-location-length-limits.html:
449         - fast/canvas/webgl/uniform-location-length-limits.html:
450
451         * platform/graphics/ANGLEWebKitBridge.cpp:
452         (WebCore::getSymbolInfo): Extracts all the information on symbols (either attributes
453         or uniforms) from the newly compiled shader.
454         (WebCore):
455         (WebCore::ANGLEWebKitBridge::compileShaderSource): New method name.
456         * platform/graphics/ANGLEWebKitBridge.h:
457         (WebCore::getUniforms): Deleted this method.
458         (WebCore::ANGLEShaderSymbol::isSampler): Make sure the symbol is a uniform.
459         (ANGLEWebKitBridge):
460         * platform/graphics/GraphicsContext3D.h:
461         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): A new object that
462         holds the size, type and translated name of a symbol from a WebGL shader.
463         (ShaderSourceEntry):
464         (WebCore::GraphicsContext3D::ShaderSourceEntry::ShaderSourceEntry): Now keeps track
465         of the translated source code and symbol mappings.
466         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): Helper function to
467         get the member variable corresponding to the type of symbol you're asking fo.
468         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
469         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): Calls new method
470         name which also produces a set of symbols to examine.
471         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
472         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): We now can pass
473         in some extra compile options to do translation of long symbol names. Also fill the
474         map of translated symbol names.
475         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
476         (WebCore::GraphicsContext3D::compileShader):
477         (WebCore::GraphicsContext3D::mappedSymbolName): Returns the mapped name for
478         a shader symbol if it was translated during compilation.
479         (WebCore):
480         (WebCore::GraphicsContext3D::getAttribLocation):
481         (WebCore::GraphicsContext3D::getShaderiv):
482         (WebCore::GraphicsContext3D::getShaderInfoLog):
483         (WebCore::GraphicsContext3D::getShaderSource):
484         (WebCore::GraphicsContext3D::getUniformLocation):
485
486 2012-10-04  Alpha Lam  <hclam@chromium.org>
487
488         [skia] Drawing a subrect of bitmap image is misaligned
489         https://bugs.webkit.org/show_bug.cgi?id=95121
490
491         Reviewed by Stephen White.
492
493         When drawing a subrect of BitmapImage and the subrect is not aligned
494         to integer boundaries, skia expands it to the closest enclosing integer
495         rectangle. This creates prominent rendering artifacts when an image
496         is used as background and its sub-regions are invalidated frequently.
497
498         This patch fixes the problem by doing alignment to integer boundaries
499         and clipping for both cases of RESAMPLE_AWESOME and RESAMPLE_LINEAR.
500
501         A clip rect is applied to the canvas using original destination
502         rectangle, while source and destination rectangles are enlarged
503         appropriately to ensure source rectangle is aligned.
504
505         This patch also fixes a closely related problem. In RESAMPLE_AWESOME
506         resampling mode the previous algorithm applies different approximated
507         scale factor for each scaled image fragment. This caused the stitched
508         image to look ugly.
509
510         Scale factor is approximated using entire image size, this gives a
511         more accurate approximation because of greater denominator and a
512         consistent scale factor across all fragments.
513
514         Changes in Skia enable caching of the scaled image and return the
515         scaled fragment because scale factor is now consistent for all
516         fragments.
517
518         Tests: fast/images/paint-subrect-grid.html
519                fast/images/paint-subrect.html
520                fast/images/repaint-subrect-grid.html
521
522         * platform/graphics/skia/ImageSkia.cpp:
523         (WebCore::computeResamplingMode): Use float for width and height.
524         (WebCore):
525         (WebCore::areBoundariesIntegerAligned):
526         (WebCore::computeBitmapDrawRects):
527         (WebCore::extractScaledImageFragment):
528         (WebCore::drawResampledBitmap): New algorithm for drawing scaled image fragment.
529         (WebCore::paintSkBitmap):
530         (WebCore::Image::drawPattern):
531         (WebCore::BitmapImage::draw): Use SkRect instead of SkIRect.
532         (WebCore::BitmapImageSingleFrameSkia::draw):
533         * platform/graphics/skia/NativeImageSkia.cpp:
534         Changing the algorithm for extracting a scaled image fragment.
535         A fragment is now identified by (scaledImageSize, scaledImageSubset).
536         (WebCore::NativeImageSkia::hasResizedBitmap):
537         (WebCore::NativeImageSkia::resizedBitmap):
538         (WebCore::NativeImageSkia::shouldCacheResampling):
539         (WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo):
540         (WebCore):
541         (WebCore::NativeImageSkia::CachedImageInfo::isEqual):
542         (WebCore::NativeImageSkia::CachedImageInfo::set):
543         (WebCore::NativeImageSkia::CachedImageInfo::rectInSubset):
544         * platform/graphics/skia/NativeImageSkia.h:
545         (NativeImageSkia):
546         (CachedImageInfo):
547
548 2012-10-03  Ryosuke Niwa  <rniwa@webkit.org>
549
550         ReplaceSelectionCommand should merge text nodes
551         https://bugs.webkit.org/show_bug.cgi?id=98188
552
553         Reviewed by Levi Weintraub.
554
555         Added mergeTextNodesAroundPosition to ReplaceSelectionCommand to merge text nodes after the replace in
556         completeHTMLReplacement. Also fixed a bunch of bugs in other classes and functions to make this work.
557
558         This behavior change is tested by existing tests.
559
560         * editing/InsertParagraphSeparatorCommand.cpp:
561         (WebCore::InsertParagraphSeparatorCommand::doApply): When splitting a text node, place the insertionPosition
562         at the end of the first half. Leaving it at the beginning of the second half confuses the rest of the code in
563         the function. However, the logic to handle the "insignificant" white spaces needs the position at the start of
564         the second half. So keep this position.
565         * editing/ReplaceSelectionCommand.cpp:
566         (WebCore::ReplaceSelectionCommand::doApply): Update visibleStart after inserting a paragraph separator so that
567         the logic to cleanup the nested div checks the right condition (right beneath it starting with a long comment).
568         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Insert a space for smart paste at the appropriate
569         offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have 
570         modified the DOM by inserting a space for endNode. Finally, a non-breaking space should be treated like a space
571         isCharacterSmartReplaceExempt for the purpose of smart replace. e.g. if we're inserting "world" after
572         "hello&nbsp;", we shouldn't be inserting another space between "hello" and "world".
573         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
574         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Added. Merge text nodes around position, and
575         adjust position and positionOnlyToBeUpdated accordingly. We need to call updatePositionForNodeRemoval when
576         positions were before or after the text node.
577         * editing/ReplaceSelectionCommand.h:
578         (ReplaceSelectionCommand):
579
580 2012-10-04  Tony Chang  <tony@chromium.org>
581
582         Fix <input type="month"> tests
583         https://bugs.webkit.org/show_bug.cgi?id=98426
584
585         Reviewed by Ojan Vafai.
586
587         The month picker uses flexbox and assumes that it will be aligned with
588         the last line box. This looks visually correct. I will follow up on
589         www-style to see what the expected behavior is.
590
591         Tests: fast/forms/month-multiple-fields tests cover this.
592
593         * rendering/RenderFlexibleBox.cpp:
594         * rendering/RenderFlexibleBox.h:
595
596 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
597
598         Unreviewed, rolling out r130396.
599         http://trac.webkit.org/changeset/130396
600         https://bugs.webkit.org/show_bug.cgi?id=98421
601
602         This patch is causing crashes on 4 tests on Lion Debug and
603         Mountain Lion Debug (Requested by jernoble on #webkit).
604
605         * rendering/RenderLayerCompositor.cpp:
606         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
607         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
608         * rendering/RenderLayerCompositor.h:
609         * testing/InternalSettings.cpp:
610         (WebCore::InternalSettings::Backup::Backup):
611         (WebCore::InternalSettings::Backup::restoreTo):
612         * testing/InternalSettings.h:
613         (Backup):
614
615 2012-10-04  Tony Chang  <tony@chromium.org>
616
617         inline-flex baseline is sometimes wrong
618         https://bugs.webkit.org/show_bug.cgi?id=96188
619
620         Reviewed by Ojan Vafai.
621
622         Implement the necessary methods to get the proper baseline alignment of flexbox.
623         We were falling back to the inline-block behavior.
624
625         Test: css3/flexbox/flexbox-baseline.html
626
627         * rendering/RenderFlexibleBox.cpp:
628         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
629         (WebCore::RenderFlexibleBox::baselinePosition): Used to get the baseline of the box.
630         Mostly just the first line box baseline.
631         (WebCore):
632         (WebCore::RenderFlexibleBox::lastLineBoxBaseline): This is used for getting the baseline when in an inline-block.
633         We actually don't want the last line, but the flexbox's baseline.
634         (WebCore::RenderFlexibleBox::firstLineBoxBaseline): Compute the baseline according to the rules in the spec.
635         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Keep track of the number of children on the
636         first line so we don't have to re-compute this when getting the baseline.
637         (WebCore::RenderFlexibleBox::crossAxisExtentForChild): Make const.
638         (WebCore::RenderFlexibleBox::mainAxisExtentForChild): Make const.
639         (WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis): Make const.
640         * rendering/RenderFlexibleBox.h: Add a size_t to keep track of how many children are in the first line.
641
642 2012-10-04  Xianzhu Wang  <wangxianzhu@chromium.org>
643
644         [Chromium] Should set unitsPerEm in SimpleFontDataSkia.cpp
645         https://bugs.webkit.org/show_bug.cgi?id=98100
646
647         Reviewed by Stephen White.
648
649         At least on chromium-linux and chromium-android, unitsPerEm was not set
650         according to the information in the font, causing at least problems in
651         OpenTypeVerticalData when calculating vertical advance.
652
653         Test: fast/writing-mode/vertical-font-vmtx-units-per-em.html
654
655         * platform/graphics/skia/SimpleFontDataSkia.cpp:
656         (WebCore::SimpleFontData::platformInit):
657
658 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
659
660         Standardize on "flush" terminology for compositing layer flushing/syncing
661         https://bugs.webkit.org/show_bug.cgi?id=98321
662
663         Reviewed by Simon Fraser.
664
665         Rename compositing-related methods that refer to "syncing" to instead
666         refer to "flushing".
667
668         * WebCore.exp.in:
669         * loader/EmptyClients.h:
670         (WebCore::EmptyChromeClient::scheduleCompositingLayerFlush):
671         * page/ChromeClient.h:
672         (ChromeClient):
673         * page/FrameView.cpp:
674         (WebCore::FrameView::flushCompositingStateForThisFrame):
675         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
676         (WebCore::FrameView::paintContents):
677         * page/FrameView.h:
678         (FrameView):
679         * rendering/RenderLayerCompositor.cpp:
680         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
681         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
682
683 2012-10-04  Peter Rybin  <peter.rybin@gmail.com>
684
685         Web Inspector: expose object internal properties such as PrimitiveValue or BoundThis
686         https://bugs.webkit.org/show_bug.cgi?id=94397
687
688         Reviewed by Yury Semikhatsky.
689
690         Internal property access is built from Injected Script to V8 debug API. JSC binding
691         has a stub imlpementation. Protocol is updated to explicitly reflect internal properties.
692
693         Test: inspector-protocol/runtime-getProperties.html
694
695         * bindings/js/JSInjectedScriptHostCustom.cpp:
696         (WebCore::JSInjectedScriptHost::getInternalProperties):
697         (WebCore):
698         * bindings/v8/DebuggerScript.js:
699         * bindings/v8/ScriptDebugServer.cpp:
700         (WebCore::ScriptDebugServer::getInternalProperties):
701         (WebCore):
702         * bindings/v8/ScriptDebugServer.h:
703         (ScriptDebugServer):
704         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
705         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallback):
706         (WebCore):
707         * inspector/InjectedScript.cpp:
708         (WebCore::InjectedScript::getInternalProperties):
709         (WebCore):
710         * inspector/InjectedScript.h:
711         (InjectedScript):
712         * inspector/InjectedScriptHost.idl:
713         * inspector/InjectedScriptSource.js:
714         (.):
715         * inspector/Inspector.json:
716         * inspector/InspectorRuntimeAgent.cpp:
717         (WebCore::InspectorRuntimeAgent::getProperties):
718         * inspector/InspectorRuntimeAgent.h:
719         (InspectorRuntimeAgent):
720
721 2012-10-04  Sami Kyostila  <skyostil@chromium.org>
722
723         Fixed position visibility check does not consider descendants
724         https://bugs.webkit.org/show_bug.cgi?id=98144
725
726         Reviewed by Simon Fraser.
727
728         The check against creating composition layers for invisible fixed positioned
729         elements is too aggressive in that it does not consider descendants of the
730         fixed positioned element that may be visible even though the element itself is
731         out of view.
732
733         Fix the problem by calculating the true composited bounds of the fixed
734         element instead of just using the size of the fixed layer. Because calculating
735         the true bounds may be expensive, it is only done if the fixed layer itself is
736         invisible.
737
738         Test: compositing/layer-creation/fixed-position-absolute-descendant.html
739
740         * rendering/RenderLayerCompositor.cpp:
741         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
742         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
743         * rendering/RenderLayerCompositor.h:
744
745 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
746
747         Web Inspector: When uiSourceCode content has diverged from VM script, call frames should be shown in temporary script based uiSourceCodes.
748         https://bugs.webkit.org/show_bug.cgi?id=98385
749
750         Reviewed by Pavel Feldman.
751
752         When javaScriptSource diverges from VM, ResourceScriptMapping now switches debugging
753         to temporary VM scripts based uiSourceCode with isDivergedReplacement property set.
754         Added hasDivergedFromVM and isDivergingFromVM properties to JavaScriptSource.
755         JavaScriptSourceFrame and ScriptSnippetsModel are updated to process breakpoint changes correctly.
756
757         * inspector/front-end/BreakpointManager.js:
758         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
759         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
760         * inspector/front-end/JavaScriptSource.js:
761         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
762         (WebInspector.JavaScriptSource.prototype.workingCopyChanged):
763         (WebInspector.JavaScriptSource.prototype.fireHasDivergedFromVMChanged):
764         * inspector/front-end/JavaScriptSourceFrame.js:
765         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
766         (WebInspector.JavaScriptSourceFrame.prototype._hasDivergedFromVM):
767         (WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
768         (WebInspector.JavaScriptSourceFrame.prototype._getBreakpointDecorations):
769         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
770         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
771         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
772         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
773         * inspector/front-end/ResourceScriptMapping.js:
774         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
775         (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVMChanged):
776         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
777         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
778         * inspector/front-end/ScriptSnippetModel.js:
779         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
780         (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
781         * inspector/front-end/ScriptsPanel.js:
782         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
783         * inspector/front-end/UISourceCode.js:
784         (WebInspector.UISourceCode.prototype.formatted):
785
786 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
787
788         Web Inspector: Scripts panel should not automatically switch to snippet evaluation when previously evaluated snippet is edited.
789         https://bugs.webkit.org/show_bug.cgi?id=98402
790
791         Reviewed by Pavel Feldman.
792
793         Scripts panel does not automatically switch to snippet evaluation when
794         one edits previously evaluated snippet.
795
796         * inspector/front-end/ScriptSnippetModel.js:
797         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
798         * inspector/front-end/ScriptsPanel.js:
799         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
800
801 2012-10-04  Balazs Kelemen  <kbalazs@webkit.org>
802
803         Don't allow to disable compositing in forced compositing mode
804         https://bugs.webkit.org/show_bug.cgi?id=98048
805
806         Reviewed by Jocelyn Turcotte.
807
808         Make forced compositing mode imply accelerated compositing. This will
809         avoid unexpected situations for platforms that don't want to support
810         the non-accelerated rendering path.
811
812         Covered by existing tests.
813
814         * WebCore.exp.in: Export Settings::setAcceleratedCompositingEnabled
815         because it has been deinlined.
816         * page/Settings.cpp:
817         (WebCore::Settings::setAcceleratedCompositingEnabled):
818         (WebCore::Settings::setForceCompositingMode):
819         (WebCore):
820         * page/Settings.h:
821         (Settings):
822         (WebCore::Settings::forceCompositingMode): Make it const as a side fix.
823
824 2012-10-04  Harald Alvestrand  <hta@google.com>
825
826         Change RTCPeerConnection GetStats to use Date timestamp format
827         https://bugs.webkit.org/show_bug.cgi?id=98263
828
829         Reviewed by Yury Semikhatsky.
830
831         Tested by extension to RTCPeerConnection-stats test.
832
833         * Modules/mediastream/RTCStatsElement.cpp:
834         (WebCore::RTCStatsElement::create):
835         (WebCore::RTCStatsElement::RTCStatsElement):
836         * Modules/mediastream/RTCStatsElement.h: long -> double
837         (RTCStatsElement):
838         (WebCore::RTCStatsElement::timestamp):
839         * Modules/mediastream/RTCStatsElement.idl: long -> Date
840         * Modules/mediastream/RTCStatsReport.cpp:
841         (WebCore::RTCStatsReport::addElement):
842         * Modules/mediastream/RTCStatsReport.h:
843         (RTCStatsReport):
844         * Modules/mediastream/RTCStatsResponse.cpp:
845         (WebCore::RTCStatsResponse::addElement):
846         * Modules/mediastream/RTCStatsResponse.h:
847         (RTCStatsResponse):
848         * platform/chromium/support/WebRTCStatsResponse.cpp:
849         (WebKit::WebRTCStatsResponse::addElement):
850         * platform/mediastream/RTCStatsResponseBase.h:
851         (RTCStatsResponseBase):
852
853 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
854
855         Unreviewed, rolling out r130377.
856         http://trac.webkit.org/changeset/130377
857         https://bugs.webkit.org/show_bug.cgi?id=98392
858
859         Chromium Win compilation is broken (Requested by yurys on
860         #webkit).
861
862         * Modules/mediastream/RTCStatsElement.cpp:
863         (WebCore::RTCStatsElement::create):
864         (WebCore::RTCStatsElement::RTCStatsElement):
865         * Modules/mediastream/RTCStatsElement.h:
866         (RTCStatsElement):
867         (WebCore::RTCStatsElement::timestamp):
868         * Modules/mediastream/RTCStatsElement.idl:
869         * Modules/mediastream/RTCStatsReport.cpp:
870         (WebCore::RTCStatsReport::addElement):
871         * Modules/mediastream/RTCStatsReport.h:
872         (RTCStatsReport):
873         * Modules/mediastream/RTCStatsResponse.cpp:
874         (WebCore::RTCStatsResponse::addElement):
875         * Modules/mediastream/RTCStatsResponse.h:
876         (RTCStatsResponse):
877         * platform/chromium/support/WebRTCStatsResponse.cpp:
878         (WebKit::WebRTCStatsResponse::addElement):
879         * platform/mediastream/RTCStatsResponseBase.h:
880         (RTCStatsResponseBase):
881
882 2012-10-04  Harald Alvestrand  <hta@google.com>
883
884         Change RTCPeerConnection GetStats to use Date timestamp format
885         https://bugs.webkit.org/show_bug.cgi?id=98263
886
887         Reviewed by Adam Barth.
888
889         Tested by extension to RTCPeerConnection-stats test.
890
891         * Modules/mediastream/RTCStatsElement.cpp:
892         (WebCore::RTCStatsElement::create):
893         (WebCore::RTCStatsElement::RTCStatsElement):
894         * Modules/mediastream/RTCStatsElement.h: long -> double
895         (RTCStatsElement):
896         (WebCore::RTCStatsElement::timestamp):
897         * Modules/mediastream/RTCStatsElement.idl: long -> Date
898         * Modules/mediastream/RTCStatsReport.cpp:
899         (WebCore::RTCStatsReport::addElement):
900         * Modules/mediastream/RTCStatsReport.h:
901         (RTCStatsReport):
902         * Modules/mediastream/RTCStatsResponse.cpp:
903         (WebCore::RTCStatsResponse::addElement):
904         * Modules/mediastream/RTCStatsResponse.h:
905         (RTCStatsResponse):
906         * platform/chromium/support/WebRTCStatsResponse.cpp:
907         (WebKit::WebRTCStatsResponse::addElement):
908         * platform/mediastream/RTCStatsResponseBase.h:
909         (RTCStatsResponseBase):
910
911 2012-10-05  Kent Tamura  <tkent@chromium.org>
912
913         [Chromium] Enable the multiple fields UI for input[type=date]
914         https://bugs.webkit.org/show_bug.cgi?id=98351
915
916         Reviewed by Hajime Morita.
917
918         Touch files related to ENABLE_INPUT_TYPE_DATE_LEGACY_UI to avoid build
919         issues.
920
921         No new tests. Many tests will be landed shortly.
922
923         * html/DateInputType.cpp:
924         * html/DateInputType.h:
925
926 2012-10-04  Kent Tamura  <tkent@chromium.org>
927
928         Add code for input[type=date] with the multiple fields UI
929         https://bugs.webkit.org/show_bug.cgi?id=98340
930
931         Reviewed by Hajime Morita.
932
933         The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
934         moment, there are no platforms enabling the new code. We're going to
935         enable it soon on desktop Chromium, and add tests. Then we're going to
936         remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).
937
938         ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
939         is represetnted as a kind of text field, and it has code to invoke a
940         calendar picker.
941         ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
942         support + text field UI of input[type=date]. Now it means only calendar
943         picker support.
944
945         * html/DateInputType.h:
946         (WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
947         !ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
948         for multiple fields UI.
949         (DateInputType): Wrap the code for text fields behavior and calendar
950         picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
951         ENABLE(INPUT_MULTIPLE_FIELDS_UI)
952         * html/DateInputType.cpp:
953         (WebCore::DateInputType::DateInputType):
954         Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
955         (WebCore): ditto.
956         (WebCore::DateInputType::formatDateTimeFieldsState):
957         A callback for multiple fields UI. This constructs a string value from
958         each of values of multiple fields.
959         Note that we don't need to do +1 to month().
960         (WebCore::DateInputType::setupLayoutParameters):
961         A callback for multiple fields UI. Passes information to build UI.
962
963         * html/BaseMultipleFieldsDateAndTimeInputType.h:
964         (BaseMultipleFieldsDateAndTimeInputType):
965         Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
966         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
967         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
968         Initialize m_pickerIndicatorIsAlwaysVisible.
969         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
970         If a type supports calendar picker, we should always show the picker
971         indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
972         RenderTheme for support status of each of types.
973         Add a local variable 'document' to avoid multiple element()->document().
974         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
975         - If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
976         - Wrap the code with appropriate flags.
977
978         * rendering/RenderTheme.h:
979         (WebCore::RenderTheme::supportsCalendarPicker): Added.
980         * rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
981         * rendering/RenderThemeChromiumMac.mm:
982         (WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
983         Added. Delegate to RenderThemeChromiumCommon.
984         * rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
985         * rendering/RenderThemeChromiumSkia.cpp:
986         (WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
987         Added. Delegate to RenderThemeChromiumCommon.
988         * rendering/RenderThemeChromiumCommon.h:
989         (RenderThemeChromiumCommon): Declare supportsCalendarPicker.
990         * rendering/RenderThemeChromiumCommon.cpp:
991         (WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
992         Returns true if the type is "date."
993
994         * html/DateTimeFieldsState.h:
995         (DateTimeFieldsState): Add a comment for the m_month field.
996
997 2012-10-04  Kent Tamura  <tkent@chromium.org>
998
999         DateTimeYearFieldElement should respect min/max values specified by page authors
1000         https://bugs.webkit.org/show_bug.cgi?id=98227
1001
1002         Reviewed by Hajime Morita.
1003
1004         Before this patch, we always set 1 to the minimum limit and 275760 to
1005         the maximum limit for a year field, and a user can specify any year
1006         regardless of min/max attributes. Such wide range is unnecessary for
1007         normal applications and we should provide a way to limit the range.
1008
1009         Test: fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
1010
1011         * html/shadow/DateTimeFieldElements.h:
1012         To add four constructor arguments, introduce Parameters struct.
1013         Actually, we add the followings;
1014          - minimum year in UI
1015          - maximum year in UI
1016          - min attribute is specified
1017          - max attribute is specified
1018         (Parameters):
1019         (WebCore::DateTimeYearFieldElement::Parameters::Parameters):
1020         (DateTimeYearFieldElement):
1021         * html/shadow/DateTimeFieldElements.cpp:
1022         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): ditto.
1023         (WebCore::DateTimeYearFieldElement::create): ditto.
1024         (WebCore::DateTimeYearFieldElement::clampValueForHardLimits):
1025         Override DateTimeNumericFieldElement::clampValueForHardLimits.
1026         By this, we allow to set out-of-range year values.
1027         (WebCore::currentFullYear): A helper to get the current year.
1028         (WebCore::DateTimeYearFieldElement::defaultValueForStepDown):
1029         If the field has no value and step down operation occurs,
1030          - the field has the current year if the max attribute is not specified.
1031          - the field has the maximum value otherwise.
1032         (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Similar change.
1033
1034         * html/shadow/DateTimeNumericFieldElement.h:
1035         (DateTimeNumericFieldElement): Declare clampValueForHardLimits.
1036         * html/shadow/DateTimeNumericFieldElement.cpp:
1037         (WebCore::DateTimeNumericFieldElement::clampValueForHardLimits):
1038         (WebCore::DateTimeNumericFieldElement::setValueAsInteger):
1039         Call clampValueForHardLimits instead of clampValue in order to
1040         distinguish limits for UI and limits for internal value update.
1041
1042         * html/shadow/DateTimeEditElement.h:
1043         (LayoutParameters): Add minimumYear and maximumYear members.
1044         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
1045         Initialize minimumYear and maximumYear.
1046         (WebCore::DateTimeEditElement::LayoutParameters::undefinedYear):
1047         Represents 'undefined' value for minimumYear and maximumYear.
1048         * html/shadow/DateTimeEditElement.cpp:
1049         (WebCore::DateTimeEditBuilder::visitField):
1050         Preparas DateTimeYearField::Parameters and pass it to the DateTimeYearField factory.
1051
1052         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1053         (WebCore::BaseMultipleFieldsDateAndTimeInputType::fullYear):
1054         A helper to get a year value from an attribute value string.
1055         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1056         (BaseMultipleFieldsDateAndTimeInputType): Add fullYear().
1057
1058         * html/DateTimeInputType.cpp:
1059         (WebCore::DateTimeInputType::setupLayoutParameters):
1060         Set LayoutParameters::minimumYear and maximumYear.
1061         * html/DateTimeLocalInputType.cpp:
1062         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
1063         * html/MonthInputType.cpp:
1064         (WebCore::MonthInputType::setupLayoutParameters): ditto.
1065         * html/WeekInputType.cpp:
1066         (WebCore::WeekInputType::setupLayoutParameters): ditto.
1067
1068 2012-10-03  Adam Barth  <abarth@webkit.org>
1069
1070         Unreviewed. Fix parse error in vcproj file.
1071
1072         * WebCore.vcproj/WebCore.vcproj:
1073
1074 2012-10-03  Keishi Hattori  <keishi@webkit.org>
1075
1076         Implement localizeValue for TimeInputType
1077         https://bugs.webkit.org/show_bug.cgi?id=98237
1078
1079         Reviewed by Kent Tamura.
1080
1081         We want to localize time values for the suggestion picker.
1082         DateTimeStringBuilder parses a format and creates a formatted string.
1083
1084         Added chromium unit test LocaleMacTest.formatTime
1085
1086         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1087         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldHaveSecondField): Moved from LayoutParameters because we want to use it inside localizeValue.
1088         (WebCore):
1089         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1090         (BaseMultipleFieldsDateAndTimeInputType):
1091         * html/DateTimeInputType.cpp:
1092         (WebCore::DateTimeInputType::setupLayoutParameters):
1093         * html/DateTimeLocalInputType.cpp:
1094         (WebCore::DateTimeLocalInputType::setupLayoutParameters):
1095         * html/TimeInputType.cpp:
1096         (WebCore::TimeInputType::localizeValue):
1097         (WebCore):
1098         (WebCore::TimeInputType::setupLayoutParameters):
1099         * html/TimeInputType.h:
1100         (TimeInputType):
1101         * html/shadow/DateTimeEditElement.cpp:
1102         (WebCore):
1103         * html/shadow/DateTimeEditElement.h:
1104         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
1105         * platform/text/LocaleICU.cpp:
1106         (WebCore::LocaleICU::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1107         * platform/text/LocaleICU.h:
1108         (LocaleICU):
1109         * platform/text/LocaleWin.cpp:
1110         (WebCore::LocaleWin::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1111         * platform/text/LocaleWin.h:
1112         (LocaleWin):
1113         * platform/text/LocaleNone.cpp:
1114         (LocaleNone):
1115         (WebCore::LocaleNone::formatDateTime):
1116         * platform/text/Localizer.cpp:
1117         (DateTimeStringBuilder):
1118         (WebCore):
1119         (WebCore::DateTimeStringBuilder::DateTimeStringBuilder): Takes a
1120         Localizer pointer. This is used inside the Localizer so the Localizer
1121         will out live the DateTimeStringBuilder.
1122         (WebCore::DateTimeStringBuilder::build): Builds a localized string for the given format.
1123         (WebCore::DateTimeStringBuilder::zeroPadString):
1124         (WebCore::DateTimeStringBuilder::appendNumber): Appends a number with left zero padding to match width.
1125         (WebCore::DateTimeStringBuilder::visitField):
1126         (WebCore::DateTimeStringBuilder::visitLiteral):
1127         (WebCore::DateTimeStringBuilder::toString): Returns the localized string.
1128         (WebCore::Localizer::formatDateTime):
1129         * platform/text/Localizer.h:
1130         * platform/text/mac/LocaleMac.h:
1131         (LocaleMac):
1132         * platform/text/mac/LocaleMac.mm:
1133         (WebCore::LocaleMac::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1134
1135 2012-10-03  Douglas Stockwell  <dstockwell@chromium.org>
1136
1137         Chromium needs support for border radius clipping
1138         https://bugs.webkit.org/show_bug.cgi?id=69866
1139
1140         Reviewed by Stephen White.
1141
1142         Changes to make this suitably efficient have already landed upstream in skia:
1143         http://code.google.com/p/skia/source/detail?r=2924
1144
1145         Covered by existing tests.
1146
1147         * rendering/RenderLayer.cpp:
1148
1149 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
1150
1151         Simplify attribute access in Element::computeInheritedLanguage
1152         https://bugs.webkit.org/show_bug.cgi?id=98327
1153
1154         Reviewed by Andreas Kling.
1155
1156         * dom/Element.cpp:
1157         (WebCore::Element::computeInheritedLanguage):
1158         By using Element::fastGetAttribute(), we check for the existence of attributeData twice
1159         and do a bunch of useless operation on AtomicString.
1160
1161         By using ElementAttributeData directly, we can cut it to the two important branch.
1162
1163 2012-10-03  Kangil Han  <kangil.han@samsung.com>
1164
1165         Fix unused parameter compile warnings.
1166         https://bugs.webkit.org/show_bug.cgi?id=98243
1167
1168         Reviewed by Alexey Proskuryakov.
1169
1170         Fixed unused parameter compile warning by removing parameter names and adding UNUSED_PARAM usage.
1171
1172         * plugins/PluginDebug.cpp:
1173         (WebCore::prettyNameForNPPVariable):
1174         * plugins/npapi.cpp:
1175         (NPN_MemFlush):
1176         (NPN_RequestRead):
1177         (NPN_GetJavaPeer):
1178
1179 2012-10-03  Adam Barth  <abarth@webkit.org>
1180
1181         Measure the usage of WebSQLDatabase
1182         https://bugs.webkit.org/show_bug.cgi?id=98330
1183
1184         Reviewed by Ojan Vafai.
1185
1186         WebKit is the only engine that implements WebSQLDatabase. This patch
1187         causes us to measure its usage so we can see how quickly web sites move
1188         to IndexedDB.
1189
1190         * Modules/webdatabase/DOMWindowWebDatabase.idl:
1191         * page/FeatureObserver.h:
1192
1193 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1194
1195         [soup] WebKit crashes when doing a http request
1196         https://bugs.webkit.org/show_bug.cgi?id=98055
1197
1198         Reviewed by Martin Robinson.
1199
1200         On i386, (d->m_firstRequest.timeoutInterval() * 1000) results in 0 if
1201         timeoutInterval() is INT_MAX. So, set default timeout to 0 to avoid
1202         calling soup_add_timeout with a 0 value.
1203
1204         Also, if resource handle is deleted before "request-started" signal is
1205         emitted, soupMessage handle points to a deleted object, and a crash
1206         occurs. So, reset soupMessage handle data in
1207         cleanupSoupRequestOperation so it won't happen anymore.
1208
1209         Lastly, if timeout occurs before request is completed, handle is
1210         deleted, and crash occurs in sendRequestCallback due to an early
1211         destroyed handle. To avoid that, call handle->cancel in
1212         requestTimeoutCallback. There is no need to call
1213         cleanupSoupRequestOperation anymore since handle->cancel will trigger
1214         sendRequestCallback, and as handle is deleted,
1215         cleanupSoupRequestOperation will be called automatically.
1216
1217         No new tests yet, tests will be added with the patch in bug 74802.
1218
1219         * platform/network/ResourceRequestBase.cpp:
1220         (WebCore):
1221         * platform/network/soup/ResourceHandleSoup.cpp:
1222         (WebCore::cleanupSoupRequestOperation):
1223         (WebCore::ResourceHandle::platformSetDefersLoading):
1224         (WebCore::requestTimeoutCallback):
1225
1226 2012-10-03  Adam Barth  <abarth@webkit.org>
1227
1228         Remove support for ENABLE(LEGACY_WEBKIT_BLOB_BUILDER)
1229         https://bugs.webkit.org/show_bug.cgi?id=98301
1230
1231         Reviewed by Eric Seidel.
1232
1233         According to anonymous usage statistics, the APIs guarded by
1234         ENABLE(LEGACY_WEBKIT_BLOB_BUILDER) are used on approximately 0.006% of
1235         web pages. Given that this feature is only enabled in GTK and Chromium,
1236         it seems likely that we should remove it.
1237
1238         * CMakeLists.txt:
1239         * DerivedSources.make:
1240         * DerivedSources.pri:
1241         * GNUmakefile.features.am:
1242         * GNUmakefile.list.am:
1243         * WebCore.gypi:
1244         * WebCore.xcodeproj/project.pbxproj:
1245         * fileapi/WebKitBlobBuilder.idl: Removed.
1246         * page/DOMWindow.idl:
1247
1248 2012-10-03  Beth Dakin  <bdakin@apple.com>
1249
1250         https://bugs.webkit.org/show_bug.cgi?id=98313
1251         ScrollingStateNode should keep a Vector of children instead of child 
1252         pointers
1253
1254         Reviewed by Simon Fraser.
1255
1256         This patch re-names ScrollingStateNode::cloneNode() to 
1257         ScrollingStateNode::cloneAndResetNode(). The new function resets the 
1258         change properties of the current node after cloning it, and it also 
1259         takes care of cloning children, which the old function did not do.
1260
1261         m_firstChild and m_nextSibling are gone. Use the m_children Vector 
1262         instead.
1263         * page/scrolling/ScrollingStateNode.cpp:
1264         (WebCore::ScrollingStateNode::cloneAndResetChildNodes):
1265         (WebCore::ScrollingStateNode::appendChild):
1266         * page/scrolling/ScrollingStateNode.h:
1267         (ScrollingStateNode):
1268         (WebCore::ScrollingStateNode::parent):
1269         (WebCore::ScrollingStateNode::setParent):
1270
1271         Reset the change properties and clone children in cloneAndResetNode()
1272         * page/scrolling/ScrollingStateScrollingNode.cpp:
1273         (WebCore::ScrollingStateScrollingNode::cloneAndResetNode):
1274         * page/scrolling/ScrollingStateScrollingNode.h:
1275
1276         Yay, this function can be vastly simplified now that we don't have 
1277         those messy child and sibling pointers.
1278         * page/scrolling/ScrollingStateTree.cpp:
1279         (WebCore::ScrollingStateTree::commit):
1280
1281 2012-10-03  Ojan Vafai  <ojan@chromium.org>
1282
1283         Replace uses of -webkit-box-sizing with box-sizing
1284         https://bugs.webkit.org/show_bug.cgi?id=98312
1285
1286         Reviewed by Tony Chang.
1287
1288         No need to use the prefixed version when the unprefixed works the same.
1289         No new tests since there's no change in behavior..
1290
1291         * css/html.css:
1292
1293 2012-10-03  Joshua Bell  <jsbell@chromium.org>
1294
1295         IndexedDB: Don't do full commit for empty transactions
1296         https://bugs.webkit.org/show_bug.cgi?id=89239
1297
1298         Reviewed by Tony Chang.
1299
1300         Don't bother creating a leveldb write batch if there's nothing in the transaction
1301         to commit. Note that a read-only transaction may still have index cleanup so may
1302         not be an empty transaction.
1303
1304         This cuts the Lookup2 benchmark in http://reyesr.github.com/html5-storage-benchmark/
1305         from 70s to 2s.
1306
1307         Covered by existing tests, e.g. storage/indexeddb/transaction-basics.html
1308
1309         * platform/leveldb/LevelDBTransaction.cpp:
1310         (WebCore::LevelDBTransaction::commit):
1311
1312 2012-10-03  Adam Klein  <adamk@chromium.org>
1313
1314         Remove bogus FIXME from Document.idl
1315         https://bugs.webkit.org/show_bug.cgi?id=98302
1316
1317         Reviewed by Adam Barth.
1318
1319         The FIXME claimed that document.body throwing an exception was not
1320         specced, but in fact it is:
1321         http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-body
1322
1323         * dom/Document.idl:
1324
1325 2012-10-03  Joshua Bell  <jsbell@chromium.org>
1326
1327         IndexedDB: Memory leak when deleting object stores with indexes
1328         https://bugs.webkit.org/show_bug.cgi?id=98292
1329
1330         Reviewed by Tony Chang.
1331
1332         Reference cycles between IDBObjectStore and IDBIndex instances are explicitly
1333         broken when the transaction completes (and the spec allows traversal to fail).
1334         Deleted stores need to have the reference cycle broken too.
1335
1336         Caught by running valgrind over: storage/indexeddb/keypath-basics.html
1337
1338         * Modules/indexeddb/IDBTransaction.cpp:
1339         (WebCore::IDBTransaction::objectStoreDeleted): Add store to set.
1340         (WebCore::IDBTransaction::dispatchEvent): Notify stores in set.
1341         * Modules/indexeddb/IDBTransaction.h: Add set of deleted stores.
1342
1343 2012-10-03  Adam Barth  <abarth@webkit.org>
1344
1345         CSSNamespace.h is empty and should be deleted
1346         https://bugs.webkit.org/show_bug.cgi?id=98304
1347
1348         Reviewed by Eric Seidel.
1349
1350         There's no reason to have this file in the repository.
1351
1352         * GNUmakefile.list.am:
1353         * WebCore.gypi:
1354         * WebCore.vcproj/WebCore.vcproj:
1355         * WebCore.xcodeproj/project.pbxproj:
1356         * css/CSSNamespace.h: Removed.
1357
1358 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1359
1360         Build failure with css filters enabled and accelerated compositing disabled
1361         https://bugs.webkit.org/show_bug.cgi?id=95908
1362
1363         Reviewed by Tony Chang.
1364
1365         Do not try to setBackingNeedsRepaint when building without accelerated
1366         compositing.
1367
1368         Also, allow painting with filter (paintsWithFilters returns true if
1369         renderer has filter) when accelerated compositing is not enabled.
1370
1371         No functional change, so no new tests.
1372
1373         * rendering/RenderLayer.cpp:
1374         (WebCore::RenderLayer::styleChanged):
1375
1376 2012-10-03  Emil A Eklund  <eae@chromium.org>
1377
1378         Round image sizes when zooming
1379         https://bugs.webkit.org/show_bug.cgi?id=98205
1380
1381         Reviewed by Eric Seidel.
1382
1383         We currently floor image sizes when zooming which can result in
1384         images being rendered at one pixel less than the actual size.
1385         This is especially likely to happen for very large images.
1386
1387         Test: fast/sub-pixel/zoomed-image-tiles.html
1388
1389         * loader/cache/CachedImage.cpp:
1390         (WebCore::CachedImage::imageSizeForRenderer):
1391
1392 2012-10-03  Hugo Parente Lima  <hugo.lima@openbossa.org>
1393
1394         [WK2] PageViewportController.cpp is supposed to be a generic WebKit2 file but only works with Qt port.
1395         https://bugs.webkit.org/show_bug.cgi?id=98186
1396
1397         Reviewed by Noam Rosenthal.
1398
1399         Remove the implicit conversion from WebCore::FloatSize to QSize.
1400
1401         * platform/graphics/FloatSize.h:
1402         (FloatSize):
1403
1404 2012-10-03  Levi Weintraub  <leviw@chromium.org>
1405
1406         [Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
1407         https://bugs.webkit.org/show_bug.cgi?id=97484
1408
1409         Reviewed by Eric Seidel.
1410
1411         When in compositing mode, layer painting can be triggered through the backing store. When this
1412         happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
1413         the proper sub-pixel accumulation through layers to their children, but since we're not
1414         starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
1415         another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
1416         past the listed root layer.
1417
1418         When painting a root layer, we're aligned to the surface we're painting to, so we round our
1419         offset to avoid moving objects around.
1420
1421         * rendering/RenderLayer.cpp:
1422         (WebCore::RenderLayer::paintLayerContents):
1423
1424 2012-10-03  Jeff Timanus  <twiz@chromium.org>
1425
1426         [chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor.  The
1427         flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
1428         https://bugs.webkit.org/show_bug.cgi?id=93292
1429
1430         Reviewed by James Robinson.
1431
1432         Tests:  Existing page-scale layout tests.
1433
1434         * page/Frame.cpp:
1435         (WebCore::Frame::frameScaleFactor):
1436         * page/Settings.cpp:
1437         (WebCore::Settings::Settings):
1438         * page/Settings.h:
1439         (WebCore::Settings::setApplyPageScaleFactorInCompositor):
1440         (WebCore::Settings::applyPageScaleFactorInCompositor):
1441         (Settings):
1442
1443 2012-10-03  Stephen Chenney  <schenney@chromium.org>
1444
1445         Font data is purged while fonts are still using it
1446         https://bugs.webkit.org/show_bug.cgi?id=93640
1447
1448         Reviewed by Eric Seidel.
1449
1450         Move the handling of custom font pruning from Document to FontFallbackList.
1451         The previous inplementation allowed fonts to be removed before all their
1452         clients were done. This change moves handling of custom font purging to the
1453         FontFallbackList class, which is the shared object that is only removed
1454         when all clients of a font are done with it. This fixes a crash in Angry
1455         Birds due to a seamless iframe and some failing tests in fast/frames/seamless.
1456
1457         The specific element that causes problems is:
1458         <iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
1459           src="http://chrome.angrybirds.com/ingame_graphic.html"
1460           onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
1461           style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
1462           position: absolute; border: 0px; width: 312px; height: 320px; z-index:
1463           300; overflow: hidden; visibility: visible;"></iframe>
1464         The source document uses the same font as the embedding document.
1465
1466         Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
1467                fast/frames/seamless/seamless-nested-crash.html
1468
1469         * css/CSSFontFaceSource.cpp:
1470         (WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
1471         * css/CSSSegmentedFontFace.cpp:
1472         (WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
1473         * dom/Document.cpp:
1474         (WebCore::Document::~Document): Remove code that records and purges custom fonts.
1475         (WebCore):
1476         (WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
1477         * dom/Document.h:
1478         (WebCore):
1479         (Document): Remove method declarations for custom font handling.
1480         * platform/graphics/FontFallbackList.h:
1481         (FontFallbackList): Moved some code around and made non-copyable.
1482         (WebCore::FontFallbackList::setGlyphPageZero): Moved.
1483         (WebCore::FontFallbackList::setGlyphPages): Moved.
1484         * platform/graphics/GlyphPageTreeNode.cpp:
1485         (WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
1486         * platform/graphics/SegmentedFontData.cpp:
1487         (WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
1488         * platform/graphics/SimpleFontData.cpp:
1489         (WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.
1490
1491 2012-10-03  Adam Barth  <abarth@webkit.org>
1492
1493         Crash when calling document.open during unload
1494         https://bugs.webkit.org/show_bug.cgi?id=98287
1495
1496         Reviewed by Nate Chapin.
1497
1498         Calling document.open results in us nulling out m_documentLoader. This
1499         code doesn't properly handle that case and crashes.
1500
1501         Test: fast/parser/document-open-in-unload.html
1502
1503         * loader/FrameLoader.cpp:
1504         (WebCore::FrameLoader::commitProvisionalLoad):
1505
1506 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
1507
1508         Element::computeInheritedLanguage: evaluate the while() condition after fetching the string
1509         https://bugs.webkit.org/show_bug.cgi?id=98220
1510
1511         Reviewed by Andreas Kling.
1512
1513         * dom/Element.cpp:
1514         (WebCore::Element::computeInheritedLanguage):
1515         The condition is never false on the first execution. Move the condition to the
1516         end of the loop for fun and profit.
1517
1518 2012-10-03  Hans Wennborg  <hans@chromium.org>
1519
1520         Speech JavaScript API: Add SpeechRecognition.interimResults attribute
1521         https://bugs.webkit.org/show_bug.cgi?id=98279
1522
1523         Reviewed by Adam Barth.
1524
1525         Add the interimResults attribute and pass it to the embedder. It was
1526         added to the spec draft in
1527         http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c
1528
1529         Tested in fast/speech/scripted/basics.html
1530
1531         * Modules/speech/SpeechRecognition.cpp:
1532         (WebCore::SpeechRecognition::start):
1533         (WebCore::SpeechRecognition::SpeechRecognition):
1534         * Modules/speech/SpeechRecognition.h:
1535         (WebCore::SpeechRecognition::interimResults):
1536         (WebCore::SpeechRecognition::setInterimResults):
1537         * Modules/speech/SpeechRecognition.idl:
1538         * Modules/speech/SpeechRecognitionClient.h:
1539         (SpeechRecognitionClient):
1540         * Modules/speech/SpeechRecognitionController.h:
1541         (WebCore::SpeechRecognitionController::start):
1542
1543 2012-10-03  Hans Wennborg  <hans@chromium.org>
1544
1545         Speech JavaScript API: Remove resultdeleted event
1546         https://bugs.webkit.org/show_bug.cgi?id=98272
1547
1548         Reviewed by Adam Barth.
1549
1550         Remove the resultdeleted event. This was never used, and was removed
1551         from the spec draft in
1552         http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
1553
1554         The fast/speech/scripted/basics.html test is updated to reflect this.
1555
1556         * Modules/speech/SpeechRecognition.cpp:
1557         * Modules/speech/SpeechRecognition.h:
1558         (SpeechRecognition):
1559         * Modules/speech/SpeechRecognition.idl:
1560         * Modules/speech/SpeechRecognitionEvent.cpp:
1561         * Modules/speech/SpeechRecognitionEvent.h:
1562         (SpeechRecognitionEvent):
1563         * dom/EventNames.h:
1564         (WebCore):
1565
1566 2012-09-16  Mark Hahnenberg  <mhahnenberg@apple.com>
1567
1568         Delayed structure sweep can leak structures without bound
1569         https://bugs.webkit.org/show_bug.cgi?id=96546
1570
1571         Reviewed by Geoffrey Garen.
1572
1573         This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
1574         allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
1575         those objects with destructors and with immortal structures, and those objects with destructors that don't have 
1576         immortal structures. All of the objects of the third type (destructors without immortal structures) now 
1577         inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
1578         the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
1579
1580         No new tests.
1581
1582         * ForwardingHeaders/runtime/JSDestructableObject.h: Added.
1583         * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
1584         (JSDOMWrapper):
1585         (WebCore::JSDOMWrapper::JSDOMWrapper):
1586         * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
1587         e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
1588         (GenerateHeader):
1589         * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
1590         (ObjcFallbackObjectImp):
1591         * bridge/objc/objc_runtime.mm:
1592         (Bindings):
1593         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1594         * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
1595         (JSC):
1596         (JSC::RuntimeArray::destroy):
1597         * bridge/runtime_array.h:
1598         (JSC::RuntimeArray::create):
1599         (JSC):
1600         * bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
1601         (Bindings):
1602         (JSC::Bindings::RuntimeObject::RuntimeObject):
1603         * bridge/runtime_object.h:
1604         (RuntimeObject):
1605
1606 2012-10-02  Anders Carlsson  <andersca@apple.com>
1607
1608         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
1609         https://bugs.webkit.org/show_bug.cgi?id=98217
1610
1611         Reviewed by Andreas Kling.
1612
1613         * WebCore.exp.in:
1614         * rendering/RenderLayerBacking.cpp:
1615         (WebCore::RenderLayerBacking::createGraphicsLayer):
1616         * rendering/RenderLayerCompositor.cpp:
1617         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1618         (WebCore::RenderLayerCompositor::ensureRootLayer):
1619
1620 2012-10-03  Joshua Bell  <jsbell@chromium.org>
1621
1622         IndexedDB: Optimize encodeString/decodeString
1623         https://bugs.webkit.org/show_bug.cgi?id=97794
1624
1625         Reviewed by Tony Chang.
1626
1627         Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
1628         The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
1629         isn't sufficient, but the code used StringBuilder::append() character-by-character
1630         and custom byte-swapping which was slow.
1631
1632         Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
1633         and putting it 20k times and getting it 20k times. On my test box, mean time before the
1634         patch was 8.2s, mean time after the patch was 4.6s.
1635
1636         Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
1637
1638         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1639         (WebCore::IDBLevelDBCoding::encodeString):
1640         (WebCore::IDBLevelDBCoding::decodeString):
1641
1642 2012-10-03  Keishi Hattori  <keishi@webkit.org>
1643
1644         Implement DataList UI for input type time on chromium
1645         https://bugs.webkit.org/show_bug.cgi?id=98240
1646
1647         Reviewed by Kent Tamura.
1648
1649         This adds datalist UI for input type time. We add the picker indicator to
1650         BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element
1651         and picker indicator inside a new div element so we can position the picker
1652         indicator in the same place as input type=date.
1653
1654         Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html
1655                platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html
1656                platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html
1657                platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html
1658                platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html
1659
1660         * css/html.css:
1661         (input::-webkit-date-and-time-container):
1662         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1663         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
1664         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator.
1665         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down.
1666         (WebCore):
1667         (WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility.
1668         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override
1669         this so the picker indicator is always visible.
1670         (WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator):
1671         (WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator):
1672         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1673         (WebCore):
1674         (BaseMultipleFieldsDateAndTimeInputType):
1675         * html/shadow/DateTimeFieldElement.cpp:
1676         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open.
1677         * rendering/RenderThemeChromiumCommon.cpp:
1678         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list.
1679
1680 2012-10-03  Andreas Kling  <kling@webkit.org>
1681
1682         Give CSSValueList backing vector an inline capacity.
1683         <http://webkit.org/b/98266>
1684         <rdar://problem/12421425>
1685
1686         Reviewed by Anders Carlsson.
1687
1688         Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation
1689         in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have
1690         at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append.
1691
1692         394kB progression on Membuster3.
1693
1694         * css/CSSValueList.h:
1695         (CSSValueList):
1696
1697 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
1698
1699         Web Inspector: NMI: instrument NativeImageSkia.
1700         https://bugs.webkit.org/show_bug.cgi?id=96277
1701
1702         Reviewed by Yury Semikhatsky.
1703
1704         * platform/graphics/skia/NativeImageSkia.cpp:
1705         (WebCore::NativeImageSkia::reportMemoryUsage):
1706         (WebCore::reportMemoryUsage):
1707
1708 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
1709
1710         Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right
1711         https://bugs.webkit.org/show_bug.cgi?id=98255
1712
1713         Reviewed by Vsevolod Vlasov.
1714
1715         - Introduced DockController.js that covers the dock mechanics
1716         - Removed dock orientation from the settings
1717         - Storing the last dock option to present it as default
1718         - Simplified the multi-option status bar button
1719
1720         * WebCore.gypi:
1721         * WebCore.vcproj/WebCore.vcproj:
1722         * inspector/compile-front-end.py:
1723         * inspector/front-end/DockController.js: Added.
1724         (WebInspector.DockController):
1725         (WebInspector.DockController.prototype.get element):
1726         (WebInspector.DockController.prototype.setDocked.set if):
1727         (WebInspector.DockController.prototype.setDocked):
1728         (WebInspector.DockController.prototype.setDockingUnavailable):
1729         (WebInspector.DockController.prototype._updateUI.get states):
1730         (WebInspector.DockController.prototype._updateUI):
1731         (WebInspector.DockController.prototype._decorateButtonForTargetState):
1732         (WebInspector.DockController.prototype._createDockOptions):
1733         (WebInspector.DockController.prototype._toggleDockState):
1734         (WebInspector.DockController.prototype.isCompactMode):
1735         (WebInspector.DockController.prototype.setCompactMode):
1736         * inspector/front-end/InspectorFrontendAPI.js:
1737         (InspectorFrontendAPI.setAttachedWindow):
1738         * inspector/front-end/InspectorFrontendHostStub.js:
1739         (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
1740         (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
1741         * inspector/front-end/Settings.js:
1742         * inspector/front-end/SettingsScreen.js:
1743         (WebInspector.GenericSettingsTab):
1744         * inspector/front-end/StatusBarButton.js:
1745         (WebInspector.StatusBarButton):
1746         * inspector/front-end/Toolbar.js:
1747         (WebInspector.Toolbar):
1748         (WebInspector.Toolbar.prototype.setCompactMode):
1749         (WebInspector.Toolbar.prototype._toolbarDragStart):
1750         (WebInspector.Toolbar.prototype._toolbarDrag):
1751         * inspector/front-end/WebKit.qrc:
1752         * inspector/front-end/externs.js:
1753         (WebInspector.toggleSearchingForNode):
1754         * inspector/front-end/inspector.css:
1755         (body.undocked.platform-mac-snowleopard #toolbar):
1756         (body.undocked.platform-mac-snowleopard #toolbar-dropdown):
1757         * inspector/front-end/inspector.html:
1758         * inspector/front-end/inspector.js:
1759         (WebInspector._createGlobalStatusBarItems):
1760         (windowLoaded):
1761         (WebInspector.setDockingUnavailable):
1762         * inspector/front-end/inspectorCommon.css:
1763         (body.dock-to-right:not(.undocked)):
1764         (body.dock-to-right.inactive:not(.undocked)):
1765
1766 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
1767
1768         Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error.
1769         https://bugs.webkit.org/show_bug.cgi?id=97272
1770
1771         Reviewed by Pavel Feldman.
1772
1773         This patch is based on patch by John J. Barton.
1774
1775         * inspector/front-end/JavaScriptSource.js:
1776         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check.
1777
1778 2012-10-03  Alexander Pavlov  <apavlov@chromium.org>
1779
1780         Web Inspector: After "Edit as HTML", any click outside box should stop editing
1781         https://bugs.webkit.org/show_bug.cgi?id=98258
1782
1783         Reviewed by Vsevolod Vlasov.
1784
1785         Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events.
1786
1787         * inspector/front-end/elementsPanel.css:
1788         (#elements-content > ol):
1789
1790 2012-10-03  Dongwoo Joshua Im  <dw.im@samsung.com>
1791
1792         [EFL] Skeleton code of File system API.
1793         https://bugs.webkit.org/show_bug.cgi?id=91187
1794
1795         Reviewed by Gyuyoung Kim.
1796
1797         Add skeleton code of File System API on EFL port.
1798         Implementation patches will be created later.
1799
1800         No new tests because this is just skeleton code.
1801
1802         * CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory.
1803         * PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp.
1804         * platform/AsyncFileSystem.cpp:
1805         (WebCore):
1806         * platform/efl/AsyncFileSystemEfl.cpp: Added.
1807         * platform/efl/AsyncFileSystemEfl.h: Added.
1808
1809 2012-10-03  Andreas Kling  <kling@webkit.org>
1810
1811         Shrink ElementRareData by moving bool flags to NodeRareData.
1812         <http://webkit.org/b/98225>
1813
1814         Reviewed by Antti Koivisto.
1815
1816         Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData.
1817         This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3.
1818         Also removed some double raredata hash lookups.
1819
1820         * dom/Element.cpp:
1821         (WebCore::Element::detach):
1822         (WebCore::Element::recalcStyle):
1823         (WebCore::Element::ensureShadow):
1824         (WebCore::Element::setStyleAffectedByEmpty):
1825         (WebCore::Element::styleAffectedByEmpty):
1826         (WebCore::Element::setIsInCanvasSubtree):
1827         (WebCore::Element::isInCanvasSubtree):
1828         (WebCore::Element::containsFullScreenElement):
1829         (WebCore::Element::setContainsFullScreenElement):
1830         * dom/ElementRareData.h:
1831         (ElementRareData):
1832         (WebCore::ElementRareData::ElementRareData):
1833         * dom/NodeRareData.h:
1834         (WebCore::NodeRareData::styleAffectedByEmpty):
1835         (WebCore::NodeRareData::setStyleAffectedByEmpty):
1836         (WebCore::NodeRareData::isInCanvasSubtree):
1837         (WebCore::NodeRareData::setIsInCanvasSubtree):
1838         (NodeRareData):
1839         (WebCore::NodeRareData::containsFullScreenElement):
1840         (WebCore::NodeRareData::setContainsFullScreenElement):
1841
1842 2012-10-03  Jussi Kukkonen  <jussi.kukkonen@intel.com>
1843
1844         getComputedStyle perspective-origin is based on the wrong bounding box
1845         https://bugs.webkit.org/show_bug.cgi?id=98027
1846
1847         Reviewed by Simon Fraser.
1848
1849         perspective-origin for ComputedStyleDeclaration is currently calculated using the
1850         wrong bounding box (sizingBox() which ends up as the contentbox).
1851
1852         Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to
1853         what transform-origin already does.
1854
1855         Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html
1856
1857         * css/CSSComputedStyleDeclaration.cpp:
1858         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1859
1860 2012-10-03  Patrick Gansterer  <paroga@webkit.org>
1861
1862         Build fix for WinCE after r130160.
1863
1864         * platform/graphics/FontFastPath.cpp:
1865         (WebCore::Font::glyphDataAndPageForCharacter):
1866
1867 2012-10-03  Tommy Widenflycht  <tommyw@google.com>
1868
1869         MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
1870         https://bugs.webkit.org/show_bug.cgi?id=98149
1871
1872         Reviewed by Adam Barth.
1873
1874         The chromium implementation needs to know which Frame created a PeerConnection so
1875         that the right housekeeping can take place correctly.
1876
1877         Not testable in DRT, but have verified the change manually and with our pyautotests.
1878
1879         * Modules/mediastream/RTCPeerConnection.cpp:
1880         (WebCore::RTCPeerConnection::RTCPeerConnection):
1881         * loader/FrameLoaderClient.h:
1882         (WebCore):
1883         (FrameLoaderClient):
1884         (WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler):
1885         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1886         (WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler):
1887         (WebCore):
1888         (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
1889         (WebCore::RTCPeerConnectionHandlerChromium::initialize):
1890         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
1891         (RTCPeerConnectionHandlerChromium):
1892
1893 2012-10-03  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1894
1895         Web Inspector: Profiles: taking heap snapshot causes error message in console.
1896         https://bugs.webkit.org/show_bug.cgi?id=97890
1897
1898         Reviewed by Yury Semikhatsky.
1899
1900         Actual problem is that proxy loader is closed twice.
1901
1902         "_snapshotReceived" should never try to close receiver,
1903         because it is a callback fired by close.
1904
1905         Also minor glitches fixed:
1906          - taking snapshot shows "Loading..." status first,
1907         and then "Saving xxx%";
1908          - after all chunks are sent "Parsing" status is set and
1909         then is replaced with "Saving 100%";
1910          - removed dead code in proxy;
1911          - proxy was ignoring callback parameter;
1912          - "Loading %d\%" is not localized.
1913
1914         * English.lproj/localizedStrings.js: Added missing "Loading %d%" string.
1915         * inspector/front-end/HeapSnapshotProxy.js: Removed dead code.
1916         (WebInspector.HeapSnapshotLoaderProxy):
1917         (WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method
1918         interface-conformant.
1919         * inspector/front-end/HeapSnapshotView.js:
1920         (WebInspector.HeapProfileHeader): Fixed update-status and
1921         finish-transfer logic.
1922
1923 2012-10-03  Jochen Eisinger  <jochen@chromium.org>
1924
1925         Make sure that user gestures can't be consumed twice
1926         https://bugs.webkit.org/show_bug.cgi?id=97483
1927
1928         Reviewed by Adam Barth.
1929
1930         Instead of a simple counter, use a ref counted token to track how many
1931         user gestures happened and where consumed. When creating a timer that
1932         is supposed to forward the user gesture, take a reference to this token
1933         and reinstantiate the UserGestureIndicator with that token when the
1934         timer is triggered.
1935
1936         Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html
1937                platform/chromium/fast/events/popup-forwarded-gesture.html
1938
1939         * dom/UserGestureIndicator.cpp:
1940         (WebCore):
1941         (WebCore::UserGestureIndicator::UserGestureIndicator):
1942         (WebCore::UserGestureIndicator::~UserGestureIndicator):
1943         (WebCore::UserGestureIndicator::processingUserGesture):
1944         (WebCore::UserGestureIndicator::consumeUserGesture):
1945         (WebCore::UserGestureIndicator::currentToken):
1946         * dom/UserGestureIndicator.h:
1947         (Token):
1948         (WebCore::UserGestureIndicator::Token::~Token):
1949         (UserGestureIndicator):
1950         * page/DOMTimer.cpp:
1951         (WebCore::DOMTimer::DOMTimer):
1952         (WebCore::DOMTimer::fired):
1953         * page/DOMTimer.h:
1954         (DOMTimer):
1955
1956 2012-10-03  Dominic Mazzoni  <dmazzoni@google.com>
1957
1958         AX: Heap-use-after-free when deleting a ContainerNode with an AX object
1959         https://bugs.webkit.org/show_bug.cgi?id=98073
1960
1961         Reviewed by Hajime Morita.
1962
1963         Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree
1964         doesn't try to access the container node while walking up the parent chain
1965         from one of the container node's children.
1966
1967         Test: accessibility/container-node-delete-causes-crash.html
1968
1969         * dom/ContainerNode.cpp:
1970         (WebCore::ContainerNode::~ContainerNode):
1971         * dom/Node.cpp:
1972         (WebCore::Node::~Node):
1973         * dom/Node.h:
1974         (WebCore::Node::document):
1975         (WebCore::Node::documentInternal):
1976
1977 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
1978
1979         Web Inspector: SourceURL should be taken from debugger agent when possible.
1980         https://bugs.webkit.org/show_bug.cgi?id=98239
1981
1982         Reviewed by Yury Semikhatsky.
1983
1984         Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent.
1985         Alwys use the one from debugger agent now.
1986
1987         * inspector/InspectorDebuggerAgent.cpp:
1988         (WebCore::InspectorDebuggerAgent::didParseSource):
1989
1990 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
1991
1992         Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation.
1993
1994         * page/FrameView.cpp:
1995         (WebCore):
1996
1997 2012-10-02  Ilya Tikhonovsky  <loislo@chromium.org>
1998
1999         Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
2000         https://bugs.webkit.org/show_bug.cgi?id=98163
2001
2002         Reviewed by Yury Semikhatsky.
2003
2004         The text was changed to "Load Heap Snapshot..."
2005         Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
2006         The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
2007
2008         * English.lproj/localizedStrings.js:
2009         * inspector/front-end/ProfilesPanel.js:
2010         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
2011         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2012
2013 2012-10-03  Harald Alvestrand  <hta@google.com>
2014
2015         Add data passing to the GetStats interface of RTCPeerConnection
2016         https://bugs.webkit.org/show_bug.cgi?id=98003
2017
2018         Reviewed by Adam Barth.
2019
2020         Added an RTCStatsResponseBase interface to platform, and let the
2021         RTCStatsRequestImpl class produce an implementation of it that's returned
2022         to WebCore.
2023
2024         Tested by extension of the RTCPeerConnection-stats.html test.
2025
2026         * Modules/mediastream/RTCStatsElement.cpp:
2027         (WebCore::RTCStatsElement::addStatistic):
2028         (WebCore):
2029         * Modules/mediastream/RTCStatsElement.h:
2030         (RTCStatsElement):
2031         * Modules/mediastream/RTCStatsReport.cpp:
2032         (WebCore):
2033         (WebCore::RTCStatsReport::addElement):
2034         (WebCore::RTCStatsReport::addStatistic):
2035         * Modules/mediastream/RTCStatsReport.h:
2036         (RTCStatsReport):
2037         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2038         (WebCore::RTCStatsRequestImpl::createResponse):
2039         (WebCore):
2040         (WebCore::RTCStatsRequestImpl::requestSucceeded):
2041         * Modules/mediastream/RTCStatsRequestImpl.h:
2042         (RTCStatsRequestImpl):
2043         * Modules/mediastream/RTCStatsResponse.cpp:
2044         (WebCore::RTCStatsResponse::create):
2045         (WebCore::RTCStatsResponse::addReport):
2046         (WebCore):
2047         (WebCore::RTCStatsResponse::addElement):
2048         (WebCore::RTCStatsResponse::addStatistic):
2049         * Modules/mediastream/RTCStatsResponse.h:
2050         (RTCStatsResponse):
2051         * WebCore.gypi:
2052         * platform/chromium/support/WebRTCStatsRequest.cpp:
2053         (WebKit::WebRTCStatsRequest::response):
2054         (WebKit):
2055         (WebKit::WebRTCStatsRequest::requestSucceeded):
2056         * platform/chromium/support/WebRTCStatsResponse.cpp: Added.
2057         (WebKit):
2058         (WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
2059         (WebKit::WebRTCStatsResponse::assign):
2060         (WebKit::WebRTCStatsResponse::reset):
2061         (WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
2062         (WebKit::WebRTCStatsResponse::addReport):
2063         (WebKit::WebRTCStatsResponse::addElement):
2064         (WebKit::WebRTCStatsResponse::addStatistic):
2065         * platform/mediastream/RTCStatsRequest.h:
2066         (WebCore):
2067         (RTCStatsRequest):
2068         * platform/mediastream/RTCStatsResponseBase.h: Added.
2069         (WebCore):
2070         (RTCStatsResponseBase):
2071         (WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):
2072
2073 2012-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2074
2075         [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
2076         https://bugs.webkit.org/show_bug.cgi?id=97895
2077
2078         Reviewed by Martin Robinson.
2079
2080         * platform/network/NetworkingContext.h:
2081         (NetworkingContext): Add initiatingPageID().
2082         * platform/network/ResourceHandle.h:
2083         (ResourceHandle): Add static method
2084         getSoupRequestInitiaingPageID().
2085         * platform/network/ResourceHandleInternal.h:
2086         (ResourceHandleInternal): Add initiatingPageID().
2087         * platform/network/soup/ResourceHandleSoup.cpp:
2088         (WebCore::ResourceHandleInternal::initiatingPageID): Get the
2089         initiating page ID of the resource handle networking context.
2090         (WebCore::setSoupRequestInitiaingPageID): Helper function to
2091         attach a page ID to a SoupRequest.
2092         (WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID()
2093         to attch the initiating page ID to the SoupRequest.
2094         (WebCore::startNonHTTPRequest): Ditto.
2095         (WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static
2096         method to get the page ID attached to a SoupRequest.
2097
2098 2012-10-03  Kent Tamura  <tkent@chromium.org>
2099
2100         Introduce DateComponents::minimumYear and maximumYear
2101         https://bugs.webkit.org/show_bug.cgi?id=98230
2102
2103         Reviewed by Kentaro Hara.
2104
2105         Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp.
2106
2107         No new tests. This doesn't change any bahevior.
2108
2109         * platform/DateComponents.h:
2110         (WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp.
2111         (WebCore::DateComponents::maximumYear): ditto.
2112         * platform/DateComponents.cpp:
2113         (WebCore): Move out static minimumYear and maximumYear.
2114         (WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear.
2115         (WebCore::withinHTMLDateLimits): ditto.
2116         (WebCore::DateComponents::parseWeek): ditto.
2117         (WebCore::DateComponents::setMonthsSinceEpoch): ditto.
2118         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto.
2119
2120         * html/shadow/DateTimeFieldElements.cpp:
2121         (WebCore): Remove minimumYear and maximumYear.
2122         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
2123         Use DateComponents::minimumYear and maximumYear.
2124
2125
2126 2012-10-02  Arko Saha  <arko@motorola.com>
2127
2128         Microdata: itemprop names must not override builtin properties.
2129         https://bugs.webkit.org/show_bug.cgi?id=98025
2130
2131         Reviewed by Kentaro Hara.
2132
2133         We should look in the prototype for functions before assuming it as
2134         an item's name. Return false if the prototype of the object has a
2135         property (function) with propertyName.
2136         Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties
2137         Named property visibility algorithm:
2138         http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties
2139         ...
2140         7. If the result of calling the [[HasProperty]] internal method on
2141         prototype with property name P is true, then return false.
2142         ...
2143         Also [OverrideBuiltins] is not declared for any of the properties,
2144         hence no overriding is allowed in this case.
2145
2146         Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html
2147
2148         * bindings/scripts/CodeGeneratorJS.pm:
2149         (GenerateGetOwnPropertySlotBody):
2150         (GenerateGetOwnPropertyDescriptorBody):
2151
2152 2012-10-02  Keishi Hattori  <keishi@webkit.org>
2153
2154         REGRESSION (r129738): Suggestion picker label is placed in the wrong location
2155         https://bugs.webkit.org/show_bug.cgi?id=98094
2156
2157         Reviewed by Kent Tamura.
2158
2159         We needed to reverse padding-left/right when rtl.
2160
2161         No new tests. Covered by date-suggestion-picker-appearance.html.
2162
2163         * Resources/pagepopups/suggestionPicker.css:
2164         (.suggestion-list-entry .label):
2165         (.rtl .suggestion-list-entry .label):
2166
2167 2012-10-02  Yury Semikhatsky  <yurys@chromium.org>
2168
2169         Provide memory instrumentation for HashCountedSet
2170         https://bugs.webkit.org/show_bug.cgi?id=98138
2171
2172         Reviewed by Pavel Feldman.
2173
2174         Replaced addHashCountedSet calls with addMember that now automatically
2175         detects HashCountedSet and calls appropriate routine.
2176
2177         * css/CSSImageGeneratorValue.cpp:
2178         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
2179         * loader/cache/CachedResource.cpp:
2180
2181 2012-10-02  Nandor Huszka  <hnandor@inf.u-szeged.hu>
2182
2183         Buildfix after r130235.
2184
2185         Reviewed by Csaba Osztrogon√°c.
2186
2187         systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D,
2188         but function body remained in GraphicsContext3DOpenGLES. Delete method body.
2189
2190         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2191
2192 2012-10-02  Kent Tamura  <tkent@chromium.org>
2193
2194         Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.
2195
2196         * html/shadow/DateTimeFieldElements.cpp:
2197         If a placeholder stirng is empty, use a sequence of "-".
2198         (WebCore::DateTimeDayFieldElement::create):
2199         (WebCore::DateTimeMonthFieldElement::create):
2200         (WebCore::DateTimeYearFieldElement::create):
2201
2202 2012-10-02  MORITA Hajime  <morrita@google.com>
2203
2204         https://bugs.webkit.org/show_bug.cgi?id=98134
2205         [Refactoring] StyleResolver::matchScopedAuthorRules() could be simpler.
2206
2207         Reviewed by Dimitri Glazkov.
2208
2209         matchScopedAuthorRules() did have some optimization which only
2210         makes sense for heavily nested shadow tree. However, we don't see
2211         such type of usage of Shadow DOM and this looks premature
2212         optimization. This change unified its triple for loop into one,
2213         which makes the code much simpler.
2214
2215         No new tests. Covered by existing tests.
2216
2217         * css/StyleResolver.cpp:
2218         (WebCore::StyleResolver::matchScopedAuthorRules):
2219
2220 2012-10-02  Kent Tamura  <tkent@chromium.org>
2221
2222         Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond
2223         https://bugs.webkit.org/show_bug.cgi?id=98229
2224
2225         Reviewed by Kentaro Hara.
2226
2227         Unify identical code in DateTimeInputType and DateTimeLocalInputType as
2228         Localizer member functions.
2229         They still have some common code. We'll address it later.
2230
2231         No new tests. This doesn't change any behavior.
2232
2233         * platform/text/Localizer.h:
2234         (Localizer): Add dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
2235         * platform/text/Localizer.cpp:
2236         (WebCore::Localizer::dateTimeFormatWithSecond):
2237         Implemented. Just concatenating dateFormat, a space, and timeFormat.
2238         (WebCore::Localizer::dateTimeFormatWithoutSecond):
2239         Implemented. Just concatenating dateFormat, a space, and shortTimeFormat.
2240
2241         * html/DateTimeInputType.cpp:
2242         (WebCore::DateTimeInputType::setupLayoutParameters):
2243         Use dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
2244         * html/DateTimeLocalInputType.cpp:
2245         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
2246
2247 2012-10-03  Kent Tamura  <tkent@chromium.org>
2248
2249         Refactoring: DateTimeEditBuilder had better hold LayoutParameters
2250         https://bugs.webkit.org/show_bug.cgi?id=98228
2251
2252         Reviewed by Kentaro Hara.
2253
2254         Stop copying multiple members of LayoutParameters in DateTimeEditBuilder
2255         constructor. This change improves code size and runtime cost.
2256
2257         No new tests. This doesn't change user-visible behavior.
2258
2259         * html/shadow/DateTimeEditElement.cpp:
2260         (DateTimeEditBuilder): Add a comment about lifetime of objects.
2261         (WebCore::DateTimeEditBuilder::stepRange):
2262         Added. A helper to access m_parameters.stepRange.
2263         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
2264         Remove m_stepRange, m_localizer, m_placeholderFor* members.
2265         Add m_parameters.
2266         (WebCore::DateTimeEditBuilder::needMillisecondField):
2267         Use stepRange() instead of m_stepRange.
2268         (WebCore::DateTimeEditBuilder::visitField):
2269         Use m_parameters.placeholderFor*.
2270         (WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly):
2271         Use stepRange() instead of m_stepRange.
2272         (WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly): ditto.
2273         (WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly): ditto.
2274
2275 2012-10-02  Kent Tamura  <tkent@chromium.org>
2276
2277         Implement LocaleICU::dateFormat
2278         https://bugs.webkit.org/show_bug.cgi?id=98118
2279
2280         Reviewed by Hajime Morita.
2281
2282         http://trac.webkit.org/changeset/130127 introduced
2283         Localizer::dateFormat, and this is its implementation for LocaleICU
2284         classs. The code is going to be used when
2285         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2286
2287         No new tests. The function is not used yet.
2288
2289         * platform/text/LocaleICU.cpp:
2290         (WebCore::LocaleICU::dateFormat):
2291         Implemented. Note that m_shortDateFormat is a UDateFormat object, which
2292         knows various format information.
2293         * platform/text/LocaleICU.h:
2294         (LocaleICU): Add m_dateFormat to cache the format string.
2295
2296 2012-10-02  Kent Tamura  <tkent@chromium.org>
2297
2298         [Mac][Chromium-Mac] Implement LocaleMac::dateFormat
2299         https://bugs.webkit.org/show_bug.cgi?id=98116
2300
2301         Reviewed by Hajime Morita.
2302
2303         http://trac.webkit.org/changeset/130127 introduced
2304         Localizer::dateFormat, and this is its implementation for LocaleICU
2305         classs. The code is going to be used when
2306         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2307
2308         No new tests. The function is not used yet.
2309
2310         * platform/text/mac/LocaleMac.h:
2311         (LocaleMac): Declare m_dateFormat.
2312         * platform/text/mac/LocaleMac.mm:
2313         (WebCore::LocaleMac::dateFormat): Implemented.
2314
2315 2012-10-02  Kent Tamura  <tkent@chromium.org>
2316
2317         [Chromium-Win] Implement LocaleWin::dateFormat
2318         https://bugs.webkit.org/show_bug.cgi?id=98117
2319
2320         Reviewed by Kentaro Hara.
2321
2322         http://trac.webkit.org/changeset/130127 introduced
2323         Localizer::dateFormat, and this is its implementation for LocaleICU
2324         classs. The code is going to be used when
2325         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2326
2327         Tests: Added a new test to WebKit/chromium/tests/LocaleWinTest.cpp.
2328
2329         * platform/text/LocaleWin.cpp:
2330         (WebCore::parseDateFormat):
2331         Fix a continuous apostrophes parsing bug; "abc''''def" produced "abc'''def"
2332         (WebCore::appendAsLDMLLiteral):
2333         A helper function to make a literal string for LDML.
2334         (WebCore::convertWindowsDateFormatToLDML):
2335         Creates an LDML format from a parsed date format tokens.
2336         (WebCore::LocaleWin::dateFormat):
2337         Implemented. This uses convertWindowsDateFormatToLDML.
2338         (WebCore::LocaleWin::dateFormat):
2339         Added for testing. The source windows format is specified as a function
2340         argument.
2341         * platform/text/LocaleWin.h:
2342         (LocaleWin): Declare m_dateFormat and dateFormat().
2343
2344 2012-10-02  Ian Vollick  <vollick@chromium.org>
2345
2346         [chromium] Fix spelling of isNVIDIA override in Extensions3DChromium
2347         https://bugs.webkit.org/show_bug.cgi?id=98219
2348
2349         Reviewed by Dean Jackson.
2350
2351         The override in Extensions3dChromium should have been spelled isNVIDIA, not isNVidia.
2352
2353         No new tests. No change in functionality.
2354
2355         * platform/graphics/chromium/Extensions3DChromium.h:
2356         (WebCore::Extensions3DChromium::isNVIDIA):
2357
2358 2012-10-02  Anders Carlsson  <andersca@apple.com>
2359
2360         Try to fix the Snow Leopard build.
2361
2362         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2363
2364 2012-10-02  Joshua Bell  <jsbell@chromium.org>
2365
2366         Add htons/htonl definitions and implementations
2367         https://bugs.webkit.org/show_bug.cgi?id=98054
2368
2369         Reviewed by Darin Adler.
2370
2371         Update users of htons and friends to use new wtf/ByteOrder.h header.
2372
2373         No new tests - just refactoring.
2374
2375         * platform/graphics/WOFFFileFormat.cpp:
2376         * platform/graphics/chromium/VDMXParser.cpp:
2377
2378 == Rolled over to ChangeLog-2012-10-02 ==