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