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