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