Source/WebCore: Add UserAgentShadowDOM to FormControlElement just before adding Autho...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-26  Shinya Kawanaka  <shinyak@chromium.org>
2
3         Add UserAgentShadowDOM to FormControlElement just before adding AuthorShadowDOM
4         https://bugs.webkit.org/show_bug.cgi?id=90866
5
6         Reviewed by Hajime Morita.
7
8         It ensures that UserAgentShadowDOM is the oldest ShadowDOM.
9
10         To show ValidationMessage, WebKit adds a Shadow DOM to some of FormControlElements.
11         ValidationMessage assumes that the added Shadow DOM is the oldest, however, there was a case
12         that a page author might add a Shadow DOM before ValidationMessage adds a Shadow DOM.
13         It will break the assumption that the Shadow DOM added by ValidationMessage is the oldest.
14         So we have prohibited a page author adding a Shadow DOM to FormControlElement.
15
16         To add UserAgentShadowDOM, we use a callback which is called before a page author adding a Shadow DOM.
17         It adds a UserAgentShadowDOM if it does not exist, so we can ensure that UserAgentShadowDOM is the oldest.
18
19         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
20                fast/dom/shadow/input-with-validation.html
21                fast/dom/shadow/shadowdom-for-button-complex-shadow.html
22                fast/dom/shadow/shadowdom-for-button-only-shadow.html
23                fast/dom/shadow/shadowdom-for-button-without-shadow.html
24                fast/dom/shadow/shadowdom-for-fieldset-complex-shadow.html
25                fast/dom/shadow/shadowdom-for-fieldset-only-shadow.html
26                fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html
27                fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html
28                fast/dom/shadow/shadowdom-for-keygen-complex-shadow.html
29                fast/dom/shadow/shadowdom-for-keygen-only-shadow.html
30                fast/dom/shadow/shadowdom-for-keygen-without-shadow.html
31                fast/dom/shadow/shadowdom-for-object-complex-shadow.html
32                fast/dom/shadow/shadowdom-for-object-only-shadow.html
33                fast/dom/shadow/shadowdom-for-object-without-shadow.html
34                fast/dom/shadow/shadowdom-for-output-complex-shadow.html
35                fast/dom/shadow/shadowdom-for-output-only-shadow.html
36                fast/dom/shadow/shadowdom-for-output-without-shadow.html
37                fast/dom/shadow/shadowdom-for-select-complex-shadow.html
38                fast/dom/shadow/shadowdom-for-select-only-shadow.html
39                fast/dom/shadow/shadowdom-for-select-without-shadow.html
40                fast/dom/shadow/shadowdom-for-textarea-complex-shadow.html
41                fast/dom/shadow/shadowdom-for-textarea-only-shadow.html
42                fast/dom/shadow/shadowdom-for-textarea-without-shadow.html
43
44         * dom/ShadowRoot.cpp:
45         (WebCore::allowsAuthorShadowRoot):
46         * html/FormAssociatedElement.cpp:
47         (WebCore::FormAssociatedElement::ensureUserAgentShadowRoot): Ensures the existence of a UserAgentShadowRoot.
48         If it does not exist, we create it with empty content.
49         (WebCore):
50         * html/FormAssociatedElement.h:
51         (FormAssociatedElement):
52         * html/HTMLFormControlElement.cpp:
53         (WebCore::HTMLFormControlElement::willAddAuthorShadowRoot):
54         (WebCore):
55         * html/HTMLFormControlElement.h:
56         (HTMLFormControlElement):
57         * html/ValidationMessage.cpp:
58         (WebCore::adjustBubblePosition): When AuthroShadowRoot does not a shadow element, ValidationMessage
59         does not have a renderer. So we have to check the existence of renderer.
60         (WebCore::ValidationMessage::buildBubbleTree):
61
62 2012-07-26  Kaustubh Atrawalkar  <kaustubh@motorola.com>
63
64         [DRT] LTC:: pageNumberForElementById() could be moved to Internals
65         https://bugs.webkit.org/show_bug.cgi?id=92091
66
67         Reviewed by Adam Barth.
68
69         Move the pageNumberForElementById from LayoutTestCotroller to Internals and
70         remove the old platform specific implementations as it exclusively tests WebCore functionality.
71
72         Covered by existing test cases.
73
74         * testing/Internals.cpp:
75         (WebCore::Internals::counterValue):
76         (WebCore):
77         (WebCore::Internals::pageNumber):
78         * testing/Internals.h:
79         (Internals):
80         (WebCore::Internals::pageNumber):
81         * testing/Internals.idl:
82
83 2012-07-25  MORITA Hajime  <morrita@google.com>
84
85         [Chromium][Win] <progress> animation on RTL direction is reverse
86         https://bugs.webkit.org/show_bug.cgi?id=92236
87
88         Reviewed by Kent Tamura.
89
90         This change modfies the way to handle RTL progress bar painting.
91         Originally it computes the flipped coordinates. This change uses transformation for the flip.
92         DirectionFlippingScope handles it.
93
94         * rendering/RenderThemeChromiumLinux.cpp:
95         (WebCore::RenderThemeChromiumLinux::paintProgressBar): Applied DirectionFlippingScope
96         * rendering/RenderThemeChromiumSkia.cpp:
97         (WebCore::RenderThemeChromiumSkia::determinateProgressValueRectFor):
98         - Deleted RTL handling in favor of DirectionFlippingScope
99         (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::DirectionFlippingScope):
100         (WebCore):
101         (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope):
102         * rendering/RenderThemeChromiumSkia.h:
103         (RenderThemeChromiumSkia):
104         (DirectionFlippingScope): Added.
105         * rendering/RenderThemeChromiumWin.cpp:
106         (WebCore):
107         (WebCore::RenderThemeChromiumWin::paintProgressBar): Applied DirectionFlippingScope
108
109 2012-07-25  Vineet Chaudhary  <rgf748@motorola.com>
110
111         https://bugs.webkit.org/show_bug.cgi?id=92260
112         Repalce "int" with "long" from WebCore/*.idls
113
114         Reviewed by Adam Barth.
115
116         As per the WebIDL spec IDL shouldn't have int attributes but long instead.
117         Repalced attributes types int with long from WebCore/*.idls.
118
119         No new tests. TestObj.idl already covers this.
120         There should be no behavioural changes.
121
122         * dom/Touch.idl: Repalce int with long.
123         * dom/WebKitNamedFlow.idl: Ditto.
124         * html/canvas/ArrayBuffer.idl: Ditto.
125         * html/canvas/WebGLActiveInfo.idl: Ditto.
126         * html/canvas/WebGLShaderPrecisionFormat.idl: Ditto.
127         * page/WebKitAnimation.idl: Ditto.
128
129 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
130
131         The elements in ShadowDOM of meter or progress should not be modifiable.
132         https://bugs.webkit.org/show_bug.cgi?id=92199
133
134         Reviewed by Hajime Morita.
135
136         A user can set -webkit-user-modify: read-write to the elements in Shadow DOM in a meter or progress element.
137         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
138
139         We add default css values to elements in ShadowDOM of meter or progress to prohibit editing them.
140
141         Tests: fast/html/meter-user-modify.html
142                fast/html/progress-user-modify.html
143
144         * css/html.css:
145         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
146         changed by a user.
147         (meter::-webkit-meter-bar):
148         (meter::-webkit-meter-optimum-value):
149         (meter::-webkit-meter-suboptimum-value):
150         (meter::-webkit-meter-even-less-good-value):
151         (progress::-webkit-progress-bar):
152         (progress::-webkit-progress-value):
153
154 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
155
156         [BlackBerry] GraphicsContext3D::paintToCanvas should not swap 0th and 2nd components of color
157         https://bugs.webkit.org/show_bug.cgi?id=92314
158
159         Reviewed by Rob Buis.
160
161         No new tests, because it corrects existing functionality, but it makes BlackBerry
162         pass canvas-text.html and others.
163
164         * platform/graphics/GraphicsContext3D.h:
165         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
166         (WebCore::GraphicsContext3D::paintToCanvas):
167         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
168         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
169
170 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
171
172         [BlackBerry] GraphicsContext3D::reshapeFBOs does not report when bound FBOs should be restored
173         https://bugs.webkit.org/show_bug.cgi?id=92304
174
175         Reviewed by Rob Buis.
176
177         No new tests, because it corrects existing functionality, but it makes BlackBerry
178         pass framebuffer-bindings-unaffected-on-resize.html.
179
180         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
181         (WebCore::GraphicsContext3D::reshapeFBOs):
182
183 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
184
185         [BlackBerry] readPixels should set alpha to 255 instead of 0 when alpha is disabled
186         https://bugs.webkit.org/show_bug.cgi?id=92303
187
188         Reviewed by Rob Buis.
189
190         No new tests, because it corrects existing functionality, but it makes BlackBerry
191         pass context-attributes-alpha-depth-stencil-antialias.html.
192
193         * html/canvas/WebGLRenderingContext.cpp:
194         (WebCore):
195         (WebCore::WebGLRenderingContext::readPixels):
196
197 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
198
199         [WebGL] fast/canvas/webgl/framebuffer-object-attachment.html fails on certain platforms
200         https://bugs.webkit.org/show_bug.cgi?id=92296
201
202         Reviewed by Rob Buis.
203
204         No new tests, because it introduces no new functionality, only fixes the above mentioned test.
205
206         * html/canvas/WebGLFramebuffer.cpp:
207         (WebCore::WebGLFramebuffer::checkStatus):
208
209 2012-07-25  Xingnan Wang  <xingnan.wang@intel.com>
210
211         IndexedDB: IDBTransaction::abort() should throw DOMException
212         https://bugs.webkit.org/show_bug.cgi?id=92069
213
214         Reviewed by Kentaro Hara.
215
216         Keep aligned with the W3C spec.
217         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void
218
219         Test: storage/indexeddb/transaction-abort.html.
220
221         * Modules/indexeddb/IDBTransaction.cpp:
222         (WebCore::IDBTransaction::abort):
223         (WebCore):
224         * Modules/indexeddb/IDBTransaction.h:
225         (IDBTransaction):
226         * Modules/indexeddb/IDBTransaction.idl:
227
228 2012-07-25  Tony Chang  <tony@chromium.org>
229
230         flexitems can overflow the flexbox due to rounding
231         https://bugs.webkit.org/show_bug.cgi?id=92163
232
233         Reviewed by Levi Weintraub.
234
235         Don't round flex item sizes and use LayoutPoint for the location of flex items.
236
237         Test: css3/flexbox/flex-rounding.html
238
239         * rendering/RenderFlexibleBox.cpp:
240         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
241         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
242         (WebCore::RenderFlexibleBox::layoutColumnReverse):
243
244 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
245
246         [BlackBerry] Integrate certmgr with CredentialBackingStore
247         https://bugs.webkit.org/show_bug.cgi?id=92183
248
249         Reviewed by George Staikos.
250
251         Integrated BlackBerry::Platform::CertMgrWrapper with
252         CredentialBackingStore, when certmgr is ready we save
253         the password in certmgr and retrieve it from certmgr.
254
255         RIM PR: 171991
256         Internally reviewed by Joe Mason <jmason@rim.com>.
257
258         No new tests since there's no functional change.
259
260         * platform/network/blackberry/CredentialBackingStore.cpp:
261         (WebCore::hashCredentialInfo):
262         (WebCore):
263         (WebCore::CredentialBackingStore::CredentialBackingStore):
264         (WebCore::CredentialBackingStore::open):
265         (WebCore::CredentialBackingStore::addLogin):
266         (WebCore::CredentialBackingStore::updateLogin):
267         (WebCore::CredentialBackingStore::getLogin):
268         * platform/network/blackberry/CredentialBackingStore.h:
269         (CredentialBackingStore):
270
271 2012-07-25  Kent Tamura  <tkent@chromium.org>
272
273         REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms
274         https://bugs.webkit.org/show_bug.cgi?id=91804
275
276         Reviewed by Hajime Morita.
277
278         The complexity of FormKeyGenerator::formKey() was O(N) where N is the
279         number form elements with an identical action URL, and formKey() is
280         called for every form. So, it's O(N^2). A page in www.reddit.com
281         contains hundreds of form elements with action="#". So FormController::
282         formElementsState() took a few seconds on a slow machine.
283
284         In order to avoid O(N^2) operation, storing a map from form signatures
285         to next index numbers, instead of storing existing formKey strings.
286
287         No new tests. Just a performance improvement.
288
289         Note: This is a re-landing of r123191. We rolled it out because of
290         suspicion of a performance regression. However it was innocent.
291
292         * html/FormController.cpp:
293         (FormKeyGenerator): Remove m_existingKeys. Add a map from a form
294         signature string to the next index number.
295         (WebCore::formSignature): Returns a signature string for a form, without
296         an index number. This is like "actionURL [name1 name2 ]"
297         (WebCore::FormKeyGenerator::formKey):
298         Creates a formKey string by concatenating a formSignature and #n. N is
299         obtained from m_formSignatureToNextIndexMap in O(1).
300         (WebCore::FormKeyGenerator::willDeleteForm):
301         Remove the code for m_existingKeys.
302
303 2012-07-25  Benjamin Poulain  <bpoulain@apple.com>
304
305         Initialize QualifiedName's strings from the read only data segment
306         https://bugs.webkit.org/show_bug.cgi?id=92226
307
308         Reviewed by Anders Carlsson.
309
310         Modify the initialization of static QualifiedName to initialize the AtomicString
311         with the data from the read only memory.
312
313         Overall, HTMLNames::init() gets 10% faster.
314
315         * dom/QualifiedName.cpp:
316         (WebCore::QualifiedName::QualifiedName):
317         * dom/QualifiedName.h:
318         (QualifiedName):
319         Remove the useless constructor taking a char* and get rid of the init() function.
320         The AtomicString representing the name should be constructed by the caller of QualifiedName.
321
322         Because the init() code is relatively large and is only executed once, it is important to
323         keep the AtomicString construction separate. The function createQualifiedName() was added
324         to improve the cache use. The short version let us reduce the code one more instruction per
325         call.
326
327         * dom/make_names.pl:
328         (printQualifiedNameMaker):
329         (printShortQualifiedNameMaker):
330         (printNamesCppFile):
331         (printDefinitions):
332
333 2012-07-25  Yoshifumi Inoue  <yosin@chromium.org>
334
335         [Forms] Move HTMLInputElement::updateInnerTextValue to InputType class
336         https://bugs.webkit.org/show_bug.cgi?id=92230
337
338         Reviewed by Kent Tamura.
339
340         This patch moves implementaion of HTMLInputElement::updateInnerTextValue()
341         into input type classes, removes updateInnerTextValue() from HTMLInputElement,
342         and updates call site of updateInnerTextValue().
343
344         No new tests. This patch doesn't change behavior.
345
346         * html/DateInputType.cpp:
347         (WebCore::DateInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
348         * html/HTMLInputElement.cpp:
349         (WebCore::HTMLInputElement::updateType): Updated call site of updateInnerTextValue().
350         (WebCore::HTMLInputElement::parseAttribute): Updated call site of updateInnerTextValue().
351         (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Updated call site of updateInnerTextValue().
352         (WebCore::HTMLInputElement::setSuggestedValue): Updated call site of updateInnerTextValue().
353         * html/HTMLInputElement.h:
354         (HTMLInputElement): Removed updateInnerTextValue().
355         * html/InputType.cpp:
356         (WebCore::InputType::updateInnerTextValue): Added default implementaion.
357         * html/InputType.h:
358         (InputType): Added declaration of updateInnerTextValue().
359         * html/NumberInputType.cpp:
360         (WebCore::NumberInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
361         * html/TextFieldInputType.cpp:
362         (WebCore::TextFieldInputType::setValue): Updated call site of updateInnerTextValue().
363         (WebCore::TextFieldInputType::updateInnerTextValue): Moved implementaion from HTMLInputElement.
364         * html/TextFieldInputType.h:
365         (TextFieldInputType): Added declaration of updateInnerTextValue().
366
367 2012-07-25  Dana Jansens  <danakj@chromium.org>
368
369         [chromium] Move ephemeral data for a single frame in LayerRendererChromium into a structure with a scoped lifetime equal to the frame
370         https://bugs.webkit.org/show_bug.cgi?id=92294
371
372         Reviewed by Adrienne Walker.
373
374         The LayerRendererChromium class has a number of member variables that are used
375         while drawing a single frame. Because they are member variables, their lifetimes
376         are not clear, and some are even updated between frames, which is not needed.
377
378         This change creates a LRC::DrawingFrame structure that holds the data used
379         while drawing the current frame, and an instance of this structure is held
380         and passed around to functions in LayerRendererChromium, moving all of the
381         data out from being member variables on the class to being function
382         arguments on the relevant methods.
383
384         The projection and window matrices are a part of this frame data, and are not
385         used externally, so they are removed from the CCRenderer interface and included
386         within the DrawingFrame structure.
387
388         Covered by existing tests, no change in behaviour intended.
389
390         * platform/graphics/chromium/LayerRendererChromium.cpp:
391         (WebCore::LayerRendererChromium::LayerRendererChromium):
392         (WebCore::LayerRendererChromium::viewportChanged):
393         (WebCore::LayerRendererChromium::clearFramebuffer):
394         (WebCore::LayerRendererChromium::drawFrame):
395         (WebCore::LayerRendererChromium::drawRenderPass):
396         (WebCore::LayerRendererChromium::drawQuad):
397         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
398         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
399         (WebCore::LayerRendererChromium::drawBackgroundFilters):
400         (WebCore::LayerRendererChromium::drawRenderPassQuad):
401         (WebCore::LayerRendererChromium::drawSolidColorQuad):
402         (WebCore::LayerRendererChromium::drawTileQuad):
403         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
404         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
405         (WebCore::LayerRendererChromium::drawTextureQuad):
406         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
407         (WebCore::LayerRendererChromium::finishDrawingFrame):
408         (WebCore::LayerRendererChromium::drawTexturedQuad):
409         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
410         (WebCore::LayerRendererChromium::isCurrentRenderPass):
411         (WebCore::LayerRendererChromium::useRenderPass):
412         (WebCore::LayerRendererChromium::useScopedTexture):
413         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
414         (WebCore::LayerRendererChromium::setScissorToRect):
415         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
416         * platform/graphics/chromium/LayerRendererChromium.h:
417         (DrawingFrame):
418         (WebCore::LayerRendererChromium::DrawingFrame::DrawingFrame):
419         (LayerRendererChromium):
420         * platform/graphics/chromium/cc/CCRenderer.h:
421         (CCRenderer):
422
423 2012-07-19  Adrienne Walker  <enne@google.com>
424
425         [chromium] Make all compositor screen space transforms operate on content rects
426         https://bugs.webkit.org/show_bug.cgi?id=91807
427
428         Reviewed by Kenneth Russell.
429
430         Previously, surface screen space transforms operated on surface
431         content space but layer screen space transforms operated on layer
432         space. For the purpose of consistency, unify these two so that they
433         both operate on content space.
434
435         No tests, because no change in behavior expected. Just a refactoring.
436
437         * platform/graphics/chromium/LayerChromium.h:
438         (LayerChromium):
439         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
440         (WebCore::CCDebugRectHistory::savePaintRects):
441         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
442         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
443         (WebCore::calculateDrawTransformsInternal):
444         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
445         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
446         (WebCore::::markOccludedBehindLayer):
447         (WebCore::::occluded):
448         (WebCore::::unoccludedContentRect):
449
450 2012-07-25  Dan Bernstein  <mitz@apple.com>
451
452         Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column
453         https://bugs.webkit.org/show_bug.cgi?id=92311
454
455         Reviewed by Anders Carlsson.
456
457         Tests: fast/multicol/hit-test-end-of-column.html
458                fast/multicol/hit-test-gap-block-axis.html
459
460         * rendering/RenderBlock.cpp:
461         (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last
462         line on a given column from returning the next line in the next column, added a check if
463         the hit occurred within the pagination strut of a line. Covered by the first test.
464         (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the
465         block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding
466         into the top of the next column. Covered by the second test.
467
468 2012-07-25  David Grogan  <dgrogan@chromium.org>
469
470         IndexedDB: Make db.version return an integer if appropriate
471         https://bugs.webkit.org/show_bug.cgi?id=92195
472
473         Reviewed by Tony Chang.
474
475         Make use of the existing IDBAny mechanism to return an integer if
476         integer versions have been used.
477
478         No new tests - no change in behavior expected.
479
480         * Modules/indexeddb/IDBDatabase.cpp:
481         (WebCore::IDBDatabase::version):
482         (WebCore):
483         * Modules/indexeddb/IDBDatabase.h:
484         (IDBDatabase):
485         * Modules/indexeddb/IDBDatabase.idl:
486
487 2012-07-25  Michael Saboff  <msaboff@apple.com>
488
489         Convert HTML parser to handle 8-bit resources without converting to UChar*
490         https://bugs.webkit.org/show_bug.cgi?id=90321
491
492         Reviewed by Geoffrey Garen.
493
494         No new tests, no new functionality therefore covered by existing tests.
495
496         Changed the parsing of HTML to handle 8-bit strings without converting the 
497         whole string to 16-bits.  Primary change was to use the appropriate 
498         character pointer type (LChar* or UChar*) depending on the source string.
499         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
500         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
501         and advanceAndUpdateLineNumber() methods have been refactored into a
502         state machine managed pair of function pointers.  The possible functions
503         have not only the 8 and 16 bitness factored out, they also have the 
504         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
505         This provides a net speed-up even with the 8/16 bit testing.
506         Other changes involve using String methods to access and compare with the
507         source data.
508
509         * html/FTPDirectoryDocument.cpp:
510         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
511         instead of SegmentedString '*' operator.
512         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
513         SegmentedString '*' operator.
514         * html/parser/HTMLParserIdioms.cpp:
515         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
516         * html/parser/HTMLSourceTracker.cpp:
517         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
518         SegmentedString '*' operator.
519         * loader/cache/CachedScript.cpp:
520         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
521         * platform/text/SegmentedString.cpp:
522         (WebCore::SegmentedString::SegmentedString):
523         (WebCore::SegmentedString::operator=):
524         (WebCore::SegmentedString::clear):
525         (WebCore::SegmentedString::append):
526         (WebCore::SegmentedString::prepend):
527         (WebCore::SegmentedString::advanceSubstring):
528         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
529         advance function.
530         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
531         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
532         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
533         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
534         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
535         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
536         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
537         8 and 16 bit advance.
538         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
539         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
540         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
541         * platform/text/SegmentedString.h:
542         (WebCore::SegmentedSubstring::SegmentedSubstring):
543         (WebCore::SegmentedSubstring::clear):
544         (SegmentedSubstring):
545         (WebCore::SegmentedSubstring::is8Bit): New getter.
546         (WebCore::SegmentedSubstring::appendTo):
547         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
548         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
549         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
550         that pre-increments the 8 bit pointer and returns the next character.
551         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
552         that pre-increments the 16 bit pointer and returns the next character.
553         (WebCore::SegmentedSubstring::currentSubString):
554         (WebCore::SegmentedSubstring::getCurrentChar):
555         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
556         (WebCore::SegmentedString::SegmentedString):
557         (WebCore::SegmentedString::push):
558         (WebCore::SegmentedString::isEmpty):
559         (WebCore::SegmentedString::lookAhead):
560         (WebCore::SegmentedString::lookAheadIgnoringCase):
561         (WebCore::SegmentedString::advance):
562         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
563         (WebCore::SegmentedString::advanceAndASSERT):
564         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
565         (WebCore::SegmentedString::advancePastNonNewline):
566         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
567         (WebCore::SegmentedString::currentChar):
568         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
569         functions.
570         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
571         change to slow case functions when only one character left.
572         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
573         functions based on current substring.
574         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
575         (WebCore::SegmentedString::lookAheadSlowCase):
576         * xml/parser/CharacterReferenceParserInlineMethods.h:
577         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
578         SegmentedString '*' operator.
579         * xml/parser/MarkupTokenizerBase.h:
580         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
581         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
582         currentChar() instead of SegmentedString '*' operator.
583         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
584
585 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
586
587         Unreviewed, rolling out r123625 and r123672.
588         http://trac.webkit.org/changeset/123625
589         http://trac.webkit.org/changeset/123672
590         https://bugs.webkit.org/show_bug.cgi?id=92315
591
592         Broke Windows and gcc builds (Requested by rniwa on #webkit).
593
594         * platform/AutodrainedPool.h:
595         (AutodrainedPool):
596         * platform/ContentType.h:
597         (ContentType):
598         * platform/ContextMenu.h:
599         (ContextMenu):
600         * platform/ContextMenuItem.h:
601         (ContextMenuItem):
602         * platform/Cursor.h:
603         (WebCore::SharedCursor::SharedCursor):
604         (Cursor):
605         * platform/KURL.h:
606         (WebCore::KURL::KURL):
607         (KURL):
608         * platform/KURLGooglePrivate.h:
609         (KURLGooglePrivate):
610         * platform/PODRedBlackTree.h:
611         (WebCore::PODRedBlackTree::PODRedBlackTree):
612         * platform/Pasteboard.h:
613         (Pasteboard):
614         * platform/PlatformEvent.h:
615         (WebCore::PlatformEvent::PlatformEvent):
616         * platform/PlatformKeyboardEvent.h:
617         (PlatformKeyboardEvent):
618         * platform/PlatformMouseEvent.h:
619         (PlatformMouseEvent):
620         * platform/PlatformPasteboard.h:
621         (PlatformPasteboard):
622         * platform/PlatformTouchEvent.h:
623         (PlatformTouchEvent):
624         * platform/PlatformWheelEvent.h:
625         (PlatformWheelEvent):
626         * platform/RunLoop.h:
627         (TimerBase):
628         * platform/ScrollAnimator.h:
629         (ScrollAnimator):
630         * platform/ScrollAnimatorNone.h:
631         (ScrollAnimatorNone):
632         * platform/SharedBuffer.h:
633         (SharedBuffer):
634         * platform/WheelFlingPlatformGestureCurve.h:
635         (WheelFlingPlatformGestureCurve):
636         * platform/Widget.h:
637         (Widget):
638         * platform/network/cf/ResourceRequestCFNet.cpp:
639         (WebCore::ResourceRequest::doUpdateResourceRequest):
640
641 2012-07-25  Ryosuke Niwa  <rniwa@webkit.org>
642
643         Windows build fix attempt after r123625.
644
645         * platform/network/cf/ResourceRequestCFNet.cpp:
646         (WebCore::ResourceRequest::doUpdateResourceRequest):
647
648 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
649
650         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately.
651         https://bugs.webkit.org/show_bug.cgi?id=92240
652
653         Reviewed by Adam Barth.
654
655         This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle
656         the context element case.
657
658         No new tests, covered by existing tests.
659
660         * html/parser/HTMLStackItem.h:
661         (WebCore::HTMLStackItem::create):
662         (WebCore::HTMLStackItem::HTMLStackItem):
663         * html/parser/HTMLTreeBuilder.cpp:
664         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
665         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
666
667 2012-07-25  Nico Weber  <thakis@chromium.org>
668
669         [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp
670         https://bugs.webkit.org/show_bug.cgi?id=92207
671
672         Reviewed by Tony Chang.
673
674         It's no longer needed after http://crrev.com/148290 and
675         http://crrev.com/148187.
676
677         * WebCore.gyp/WebCore.gyp:
678
679 2012-07-25  Dana Jansens  <danakj@chromium.org>
680
681         [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass
682         https://bugs.webkit.org/show_bug.cgi?id=91885
683
684         Reviewed by Adrienne Walker.
685
686         We move the filter operations to CCRenderPass to avoid having
687         variable-length data in a WebCompositorQuad in order to serialize,
688         and also to avoid requiring a virtual destructor for the quad
689         classes.
690
691         The drawFrame method now takes a CCRenderPassIdHashMap in order
692         to connect RenderPass quads to their source RenderPass.
693
694         Covered by existing tests.
695
696         * platform/graphics/chromium/LayerRendererChromium.cpp:
697         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
698         (WebCore::LayerRendererChromium::drawFrame):
699         (WebCore::LayerRendererChromium::beginDrawingFrame):
700         (WebCore::LayerRendererChromium::drawBackgroundFilters):
701         (WebCore::LayerRendererChromium::drawRenderPassQuad):
702         * platform/graphics/chromium/LayerRendererChromium.h:
703         (LayerRendererChromium):
704         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
705         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
706         (WebCore::CCLayerTreeHostImpl::drawLayers):
707         * platform/graphics/chromium/cc/CCRenderPass.h:
708         (WebCore::CCRenderPass::filters):
709         (WebCore::CCRenderPass::setFilters):
710         (CCRenderPass):
711         (WebCore::CCRenderPass::backgroundFilters):
712         (WebCore::CCRenderPass::setBackgroundFilters):
713         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
714         (WebCore::CCRenderPassDrawQuad::create):
715         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
716         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
717         (CCRenderPassDrawQuad):
718         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
719         (WebCore::CCRenderSurface::appendQuads):
720         * platform/graphics/chromium/cc/CCRenderer.h:
721         (CCRenderer):
722
723 2012-07-25  Mike Reed  <reed@google.com>
724
725         fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy
726         https://bugs.webkit.org/show_bug.cgi?id=92276
727
728         Reviewed by Stephen White.
729
730         PlatformContextSkia::beginLayerClippedToImage
731
732         This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet,
733         so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a
734         deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy.
735         This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks
736         against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a
737         deep copy.
738
739         No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see
740         failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until
741         Skia rev. 4722 or later lands.
742
743         * platform/graphics/skia/PlatformContextSkia.cpp:
744         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
745
746 2012-07-25  Li Yin  <li.yin@intel.com>
747
748         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
749         https://bugs.webkit.org/show_bug.cgi?id=91364
750
751         Reviewed by Kenneth Russell.
752
753         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
754         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
755
756         Test: webaudio/javascriptaudionode.html
757
758         * Modules/webaudio/JavaScriptAudioNode.cpp:
759         (WebCore::JavaScriptAudioNode::create):
760
761 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
762
763         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
764         https://bugs.webkit.org/show_bug.cgi?id=88953
765
766         Reviewed by Adrienne Walker.
767
768         This is part 1 of trying to reduce the root layer special
769         case. This tries to reduce the special-ness of the root layer from
770         the perspective of outside code.
771
772         After this patch, code that uses calcDrawTransforms() no longer
773         needs to initialize the root layer's surface, and no longer needs
774         to manually append the root layer to the renderSurfaceLayerList.
775
776         Unit tests were also updated (much cleaner!) to account for this change.
777
778         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
779         (WebCore::CCLayerTreeHost::updateLayers):
780         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
781         (WebCore):
782         (WebCore::setupRootLayerAndSurfaceForRecursion):
783         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
784         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
785         (CCLayerTreeHostCommon):
786         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
787         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
788
789 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
790
791         FileSystem should provide a way to delete filesystem.
792         https://bugs.webkit.org/show_bug.cgi?id=91861
793
794         Reviewed by Adam Barth.
795
796         We will add a test when we wire-up the feature to Inspector.
797
798         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
799         (WebCore::deleteFileSystem):
800         (WebCore):
801         (WebCore::LocalFileSystem::deleteFileSystem):
802         * Modules/filesystem/LocalFileSystem.h:
803         (LocalFileSystem):
804         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
805         (WebCore):
806         (WebCore::AsyncFileSystem::deleteFileSystem):
807         * platform/AsyncFileSystem.h:
808         (AsyncFileSystem):
809         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
810         (WebCore::AsyncFileSystem::deleteFileSystem):
811         (WebCore):
812         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
813         (WebCore::AsyncFileSystem::deleteFileSystem):
814         (WebCore):
815
816 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
817
818         Web Inspector: Add more jsdocs to InjectedScriptSource.js
819         https://bugs.webkit.org/show_bug.cgi?id=92255
820
821         Reviewed by Pavel Feldman.
822
823         * inspector/InjectedScriptSource.js:
824
825 2012-07-24  Dana Jansens  <danakj@chromium.org>
826
827         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
828         https://bugs.webkit.org/show_bug.cgi?id=92182
829
830         Reviewed by Adrienne Walker.
831
832         By changing the HUD into a quad, we are able to create a HUD and pass
833         it to the host compositor, allowing the HUD to be used for renderers
834         under Ubercompositor.
835
836         This also removes the special drawing code for the HUD from
837         LayerRendererChromium, allowing us to move finishDrawingFrame
838         into LayerRendererChromium as a private method and remove it
839         from the CCRenderer interface.
840
841         Finally, we can remove the CCFontAtlas transport code from CCProxy
842         and its implementations as the atlas can be synced to impl thread
843         through the usual layer commit mechanism.
844
845         The debug HUD is not covered by tests.
846
847         * WebCore.gypi:
848         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
849         (WebCore):
850         (WebCore::HeadsUpDisplayLayerChromium::create):
851         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
852         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
853         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
854         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
855         (WebCore):
856         (HeadsUpDisplayLayerChromium):
857         * platform/graphics/chromium/LayerRendererChromium.cpp:
858         (WebCore::LayerRendererChromium::drawFrame):
859         (WebCore::LayerRendererChromium::cleanupSharedObjects):
860         * platform/graphics/chromium/LayerRendererChromium.h:
861         (LayerRendererChromium):
862         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
863         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
864         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
865         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
866         (WebCore):
867         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
868         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
869         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
870         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
871         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
872         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
873         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
874         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
875         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
876         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
877         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
878         (WebCore):
879         (CCHeadsUpDisplayLayerImpl):
880         (WebCore::CCHeadsUpDisplayLayerImpl::create):
881         * platform/graphics/chromium/cc/CCLayerImpl.h:
882         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
883         This flag is used to mark the HUD as always damaged, so that it is
884         continually drawn on the impl thread. It is also used as a hint by
885         the CCDebugRectHistory class to not include the layer in the display
886         of damage, since always damaged is not interesting damage.
887         (CCLayerImpl):
888         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
889         (WebCore::CCLayerTreeHost::create):
890         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
891         (WebCore::CCLayerTreeHost::initialize):
892         (WebCore::CCLayerTreeHost::willCommit):
893         (WebCore::CCLayerTreeHost::didCommit):
894         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
895         (CCLayerTreeSettings):
896         (WebCore::CCLayerTreeSettings::showDebugInfo):
897         (WebCore::CCLayerTreeSettings::showDebugRects):
898         (CCLayerTreeHost):
899         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
900         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
901         (WebCore::CCLayerTreeHostImpl::drawLayers):
902         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
903         (WebCore):
904         (CCLayerTreeHostImpl):
905         * platform/graphics/chromium/cc/CCProxy.h:
906         (CCProxy):
907         * platform/graphics/chromium/cc/CCRenderer.h:
908         (CCRenderer):
909         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
910         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
911         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
912         * platform/graphics/chromium/cc/CCThreadProxy.h:
913         (CCThreadProxy):
914
915 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
916
917         Web Inspector: follow up to r123612, fixing CSS value suggest.
918
919         Not reviewed, minor JS fix.
920
921         * inspector/front-end/CSSCompletions.js:
922         (WebInspector.CSSCompletions):
923         * inspector/front-end/StylesSidebarPane.js:
924         (WebInspector.StylePropertyTreeElement.prototype):
925
926 2012-07-25  Michael Saboff  <msaboff@apple.com>
927
928         Unreviewed build fix after r123624.
929
930         * inspector/InspectorPageAgent.cpp:
931         (WebCore::InspectorPageAgent::clearGeolocationOverride):
932         Changed ASSERT_UNUSED() to UNUSED_PARAM().
933
934 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
935
936         Web inspector auto-completes "optimizequality" but then complains
937         https://bugs.webkit.org/show_bug.cgi?id=92262
938
939         Reviewed by Timothy Hatcher.
940
941         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
942
943         * inspector/front-end/CSSKeywordCompletions.js:
944
945 2012-07-25  Beth Dakin  <bdakin@apple.com>
946
947         https://bugs.webkit.org/show_bug.cgi?id=89114
948         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
949         fails
950         -and corresponding-
951         <rdar://problem/11656050>
952
953         Reviewed by Simon Fraser.
954
955         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
956         both have an optimization in place so that they do not call 
957         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
958         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
959         this optimization because it allowed RenderLayers to restore a scrollOffset from 
960         the Element if there is one cached there. This caused the RenderLayer to have a 
961         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
962         currentPosition (which will just be 0,0 since it is being re-created like the 
963         RenderLayer). This fix makes sure they are in synch by calling 
964         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
965         * rendering/RenderLayer.cpp:
966         (WebCore::RenderLayer::RenderLayer):
967
968 2012-07-25  Andreas Kling  <kling@webkit.org>
969
970         Make ElementAttributeData a variable-sized object to reduce memory use.
971         <http://webkit.org/b/88240>
972
973         Reviewed by Ryosuke Niwa.
974
975         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
976         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
977         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
978         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
979
980         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
981         that nothing tries to mutate an element with a raw attribute array.
982
983         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
984         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
985
986         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
987         That is a ~35% reduction in DOM attribute memory use.
988
989         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
990         adding of "class" attributes. For more static pages, savings are even greater.
991
992         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
993         needed. Not a big deal but avoids double lookup of attributes when removing them.
994
995         * dom/Element.cpp:
996         (WebCore::Element::detachAttribute):
997         (WebCore::Element::removeAttribute):
998         (WebCore::Element::attributes):
999         (WebCore::Element::setAttributeInternal):
1000         (WebCore::Element::parserSetAttributes):
1001         (WebCore::Element::hasEquivalentAttributes):
1002         (WebCore::Element::setAttributeNode):
1003         (WebCore::Element::removeAttributeNode):
1004         (WebCore::Element::getAttributeNode):
1005         (WebCore::Element::getAttributeNodeNS):
1006         (WebCore::Element::hasAttribute):
1007         (WebCore::Element::hasAttributeNS):
1008         (WebCore::Element::cloneAttributesFromElement):
1009
1010             Sprinkle const on ElementAttributeData* pointers.
1011             Switch to using mutableAttributeData() in code paths that modify attributes.
1012
1013         (WebCore::Element::normalizeAttributes):
1014
1015             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
1016             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
1017             length() and attributeItem(index), use those to iterate directly over the attributes.
1018
1019         (WebCore::Element::createMutableAttributeData):
1020
1021             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
1022             ElementAttributeData (mutable and empty.)
1023
1024         * dom/Element.h:
1025         (WebCore::Element::attributeData):
1026         (WebCore::Element::updatedAttributeData):
1027         (WebCore::Element::ensureAttributeData):
1028         (WebCore::Element::ensureUpdatedAttributeData):
1029
1030             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
1031             attempts to modify an ElementAttributeData that may be immutable.
1032
1033             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
1034             The goal of having methods be const is to prevent conversion from one ElementAttributeData
1035             object to another, so that pointers remain intact and no unnecessary work gets done.
1036
1037         (WebCore::Element::mutableAttributeData):
1038
1039             Added, returns a guaranteed mutable ElementAttributeData* pointer.
1040
1041         * dom/ElementAttributeData.cpp:
1042         (WebCore::ElementAttributeData::createImmutable):
1043
1044             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
1045
1046         (WebCore::ElementAttributeData::ElementAttributeData):
1047
1048             Moved constructors out-of-line, getting too complex for header files.
1049
1050             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
1051             containing the provided attributes in an array tacked onto the end of the object.
1052
1053         (WebCore::ElementAttributeData::~ElementAttributeData):
1054
1055             Free the attribute vector if mutable.
1056             For immutable objects, manually invoke destructor on each Attribute object,
1057             since these won't be destroyed automatically by ~ElementAttributeData.
1058
1059         (WebCore::ElementAttributeData::attrIfExists):
1060
1061         (WebCore::ElementAttributeData::ensureAttr):
1062         (WebCore::ElementAttributeData::setAttr):
1063         (WebCore::ElementAttributeData::removeAttr):
1064
1065             Make these const, as they should always have been- they don't affect the ElementAttributeData,
1066             only the global DOM Attr <-> ElementAttributeData mappings.
1067
1068         (WebCore::ElementAttributeData::ensureInlineStyle):
1069         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
1070
1071             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
1072             have mutable attribute data. There's still inlineStyle() for that, which may return null.
1073             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
1074             attribute, e.g in editing code that wants to add style.
1075
1076         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
1077         (WebCore::ElementAttributeData::destroyInlineStyle):
1078
1079             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
1080             contain a style attribute will have a valid inlineStyle() with that style data. This is just
1081             an interface for ~StyledElement to destroy the style object.
1082             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
1083             clean up properly and we don't store one in this class.
1084
1085         (WebCore::ElementAttributeData::addAttribute):
1086         (WebCore::ElementAttributeData::removeAttribute):
1087         (WebCore::ElementAttributeData::clearAttributes):
1088         (WebCore::ElementAttributeData::replaceAttribute):
1089
1090             Sprinkle ASSERT(isMutable()).
1091             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
1092
1093         (WebCore::ElementAttributeData::isEquivalent):
1094         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
1095         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
1096         (WebCore::ElementAttributeData::removeAttribute):
1097         (WebCore::ElementAttributeData::getAttributeItem):
1098         (WebCore::ElementAttributeData::getAttributeItemIndex):
1099
1100             Use length() and attributeItem(index) to iterate over the attributes.
1101
1102         (WebCore::ElementAttributeData::cloneDataFrom):
1103
1104             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
1105             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
1106             a semi-rare occurrence.
1107
1108             Updated code to handle both immutable and mutable source objects. This could 
1109
1110         (WebCore::ElementAttributeData::getAttributeNode):
1111
1112             Const correctness.
1113
1114         * dom/ElementAttributeData.h:
1115         (ElementAttributeData):
1116
1117             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
1118             The new m_isMutable bit determines which union member should be used for access.
1119
1120         (WebCore::ElementAttributeData::create):
1121         (WebCore::ElementAttributeData::createImmutable):
1122
1123             Added createImmutable(const Vector<Attribute>&) as a complement to create().
1124
1125         (WebCore::ElementAttributeData::setClass):
1126         (WebCore::ElementAttributeData::setIdForStyleResolution):
1127         (WebCore::ElementAttributeData::inlineStyle):
1128         (WebCore::ElementAttributeData::setAttributeStyle):
1129
1130             Make these const, and their data member counterparts 'mutable'.
1131             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
1132             m_inlineStyleDecl and m_attributeStyle.
1133
1134         (WebCore::ElementAttributeData::reportMemoryUsage):
1135
1136             Updated for isMutable().
1137
1138         (WebCore::ElementAttributeData::makeMutable):
1139
1140             Returns a mutable clone of itself.
1141
1142         (WebCore::ElementAttributeData::isEmpty):
1143         (WebCore::ElementAttributeData::length):
1144         (WebCore::ElementAttributeData::attributeItem):
1145
1146             Check isMutable() to know how to access attribute storage.
1147
1148         * dom/StyledElement.cpp:
1149         (WebCore::StyledElement::style):
1150         (WebCore::StyledElement::setInlineStyleProperty):
1151
1152             Simplify by using StyledElement::ensureInlineStyle().
1153
1154         (WebCore::StyledElement::classAttributeChanged):
1155
1156             Use mutableAttributeData() if the attribute is being removed completely.
1157             In other cases, tiptoe around without causing the attribute data to go mutable.
1158
1159         (WebCore::StyledElement::removeInlineStyleProperty):
1160
1161             Use mutableAttributeData() if/when actually removing something.
1162
1163         (WebCore::StyledElement::addSubresourceAttributeURLs):
1164
1165             Const correctness.
1166
1167         * dom/StyledElement.h:
1168         (WebCore::StyledElement::ensureInlineStyle):
1169
1170             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
1171             properties, so conversion is inevitable.
1172
1173         * html/parser/HTMLConstructionSite.cpp:
1174         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
1175         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
1176         * svg/properties/SVGAnimatedPropertyMacros.h:
1177         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
1178
1179             Use mutableAttributeData() as appropriate.
1180
1181         * xml/parser/XMLDocumentParserQt.cpp:
1182         (WebCore::XMLDocumentParser::XMLDocumentParser):
1183
1184             Const correctness.
1185
1186 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
1187
1188         Unreviewed, rolling out r123560.
1189         http://trac.webkit.org/changeset/123560
1190         https://bugs.webkit.org/show_bug.cgi?id=90321
1191
1192         Breaks chromium valgrind tests.
1193
1194         * html/FTPDirectoryDocument.cpp:
1195         (WebCore::FTPDirectoryDocumentParser::append):
1196         * html/parser/HTMLEntityParser.cpp:
1197         (WebCore::HTMLEntityParser::consumeNamedEntity):
1198         * html/parser/HTMLParserIdioms.cpp:
1199         (WebCore::stripLeadingAndTrailingHTMLSpaces):
1200         * html/parser/HTMLSourceTracker.cpp:
1201         (WebCore::HTMLSourceTracker::sourceForToken):
1202         * loader/cache/CachedScript.cpp:
1203         (WebCore::CachedScript::script):
1204         * platform/text/SegmentedString.cpp:
1205         (WebCore::SegmentedString::SegmentedString):
1206         (WebCore::SegmentedString::operator=):
1207         (WebCore::SegmentedString::clear):
1208         (WebCore::SegmentedString::append):
1209         (WebCore::SegmentedString::prepend):
1210         (WebCore::SegmentedString::advanceSubstring):
1211         (WebCore::SegmentedString::advance):
1212         (WebCore::SegmentedString::advanceSlowCase):
1213         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
1214         * platform/text/SegmentedString.h:
1215         (WebCore::SegmentedSubstring::SegmentedSubstring):
1216         (WebCore::SegmentedSubstring::clear):
1217         (WebCore::SegmentedSubstring::appendTo):
1218         (SegmentedSubstring):
1219         (WebCore::SegmentedString::SegmentedString):
1220         (WebCore::SegmentedString::push):
1221         (WebCore::SegmentedString::isEmpty):
1222         (WebCore::SegmentedString::lookAhead):
1223         (WebCore::SegmentedString::lookAheadIgnoringCase):
1224         (WebCore::SegmentedString::advance):
1225         (WebCore::SegmentedString::advanceAndASSERT):
1226         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1227         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1228         (SegmentedString):
1229         (WebCore::SegmentedString::advancePastNonNewline):
1230         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1231         (WebCore::SegmentedString::operator*):
1232         (WebCore::SegmentedString::operator->):
1233         (WebCore::SegmentedString::current):
1234         (WebCore::SegmentedString::equalsLiterally):
1235         (WebCore::SegmentedString::equalsIgnoringCase):
1236         (WebCore::SegmentedString::lookAheadInline):
1237         (WebCore::SegmentedString::lookAheadSlowCase):
1238         * xml/parser/CharacterReferenceParserInlineMethods.h:
1239         (WebCore::consumeCharacterReference):
1240         * xml/parser/MarkupTokenizerBase.h:
1241         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1242         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
1243         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1244
1245 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
1246
1247         Web Inspector: Geolocation override
1248         https://bugs.webkit.org/show_bug.cgi?id=89365
1249
1250         Reviewed by Pavel Feldman.
1251
1252         Re-added the m_page member variable for GeolocationController since
1253         it's now being used by InspectorInstrumentaiton.
1254
1255         Added a way to override the GeolocationPosition and GeolocationError
1256         using Web Inspector. Curretnly only PositionError can be set.
1257
1258         This will be hidden behind the experiments flag for now.
1259
1260         Tests: inspector/geolocation-error.html
1261                inspector/geolocation-success.html
1262                inspector/geolocation-watchPosition.html
1263
1264         * English.lproj/localizedStrings.js:
1265         * Modules/geolocation/GeolocationController.cpp:
1266         (WebCore::GeolocationController::GeolocationController):
1267         (WebCore::GeolocationController::positionChanged):
1268         * Modules/geolocation/GeolocationController.h:
1269         (GeolocationController):
1270         * inspector/Inspector.json:
1271         * inspector/InspectorInstrumentation.cpp:
1272         (WebCore):
1273         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
1274         * inspector/InspectorInstrumentation.h:
1275         (WebCore):
1276         (InspectorInstrumentation):
1277         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
1278         * inspector/InspectorPageAgent.cpp:
1279         (WebCore::InspectorPageAgent::InspectorPageAgent):
1280         (WebCore::InspectorPageAgent::setGeolocationOverride):
1281         (WebCore):
1282         (WebCore::InspectorPageAgent::clearGeolocationOverride):
1283         (WebCore::InspectorPageAgent::canOverrideGeolocation):
1284         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
1285         * inspector/InspectorPageAgent.h:
1286         * inspector/front-end/Settings.js:
1287         * inspector/front-end/SettingsScreen.js:
1288         (WebInspector.UserAgentSettingsTab):
1289         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1290         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
1291         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
1292         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
1293         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
1294         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
1295         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
1296         * inspector/front-end/UserAgentSupport.js:
1297         (WebInspector.UserAgentSupport.GeolocationPosition):
1298         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
1299         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
1300         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
1301         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
1302         * inspector/front-end/inspector.js:
1303         (WebInspector.doLoadedDone):
1304
1305 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
1306
1307         [chromium] Build fix for clang builds after r123628
1308         https://bugs.webkit.org/show_bug.cgi?id=92266
1309
1310         Reviewed by Adrienne Walker.
1311
1312         An un-used variable was causing build failures for clang builds
1313         after the refactoring in r123628.  It is correct to simply remove
1314         this value.
1315
1316         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1317         (WebCore::calculateDrawTransformsInternal):
1318
1319 2012-07-25  Hans Wennborg  <hans@chromium.org>
1320
1321         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
1322         https://bugs.webkit.org/show_bug.cgi?id=92232
1323
1324         Reviewed by Adam Barth.
1325
1326         Extract code for creating emma-qualified names to a helper function.
1327
1328         Just a refactoring; covered by the existing test.
1329
1330         * Modules/speech/SpeechRecognitionResult.cpp:
1331         (WebCore::emmaQualifiedName):
1332         (WebCore):
1333         (WebCore::SpeechRecognitionResult::emma):
1334
1335 2012-07-25  Adrienne Walker  <enne@google.com>
1336
1337         [chromium] Unify compositor quadTransform/drawTransform/originTransform
1338         https://bugs.webkit.org/show_bug.cgi?id=91417
1339
1340         Reviewed by Kenneth Russell.
1341
1342         drawTransform used to operate on centered layer rects. To unify quad
1343         transforms, draw transforms, and origin transforms, make draw
1344         transforms operate on content rects with the origin in the top left.
1345
1346         This essentially eliminates the need for surface origin transforms,
1347         which will be eliminated in a future patch.
1348
1349         Also, remove the unused CCLayerImpl::getDrawRect function.
1350
1351         No-op refactoring. Tested by existing tests.
1352
1353         * platform/graphics/chromium/LayerRendererChromium.cpp:
1354         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1355         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1356         (WebCore::RenderSurfaceChromium::drawableContentRect):
1357         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1358         (WebCore::CCDamageTracker::extendDamageForLayer):
1359         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1360         (WebCore::CCLayerImpl::createSharedQuadState):
1361         * platform/graphics/chromium/cc/CCLayerImpl.h:
1362         (CCLayerImpl):
1363         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1364         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1365         (WebCore::CCLayerSorter::createGraphNodes):
1366         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1367         (WebCore::calculateVisibleContentRect):
1368         (WebCore::calculateDrawTransformsInternal):
1369         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1370         (WebCore::::markOccludedBehindLayer):
1371         (WebCore::::occluded):
1372         (WebCore::::unoccludedContentRect):
1373         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1374         (WebCore::CCRenderPass::appendQuadsToFillScreen):
1375         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1376         (WebCore::CCRenderSurface::drawableContentRect):
1377
1378 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
1379
1380         MediaStream API: Update MediaStreamTrack to match the specification
1381         https://bugs.webkit.org/show_bug.cgi?id=90180
1382
1383         Reviewed by Adam Barth.
1384
1385         MediaStreamTracks are now required to show the status of the underlying source,
1386         and trigger events when that status changes.
1387
1388         Test: fast/mediastream/MediaStreamTrack.html
1389
1390         * GNUmakefile.list.am:
1391         * Modules/mediastream/MediaStream.cpp:
1392         (WebCore::MediaStream::MediaStream):
1393         (WebCore::MediaStream::addTrack):
1394         * Modules/mediastream/MediaStreamTrack.cpp:
1395         (WebCore::MediaStreamTrack::create):
1396         (WebCore::MediaStreamTrack::MediaStreamTrack):
1397         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1398         (WebCore::MediaStreamTrack::setEnabled):
1399         (WebCore::MediaStreamTrack::readyState):
1400         (WebCore):
1401         (WebCore::MediaStreamTrack::sourceChangedState):
1402         (WebCore::MediaStreamTrack::stop):
1403         (WebCore::MediaStreamTrack::interfaceName):
1404         (WebCore::MediaStreamTrack::scriptExecutionContext):
1405         (WebCore::MediaStreamTrack::eventTargetData):
1406         (WebCore::MediaStreamTrack::ensureEventTargetData):
1407         * Modules/mediastream/MediaStreamTrack.h:
1408         * Modules/mediastream/MediaStreamTrack.idl:
1409         * WebCore.gypi:
1410         * dom/EventNames.h:
1411         (WebCore):
1412         * dom/EventTargetFactory.in:
1413         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1414         * platform/chromium/support/WebMediaStreamSource.cpp:
1415         (WebKit::WebMediaStreamSource::setReadyState):
1416         (WebKit):
1417         (WebKit::WebMediaStreamSource::readyState):
1418         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
1419         (WebCore):
1420         (WebCore::MediaStreamSource::create):
1421         (WebCore::MediaStreamSource::MediaStreamSource):
1422         (WebCore::MediaStreamSource::setReadyState):
1423         (WebCore::MediaStreamSource::addObserver):
1424         (WebCore::MediaStreamSource::removeObserver):
1425         * platform/mediastream/MediaStreamSource.h:
1426         (Observer):
1427         (WebCore::MediaStreamSource::Observer::~Observer):
1428         (MediaStreamSource):
1429         (WebCore::MediaStreamSource::readyState):
1430         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1431         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1432         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1433
1434 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1435
1436         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
1437         https://bugs.webkit.org/show_bug.cgi?id=91061
1438
1439         Reviewed by Adam Barth.
1440
1441         The two functions are currently both returning the flooredLayoutUnit when subpixel
1442         layout is enabled. This patch changes them to return the correct fractional rounded
1443         value.
1444
1445         * platform/FractionalLayoutUnit.h:
1446         (WebCore::FractionalLayoutUnit::fromFloatCeil):
1447         (FractionalLayoutUnit):
1448         (WebCore::FractionalLayoutUnit::fromFloatRound):
1449         * rendering/LayoutTypes.h:
1450         (WebCore::roundedLayoutUnit):
1451         (WebCore::ceiledLayoutUnit):
1452         * rendering/RenderBlock.cpp:
1453         (WebCore::updatePreferredWidth):
1454
1455 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1456
1457         Add *explicit* keyword to constructors in WebCore/platform
1458         https://bugs.webkit.org/show_bug.cgi?id=92238
1459
1460         Reviewed by Kentaro Hara.
1461
1462         As a step to let *explicit* keyword add to constructors which have a parameter,
1463         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
1464         type conversion.
1465
1466         Some files in platform directory can't use explicit keyword because of build breaks.
1467
1468         No new tests. Covered by existing tests.
1469
1470         * platform/AutodrainedPool.h:
1471         (AutodrainedPool):
1472         * platform/ContentType.h:
1473         (ContentType):
1474         * platform/ContextMenu.h:
1475         (ContextMenu):
1476         * platform/ContextMenuItem.h:
1477         (ContextMenuItem):
1478         * platform/Cursor.h:
1479         (WebCore::SharedCursor::SharedCursor):
1480         (Cursor):
1481         * platform/KURL.h:
1482         (WebCore::KURL::KURL):
1483         (KURL):
1484         * platform/KURLGooglePrivate.h:
1485         (KURLGooglePrivate):
1486         * platform/PODRedBlackTree.h:
1487         (WebCore::PODRedBlackTree::PODRedBlackTree):
1488         * platform/Pasteboard.h:
1489         (Pasteboard):
1490         * platform/PlatformEvent.h:
1491         (WebCore::PlatformEvent::PlatformEvent):
1492         * platform/PlatformKeyboardEvent.h:
1493         (PlatformKeyboardEvent):
1494         * platform/PlatformMouseEvent.h:
1495         (PlatformMouseEvent):
1496         * platform/PlatformPasteboard.h:
1497         (PlatformPasteboard):
1498         * platform/PlatformTouchEvent.h:
1499         (PlatformTouchEvent):
1500         * platform/PlatformWheelEvent.h:
1501         (PlatformWheelEvent):
1502         * platform/RunLoop.h:
1503         (TimerBase):
1504         * platform/ScrollAnimator.h:
1505         (ScrollAnimator):
1506         * platform/ScrollAnimatorNone.h:
1507         (ScrollAnimatorNone):
1508         * platform/SharedBuffer.h:
1509         (SharedBuffer):
1510         * platform/WheelFlingPlatformGestureCurve.h:
1511         (WheelFlingPlatformGestureCurve):
1512         * platform/Widget.h:
1513         (Widget):
1514
1515 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1516
1517         NodesFromRect and area-based hit-testing can not handle CSS transforms.
1518         https://bugs.webkit.org/show_bug.cgi?id=85792
1519
1520         Reviewed by Eric Seidel.
1521
1522         To support the combination of CSS transforms and rect based hit testing,
1523         we need to test against the transformed rect, instead of the original rect.
1524
1525         This patch makes HitTestPoint store the exact transformed FloatPoint and 
1526         FloatQuad, and modifies the intersection methods so that they will use a 
1527         new FloatQuad based intersection when transforms requires it.
1528
1529         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
1530                fast/dom/nodesFromRect/nodesFromRect-scale.html
1531
1532         * platform/graphics/FloatQuad.cpp:
1533         (WebCore::determinant):
1534         (WebCore::rightMostCornerToVector):
1535         (WebCore::FloatQuad::intersectsRect):
1536         (WebCore::FloatQuad::isCounterclockwise):
1537         * platform/graphics/FloatQuad.h:
1538         (FloatQuad):
1539         * rendering/HitTestResult.cpp:
1540         (WebCore::HitTestPoint::HitTestPoint):
1541         (WebCore::HitTestPoint::operator=):
1542         (WebCore::HitTestPoint::move):
1543         (WebCore::HitTestPoint::intersectsRect):
1544         (WebCore::HitTestPoint::intersects):
1545         * rendering/HitTestResult.h:
1546         (HitTestPoint):
1547         (WebCore::HitTestPoint::isRectilinear):
1548         (WebCore::HitTestPoint::transformedPoint):
1549         (WebCore::HitTestPoint::transformedRect):
1550         * rendering/HitTestingTransformState.cpp:
1551         (WebCore::HitTestingTransformState::flattenWithTransform):
1552         (WebCore::HitTestingTransformState::mappedArea):
1553         (WebCore::HitTestingTransformState::boundsOfMappedArea):
1554         * rendering/HitTestingTransformState.h:
1555         (WebCore::HitTestingTransformState::create):
1556         (WebCore::HitTestingTransformState::HitTestingTransformState):
1557         * rendering/RenderFlowThread.cpp:
1558         (WebCore::RenderFlowThread::hitTestRegion):
1559         * rendering/RenderLayer.cpp:
1560         (WebCore::RenderLayer::hitTest):
1561         (WebCore::RenderLayer::createLocalTransformState):
1562         (WebCore::RenderLayer::hitTestLayer):
1563         (WebCore::RenderLayer::hitTestChildLayerColumns):
1564         * rendering/RenderLayer.h:
1565         * rendering/svg/RenderSVGText.cpp:
1566         (WebCore::RenderSVGText::nodeAtFloatPoint):
1567
1568 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
1569
1570         Add HTMLStackItem.h to project files
1571         https://bugs.webkit.org/show_bug.cgi?id=92221
1572
1573         Reviewed by Adam Barth.
1574
1575         Added HTMLStackItem.h introduced in r123399 to project files.
1576
1577         Project file changes only, no change in behavior thus no new tests.
1578
1579         * GNUmakefile.list.am:
1580         * WebCore.gypi:
1581         * WebCore.vcproj/WebCore.vcproj:
1582         * WebCore.xcodeproj/project.pbxproj:
1583
1584 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1585
1586         Unreviewed, rolling out r123606.
1587         http://trac.webkit.org/changeset/123606
1588         https://bugs.webkit.org/show_bug.cgi?id=92247
1589
1590         broke Windows build of Chromium (Requested by tomhudson on
1591         #webkit).
1592
1593         * Resources/colorSuggestionPicker.css: Removed.
1594         * Resources/colorSuggestionPicker.js: Removed.
1595         * WebCore.gyp/WebCore.gyp:
1596
1597 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1598
1599         Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
1600         https://bugs.webkit.org/show_bug.cgi?id=92253
1601
1602         Reviewed by Vsevolod Vlasov.
1603
1604         Bug fix with a test and more compilation markup.
1605
1606         Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
1607
1608         * inspector/front-end/StylesSidebarPane.js:
1609         (WebInspector.StylePropertiesSection.prototype.update):
1610         (WebInspector.StylePropertyTreeElement):
1611         (WebInspector.StylePropertyTreeElement.prototype):
1612
1613 2012-07-25  Vsevolod Vlasov  <vsevik@chromium.org>
1614
1615         Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
1616         https://bugs.webkit.org/show_bug.cgi?id=92225
1617
1618         Reviewed by Pavel Feldman.
1619
1620         Added tooltip with property value description on the property's valueElement.
1621
1622         * inspector/front-end/ObjectPropertiesSection.js:
1623         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1624
1625 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1626
1627         https://bugs.webkit.org/show_bug.cgi?id=91931
1628
1629         Reviewed by Vsevolod Vlasov.
1630
1631         - Synthetic shorthand values are now only returned for source-less styles
1632         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
1633         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
1634         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
1635
1636         Test: inspector/styles/styles-overriden-properties.html
1637
1638         * inspector/Inspector.json:
1639         * inspector/InspectorCSSAgent.cpp:
1640         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1641         * inspector/InspectorCSSAgent.h:
1642         (InspectorCSSAgent):
1643         * inspector/InspectorStyleSheet.cpp:
1644         (WebCore::InspectorStyle::styleWithProperties):
1645         * inspector/front-end/CSSCompletions.js:
1646         (WebInspector.CSSCompletions):
1647         (WebInspector.CSSCompletions.requestCSSNameCompletions):
1648         (WebInspector.CSSCompletions.prototype._closest):
1649         (WebInspector.CSSCompletions.prototype.longhands):
1650         (WebInspector.CSSCompletions.prototype.shorthands):
1651         * inspector/front-end/CSSStyleModel.js:
1652         (WebInspector.CSSStyleDeclaration):
1653         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
1654         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
1655         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
1656         (WebInspector.CSSProperty):
1657         (WebInspector.CSSProperty.parsePayload):
1658         * inspector/front-end/SourceCSSTokenizer.js:
1659         (WebInspector.SourceCSSTokenizer):
1660         * inspector/front-end/SourceCSSTokenizer.re2js:
1661         * inspector/front-end/StylesSidebarPane.js:
1662         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
1663         (WebInspector.StylePropertiesSection.prototype.update):
1664         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1665         (WebInspector.StylePropertyTreeElement.prototype):
1666
1667 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1668
1669         Implement ColorSuggestionPicker page popup
1670         https://bugs.webkit.org/show_bug.cgi?id=92109
1671
1672         Reviewed by Kent Tamura.
1673
1674         Implements ColorSuggestionPicker page popup. This will be used in
1675         certain ports as the datalist UI for <input type=color>.
1676
1677         No new tests because there is no way to open the popup yet.
1678
1679         * Resources/colorSuggestionPicker.css: Added.
1680         (body):
1681         (#main):
1682         (.color-swatch):
1683         (.color-swatch:hover):
1684         (.color-swatch-container):
1685         (.other-color):
1686         * Resources/colorSuggestionPicker.js: Added.
1687         (getScrollbarWidth):When there are more than 20 colors we need to
1688         increase the window width to accommodate the scroll bar.
1689         (createElement):
1690         (handleMessage):
1691         (initialize):
1692         (handleArgumentsTimeout):
1693         (validateArguments):
1694         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
1695         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
1696         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
1697         (ColorPicker):
1698         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
1699         grid.
1700         (ColorPicker.prototype._handleSwatchClick):
1701         * WebCore.gyp/WebCore.gyp:
1702
1703 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1704
1705         Fix arithmetic composite filter for auto-vectorization
1706         https://bugs.webkit.org/show_bug.cgi?id=92123
1707
1708         Reviewed by Nikolas Zimmermann.
1709
1710         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
1711         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
1712
1713         * platform/graphics/filters/FEComposite.cpp:
1714         (WebCore::computeArithmeticPixelsUnclamped):
1715         (WebCore::arithmeticSoftware):
1716
1717 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1718
1719         Fix blend filter for autovectorizing
1720         https://bugs.webkit.org/show_bug.cgi?id=91398
1721
1722         Reviewed by Nikolas Zimmermann.
1723
1724         Get rid of wrapper classes, and use functions directly as template argument.
1725
1726         * platform/graphics/filters/FEBlend.cpp:
1727         (WebCore::feBlendNormal):
1728         (WebCore::feBlendMultiply):
1729         (WebCore::feBlendScreen):
1730         (WebCore::feBlendDarken):
1731         (WebCore::feBlendLighten):
1732         (WebCore::feBlendUnknown):
1733         (WebCore::platformApply):
1734         (WebCore::FEBlend::platformApplyGeneric):
1735
1736 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1737
1738         Add methods to ColorChooserClient so the color chooser can show suggestions
1739         https://bugs.webkit.org/show_bug.cgi?id=92114
1740
1741         Reviewed by Kent Tamura.
1742
1743         Added methods to ColorChooserClient so the color chooser can ask the
1744         client for suggestions and current color.
1745
1746         No new tests. The methods are not used yet.
1747
1748         * html/ColorInputType.cpp:
1749         (WebCore::ColorInputType::currentColor): Returns what color the color
1750         chooser should display.
1751         (WebCore):
1752         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
1753         suggestions should be shown.
1754         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
1755         suggested to the user.
1756         * html/ColorInputType.h:
1757         (ColorInputType):
1758         * html/HTMLInputElement.h:
1759         (HTMLInputElement): Made dataList() public.
1760         * platform/ColorChooserClient.h:
1761         (ColorChooserClient):
1762
1763 2012-07-25  Kentaro Hara  <haraken@chromium.org>
1764
1765         Replace int with long in test IDL files
1766         https://bugs.webkit.org/show_bug.cgi?id=92181
1767
1768         Reviewed by Adam Barth.
1769
1770         int is not a valid type in WebIDL. It should be long.
1771         We should replace int with long in bindings/scripts/test/*.idl.
1772         This is a follow-up patch for r123550.
1773
1774         Test: bindings/scripts/test/TestObj.idl
1775
1776         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1777         (WebDOMTestObj::readOnlyLongAttr):
1778         (WebDOMTestObj::Attr):
1779         (WebDOMTestObj::setAttr):
1780         (WebDOMTestObj::voidMethodWithArgs):
1781         (WebDOMTestObj::Method):
1782         (WebDOMTestObj::MethodWithArgs):
1783         (WebDOMTestObj::objMethodWithArgs):
1784         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1785         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1786         (webkit_dom_test_obj_set_property):
1787         (webkit_dom_test_obj_get_property):
1788         (webkit_dom_test_obj_class_init):
1789         (webkit_dom_test_obj_void_method_with_args):
1790         (webkit_dom_test_obj_method):
1791         (webkit_dom_test_obj_method_with_args):
1792         (webkit_dom_test_obj_obj_method_with_args):
1793         (webkit_dom_test_obj_get_read_only_long_attr):
1794         (webkit_dom_test_obj_get_attr):
1795         (webkit_dom_test_obj_set_attr):
1796         (webkit_dom_test_obj_get_strawberry):
1797         (webkit_dom_test_obj_set_strawberry):
1798         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1799         * bindings/scripts/test/JS/JSTestObj.cpp:
1800         (WebCore):
1801         (WebCore::jsTestObjReadOnlyLongAttr):
1802         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1803         (WebCore::jsTestObjAttr):
1804         (WebCore::setJSTestObjAttr):
1805         (WebCore::setJSTestObjStrawberry):
1806         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1807         (WebCore::jsTestObjPrototypeFunctionMethod):
1808         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
1809         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1810         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1811         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1812         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1813         * bindings/scripts/test/JS/JSTestObj.h:
1814         (WebCore):
1815         * bindings/scripts/test/ObjC/DOMTestObj.h:
1816         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1817         (-[DOMTestObj readOnlyLongAttr]):
1818         (-[DOMTestObj Attr]):
1819         (-[DOMTestObj setAttr:]):
1820         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1821         (-[DOMTestObj Method]):
1822         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1823         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1824         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1825         * bindings/scripts/test/TestObj.idl:
1826         * bindings/scripts/test/V8/V8TestObj.cpp:
1827         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1828         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1829         (WebCore::TestObjV8Internal::AttrAttrGetter):
1830         (WebCore::TestObjV8Internal::AttrAttrSetter):
1831         (WebCore::TestObjV8Internal::strawberryAttrSetter):
1832         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1833         (WebCore::TestObjV8Internal::MethodCallback):
1834         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1835         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1836         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1837         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1838         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1839         (WebCore):
1840         (WebCore::ConfigureV8TestObjTemplate):
1841
1842 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
1843
1844         A validation bubble should not be modifiable.
1845         https://bugs.webkit.org/show_bug.cgi?id=92217
1846
1847         Reviewed by Kent Tamura.
1848
1849         A user can set -webkit-user-modify: read-write to validation message elements.
1850         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1851
1852         Test: fast/forms/validation-user-modify.html
1853
1854         * css/html.css:
1855         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1856         changed by a user.
1857         (::-webkit-validation-bubble):
1858         (::-webkit-validation-bubble-message):
1859         (::-webkit-validation-bubble-text-block):
1860         (::-webkit-validation-bubble-heading):
1861         (::-webkit-validation-bubble-arrow):
1862         (::-webkit-validation-bubble-arrow-clipper):
1863
1864 2012-07-25  Zeno Albisser  <zeno@webkit.org>
1865
1866         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1867         https://bugs.webkit.org/show_bug.cgi?id=92159
1868
1869         Disable CopyToTexture feature for GraphicsSurface on Mac.
1870         While this is actually working, it is currently used for Tiles
1871         that are single buffered, and therefore requires a call to glFlush.
1872         This call blocks the GPU for about 40ms which would make smooth animations impossible.
1873
1874         Reviewed by Noam Rosenthal.
1875
1876         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1877         (WebCore::GraphicsSurface::platformCreate):
1878         (WebCore::GraphicsSurface::platformImport):
1879
1880 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
1881
1882         [Chromium] Fix up includes in HarfBuzzNGFace.h
1883         https://bugs.webkit.org/show_bug.cgi?id=92127
1884
1885         Reviewed by Hajime Morita.
1886
1887         Move constructors of FontPlatformData from headers to corresponding cpp files
1888         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1889         This way we can include hb.h in HarfBuzzNGFace.h.
1890
1891         No new tests. No changes in behavior.
1892
1893         * platform/graphics/FontPlatformData.cpp:
1894         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1895         (WebCore):
1896         * platform/graphics/FontPlatformData.h:
1897         (WebCore):
1898         (FontPlatformData): Moved to cpp file.
1899         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1900         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1901         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1902         (WebCore):
1903         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1904         (WebCore):
1905         (FontPlatformData): Moved to cpp file.
1906         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1907
1908 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
1909
1910         QualifiedName's HashSet should be big enough to hold at least all the static names
1911         https://bugs.webkit.org/show_bug.cgi?id=91891
1912
1913         Reviewed by Darin Adler.
1914
1915         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1916         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1917
1918         The small base size forces us to grow and rehash the table several time on startup.
1919
1920         This patch solves the issue by defining the initial table size to the minimum size that
1921         can hold all the static QualifiedName.
1922
1923         * dom/QualifiedName.cpp:
1924         (QualifiedNameHashTraits):
1925         * dom/make_names.pl:
1926         (printNamesHeaderFile):
1927
1928 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1929
1930         Remove anonymous namespace and make functions static.
1931         https://bugs.webkit.org/show_bug.cgi?id=92214
1932
1933         Reviewed by Adam Barth.
1934
1935         Mark functions as static instead of enclosing them in anonymous namespaces.
1936         One exception to this rule is when a function is passed as a template argument.
1937         In this case, the function must have an external linkage.
1938
1939         No functional change. Covered by existing tests.
1940
1941         * html/parser/HTMLConstructionSite.cpp:
1942         (WebCore::hasImpliedEndTag):
1943         (WebCore::causesFosterParenting):
1944         (WebCore::isAllWhitespace):
1945         * html/parser/HTMLDocumentParser.cpp:
1946         (WebCore):
1947         (WebCore::tokenizerStateForContextElement):
1948         * html/parser/HTMLElementStack.cpp:
1949         (WebCore::isNumberedHeaderElement):
1950         (WebCore::isRootNode):
1951         (WebCore):
1952         * html/parser/HTMLEntityParser.cpp:
1953         (WebCore::isAlphaNumeric):
1954         * html/parser/HTMLEntitySearch.cpp:
1955         (WebCore::halfway):
1956         * html/parser/HTMLPreloadScanner.cpp:
1957         (WebCore):
1958         * html/parser/HTMLTokenizer.cpp:
1959         (WebCore::toLowerCase):
1960         (WebCore::vectorEqualsString):
1961         (WebCore::isEndTagBufferingState):
1962         * html/parser/HTMLTreeBuilder.cpp:
1963         (WebCore):
1964         (WebCore::uninitializedPositionValue1):
1965         (WebCore::isAllWhitespace):
1966         (WebCore::isAllWhitespaceOrReplacementCharacters):
1967         (WebCore::isNumberedHeaderTag):
1968         (WebCore::isCaptionColOrColgroupTag):
1969         (WebCore::isTableCellContextTag):
1970         (WebCore::isTableBodyContextTag):
1971         (WebCore::isSpecialNode):
1972         (WebCore::isNonAnchorNonNobrFormattingTag):
1973         (WebCore::isNonAnchorFormattingTag):
1974         (WebCore::isFormattingTag):
1975         (WebCore::closestFormAncestor):
1976         (WebCore::mapLoweredLocalNameToName):
1977         (WebCore::adjustSVGTagNameCase):
1978         (WebCore::adjustAttributes):
1979         (WebCore::adjustSVGAttributes):
1980         (WebCore::adjustMathMLAttributes):
1981         (WebCore::addNamesWithPrefix):
1982         (WebCore::adjustForeignAttributes):
1983
1984 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1985
1986         Unreviewed r123494 follow-up: fixed inspector undock icon.
1987
1988         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1989
1990 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1991
1992         Read tag names and attributes from the saved tokens where possible.
1993         https://bugs.webkit.org/show_bug.cgi?id=92079
1994
1995         Reviewed by Adam Barth.
1996
1997         Read tag names and attributes from the saved tokens, not from the DOM.
1998         Also added convenient methods such as hasLocalName, hasTagName, localName,
1999         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
2000
2001         No new tests, covered by existing tests.
2002
2003         * html/parser/HTMLConstructionSite.cpp:
2004         (WebCore::HTMLNames::hasImpliedEndTag):
2005         (WebCore::HTMLNames::causesFosterParenting):
2006         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
2007         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
2008         (WebCore::HTMLConstructionSite::shouldFosterParent):
2009         * html/parser/HTMLConstructionSite.h:
2010         (WebCore::HTMLConstructionSite::currentStackItem):
2011         * html/parser/HTMLElementStack.cpp:
2012         (WebCore::HTMLNames::isNumberedHeaderElement):
2013         (WebCore::HTMLNames::isRootNode):
2014         (WebCore::HTMLNames::isScopeMarker):
2015         (WebCore::HTMLNames::isListItemScopeMarker):
2016         (WebCore::HTMLNames::isTableScopeMarker):
2017         (WebCore::HTMLNames::isTableBodyScopeMarker):
2018         (WebCore::HTMLNames::isTableRowScopeMarker):
2019         (WebCore::HTMLNames::isForeignContentScopeMarker):
2020         (WebCore::HTMLNames::isButtonScopeMarker):
2021         (WebCore::HTMLNames::isSelectScopeMarker):
2022         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
2023         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
2024         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
2025         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
2026         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
2027         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
2028         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
2029         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
2030         (WebCore::HTMLElementStack::pushRootNode):
2031         (WebCore::HTMLElementStack::oneBelowTop):
2032         (WebCore::HTMLElementStack::topmost):
2033         (WebCore):
2034         (WebCore::inScopeCommon):
2035         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
2036         (WebCore::HTMLElementStack::inScope):
2037         * html/parser/HTMLElementStack.h:
2038         (WebCore::HTMLElementStack::topStackItem):
2039         (HTMLElementStack):
2040         (WebCore::isInHTMLNamespace):
2041         * html/parser/HTMLStackItem.h:
2042         (WebCore::HTMLStackItem::isDocumentFragmentNode):
2043         (WebCore::HTMLStackItem::isElementNode):
2044         (HTMLStackItem):
2045         (WebCore::HTMLStackItem::hasLocalName):
2046         (WebCore::HTMLStackItem::hasTagName):
2047         (WebCore::HTMLStackItem::HTMLStackItem):
2048         * html/parser/HTMLTreeBuilder.cpp:
2049         (WebCore):
2050         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
2051         (WebCore::HTMLTreeBuilder::processFakeEndTag):
2052         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
2053         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2054         (WebCore::HTMLTreeBuilder::processStartTag):
2055         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
2056         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
2057         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2058         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
2059         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
2060         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
2061         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
2062         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
2063         (WebCore::HTMLTreeBuilder::processEndTag):
2064         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2065         (WebCore::HTMLTreeBuilder::processEndOfFile):
2066         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
2067         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2068         * html/parser/HTMLTreeBuilder.h:
2069
2070 2012-07-24  Hironori Bono  <hbono@chromium.org>
2071
2072         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
2073         https://bugs.webkit.org/show_bug.cgi?id=91756
2074
2075         Reviewed by Tony Chang.
2076
2077         My r123067 moves the top-left origin of an RTL element right when its vertical
2078         scrollbar is shown at its left side. (That is, r123067 moves all child objects
2079         in the RTL element right.) This change also increases RenderBox::clientLeft()
2080         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
2081         moves positioned objects in an RTL element right at the same time. This makes
2082         WebKit move objects in an RTL element up to three times by the scrollbar width.
2083         (Moving an absolute object right increases the scrollWidth value and it causes
2084         this bug.) This change removes unnecessary code that moves objects right in my
2085         r109512 and RenderBox::clientLeft().
2086
2087         Test: scrollbars/rtl/div-absolute.html
2088               fast/block/float/026.html
2089               fast/block/float/028.html
2090               fast/overflow/unreachable-overflow-rtl-bug.html
2091
2092         * dom/Element.cpp:
2093         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
2094         * rendering/RenderBlock.cpp:
2095         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
2096         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
2097         * rendering/RenderBox.h:
2098         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
2099
2100 2012-07-24  Dan Bernstein  <mitz@apple.com>
2101
2102         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
2103         https://bugs.webkit.org/show_bug.cgi?id=92202
2104
2105         Reviewed by Beth Dakin.
2106
2107         Test: fast/writing-mode/positionForPoint.html
2108
2109         * rendering/RenderBlock.cpp:
2110         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
2111         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
2112         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
2113         point’s horizontal component; and (2) changed to use logicalTopForChild and
2114         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
2115         and logicalBottom, which are based on the child’s writing mode.
2116
2117 2012-07-24  MORITA Hajime  <morrita@google.com>
2118
2119         https://bugs.webkit.org/show_bug.cgi?id=89179
2120         Rendering LI having Shadow DOM seems weird
2121
2122         Reviewed by Dimitri Glazkov.
2123
2124         This incorrect rendering happend because HTMLLIElement::attach()
2125         wasn't aware of composed shadow subtree. This change makes it
2126         aware of that using ComposedShadowTreeParentWalker.
2127
2128         Test: fast/dom/shadow/shadow-and-list-elements.html
2129
2130         * html/HTMLLIElement.cpp:
2131         (WebCore::HTMLLIElement::attach):
2132
2133 2012-07-24  Alec Flett  <alecflett@chromium.org>
2134
2135         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
2136         https://bugs.webkit.org/show_bug.cgi?id=92167
2137
2138         Reviewed by Tony Chang.
2139
2140         Remove implicit dependencies due to using IDBRequest.h, and fix all
2141         places that break as a result.
2142
2143         * Modules/indexeddb/IDBCallbacks.h:
2144         (WebCore):
2145         * Modules/indexeddb/IDBObjectStore.cpp:
2146         * Modules/indexeddb/IDBRequest.h:
2147         * inspector/InspectorIndexedDBAgent.cpp:
2148
2149 2012-07-24  Keishi Hattori  <keishi@webkit.org>
2150
2151         Move PagePopupClient helper functions so they can be shared
2152         https://bugs.webkit.org/show_bug.cgi?id=92096
2153
2154         Reviewed by Kent Tamura.
2155
2156         Move PagePopupClient helper functions to a separate file,
2157         so they can be shared with new PagePopupClients.
2158
2159         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
2160
2161         * WebCore.gypi: Added PagePopupClient.cpp
2162         * html/shadow/CalendarPickerElement.cpp:
2163         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
2164         * page/PagePopupClient.cpp: Added.
2165         (WebCore):
2166         (WebCore::PagePopupClient::addJavaScriptString):
2167         (WebCore::PagePopupClient::addProperty):
2168         * page/PagePopupClient.h:
2169         (WebCore::PagePopupClient::addString):
2170
2171 2012-07-24  Jer Noble  <jer.noble@apple.com>
2172
2173         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
2174         https://bugs.webkit.org/show_bug.cgi?id=92035
2175
2176         Reviewed by Darin Adler.
2177
2178         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
2179         current media controller.
2180
2181         Test: media/media-controller-playbackrate.html
2182
2183         * html/HTMLMediaElement.cpp:
2184         (WebCore::HTMLMediaElement::updatePlaybackRate):
2185
2186 2012-07-24  Hayato Ito  <hayato@chromium.org>
2187
2188         Rename FocusScope to FocusNavigationScope.
2189         https://bugs.webkit.org/show_bug.cgi?id=92062
2190
2191         Reviewed by Dimitri Glazkov.
2192
2193         FocusNavagationScope is better name than FocusScope since the
2194         class is only used for controlling focus navigation.
2195
2196         No new tests - no functional changes.
2197
2198         * page/FocusController.cpp:
2199         (WebCore::FocusNavigationScope::FocusNavigationScope):
2200         (WebCore::FocusNavigationScope::rootNode):
2201         (WebCore::FocusNavigationScope::owner):
2202         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
2203         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
2204         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
2205         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
2206         (WebCore::FocusController::advanceFocusInDocumentOrder):
2207         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
2208         (WebCore::FocusController::findFocusableNodeRecursively):
2209         (WebCore::FocusController::findFocusableNode):
2210         (WebCore::FocusController::nextFocusableNode):
2211         (WebCore::FocusController::previousFocusableNode):
2212         * page/FocusController.h:
2213         (FocusNavigationScope):
2214         (FocusController):
2215
2216 2012-07-24  Michael Saboff  <msaboff@apple.com>
2217
2218         Convert HTML parser to handle 8-bit resources without converting to UChar*
2219         https://bugs.webkit.org/show_bug.cgi?id=90321
2220
2221         Reviewed by Geoffrey Garen.
2222
2223         No new tests, no new functionality therefore covered by existing tests.
2224
2225         Changed the parsing of HTML to handle 8-bit strings without converting the 
2226         whole string to 16-bits.  Primary change was to use the appropriate 
2227         character pointer type (LChar* or UChar*) depending on the source string.
2228         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
2229         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
2230         and advanceAndUpdateLineNumber() methods have been refactored into a
2231         state machine managed pair of function pointers.  The possible functions
2232         have not only the 8 and 16 bitness factored out, they also have the 
2233         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
2234         This provides a net speed-up even with the 8/16 bit testing.
2235         Other changes involve using String methods to access and compare with the
2236         source data.
2237
2238         * html/FTPDirectoryDocument.cpp:
2239         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
2240         instead of SegmentedString '*' operator.
2241         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
2242         SegmentedString '*' operator.
2243         * html/parser/HTMLParserIdioms.cpp:
2244         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
2245         * html/parser/HTMLSourceTracker.cpp:
2246         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
2247         SegmentedString '*' operator.
2248         * loader/cache/CachedScript.cpp:
2249         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
2250         * platform/text/SegmentedString.cpp:
2251         (WebCore::SegmentedString::SegmentedString):
2252         (WebCore::SegmentedString::operator=):
2253         (WebCore::SegmentedString::clear):
2254         (WebCore::SegmentedString::append):
2255         (WebCore::SegmentedString::prepend):
2256         (WebCore::SegmentedString::advanceSubstring):
2257         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
2258         advance function.
2259         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
2260         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
2261         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
2262         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
2263         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
2264         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
2265         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
2266         8 and 16 bit advance.
2267         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
2268         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
2269         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
2270         * platform/text/SegmentedString.h:
2271         (WebCore::SegmentedSubstring::SegmentedSubstring):
2272         (WebCore::SegmentedSubstring::clear):
2273         (SegmentedSubstring):
2274         (WebCore::SegmentedSubstring::is8Bit): New getter.
2275         (WebCore::SegmentedSubstring::appendTo):
2276         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
2277         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
2278         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
2279         that pre-increments the 8 bit pointer and returns the next character.
2280         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
2281         that pre-increments the 16 bit pointer and returns the next character.
2282         (WebCore::SegmentedSubstring::currentSubString):
2283         (WebCore::SegmentedSubstring::getCurrentChar):
2284         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
2285         (WebCore::SegmentedString::SegmentedString):
2286         (WebCore::SegmentedString::push):
2287         (WebCore::SegmentedString::isEmpty):
2288         (WebCore::SegmentedString::lookAhead):
2289         (WebCore::SegmentedString::lookAheadIgnoringCase):
2290         (WebCore::SegmentedString::advance):
2291         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
2292         (WebCore::SegmentedString::advanceAndASSERT):
2293         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
2294         (WebCore::SegmentedString::advancePastNonNewline):
2295         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
2296         (WebCore::SegmentedString::currentChar):
2297         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
2298         functions.
2299         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
2300         change to slow case functions when only one character left.
2301         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
2302         functions based on current substring.
2303         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
2304         (WebCore::SegmentedString::lookAheadSlowCase):
2305         * xml/parser/CharacterReferenceParserInlineMethods.h:
2306         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
2307         SegmentedString '*' operator.
2308         * xml/parser/MarkupTokenizerBase.h:
2309         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2310         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
2311         currentChar() instead of SegmentedString '*' operator.
2312         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2313
2314 2012-07-24  Kenneth Russell  <kbr@google.com>
2315
2316         [chromium] Hint garbage collector to run if page uses Canvas contexts
2317         https://bugs.webkit.org/show_bug.cgi?id=76225
2318
2319         Reviewed by Kentaro Hara.
2320
2321         Upon creating a canvas context, set a hint in the current isolate
2322         indicating that a full GC should be done upon the next page
2323         navigation.
2324
2325         This improves Chrome's robustness on some WebGL stress tests which
2326         simulate real-world behavior by repeatedly navigating among
2327         several samples. More general measures are being investigated, but
2328         this change makes V8 behave the same as JSC on these stress tests.
2329         JSC doesn't currently use generational garbage collection, so it
2330         has more opportunities to discover unreferenced canvas contexts.
2331
2332         Test: fast/canvas/webgl/context-creation-and-destruction.html
2333
2334         * bindings/v8/V8Binding.cpp:
2335         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
2336             Initialize per-isolate low memory hint.
2337         * bindings/v8/V8Binding.h:
2338         (V8BindingPerIsolateData):
2339         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
2340             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
2341         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
2342             Clear the previously set hint.
2343         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
2344             Get the previously set hint.
2345         * bindings/v8/V8Proxy.cpp:
2346         (WebCore::V8Proxy::hintForGCIfNecessary):
2347             If necessary, send V8 a hint that it should GC.
2348         (WebCore):
2349         (WebCore::V8Proxy::clearForClose):
2350         (WebCore::V8Proxy::clearForNavigation):
2351             Call hintForGCIfNecessary.
2352         * bindings/v8/V8Proxy.h:
2353         (V8Proxy):
2354         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2355         (WebCore::V8HTMLCanvasElement::getContextCallback):
2356             Set a hint that we should GC upon the next page navigation.
2357
2358 2012-07-24  Dave Tu  <dtu@chromium.org>
2359
2360         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
2361         https://bugs.webkit.org/show_bug.cgi?id=90019
2362
2363         Reviewed by Adrienne Walker.
2364
2365         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2366         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2367         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2368         (BitmapCanvasLayerTextureUpdater):
2369         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2370         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
2371         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2372         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
2373         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2374         (Texture):
2375         (BitmapSkPictureCanvasLayerTextureUpdater):
2376         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
2377         (WebCore::CanvasLayerTextureUpdater::paintContents):
2378         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
2379         (CanvasLayerTextureUpdater):
2380         * platform/graphics/chromium/ContentLayerChromium.cpp:
2381         (WebCore::ContentLayerChromium::update):
2382         * platform/graphics/chromium/ContentLayerChromium.h:
2383         (ContentLayerChromium):
2384         * platform/graphics/chromium/ImageLayerChromium.cpp:
2385         (WebCore::ImageLayerChromium::update):
2386         * platform/graphics/chromium/ImageLayerChromium.h:
2387         (ImageLayerChromium):
2388         * platform/graphics/chromium/LayerChromium.h:
2389         (WebCore):
2390         (WebCore::LayerChromium::update):
2391         * platform/graphics/chromium/LayerTextureUpdater.h:
2392         (WebCore):
2393         (WebCore::LayerTextureUpdater::Texture::prepareRect):
2394         (WebCore::LayerTextureUpdater::prepareToUpdate):
2395         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2396         (WebCore::ScrollbarLayerChromium::updatePart):
2397         (WebCore::ScrollbarLayerChromium::update):
2398         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2399         (ScrollbarLayerChromium):
2400         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2401         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2402         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2403         (SkPictureCanvasLayerTextureUpdater):
2404         * platform/graphics/chromium/TiledLayerChromium.cpp:
2405         (WebCore::TiledLayerChromium::updateTiles):
2406         (WebCore::TiledLayerChromium::updateContentRect):
2407         * platform/graphics/chromium/TiledLayerChromium.h:
2408         (TiledLayerChromium):
2409         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2410         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2411         (WebCore::CCLayerTreeHost::updateAnimations):
2412         (WebCore::CCLayerTreeHost::renderingStats):
2413         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2414         (WebCore::CCLayerTreeHost::paintLayerContents):
2415         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2416         (WebCore):
2417         (CCLayerTreeHost):
2418         * platform/graphics/chromium/cc/CCRenderingStats.h:
2419         (CCRenderingStats):
2420         (WebCore::CCRenderingStats::CCRenderingStats):
2421
2422 2012-07-24  Jian Li  <jianli@chromium.org>
2423
2424         [V8] Correct WebIDL type should be used in the testing IDL file 
2425         https://bugs.webkit.org/show_bug.cgi?id=92168
2426
2427         Reviewed by Kentaro Hara.
2428
2429         Updated bindings test.
2430
2431         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2432         (webkit_dom_test_obj_strict_function):
2433         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2434         * bindings/scripts/test/JS/JSTestObj.cpp:
2435         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2436         * bindings/scripts/test/TestObj.idl:
2437         * bindings/scripts/test/V8/V8TestObj.cpp:
2438         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2439         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2440         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
2441         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
2442         (WebCore::TestObjV8Internal::strictFunctionCallback):
2443
2444 2012-07-24  Kent Tamura  <tkent@chromium.org>
2445
2446         Unreviewed, rolling out r123191.
2447         http://trac.webkit.org/changeset/123191
2448         https://bugs.webkit.org/show_bug.cgi?id=91804
2449
2450         It might cause another performance regression.
2451         http://code.google.com/p/chromium/issues/detail?id=138410
2452
2453         * html/FormController.cpp:
2454         (FormKeyGenerator):
2455         (WebCore::createKey):
2456         (WebCore::FormKeyGenerator::formKey):
2457         (WebCore::FormKeyGenerator::willDeleteForm):
2458
2459 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
2460
2461         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
2462         https://bugs.webkit.org/show_bug.cgi?id=90381
2463
2464         Reviewed by Kentaro Hara.
2465
2466         We can remove jsUnsignedLongArrayToVector() implementaion
2467         merging it to current and toNativeArray() traits.
2468
2469         Tests: TestObj.idl
2470         There should be no behavoiral changes as just refactoring.
2471
2472         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
2473         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
2474         * bindings/js/JSDOMBinding.h:
2475         (WebCore::toJSSequence): Moved toJSSequence() to header file.
2476         (WebCore::jsArray): Renamed Traits to JSValueTraits
2477         (WebCore::toNativeArray): Using traits.
2478         * bindings/js/JSDictionary.cpp:
2479         (WebCore::JSDictionary::convertValue):
2480         * bindings/js/JSMessagePortCustom.cpp:
2481         (WebCore::fillMessagePortArray):
2482         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
2483         (AddIncludesForType):
2484         (GenerateParametersCheckExpression):
2485         (JSValueToNative):
2486         (NativeToJSValue):
2487         * bindings/scripts/CodeGeneratorV8.pm:
2488         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
2489         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
2490         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2491         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2492         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2493         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
2494         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
2495         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
2496         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2497         (TestObjV8Internal):
2498         (WebCore::TestObjV8Internal::overloadedMethodCallback):
2499
2500 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2501
2502         Remove an invalid assertion introduced in r123536. Unreviewed.
2503
2504         * xml/parser/MarkupTokenBase.h:
2505         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2506
2507 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2508
2509         Unreviewed, rolling out r123504.
2510         http://trac.webkit.org/changeset/123504
2511         https://bugs.webkit.org/show_bug.cgi?id=92169
2512
2513         broke a bunch of text-related tests in chromium mac debug
2514         (Requested by zhenyao on #webkit).
2515
2516         * platform/text/cf/StringCF.cpp:
2517         (WTF::String::createCFString):
2518         * platform/text/cf/StringImplCF.cpp:
2519         (WTF::StringImpl::createCFString):
2520
2521 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2522
2523         Ensure Noah's ark without reading the DOM tree.
2524         https://bugs.webkit.org/show_bug.cgi?id=92065
2525
2526         Reviewed by Adam Barth.
2527
2528         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
2529         the attributes values, we could get a slightly wrong output here.
2530
2531         Read attributes from tokens saved in the active formatting element list.
2532
2533         No new tests, covered by existing tests.
2534
2535         * html/parser/HTMLFormattingElementList.cpp:
2536         (WebCore::attributeCount):
2537         (WebCore::HTMLFormattingElementList::append):
2538         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2539         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2540         * html/parser/HTMLFormattingElementList.h:
2541         (HTMLFormattingElementList):
2542         * html/parser/HTMLStackItem.h:
2543         (WebCore::HTMLStackItem::localName):
2544         (HTMLStackItem):
2545
2546 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2547
2548         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
2549         https://bugs.webkit.org/show_bug.cgi?id=92056
2550
2551         Reviewed by Adam Barth.
2552
2553         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
2554         characters for performance. Clear the external characters pointer before the raw token
2555         is cleared to make sure that we won't have a dangling pointer.
2556
2557         No new tests - no functional changes.
2558
2559         * html/parser/HTMLTreeBuilder.cpp:
2560         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2561         * xml/parser/MarkupTokenBase.h:
2562         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2563         (AtomicMarkupTokenBase):
2564
2565 2012-07-24  Jian Li  <jianli@chromium.org>
2566
2567         Add per-context setting for html notifications
2568         https://bugs.webkit.org/show_bug.cgi?id=91295
2569
2570         Reviewed by Adam Barth.
2571
2572         Added a new per-context setting to control the enabling of html notifications.
2573         For chromium port, we're going to disable html notifications for web
2574         pages, but still keep it enabled for extensions.
2575
2576         Also enhance V8 code generator to support V8EnabledPerContext attribute
2577         for methods.
2578
2579         Updated the binding tests.
2580
2581         * Modules/notifications/NotificationCenter.cpp:
2582         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
2583         (WebCore):
2584         * Modules/notifications/NotificationCenter.h:
2585         (NotificationCenter):
2586         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
2587         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
2588         (GenerateHeader):
2589         (IsStandardFunction):
2590         (GenerateNonStandardFunction):
2591         (GenerateImplementation):
2592         (GenerateToV8Converters):
2593         (GetContextEnableFunction):
2594         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
2595         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
2596         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
2597         (TestObjV8Internal):
2598         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
2599         (WebCore::V8TestObj::installPerContextProperties):
2600         (WebCore::V8TestObj::wrapSlow):
2601         * dom/ContextFeatures.cpp: Add a new per-context feature.
2602         (WebCore::ContextFeatures::htmlNotificationsEnabled):
2603         (WebCore):
2604         * dom/ContextFeatures.h: Add a new per-context feature.
2605
2606 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2607
2608         Unreviewed, rolling out r123499.
2609         http://trac.webkit.org/changeset/123499
2610         https://bugs.webkit.org/show_bug.cgi?id=92161
2611
2612         Android fails to compile (Requested by zhenyao on #webkit).
2613
2614         * GNUmakefile.list.am:
2615         * Modules/mediastream/MediaStream.cpp:
2616         (WebCore::MediaStream::MediaStream):
2617         (WebCore::MediaStream::addTrack):
2618         * Modules/mediastream/MediaStreamTrack.cpp:
2619         (WebCore::MediaStreamTrack::create):
2620         (WebCore::MediaStreamTrack::MediaStreamTrack):
2621         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2622         (WebCore::MediaStreamTrack::setEnabled):
2623         * Modules/mediastream/MediaStreamTrack.h:
2624         (MediaStreamTrack):
2625         * Modules/mediastream/MediaStreamTrack.idl:
2626         * WebCore.gypi:
2627         * dom/EventNames.h:
2628         (WebCore):
2629         * dom/EventTargetFactory.in:
2630         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2631         (WebKit):
2632         (WebKit::WebMediaStreamDescriptor::sources):
2633         * platform/chromium/support/WebMediaStreamSource.cpp:
2634         * platform/mediastream/MediaStreamSource.cpp: Removed.
2635         * platform/mediastream/MediaStreamSource.h:
2636         (WebCore::MediaStreamSource::create):
2637         (WebCore::MediaStreamSource::muted):
2638         (WebCore::MediaStreamSource::setMuted):
2639         (WebCore::MediaStreamSource::MediaStreamSource):
2640         (MediaStreamSource):
2641         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2642         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2643         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2644
2645 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2646
2647         Crash in RenderTableSection::layoutRows
2648         https://bugs.webkit.org/show_bug.cgi?id=92145
2649
2650         Reviewed by Abhishek Arya.
2651
2652         The crash came from the insertChildNode logic being confused and choosing the wrong
2653         renderer for insertion. This is because after r123159, table anonymous wrappers can
2654         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
2655
2656         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
2657
2658         Test: fast/table/crash-table-section-layoutRows.html
2659
2660         * rendering/RenderObjectChildList.cpp:
2661         (WebCore::RenderObjectChildList::insertChildNode):
2662         Changed the code to always get the right child. There is no justification to not
2663         walking up to the |owner|'s direct child in all cases.
2664
2665 2012-07-24  Tony Chang  <tony@chromium.org>
2666
2667         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
2668         https://bugs.webkit.org/show_bug.cgi?id=92042
2669
2670         Reviewed by Ojan Vafai.
2671
2672         The flexbox spec says that the order property should change the paint order of flex children.
2673         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
2674
2675         No new tests, this is just a refactoring.
2676
2677         * rendering/RenderBlock.cpp:
2678         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
2679         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
2680         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
2681         * rendering/RenderBlock.h:
2682         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
2683
2684 2012-07-24  Anna Cavender  <annacc@chromium.org>
2685
2686         Create SourceBuffer and SourceBufferList objects
2687         https://bugs.webkit.org/show_bug.cgi?id=91771
2688
2689         Reviewed by Eric Carlson.
2690
2691         SourceBuffer and SourceBufferList objects are needed in order to
2692         implement the new object-oriented MediaSource API:
2693         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
2694
2695         No new tests - will be able to test after landing BUGWK91775
2696
2697         Adding new files to build files:
2698         * CMakeLists.txt:
2699         * DerivedSources.cpp:
2700         * DerivedSources.make:
2701         * DerivedSources.pri:
2702         * GNUmakefile.am:
2703         * GNUmakefile.list.am:
2704         * Target.pri:
2705         * WebCore.gyp/WebCore.gyp:
2706         * WebCore.gypi:
2707         * WebCore.vcproj/WebCore.vcproj:
2708         * WebCore.vcproj/WebCoreCommon.vsprops:
2709         * WebCore.vcproj/copyForwardingHeaders.cmd:
2710         * WebCore.xcodeproj/project.pbxproj:
2711
2712         New objects:
2713         * Modules/mediasource/SourceBuffer.cpp: Added.
2714         * Modules/mediasource/SourceBuffer.h: Added.
2715         * Modules/mediasource/SourceBuffer.idl: Added.
2716         * Modules/mediasource/SourceBufferList.cpp: Added.
2717         * Modules/mediasource/SourceBufferList.h: Added.
2718         * Modules/mediasource/SourceBufferList.idl: Added.
2719
2720         New events:
2721         * dom/EventNames.h:
2722         (WebCore):
2723         * dom/EventTarget.h:
2724         (WebCore):
2725         * dom/EventTargetFactory.in:
2726
2727         Object constructors:
2728         * page/DOMWindow.idl:
2729
2730 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
2731
2732         Store the full year in GregorianDateTime
2733         https://bugs.webkit.org/show_bug.cgi?id=92067
2734
2735         Reviewed by Geoffrey Garen.
2736
2737         Use the full year instead of the offset from year 1900 
2738         for the year member variable of GregorianDateTime.
2739
2740         * bridge/qt/qt_runtime.cpp:
2741         (JSC::Bindings::convertValueToQVariant):
2742         (JSC::Bindings::convertQVariantToValue):
2743         * bridge/qt/qt_runtime_qt4.cpp:
2744         (JSC::Bindings::convertValueToQVariant):
2745         (JSC::Bindings::convertQVariantToValue):
2746
2747 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
2748
2749         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
2750         https://bugs.webkit.org/show_bug.cgi?id=90720
2751
2752         Reviewed by Geoffrey Garen.
2753
2754         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
2755         a relatively cheap conversion from WTF::String to CFString.
2756
2757         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
2758         to String::characters().
2759
2760         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
2761
2762         This is covered by existing tests.
2763
2764         * platform/text/cf/StringCF.cpp:
2765         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
2766         * platform/text/cf/StringImplCF.cpp:
2767         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
2768         The allocator creation is now closer to where it is useful.
2769
2770 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2771
2772         [V8] String wrappers should be marked Independent
2773         https://bugs.webkit.org/show_bug.cgi?id=91251
2774
2775         Reviewed by Adam Barth.
2776
2777         Currently V8 String wrappers are not marked Independent.
2778         By marking them Independent, they can be reclaimed by the scavenger GC.
2779         Although I couldn't find a case where this change reduces memory usage,
2780         this change would be important for upcoming changes in string conversion
2781         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
2782
2783         'm_lastStringImpl = 0' in StringCache::remove() is important.
2784         Look at the following code:
2785
2786             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
2787             {
2788                 ...;
2789                 stringCache()->remove(stringImpl);
2790                 wrapper.Dispose();
2791             }
2792
2793             void StringCache::remove(StringImpl* stringImpl)
2794             {
2795                 ...
2796                 if (m_lastStringImpl.get() == stringImpl)
2797                     m_lastStringImpl = 0;
2798             }
2799
2800             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
2801             {
2802                 if (m_lastStringImpl.get() == stringImpl) {
2803                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
2804                 }
2805                 return v8ExternalStringSlow(stringImpl, isolate);
2806             }
2807
2808         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
2809         in v8ExternalString(). This was a cause of the crashes of r122614.
2810
2811         Tests: At the initial commit of this patch (r122614),
2812                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
2813                fast/workers/worker-location.html
2814                Dromaeo/cssquery-jquery.html
2815                Dromaeo/jslib-event-jquery.html
2816                Dromaeo/jslib-style-jquery.html
2817                Dromaeo/jslib-style-prototype.html
2818
2819         * bindings/v8/V8Binding.cpp:
2820         (WebCore::StringCache::remove):
2821         (WebCore::StringCache::v8ExternalStringSlow):
2822
2823 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
2824
2825         MediaStream API: Update MediaStreamTrack to match the specification
2826         https://bugs.webkit.org/show_bug.cgi?id=90180
2827
2828         Reviewed by Adam Barth.
2829
2830         MediaStreamTracks are now required to show the status of the underlying source,
2831         and trigger events when that status changes.
2832
2833         Test: fast/mediastream/MediaStreamTrack.html
2834
2835         * GNUmakefile.list.am:
2836         * Modules/mediastream/MediaStream.cpp:
2837         (WebCore::MediaStream::MediaStream):
2838         (WebCore::MediaStream::addTrack):
2839         * Modules/mediastream/MediaStreamTrack.cpp:
2840         (WebCore::MediaStreamTrack::create):
2841         (WebCore::MediaStreamTrack::MediaStreamTrack):
2842         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2843         (WebCore::MediaStreamTrack::setEnabled):
2844         (WebCore::MediaStreamTrack::readyState):
2845         (WebCore):
2846         (WebCore::MediaStreamTrack::sourceChangedState):
2847         (WebCore::MediaStreamTrack::stop):
2848         (WebCore::MediaStreamTrack::interfaceName):
2849         (WebCore::MediaStreamTrack::scriptExecutionContext):
2850         (WebCore::MediaStreamTrack::eventTargetData):
2851         (WebCore::MediaStreamTrack::ensureEventTargetData):
2852         * Modules/mediastream/MediaStreamTrack.h:
2853         * Modules/mediastream/MediaStreamTrack.idl:
2854         * WebCore.gypi:
2855         * dom/EventNames.h:
2856         (WebCore):
2857         * dom/EventTargetFactory.in:
2858         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2859         * platform/chromium/support/WebMediaStreamSource.cpp:
2860         (WebKit::WebMediaStreamSource::setReadyState):
2861         (WebKit):
2862         (WebKit::WebMediaStreamSource::readyState):
2863         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2864         (WebCore):
2865         (WebCore::MediaStreamSource::create):
2866         (WebCore::MediaStreamSource::MediaStreamSource):
2867         (WebCore::MediaStreamSource::setReadyState):
2868         (WebCore::MediaStreamSource::addObserver):
2869         (WebCore::MediaStreamSource::removeObserver):
2870         * platform/mediastream/MediaStreamSource.h:
2871         (Observer):
2872         (WebCore::MediaStreamSource::Observer::~Observer):
2873         (MediaStreamSource):
2874         (WebCore::MediaStreamSource::readyState):
2875         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2876         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2877         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2878
2879 2012-07-24  Scott Graham  <scottmg@chromium.org>
2880
2881         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2882         https://bugs.webkit.org/show_bug.cgi?id=91667
2883
2884         Reviewed by Tony Chang.
2885
2886         Using native tools instead of cygwin version improves build time
2887         performance by roughly 50% (on top of previous cl-instead-of-gcc
2888         change).
2889
2890         Also, use - instead of / for cl flags, otherwise preprocessing fails
2891         very slowly (due to retry loop). And, replace \ with / in gperf
2892         command line. Without this, gperf emits the filename literally in
2893         #line directives which causes VS to error with "unescaped \ in
2894         string". Bizarrely, building ColorData.cpp with those \ in place
2895         causes the IDE to exit with no error message, which was the cause of
2896         the previous canary failures.
2897
2898         No new tests.
2899
2900         * WebCore.gyp/WebCore.gyp:
2901         * WebCore.gyp/scripts/rule_bison.py:
2902         * bindings/scripts/preprocessor.pm:
2903         (applyPreprocessor):
2904         * make-hash-tools.pl:
2905
2906 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
2907
2908         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2909         https://bugs.webkit.org/show_bug.cgi?id=91702
2910
2911         Reviewed by Jian Li.
2912
2913         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2914         pages from being able to detect what applications a user has installed indirectly through
2915         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2916         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2917         from an user action.
2918
2919         * fileapi/File.cpp:
2920         (WebCore::getContentTypeFromFileName):
2921         (WebCore::createBlobDataForFile):
2922         (WebCore::createBlobDataForFileWithName):
2923         (WebCore::createBlobDataForFileWithMetadata):
2924         (WebCore::File::createWithRelativePath):
2925         (WebCore::File::File):
2926         * fileapi/File.h:
2927         (File):
2928         (WebCore::File::create):
2929         (WebCore::File::createWithName):
2930         * html/FileInputType.cpp:
2931         (WebCore::FileInputType::createFileList):
2932         * platform/chromium/ChromiumDataObject.cpp:
2933         (WebCore::ChromiumDataObject::addFilename):
2934         * platform/gtk/ClipboardGtk.cpp:
2935         (WebCore::ClipboardGtk::files):
2936         * platform/mac/ClipboardMac.mm:
2937         (WebCore::ClipboardMac::files):
2938         * platform/qt/ClipboardQt.cpp:
2939         (WebCore::ClipboardQt::files):
2940         * platform/win/ClipboardWin.cpp:
2941         (WebCore::ClipboardWin::files):
2942
2943 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
2944
2945         Web Inspector: Snippets UI polish
2946         https://bugs.webkit.org/show_bug.cgi?id=92142
2947
2948         Reviewed by Pavel Feldman.
2949
2950         Changed snippets context menu items.
2951         Added run snippet status bar button.
2952         Removed unused edit source button.
2953
2954         * English.lproj/localizedStrings.js:
2955         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2956         * inspector/front-end/ScriptSnippetModel.js:
2957         (WebInspector.SnippetJavaScriptSourceFrame):
2958         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2959         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2960         * inspector/front-end/ScriptsNavigator.js:
2961         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2962         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2963         * inspector/front-end/ScriptsPanel.js:
2964         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2965         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2966         * inspector/front-end/SourceFrame.js:
2967         (WebInspector.SourceFrame.prototype.statusBarItems):
2968         * inspector/front-end/inspector.css:
2969         * inspector/front-end/scriptsPanel.css:
2970         (.evaluate-snippet-status-bar-item .glyph):
2971         (.evaluate-snippet-status-bar-item.toggled .glyph):
2972
2973 2012-07-24  Nico Weber  <thakis@chromium.org>
2974
2975         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2976         https://bugs.webkit.org/show_bug.cgi?id=92129
2977
2978         Reviewed by Adam Barth.
2979
2980         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2981         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2982         but this block was forgotten. Since it just confused me for a bit, remove it.
2983
2984         * WebCore.gyp/WebCore.gyp:
2985
2986 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2987
2988         inline-table wrapper should be generated for display: inline element only
2989         https://bugs.webkit.org/show_bug.cgi?id=92054
2990
2991         Reviewed by Abhishek Arya.
2992
2993         CSS 2.1 only takes into account the display when determining if we should generate
2994         an inline-table. My misreading of the spec would make us generate an inline-table
2995         wrapper for any inline formatting context.
2996
2997         Test: fast/table/inline-block-generates-table-wrapper.html
2998
2999         * rendering/RenderTable.cpp:
3000         (WebCore::RenderTable::createAnonymousWithParentRenderer):
3001         Changed to use display instead of isInline to properly match the spec.
3002
3003 2012-07-24  Alec Flett  <alecflett@chromium.org>
3004
3005         IndexedDB: Temporarily continue generating backend keys for empty key lists
3006         https://bugs.webkit.org/show_bug.cgi?id=92012
3007
3008         Reviewed by Tony Chang.
3009
3010         Temporarily change key behavior to allow chromium in_process_webkit
3011         to call putWithIndexKeys without inadvertently preventing index
3012         key generation. Note this is temporary until frontend key generation
3013         patch lands.
3014
3015         No new tests, this is part of a refactor that doesn't change behavior.
3016
3017         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3018         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3019
3020 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
3021
3022         Web Inspector: introduce UISourceCodeFrame.
3023         https://bugs.webkit.org/show_bug.cgi?id=92124
3024
3025         Reviewed by Vsevolod Vlasov.
3026
3027         Generic implementation of SourceFrame over UISourceCode added.
3028
3029         * WebCore.gypi:
3030         * WebCore.vcproj/WebCore.vcproj:
3031         * inspector/compile-front-end.py:
3032         * inspector/front-end/ScriptsPanel.js:
3033         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
3034         * inspector/front-end/StylesPanel.js:
3035         * inspector/front-end/UISourceCodeFrame.js: Added.
3036         (WebInspector.UISourceCodeFrame):
3037         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
3038         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
3039         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
3040         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
3041         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
3042         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
3043         * inspector/front-end/WebKit.qrc:
3044         * inspector/front-end/inspector.html:
3045
3046 2012-07-24  Dan Bernstein  <mitz@apple.com>
3047
3048         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
3049         https://bugs.webkit.org/show_bug.cgi?id=92115
3050
3051         Reviewed by Mark Rowe.
3052
3053         * platform/Scrollbar.cpp:
3054         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
3055
3056 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
3057
3058         Another prospective build fix for Chromium. Unreviewed.
3059
3060         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
3061
3062 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
3063
3064         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
3065
3066         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
3067
3068 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
3069
3070         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
3071         https://bugs.webkit.org/show_bug.cgi?id=92103
3072
3073         Reviewed by Philippe Normand.
3074
3075         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
3076         here since the forward declarations are conflicting with the harfbuzz version
3077         we will use for EFL.
3078
3079         No new tests, no change in behavior.
3080
3081         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
3082
3083 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3084
3085         Fix blend filter for autovectorizing
3086         https://bugs.webkit.org/show_bug.cgi?id=91398
3087
3088         Reviewed by Nikolas Zimmermann.
3089
3090         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
3091         did not do boundary-checks in the inner loop. Finally the integer division by 255
3092         was optimized not use integer division intrinsics.
3093
3094         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
3095
3096         * platform/graphics/filters/FEBlend.cpp:
3097         (WebCore::fastDivideBy255):
3098         (BlendNormal):
3099         (WebCore::BlendNormal::apply):
3100         (BlendMultiply):
3101         (WebCore::BlendMultiply::apply):
3102         (BlendScreen):
3103         (WebCore::BlendScreen::apply):
3104         (BlendDarken):
3105         (WebCore::BlendDarken::apply):
3106         (BlendLighten):
3107         (WebCore::BlendLighten::apply):
3108         (BlendUnknown):
3109         (WebCore::BlendUnknown::apply):
3110         (WebCore::platformApply):
3111         (WebCore::FEBlend::platformApplyGeneric):
3112         (WebCore::FEBlend::platformApplySoftware):
3113         * platform/graphics/filters/FEBlend.h:
3114         (FEBlend):
3115
3116 2012-07-23  Hans Wennborg  <hans@chromium.org>
3117
3118         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
3119         https://bugs.webkit.org/show_bug.cgi?id=91743
3120
3121         Reviewed by Adam Barth.
3122
3123         Implement the 'emma' attribute as described in the spec draft at
3124         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
3125
3126         Test: fast/speech/scripted/emma.html
3127
3128         * Modules/speech/SpeechRecognitionResult.cpp:
3129         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
3130         (WebCore):
3131         (WebCore::SpeechRecognitionResult::emma):
3132         * Modules/speech/SpeechRecognitionResult.h:
3133         (WebCore):
3134         (SpeechRecognitionResult):
3135         * Modules/speech/SpeechRecognitionResult.idl:
3136         * WebCore.gypi:
3137         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
3138         (WebCore):
3139         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
3140           We need to add an implicit reference from the result object to the
3141           emma object to keep the latters DOM tree alive across
3142           garbage-collection.
3143
3144 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
3145
3146         Web Inspector: Protocol Extension: add getFlowByName command
3147         https://bugs.webkit.org/show_bug.cgi?id=91855
3148
3149         Reviewed by Pavel Feldman.
3150
3151         The "getFlowByName" command should return a NamedFlow for a given document and name.
3152
3153         Test: inspector/styles/protocol-css-regions-commands.html
3154
3155         * inspector/Inspector.json:
3156         * inspector/InspectorCSSAgent.cpp:
3157         (WebCore::InspectorCSSAgent::getFlowByName):
3158         (WebCore):
3159         * inspector/InspectorCSSAgent.h:
3160         (InspectorCSSAgent):
3161         * inspector/front-end/CSSStyleModel.js:
3162         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
3163         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
3164         (WebInspector.NamedFlow):
3165         (WebInspector.NamedFlow.parsePayload):
3166
3167 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
3168
3169         [Qt] Fix compilation against namespaced Qt
3170
3171         Reviewed by Simon Hausmann.
3172
3173         * platform/graphics/Font.h:
3174         * platform/network/ResourceHandleInternal.h:
3175         * platform/qt/ThirdPartyCookiesQt.h:
3176
3177 2012-07-24  Anthony Scian  <ascian@rim.com>
3178
3179         Web Inspector [JSC]: Enable initiator column in network panel.
3180         https://bugs.webkit.org/show_bug.cgi?id=65533
3181
3182         Reviewed by Vsevolod Vlasov.
3183
3184         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
3185         Removed references to it since the optionality is no longer required.
3186
3187         Test: http/tests/inspector/network/network-initiator.html
3188
3189         * inspector/front-end/NetworkPanel.js:
3190         (WebInspector.NetworkLogView.prototype._createTable):
3191         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
3192         (WebInspector.NetworkLogView.prototype.switchToBriefView):
3193         (WebInspector.NetworkDataGridNode.prototype.createCells):
3194         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
3195         * inspector/front-end/Settings.js:
3196
3197 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3198
3199         Missing *explicit* keyword in dom and page.
3200         https://bugs.webkit.org/show_bug.cgi?id=92074
3201
3202         Reviewed by Kentaro Hara.
3203
3204         Some constructors missed to use *explicit* keyword. They need to be added
3205         *explicit* keyword to contructor which has a parameter in order to avoid
3206         implicit type conversion.
3207
3208         Some files in dom directory can't use explicit keyword because of build breaks.
3209
3210         No new tests. Covered by existing tests.
3211
3212         * dom/BeforeLoadEvent.h:
3213         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
3214         * dom/BeforeTextInsertedEvent.h:
3215         (BeforeTextInsertedEvent):
3216         * dom/ChildListMutationScope.h:
3217         (WebCore::ChildListMutationScope::ChildListMutationScope):
3218         * dom/ChildNodeList.h:
3219         (ChildNodeList):
3220         * dom/ClientRect.h:
3221         (ClientRect):
3222         * dom/ClientRectList.h:
3223         (ClientRectList):
3224         * dom/ComposedShadowTreeWalker.h:
3225         (ComposedShadowTreeParentWalker):
3226         * dom/DOMCoreException.h:
3227         (WebCore::DOMCoreException::DOMCoreException):
3228         * dom/DOMImplementation.h:
3229         (DOMImplementation):
3230         * dom/DatasetDOMStringMap.h:
3231         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
3232         * dom/DeviceMotionController.h:
3233         (DeviceMotionController):
3234         * dom/DeviceOrientationController.h:
3235         (DeviceOrientationController):
3236         * dom/DocumentParser.h:
3237         (DocumentParser):
3238         * dom/EventException.h:
3239         (WebCore::EventException::EventException):
3240         * dom/EventListener.h:
3241         (WebCore::EventListener::EventListener):
3242         * dom/ExceptionBase.h:
3243         (ExceptionBase):
3244         * dom/GenericEventQueue.h:
3245         (GenericEventQueue):
3246         * dom/KeyboardEvent.h:
3247         (WebCore::KeypressCommand::KeypressCommand):
3248         * dom/MemoryInstrumentation.h:
3249         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
3250         * dom/MessageChannel.h:
3251         (MessageChannel):
3252         * dom/MessagePort.h:
3253         (MessagePort):
3254         * dom/MessagePortChannel.h:
3255         (MessagePortChannel):
3256         * dom/MutationObserver.h:
3257         * dom/NamedNodeMap.h:
3258         (WebCore::NamedNodeMap::NamedNodeMap):
3259         * dom/NodeFilter.h:
3260         (WebCore::NodeFilter::NodeFilter):
3261         * dom/NodeWithIndex.h:
3262         (WebCore::NodeWithIndex::NodeWithIndex):
3263         * dom/Range.h:
3264         * dom/RangeException.h:
3265         (WebCore::RangeException::RangeException):
3266         * dom/RawDataDocumentParser.h:
3267         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
3268         * dom/ScriptRunner.h:
3269         (ScriptRunner):
3270         * dom/SelectorQuery.h:
3271         (SelectorQuery):
3272         * dom/ShadowRoot.h:
3273         (ShadowRoot):
3274         * dom/SpaceSplitString.h:
3275         (SpaceSplitStringData):
3276         * dom/StaticHashSetNodeList.h:
3277         (StaticHashSetNodeList):
3278         * dom/StaticNodeList.h:
3279         (WebCore::StaticNodeList::StaticNodeList):
3280         * dom/TransformSource.h:
3281         (TransformSource):
3282         * dom/TreeScope.h:
3283         (TreeScope):
3284         * dom/WebKitNamedFlowCollection.h:
3285         (WebKitNamedFlowCollection):
3286         * page/EventHandler.h:
3287         (EventHandler):
3288         * page/FocusController.h:
3289         (FocusController):
3290         * page/FrameView.h:
3291         (FrameView):
3292         * page/MemoryInfo.h:
3293         (MemoryInfo):
3294         * page/Page.h:
3295         (Page):
3296         * page/PageGroup.h:
3297         (PageGroup):
3298         * page/PrintContext.h:
3299         (PrintContext):
3300         * page/Settings.h:
3301         (Settings):
3302         * page/SpeechInput.h:
3303         (SpeechInput):
3304         * page/SpeechInputResultList.h:
3305         (SpeechInputResultList):
3306         * page/WebKitAnimation.h:
3307         * page/WindowFeatures.h:
3308         (WindowFeatures):
3309         * page/WorkerNavigator.h:
3310         (WorkerNavigator):
3311
3312 2012-07-24  Kent Tamura  <tkent@chromium.org>
3313
3314         Replace some callsites of shadowAncestorNode() with shadowHost()
3315         https://bugs.webkit.org/show_bug.cgi?id=92060
3316
3317         Reviewed by Hajime Morita.
3318
3319         shadowAncestorNode() is deprecated.
3320
3321         No new tests. This shouldn't change behaviors.
3322
3323         * html/shadow/MediaControlElements.cpp:
3324         (WebCore::toParentMediaElement):
3325         * html/shadow/TextControlInnerElements.h:
3326         (WebCore::SpinButtonElement::isEnabledFormControl):
3327         (WebCore::SpinButtonElement::isReadOnlyFormControl):
3328         * platform/efl/RenderThemeEfl.cpp:
3329         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
3330         (WebCore::RenderThemeEfl::paintMediaMuteButton):
3331         * platform/gtk/RenderThemeGtk.cpp:
3332         (WebCore::getMediaElementFromRenderObject):
3333         (WebCore::centerRectVerticallyInParentInputElement):
3334         * platform/qt/RenderThemeQt.cpp:
3335         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
3336         (WebCore::RenderThemeQt::paintMediaSliderThumb):
3337         Removed an ASSERT() because nullness of o->node() is already asserted.
3338         * rendering/RenderInputSpeech.cpp:
3339         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
3340         * rendering/RenderMediaControlsChromium.cpp:
3341         (WebCore::paintMediaSliderThumb):
3342         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
3343         (WebCore::paintMediaVolumeSliderThumb): ditto.
3344         * rendering/RenderThemeChromiumSkia.cpp:
3345         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
3346         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
3347         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
3348         * rendering/RenderThemeMac.mm:
3349         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3350         Remove an ASSERT(input) because input never be null unless o->node() is
3351         null. If o->node() is null, this function crashes.
3352         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
3353         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3354         (WebCore::RenderThemeMac::paintMediaMuteButton):
3355         It's ok to ignore "node is a media element" case because this function
3356         works only if node->isMediaControlElement().
3357         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
3358         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
3359         * rendering/RenderThemeSafari.cpp:
3360         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
3361         Remove an ASSERT(input) because input never be null unless o->node() is
3362         null. If o->node() is null, this function crashes.
3363         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
3364         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
3365         * rendering/RenderThemeWinCE.cpp:
3366         (WebCore::mediaElementParent):
3367
3368 2012-07-24  Peter Beverloo  <peter@chromium.org>
3369
3370         [Chromium] Build fix for Android after r123424
3371         https://bugs.webkit.org/show_bug.cgi?id=92082
3372
3373         Unreviewed build fix.
3374
3375         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
3376         in r123424, while there still are two references left to another method and a
3377         constant. Re-add the include directive.
3378
3379         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3380
3381 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3382
3383         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
3384         for static attributes in supplemental IDL files
3385         https://bugs.webkit.org/show_bug.cgi?id=91925
3386
3387         Reviewed by Adam Barth.
3388
3389         r122912 implemented static attributes in CodeGeneratorJS.pm.
3390         However, it generates wrong code for static attributes in supplemental
3391         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
3392         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
3393
3394         Test: bindings/scripts/test/TestSupplemental.idl
3395
3396         * bindings/scripts/CodeGeneratorJS.pm:
3397         (GenerateImplementation):
3398         * bindings/scripts/test/JS/JSTestInterface.cpp:
3399         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3400         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3401         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3402
3403 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3404
3405         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
3406         https://bugs.webkit.org/show_bug.cgi?id=92064
3407
3408         Reviewed by Kentaro Hara.
3409
3410         Some constructors missed to use *explicit* keyword. They need to be added
3411         *explicit* keyword to contructor which has a parameter in order to avoid
3412         implicit type conversion.
3413
3414         No new tests. Covered by existing tests.
3415
3416         * bridge/IdentifierRep.h:
3417         (WebCore::IdentifierRep::IdentifierRep):
3418         * history/BackForwardListImpl.h:
3419         (BackForwardListImpl):
3420         * history/CachedFrame.h:
3421         (CachedFrame):
3422         * history/HistoryItem.h:
3423         (HistoryItem):
3424         * loader/DocumentWriter.h:
3425         (DocumentWriter):
3426         * loader/FrameNetworkingContext.h:
3427         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
3428         * loader/HistoryController.h:
3429         * loader/ImageLoader.h:
3430         (ImageLoader):
3431         * loader/LinkLoader.h:
3432         (LinkLoader):
3433         * loader/MainResourceLoader.h:
3434         (MainResourceLoader):
3435         * loader/NavigationAction.h:
3436         (NavigationAction):
3437         * loader/NavigationScheduler.h:
3438         (NavigationScheduler):
3439         * loader/PolicyChecker.h:
3440         (PolicyChecker):
3441         * loader/SubframeLoader.h:
3442         (SubframeLoader):
3443         * loader/ThreadableLoaderClientWrapper.h:
3444         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
3445         * plugins/PluginData.h:
3446         (PluginData):
3447         * plugins/PluginViewBase.h:
3448         (WebCore::PluginViewBase::PluginViewBase):
3449
3450 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
3451